aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorTravis Howell2006-10-02 01:39:50 +0000
committerTravis Howell2006-10-02 01:39:50 +0000
commit42cb69827eaab991912022c28be09f2addffe55e (patch)
treeefb9f8ba4e489fee36e46932a4c98c379876c8f6 /engines
parent3fc8aec422f52c8d7743eb273566e0beeb764807 (diff)
downloadscummvm-rg350-42cb69827eaab991912022c28be09f2addffe55e.tar.gz
scummvm-rg350-42cb69827eaab991912022c28be09f2addffe55e.tar.bz2
scummvm-rg350-42cb69827eaab991912022c28be09f2addffe55e.zip
Add more tiles code for Swampy
svn-id: r24059
Diffstat (limited to 'engines')
-rw-r--r--engines/agos/agos.h1
-rw-r--r--engines/agos/items.cpp2
-rw-r--r--engines/agos/vga.cpp54
3 files changed, 56 insertions, 1 deletions
diff --git a/engines/agos/agos.h b/engines/agos/agos.h
index 876bc5d1da..8f0aba39c2 100644
--- a/engines/agos/agos.h
+++ b/engines/agos/agos.h
@@ -1127,6 +1127,7 @@ protected:
void startOverlayAnims();
void startAnOverlayAnim();
+ void startBlock(uint windowNum, uint vga_res, uint vga_sprite_id, uint x, uint y, uint palette);
bool itemIsSiblingOf(uint16 val);
bool itemIsParentOf(uint16 a, uint16 b);
diff --git a/engines/agos/items.cpp b/engines/agos/items.cpp
index 49699d4c02..95925669c6 100644
--- a/engines/agos/items.cpp
+++ b/engines/agos/items.cpp
@@ -2511,7 +2511,7 @@ void AGOSEngine::o4_animate() {
uint palette = getVarOrWord();
if (getBitFlag(96)) {
- printf("Start Block\n");
+ startBlock(windowNum, vga_res, vgaSpriteId, x, y, palette);
} else {
loadSprite(windowNum, vga_res, vgaSpriteId, x, y, palette);
}
diff --git a/engines/agos/vga.cpp b/engines/agos/vga.cpp
index 059228d35a..83846ef556 100644
--- a/engines/agos/vga.cpp
+++ b/engines/agos/vga.cpp
@@ -2927,4 +2927,58 @@ void AGOSEngine::startAnOverlayAnim() {
_vgaCurZoneNum = file;
}
+void AGOSEngine::startBlock(uint windowNum, uint zoneNum, uint vgaSpriteId, uint x, uint y, uint priority) {
+ VgaSprite *vsp = _vgaSprites;
+ const byte *vcPtrOrg;
+ uint16 tmp;
+ uint i;
+
+ while (vsp->id != 0)
+ vsp++;
+
+ _variableArray[201] = vgaSpriteId;
+
+ if (getBitFlag(95)) {
+ _droppingBlockAnim = vgaSpriteId;
+ _droppingBlockX = _variableArray[202];
+ _droppingBlockY = _variableArray[203];
+ _droppingBlockZ = _variableArray[204];
+ _droppingBlockLength = windowNum;
+ if (windowNum == 1) {
+ priority += 9;
+ y += 10;
+ x += 15;
+ }
+ _droppingBlockCount = 4;
+ _droppingBlockType = 4;
+ }
+
+ for (i = 0; i < windowNum; i++) {
+ vsp->palette = 0;
+ vsp->flags = 0;
+ vsp->priority = 0;
+ vsp->windowNum = 4;
+ vsp->zoneNum = 60;
+ vsp->y = y;
+ vsp->x = x;
+ vsp->id = vgaSpriteId;
+ vsp->image = zoneNum;
+
+ _vgaCurSpriteId = vgaSpriteId;
+ _vgaCurZoneNum = 60;
+
+ tmp = to16Wrapper(priority);
+
+ vcPtrOrg = _vcPtr;
+ _vcPtr = (byte *)&tmp;
+ vc23_setSpritePriority();
+ _vcPtr = vcPtrOrg;
+
+ vgaSpriteId++;
+ x += 15;
+ y += 10;
+ priority += 8;
+ }
+}
+
} // End of namespace AGOS