diff options
author | Nipun Garg | 2019-07-04 23:32:46 +0530 |
---|---|---|
committer | Eugene Sandulenko | 2019-09-03 17:17:11 +0200 |
commit | c9c08476f16e7535da0bd8aff231f6ee6fa8a0db (patch) | |
tree | 1018bec8f1d1f00153457a4a4cc99f6f38049038 /engines/hdb/ai-init.cpp | |
parent | ac04002411d4094359c9f2722cecb41dd740d861 (diff) | |
download | scummvm-rg350-c9c08476f16e7535da0bd8aff231f6ee6fa8a0db.tar.gz scummvm-rg350-c9c08476f16e7535da0bd8aff231f6ee6fa8a0db.tar.bz2 scummvm-rg350-c9c08476f16e7535da0bd8aff231f6ee6fa8a0db.zip |
HDB: Add Gfx data
Diffstat (limited to 'engines/hdb/ai-init.cpp')
-rw-r--r-- | engines/hdb/ai-init.cpp | 87 |
1 files changed, 87 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)); |