aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorNipun Garg2019-07-06 01:48:26 +0530
committerEugene Sandulenko2019-09-03 17:17:13 +0200
commitebea69eceb2cb8ae823a702b484b9a29f91f3858 (patch)
treef10c8913a959746a09777d84722f982fdc881d04 /engines
parent0dff3cd8e66ac2d5e3e8284fe6ea4186aea506ee (diff)
downloadscummvm-rg350-ebea69eceb2cb8ae823a702b484b9a29f91f3858.tar.gz
scummvm-rg350-ebea69eceb2cb8ae823a702b484b9a29f91f3858.tar.bz2
scummvm-rg350-ebea69eceb2cb8ae823a702b484b9a29f91f3858.zip
HDB: Unstub lasers and more
Diffstat (limited to 'engines')
-rw-r--r--engines/hdb/ai-funcs.cpp24
1 files changed, 18 insertions, 6 deletions
diff --git a/engines/hdb/ai-funcs.cpp b/engines/hdb/ai-funcs.cpp
index bdbf997655..56b021a567 100644
--- a/engines/hdb/ai-funcs.cpp
+++ b/engines/hdb/ai-funcs.cpp
@@ -529,7 +529,9 @@ AIEntity *AI::findEntity(int x, int y) {
}
}
- warning("STUB: findEntity: Check for Laser");
+ if (g_hdb->_map->laserBeamExist(x, y))
+ return &_dummyLaser;
+
return NULL;
}
@@ -546,7 +548,9 @@ AIEntity *AI::findEntityIgnore(int x, int y, AIEntity *ignore) {
}
}
- warning("STUB: findEntityIgnore: Check for Laser");
+ if (g_hdb->_map->laserBeamExist(x, y) && ignore->type != AI_LASERBEAM)
+ return &_dummyLaser;
+
return NULL;
}
@@ -563,7 +567,9 @@ AIEntity *AI::findEntityType(AIType type, int x, int y) {
}
}
- warning("STUB: findEntityType: Check for Laser");
+ if (g_hdb->_map->laserBeamExist(x, y) && type == AI_LASERBEAM)
+ return &_dummyLaser;
+
return NULL;
}
@@ -770,7 +776,9 @@ void AI::initAllEnts() {
_deliveries[i].itemGfx = g_hdb->_gfx->getTileGfx(_deliveries[i].itemGfxName, -1);
_deliveries[i].destGfx = g_hdb->_gfx->getTileGfx(_deliveries[i].destGfxName, -1);
}
- warning("STUB: initAllEnts: LaserScan required");
+
+ // do a quick LaserScan to fill the laserbeam matrix!
+ laserScan();
}
void AI::killPlayer(Death method) {
@@ -783,7 +791,9 @@ void AI::killPlayer(Death method) {
_playerInvisible = false;
_playerDead = true;
- warning("STUB: killPlayer: Close Dialogs");
+ g_hdb->_window->closeDialog();
+ g_hdb->_window->closeDialogChoice();
+ g_hdb->_window->stopPanicZone();
switch (method) {
case DEATH_NORMAL:
@@ -817,7 +827,9 @@ void AI::killPlayer(Death method) {
break;
}
- warning("STUB: killPlayer: Stop Music");
+ // sound.StopMusic();
+ if (!g_hdb->_sound->getMusicVolume())
+ g_hdb->_sound->playSound(SND_TRY_AGAIN);
}
void AI::stunEnemy(AIEntity *e, int time) {