aboutsummaryrefslogtreecommitdiff
path: root/engines/hdb/ai-init.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/hdb/ai-init.cpp')
-rw-r--r--engines/hdb/ai-init.cpp109
1 files changed, 56 insertions, 53 deletions
diff --git a/engines/hdb/ai-init.cpp b/engines/hdb/ai-init.cpp
index d6e2b3fb78..29b5ec1377 100644
--- a/engines/hdb/ai-init.cpp
+++ b/engines/hdb/ai-init.cpp
@@ -773,17 +773,19 @@ bool AI::init() {
_kcHolderBlackOn = g_hdb->_gfx->getTileIndex("t32_kcholder_black_on");
// icepuff snowball
- icepSnowballGfxDown = icepSnowballGfxLeft = icepSnowballGfxRight = NULL;
+ g_hdb->_gfx->_icepSnowballGfxDown = g_hdb->_gfx->_icepSnowballGfxLeft =
+ g_hdb->_gfx->_icepSnowballGfxRight = NULL;
// Frogglick
- tileFroglickMiddleUD = tileFroglickMiddleLR = NULL;
- tileFroglickWiggleLeft[0] = tileFroglickWiggleRight[0] = NULL;
+ g_hdb->_gfx->_tileFroglickMiddleUD = g_hdb->_gfx->_tileFroglickMiddleLR = NULL;
+ g_hdb->_gfx->_tileFroglickWiggleLeft[0] = g_hdb->_gfx->_tileFroglickWiggleRight[0] = NULL;
// Dragon
- gfxDragonAsleep = NULL;
+ g_hdb->_gfx->_gfxDragonAsleep = NULL;
// laser beam
- gfxLaserbeamUD[0] = gfxLaserbeamUD[1] = gfxLaserbeamLR[0] = gfxLaserbeamLR[1] = NULL;
+ g_hdb->_gfx->_gfxLaserbeamUD[0] = g_hdb->_gfx->_gfxLaserbeamUD[1] =
+ g_hdb->_gfx->_gfxLaserbeamLR[0] = g_hdb->_gfx->_gfxLaserbeamLR[1] = NULL;
_dummyPlayer.type = AI_GUY;
_dummyLaser.type = AI_LASERBEAM;
@@ -848,76 +850,77 @@ void AI::restartSystem() {
memset(_clubRightGfx, NULL, kMaxAnimFrames * sizeof(Tile *));
int i;
- if (icepSnowballGfxDown) {
- icepSnowballGfxDown->free();
- icepSnowballGfxDown = NULL;
+ if (g_hdb->_gfx->_icepSnowballGfxDown) {
+ g_hdb->_gfx->_icepSnowballGfxDown->free();
+ g_hdb->_gfx->_icepSnowballGfxDown = NULL;
}
- if (icepSnowballGfxLeft) {
- icepSnowballGfxLeft->free();
- icepSnowballGfxLeft = NULL;
+ if (g_hdb->_gfx->_icepSnowballGfxLeft) {
+ g_hdb->_gfx->_icepSnowballGfxLeft->free();
+ g_hdb->_gfx->_icepSnowballGfxLeft = NULL;
}
- if (icepSnowballGfxRight) {
- icepSnowballGfxRight->free();
- icepSnowballGfxRight = NULL;
+ if (g_hdb->_gfx->_icepSnowballGfxRight) {
+ g_hdb->_gfx->_icepSnowballGfxRight->free();
+ g_hdb->_gfx->_icepSnowballGfxRight = NULL;
}
- if (tileFroglickMiddleUD) {
- tileFroglickMiddleUD->free();
- tileFroglickMiddleUD = NULL;
+ if (g_hdb->_gfx->_tileFroglickMiddleUD) {
+ g_hdb->_gfx->_tileFroglickMiddleUD->free();
+ g_hdb->_gfx->_tileFroglickMiddleUD = NULL;
}
- if (tileFroglickWiggleUD[0]) {
+ if (g_hdb->_gfx->_tileFroglickWiggleUD[0]) {
for (i = 0; i < 3; i++) {
- tileFroglickWiggleUD[i]->free();
- tileFroglickWiggleUD[i] = NULL;
+ g_hdb->_gfx->_tileFroglickWiggleUD[i]->free();
+ g_hdb->_gfx->_tileFroglickWiggleUD[i] = NULL;
}
}
- if (tileFroglickMiddleLR) {
- tileFroglickMiddleLR->free();
- tileFroglickMiddleLR = NULL;
+ if (g_hdb->_gfx->_tileFroglickMiddleLR) {
+ g_hdb->_gfx->_tileFroglickMiddleLR->free();
+ g_hdb->_gfx->_tileFroglickMiddleLR = NULL;
}
- if (tileFroglickWiggleLeft[0]) {
+ if (g_hdb->_gfx->_tileFroglickWiggleLeft[0]) {
for (i = 0; i < 3; i++) {
- tileFroglickWiggleLeft[i]->free();
- tileFroglickWiggleLeft[i] = NULL;
+ g_hdb->_gfx->_tileFroglickWiggleLeft[i]->free();
+ g_hdb->_gfx->_tileFroglickWiggleLeft[i] = NULL;
}
}
- if (tileFroglickWiggleRight[0]) {
+ if (g_hdb->_gfx->_tileFroglickWiggleRight[0]) {
for (i = 0; i < 3; i++) {
- tileFroglickWiggleRight[i]->free();
- tileFroglickWiggleRight[i] = NULL;
+ g_hdb->_gfx->_tileFroglickWiggleRight[i]->free();
+ g_hdb->_gfx->_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;
+ if (g_hdb->_gfx->_gfxDragonAsleep) {
+ g_hdb->_gfx->_gfxDragonAsleep->free();
+ g_hdb->_gfx->_gfxDragonAsleep = NULL;
+ g_hdb->_gfx->_gfxDragonFlap[0]->free();
+ g_hdb->_gfx->_gfxDragonFlap[1]->free();
+ g_hdb->_gfx->_gfxDragonFlap[0] = g_hdb->_gfx->_gfxDragonFlap[1] = NULL;
+ g_hdb->_gfx->_gfxDragonBreathe[0]->free();
+ g_hdb->_gfx->_gfxDragonBreathe[1]->free();
+ g_hdb->_gfx->_gfxDragonBreathe[2]->free();
+ g_hdb->_gfx->_gfxDragonBreathe[0] = g_hdb->_gfx->_gfxDragonBreathe[1] =
+ g_hdb->_gfx->_gfxDragonBreathe[2] = NULL;
}
// laser beams
- if (gfxLaserbeamUD[0]) {
+ if (g_hdb->_gfx->_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;
+ g_hdb->_gfx->_gfxLaserbeamUD[i]->free();
+ g_hdb->_gfx->_gfxLaserbeamUDTop[i]->free();
+ g_hdb->_gfx->_gfxLaserbeamUDBottom[i]->free();
+ g_hdb->_gfx->_gfxLaserbeamLR[i]->free();
+ g_hdb->_gfx->_gfxLaserbeamLRLeft[i]->free();
+ g_hdb->_gfx->_gfxLaserbeamLRRight[i]->free();
+
+ g_hdb->_gfx->_gfxLaserbeamUD[i] = NULL;
+ g_hdb->_gfx->_gfxLaserbeamUDTop[i] = NULL;
+ g_hdb->_gfx->_gfxLaserbeamUDBottom[i] = NULL;
+ g_hdb->_gfx->_gfxLaserbeamLR[i] = NULL;
+ g_hdb->_gfx->_gfxLaserbeamLRLeft[i] = NULL;
+ g_hdb->_gfx->_gfxLaserbeamLRRight[i] = NULL;
}
}