diff options
author | Travis Howell | 2007-05-15 13:01:36 +0000 |
---|---|---|
committer | Travis Howell | 2007-05-15 13:01:36 +0000 |
commit | 73749ddafa03c2b6af87cfe63a30a66333c3bb90 (patch) | |
tree | 14b4eef88ef7dac04751b434d516e2fdc9fb05c0 /engines | |
parent | dc9d36ea4a56aaa285de2059ad34120d549c0831 (diff) | |
download | scummvm-rg350-73749ddafa03c2b6af87cfe63a30a66333c3bb90.tar.gz scummvm-rg350-73749ddafa03c2b6af87cfe63a30a66333c3bb90.tar.bz2 scummvm-rg350-73749ddafa03c2b6af87cfe63a30a66333c3bb90.zip |
Minor cleanup.
svn-id: r26845
Diffstat (limited to 'engines')
-rw-r--r-- | engines/agos/agos.h | 4 | ||||
-rw-r--r-- | engines/agos/draw.cpp | 6 | ||||
-rw-r--r-- | engines/agos/gfx.cpp | 2 | ||||
-rw-r--r-- | engines/agos/script_e1.cpp | 10 | ||||
-rw-r--r-- | engines/agos/script_s1.cpp | 10 | ||||
-rw-r--r-- | engines/agos/script_s2.cpp | 12 | ||||
-rw-r--r-- | engines/agos/vga.cpp | 5 | ||||
-rw-r--r-- | engines/agos/vga.h | 2 | ||||
-rw-r--r-- | engines/agos/vga_s1.cpp | 2 |
9 files changed, 27 insertions, 26 deletions
diff --git a/engines/agos/agos.h b/engines/agos/agos.h index e39c7a4540..f2445d3680 100644 --- a/engines/agos/agos.h +++ b/engines/agos/agos.h @@ -788,7 +788,7 @@ protected: void loadZone(uint zoneNum); - void animate(uint windowNum, uint zoneNum, uint vgaSpriteId, uint x, uint y, uint palette, bool vgaScript = false); + void animate(uint16 windowNum, uint16 zoneNum, uint16 vgaSpriteId, int16 x, int16 y, uint16 palette, bool vgaScript = false); void setImage(uint16 vga_res_id, bool vgaScript = false); void setWindowImage(uint16 mode, uint16 vga_res_id); void setWindowImageEx(uint16 mode, uint16 vga_res); @@ -1044,7 +1044,7 @@ public: protected: bool drawImage_clip(VC10_state *state); - void drawImage_init(int16 image, uint16 palette, uint16 x, uint16 y, uint16 flags); + void drawImage_init(int16 image, uint16 palette, int16 x, int16 y, uint16 flags); virtual void drawImage(VC10_state *state); void drawBackGroundImage(VC10_state *state); diff --git a/engines/agos/draw.cpp b/engines/agos/draw.cpp index afc879a839..d5345c9071 100644 --- a/engines/agos/draw.cpp +++ b/engines/agos/draw.cpp @@ -258,19 +258,19 @@ void AGOSEngine::restoreBackGround() { AnimTable *animTableTmp; animTable = animTableTmp = _screenAnim1; - while (animTable->srcPtr != 0) { + while (animTable->srcPtr) { if (!(animTable->window & 8000)) { memcpy(animTableTmp, animTable, sizeof(AnimTable)); animTableTmp++; } animTable++; } - animTableTmp->id = 0; + animTableTmp->srcPtr = 0; } } void AGOSEngine::saveBackGround(VgaSprite *vsp) { - if ((vsp->flags & 4) || !vsp->image) + if ((vsp->flags & kDFSkipStoreBG) || !vsp->image) return; AnimTable *animTable = _screenAnim1; diff --git a/engines/agos/gfx.cpp b/engines/agos/gfx.cpp index 79999aa65b..87f0fb2d88 100644 --- a/engines/agos/gfx.cpp +++ b/engines/agos/gfx.cpp @@ -981,7 +981,7 @@ void AGOSEngine::paletteFadeOut(byte *palPtr, uint num, uint size) { } while (--num); } -void AGOSEngine::animate(uint windowNum, uint zoneNum, uint vgaSpriteId, uint x, uint y, uint palette, bool vgaScript) { +void AGOSEngine::animate(uint16 windowNum, uint16 zoneNum, uint16 vgaSpriteId, int16 x, int16 y, uint16 palette, bool vgaScript) { VgaSprite *vsp; VgaPointersEntry *vpe; byte *p, *pp; diff --git a/engines/agos/script_e1.cpp b/engines/agos/script_e1.cpp index 53479b2c24..72ca9c3ce3 100644 --- a/engines/agos/script_e1.cpp +++ b/engines/agos/script_e1.cpp @@ -750,11 +750,11 @@ void AGOSEngine_Elvira1::oe1_nextMaster() { void AGOSEngine_Elvira1::oe1_animate() { // 226: animate - uint vgaSpriteId = getVarOrWord(); - uint windowNum = getVarOrByte(); - uint x = getVarOrWord(); - uint y = getVarOrWord(); - uint palette = getVarOrWord(); + uint16 vgaSpriteId = getVarOrWord(); + uint16 windowNum = getVarOrByte(); + int16 x = getVarOrWord(); + int16 y = getVarOrWord(); + uint16 palette = getVarOrWord(); _lockWord |= 0x40; animate(windowNum, vgaSpriteId / 100, vgaSpriteId, x, y, palette); diff --git a/engines/agos/script_s1.cpp b/engines/agos/script_s1.cpp index dd7e683147..b10013d186 100644 --- a/engines/agos/script_s1.cpp +++ b/engines/agos/script_s1.cpp @@ -289,11 +289,11 @@ void AGOSEngine_Simon1::executeOpcode(int opcode) { void AGOSEngine_Simon1::os1_animate() { // 98: animate - uint vgaSpriteId = getVarOrWord(); - uint windowNum = getVarOrByte(); - uint x = getVarOrWord(); - uint y = getVarOrWord(); - uint palette = (getVarOrWord() & 15); + uint16 vgaSpriteId = getVarOrWord(); + uint16 windowNum = getVarOrByte(); + int16 x = getVarOrWord(); + int16 y = getVarOrWord(); + uint16 palette = (getVarOrWord() & 15); if (getFeatures() & GF_TALKIE && vgaSpriteId >= 400) { _lastVgaWaitFor = 0; diff --git a/engines/agos/script_s2.cpp b/engines/agos/script_s2.cpp index 100da239bb..9d61f377a0 100644 --- a/engines/agos/script_s2.cpp +++ b/engines/agos/script_s2.cpp @@ -307,12 +307,12 @@ void AGOSEngine_Simon2::os2_rescan() { void AGOSEngine_Simon2::os2_animate() { // 98: start vga - uint zoneNum = getVarOrWord(); - uint vgaSpriteId = getVarOrWord(); - uint windowNum = getVarOrByte(); - uint x = getVarOrWord(); - uint y = getVarOrWord(); - uint palette = (getVarOrWord() & 15); + uint16 zoneNum = getVarOrWord(); + uint16 vgaSpriteId = getVarOrWord(); + uint16 windowNum = getVarOrByte(); + int16 x = getVarOrWord(); + int16 y = getVarOrWord(); + uint16 palette = (getVarOrWord() & 15); _lockWord |= 0x40; animate(windowNum, zoneNum, vgaSpriteId, x, y, palette); diff --git a/engines/agos/vga.cpp b/engines/agos/vga.cpp index d80ae26a23..516f195584 100644 --- a/engines/agos/vga.cpp +++ b/engines/agos/vga.cpp @@ -403,7 +403,8 @@ void AGOSEngine::vc2_call() { } void AGOSEngine::vc3_loadSprite() { - uint16 windowNum, zoneNum, palette, x, y, vgaSpriteId; + uint16 windowNum, zoneNum, palette, vgaSpriteId; + int16 x, y; byte *old_file_1; if (getGameType() == GType_PP && getBitFlag(100)) { @@ -608,7 +609,7 @@ void AGOSEngine::vc10_draw() { drawImage_init(image, palette, x, y, flags); } -void AGOSEngine::drawImage_init(int16 image, uint16 palette, uint16 x, uint16 y, uint16 flags) { +void AGOSEngine::drawImage_init(int16 image, uint16 palette, int16 x, int16 y, uint16 flags) { if (image == 0) return; diff --git a/engines/agos/vga.h b/engines/agos/vga.h index ac84262cbf..2daa0c02a6 100644 --- a/engines/agos/vga.h +++ b/engines/agos/vga.h @@ -101,7 +101,7 @@ struct VgaFileHeader2_Common { enum DrawFlags { kDFFlip = 0x1, kDFNonTrans = 0x2, - kDFUseFrontBuf = 0x4, + kDFSkipStoreBG = 0x4, kDFCompressed = 0x8, kDFCompressedFlip = 0x10, kDFMasked = 0x20, diff --git a/engines/agos/vga_s1.cpp b/engines/agos/vga_s1.cpp index ad7b8b06f5..bbad846727 100644 --- a/engines/agos/vga_s1.cpp +++ b/engines/agos/vga_s1.cpp @@ -216,7 +216,7 @@ void AGOSEngine::vc61_setMaskImage() { vsp->image = vcReadVarOrWord(); vsp->x += vcReadNextWord(); vsp->y += vcReadNextWord(); - vsp->flags = kDFMasked | kDFUseFrontBuf; + vsp->flags = kDFMasked | kDFSkipStoreBG; vsp->windowNum |= 0x8000; dirtyBackGround(); |