aboutsummaryrefslogtreecommitdiff
path: root/engines/toltecs/segmap.h
diff options
context:
space:
mode:
authorBenjamin Haisch2008-09-20 19:06:41 +0000
committerWillem Jan Palenstijn2011-11-20 22:43:06 +0100
commit7b97e8cd9370095b999b22371c1aef606a8464a1 (patch)
tree5b498423cef9e27432934da0b19794fbc1f2c038 /engines/toltecs/segmap.h
parent37a5f9e9ef9039808b225f598d02c1c48bc9fa95 (diff)
downloadscummvm-rg350-7b97e8cd9370095b999b22371c1aef606a8464a1.tar.gz
scummvm-rg350-7b97e8cd9370095b999b22371c1aef606a8464a1.tar.bz2
scummvm-rg350-7b97e8cd9370095b999b22371c1aef606a8464a1.zip
TOLTECS: A lot of changes in the graphics code:
- Optimized drawing code; now only items (sprites, text, screen masks) which have changed from the previous frame are redrawn, this speeds up things a lot - Implemented dirty rectangles using a microtile array - The previously committed Microtile Array implementation from SEL seemed buggy so I wrote my own version which works nicely so far (and is less code and GPL), only MicroTileArray::getRectangles uses parts from the old version, this will be changed later - One known bug related to dirty rectangles remains: Sometimes the background isn't restored correctly and gfx artifacts are visible
Diffstat (limited to 'engines/toltecs/segmap.h')
-rw-r--r--engines/toltecs/segmap.h19
1 files changed, 8 insertions, 11 deletions
diff --git a/engines/toltecs/segmap.h b/engines/toltecs/segmap.h
index 6c20eac431..77ab247c72 100644
--- a/engines/toltecs/segmap.h
+++ b/engines/toltecs/segmap.h
@@ -56,6 +56,13 @@ struct ScriptWalk {
int16 scaling;
};
+struct SegmapMaskRect {
+ int16 x, y;
+ int16 width, height;
+ int16 priority;
+ Graphics::Surface *surface;
+};
+
class SegmentMap {
public:
SegmentMap(ToltecsEngine *vm);
@@ -71,21 +78,11 @@ public:
int8 getScalingAtPoint(int16 x, int16 y);
void getRgbModifiertAtPoint(int16 x, int16 y, int16 id, byte &r, byte &g, byte &b);
- void restoreMasksBySprite(SpriteDrawItem *sprite);
- void restoreMask(int16 index);
-
- void debugDrawRects(Graphics::Surface *surf);
+ void addMasksToRenderQueue();
//protected:
public: // for debugging purposes
- struct SegmapMaskRect {
- int16 x, y;
- int16 width, height;
- int16 priority;
- Graphics::Surface *surface;
- };
-
struct SegmapPathRect {
int16 x1, y1, x2, y2;
};