diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/glshape.h | 3 | ||||
-rw-r--r-- | include/shape.h | 26 | ||||
-rw-r--r-- | include/texture.h | 1 |
3 files changed, 24 insertions, 6 deletions
diff --git a/include/glshape.h b/include/glshape.h index bb0bdb3..c2e8b59 100644 --- a/include/glshape.h +++ b/include/glshape.h @@ -11,10 +11,10 @@ namespace mogltk { class glshape : public shape { public: virtual void pixel(int x, int y, ColorP = WHITE); - virtual void fdraw(fill *, ColorP = WHITE); virtual void box(int x1, int y1, int x2, int y2, ColorP = WHITE); virtual void box3d(int x1, int y1, int x2, int y2, ColorP = DOS_WHITE, ColorP = DOS_HIGH_WHITE, ColorP = DOS_GRAY, int = 2, bool = false); virtual void box(int x1, int y1, int x2, int y2, ColorP, ColorP, ColorP, ColorP); + virtual void obox(int x1, int y1, int x2, int y2, ColorP = DOS_WHITE); virtual void obox(int x1, int y1, int x2, int y2, ColorP, ColorP, ColorP, ColorP); virtual void hline(int x1, int x2, int y, ColorP, ColorP); virtual void vline(int x, int y1, int y2, ColorP, ColorP); @@ -22,6 +22,7 @@ namespace mogltk { virtual void tbox(texture *, int x1, int y1, int x2, int y2, int tx1, int ty1, int tx2, int ty2, ColorP = WHITE); virtual void tbox(texture *, int x1, int y1, int x2, int y2, ColorP, ColorP, ColorP, ColorP, int tx = 0, int ty = 0, double = 1.0); virtual void tbox(texture *, int x1, int y1, int x2, int y2, ColorP, ColorP, ColorP, ColorP, int tx1, int ty1, int tx2, int ty2); + virtual void fdraw(fill * f, ColorP = WHITE, int sx = 0, int sy = 0); private: bool Enter(bool); virtual bool Enter(); diff --git a/include/shape.h b/include/shape.h index e06115e..6bbf94e 100644 --- a/include/shape.h +++ b/include/shape.h @@ -24,10 +24,13 @@ namespace mogltk { virtual ~fill(); void walk(fillwalker *); void insert(int, int); - int GetMinX(); - int GetMinY(); - int GetMaxX(); - int GetMaxY(); + int GetMinX() const; + int GetMinY() const; + int GetMaxX() const; + int GetMaxY() const; + texture * GetTexture(); + texture * Talloc(); + Color last; private: class sline : public Base { public: @@ -59,6 +62,7 @@ namespace mogltk { friend class point; }; int minX, minY, maxX, maxY; + texture * cached; protected: sline * header; friend class sline; @@ -69,7 +73,7 @@ namespace mogltk { virtual void circle(int x, int y, int r, ColorP = WHITE); virtual void pcircle(int x, int y, int r, ColorP = WHITE); virtual fill * fcircle(int x, int y, int r); - virtual void fdraw(fill *, ColorP = WHITE); + virtual void fdraw(fill *, ColorP = WHITE, int sx = 0, int sy = 0); virtual void arc(int x, int y, int r, double a1, double a2, ColorP = DOS_WHITE); virtual void arc(int x, int y, int r, int x1, int y1, int x2, int y2, ColorP = DOS_WHITE); virtual void box(int x1, int y1, int x2, int y2, ColorP = DOS_WHITE); @@ -109,6 +113,18 @@ namespace mogltk { virtual bool Enter(); virtual void Leave(bool); }; + + class filldrawer : public fillwalker { + public: + filldrawer(fill *, texture *, ColorP = DOS_WHITE); + virtual ~filldrawer(); + virtual void step(int x, int y); + private: + fill * f; + texture * t; + ColorP c; + int oldx, oldy; + }; }; #endif diff --git a/include/texture.h b/include/texture.h index 4f14ba4..b558694 100644 --- a/include/texture.h +++ b/include/texture.h @@ -15,6 +15,7 @@ namespace mogltk { virtual ~texture(); SDL_Surface * GetSurface(); Uint32 * GetPixels(); + SDL_PixelFormat * GetFormat(); static SDL_Surface * LoadNTEX(Handle * h) throw (GeneralException) ; void Generate(); void Bind(bool = true); |