aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNipun Garg2019-07-06 01:00:10 +0530
committerEugene Sandulenko2019-09-03 17:17:12 +0200
commita27faf35b43ae19c679eb9e927aee0736b158b3a (patch)
treecabce3ad258a9851a767866b1b0eab1468f6da1a
parent48546f3c8d24babf477c05671ec384706ab23654 (diff)
downloadscummvm-rg350-a27faf35b43ae19c679eb9e927aee0736b158b3a.tar.gz
scummvm-rg350-a27faf35b43ae19c679eb9e927aee0736b158b3a.tar.bz2
scummvm-rg350-a27faf35b43ae19c679eb9e927aee0736b158b3a.zip
HDB: Add Laser related stubs
-rw-r--r--engines/hdb/ai-funcs.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/engines/hdb/ai-funcs.cpp b/engines/hdb/ai-funcs.cpp
index 266a71c405..9e95b73945 100644
--- a/engines/hdb/ai-funcs.cpp
+++ b/engines/hdb/ai-funcs.cpp
@@ -1835,6 +1835,7 @@ void AI::entityFace(const char *luaName, int dir) {
void AI::moveEnts() {
static int frameDelay = kAnimFrameDelay;
+ static int startLaserSound = false;
AIEntity *e;
if (frameDelay-- > 0)
@@ -1875,8 +1876,19 @@ void AI::moveEnts() {
}
}
- debug(9, "STUB: moveEnts: Laser Rescan");
- debug(9, "STUB: moveEnts: Laser Looping Sound Channel");
+ // if lasers need to rescan, do it here only
+ if (_laserRescan) {
+ _laserRescan = false;
+ laserScan();
+ }
+
+ // handle the constant laser looping sound channel
+ if (_laserOnScreen)
+ startLaserSound = true;
+ if (!_laserOnScreen && startLaserSound) {
+ startLaserSound = 0;
+ g_hdb->_sound->stopChannel(kLaserChannel);
+ }
}
bool AI::findPath(AIEntity *e) {