aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorNipun Garg2019-07-04 23:32:46 +0530
committerEugene Sandulenko2019-09-03 17:17:11 +0200
commitc9c08476f16e7535da0bd8aff231f6ee6fa8a0db (patch)
tree1018bec8f1d1f00153457a4a4cc99f6f38049038 /engines
parentac04002411d4094359c9f2722cecb41dd740d861 (diff)
downloadscummvm-rg350-c9c08476f16e7535da0bd8aff231f6ee6fa8a0db.tar.gz
scummvm-rg350-c9c08476f16e7535da0bd8aff231f6ee6fa8a0db.tar.bz2
scummvm-rg350-c9c08476f16e7535da0bd8aff231f6ee6fa8a0db.zip
HDB: Add Gfx data
Diffstat (limited to 'engines')
-rw-r--r--engines/hdb/ai-init.cpp87
-rw-r--r--engines/hdb/ai.h21
2 files changed, 108 insertions, 0 deletions
diff --git a/engines/hdb/ai-init.cpp b/engines/hdb/ai-init.cpp
index 426f549704..d6e2b3fb78 100644
--- a/engines/hdb/ai-init.cpp
+++ b/engines/hdb/ai-init.cpp
@@ -772,6 +772,19 @@ bool AI::init() {
_kcHolderBlackOff = g_hdb->_gfx->getTileIndex("anim_t32_kcholder_black_off1");
_kcHolderBlackOn = g_hdb->_gfx->getTileIndex("t32_kcholder_black_on");
+ // icepuff snowball
+ icepSnowballGfxDown = icepSnowballGfxLeft = icepSnowballGfxRight = NULL;
+
+ // Frogglick
+ tileFroglickMiddleUD = tileFroglickMiddleLR = NULL;
+ tileFroglickWiggleLeft[0] = tileFroglickWiggleRight[0] = NULL;
+
+ // Dragon
+ gfxDragonAsleep = NULL;
+
+ // laser beam
+ gfxLaserbeamUD[0] = gfxLaserbeamUD[1] = gfxLaserbeamLR[0] = gfxLaserbeamLR[1] = NULL;
+
_dummyPlayer.type = AI_GUY;
_dummyLaser.type = AI_LASERBEAM;
strcpy(_dummyPlayer.entityName, "Virtual Player");
@@ -834,6 +847,80 @@ void AI::restartSystem() {
memset(_clubLeftGfx, NULL, kMaxAnimFrames * sizeof(Tile *));
memset(_clubRightGfx, NULL, kMaxAnimFrames * sizeof(Tile *));
+ int i;
+ if (icepSnowballGfxDown) {
+ icepSnowballGfxDown->free();
+ icepSnowballGfxDown = NULL;
+ }
+ if (icepSnowballGfxLeft) {
+ icepSnowballGfxLeft->free();
+ icepSnowballGfxLeft = NULL;
+ }
+ if (icepSnowballGfxRight) {
+ icepSnowballGfxRight->free();
+ icepSnowballGfxRight = NULL;
+ }
+
+ if (tileFroglickMiddleUD) {
+ tileFroglickMiddleUD->free();
+ tileFroglickMiddleUD = NULL;
+ }
+ if (tileFroglickWiggleUD[0]) {
+ for (i = 0; i < 3; i++) {
+ tileFroglickWiggleUD[i]->free();
+ tileFroglickWiggleUD[i] = NULL;
+ }
+ }
+
+ if (tileFroglickMiddleLR) {
+ tileFroglickMiddleLR->free();
+ tileFroglickMiddleLR = NULL;
+ }
+ if (tileFroglickWiggleLeft[0]) {
+ for (i = 0; i < 3; i++) {
+ tileFroglickWiggleLeft[i]->free();
+ tileFroglickWiggleLeft[i] = NULL;
+ }
+ }
+ if (tileFroglickWiggleRight[0]) {
+ for (i = 0; i < 3; i++) {
+ tileFroglickWiggleRight[i]->free();
+ tileFroglickWiggleRight[i] = NULL;
+ }
+ }
+
+ // dragon! see ya!
+ if (gfxDragonAsleep) {
+ gfxDragonAsleep->free();
+ gfxDragonAsleep = NULL;
+ gfxDragonFlap[0]->free();
+ gfxDragonFlap[1]->free();
+ gfxDragonFlap[0] = gfxDragonFlap[1] = NULL;
+ gfxDragonBreathe[0]->free();
+ gfxDragonBreathe[1]->free();
+ gfxDragonBreathe[2]->free();
+ gfxDragonBreathe[0] = gfxDragonBreathe[1] = gfxDragonBreathe[2] = NULL;
+ }
+
+ // laser beams
+ if (gfxLaserbeamUD[0]) {
+ for (i = 0; i < 4; i++) {
+ gfxLaserbeamUD[i]->free();
+ gfxLaserbeamUDTop[i]->free();
+ gfxLaserbeamUDBottom[i]->free();
+ gfxLaserbeamLR[i]->free();
+ gfxLaserbeamLRLeft[i]->free();
+ gfxLaserbeamLRRight[i]->free();
+
+ gfxLaserbeamUD[i] = NULL;
+ gfxLaserbeamUDTop[i] = NULL;
+ gfxLaserbeamUDBottom[i] = NULL;
+ gfxLaserbeamLR[i] = NULL;
+ gfxLaserbeamLRLeft[i] = NULL;
+ gfxLaserbeamLRRight[i] = NULL;
+ }
+ }
+
// Clear the Action list
memset(_actions, 0, sizeof(_actions));
diff --git a/engines/hdb/ai.h b/engines/hdb/ai.h
index 78de3d48d5..908bd51a65 100644
--- a/engines/hdb/ai.h
+++ b/engines/hdb/ai.h
@@ -766,6 +766,27 @@ struct CineBlit {
}
#define spawnBlocking(x, y, level) g_hdb->_ai->spawn(AI_NONE, DIR_NONE, x, y, NULL, NULL, NULL, DIR_NONE, level, 0, 0, 0)
+extern Picture *icepSnowballGfxDown; // ICEPUFF's snowball moving down
+extern Picture *icepSnowballGfxLeft; // ICEPUFF's snowball moving left
+extern Picture *icepSnowballGfxRight; // ICEPUFF's snowball moving right
+
+extern Tile *tileFroglickMiddleUD;
+extern Tile *tileFroglickWiggleUD[3];
+extern Tile *tileFroglickMiddleLR;
+extern Tile *tileFroglickWiggleLeft[3];
+extern Tile *tileFroglickWiggleRight[3];
+
+extern Picture *gfxDragonAsleep;
+extern Picture *gfxDragonFlap[2];
+extern Picture *gfxDragonBreathe[3];
+
+extern Tile *gfxLaserbeamUD[4];
+extern Tile *gfxLaserbeamUDTop[4];
+extern Tile *gfxLaserbeamUDBottom[4];
+extern Tile *gfxLaserbeamLR[4];
+extern Tile *gfxLaserbeamLRLeft[4];
+extern Tile *gfxLaserbeamLRRight[4];
+
class AI {
public:
AI();