diff options
author | Bendegúz Nagy | 2016-07-12 08:08:57 +0200 |
---|---|---|
committer | Bendegúz Nagy | 2016-08-26 23:02:22 +0200 |
commit | 3b917d35c4dfc962aeb4786bd84fc54bdee3f24e (patch) | |
tree | 39df4720da709d6e00c5e2313b24726839fa3c41 | |
parent | 278e0b6647bd9cc46818771da86a2fadb30cd123 (diff) | |
download | scummvm-rg350-3b917d35c4dfc962aeb4786bd84fc54bdee3f24e.tar.gz scummvm-rg350-3b917d35c4dfc962aeb4786bd84fc54bdee3f24e.tar.bz2 scummvm-rg350-3b917d35c4dfc962aeb4786bd84fc54bdee3f24e.zip |
DM: Add f246_timelineProcesEvent65_enableGroupGenerator
-rw-r--r-- | engines/dm/dungeonman.h | 2 | ||||
-rw-r--r-- | engines/dm/timeline.cpp | 20 | ||||
-rw-r--r-- | engines/dm/timeline.h | 1 |
3 files changed, 21 insertions, 2 deletions
diff --git a/engines/dm/dungeonman.h b/engines/dm/dungeonman.h index 049c8eae6f..2a6a8b72f8 100644 --- a/engines/dm/dungeonman.h +++ b/engines/dm/dungeonman.h @@ -340,8 +340,8 @@ public: uint16 M45_healthMultiplier() { return (_action & 0xF); } // @ M45_HEALTH_MULTIPLIER uint16 M46_ticks() { return (_action >> 4) & 0xFFF; } // @ M46_TICKS + void setDatAndTypeWithOr(uint16 val) { _datAndType |= val; } - // some macros missing, i got bored }; // @ SENSOR diff --git a/engines/dm/timeline.cpp b/engines/dm/timeline.cpp index 2bb96e0c42..a34fc4921d 100644 --- a/engines/dm/timeline.cpp +++ b/engines/dm/timeline.cpp @@ -267,7 +267,7 @@ void Timeline::f261_processTimeline() { f252_timelineProcessEvents60to61_moveGroup(L0681_ps_Event); break; case k65_TMEventTypeEnableGroupGenerator: - //F0246_TIMELINE_ProcessEvent65_EnableGroupGenerator(L0681_ps_Event); + f246_timelineProcesEvent65_enableGroupGenerator(L0681_ps_Event); break; case k20_TMEventTypePlaySound: warning(false, "MISSING CODE: F0064_SOUND_RequestPlay_CPSD"); @@ -859,4 +859,22 @@ T0252001: _vm->_timeline->f238_addEventGetEventIndex(event); } } + +void Timeline::f246_timelineProcesEvent65_enableGroupGenerator(TimelineEvent* event) { + Thing L0620_T_Thing; + Sensor* L0621_ps_Sensor; + + L0620_T_Thing = _vm->_dungeonMan->f161_getSquareFirstThing(event->_B._location._mapX, event->_B._location._mapY); + L0620_T_Thing = _vm->_dungeonMan->f161_getSquareFirstThing(event->_B._location._mapX, event->_B._location._mapY); + while (L0620_T_Thing != Thing::_none) { + if ((L0620_T_Thing.getType()) == k3_SensorThingType) { + L0621_ps_Sensor = (Sensor*)_vm->_dungeonMan->f156_getThingData(L0620_T_Thing); + if (L0621_ps_Sensor->getType() == k0_SensorDisabled) { + L0621_ps_Sensor->setDatAndTypeWithOr(k6_SensorFloorGroupGenerator); + return; + } + } + L0620_T_Thing = _vm->_dungeonMan->f159_getNextThing(L0620_T_Thing); + } +} } diff --git a/engines/dm/timeline.h b/engines/dm/timeline.h index c56db55dfd..02e13a5e95 100644 --- a/engines/dm/timeline.h +++ b/engines/dm/timeline.h @@ -174,6 +174,7 @@ public: void f247_triggerProjectileLauncher(Sensor *sensor, TimelineEvent *event); // @ F0247_TIMELINE_TriggerProjectileLauncher void f245_timlineProcessEvent5_squareCorridor(TimelineEvent *event); // @ F0245_TIMELINE_ProcessEvent5_Square_Corridor void f252_timelineProcessEvents60to61_moveGroup(TimelineEvent *event); // @ F0252_TIMELINE_ProcessEvents60to61_MoveGroup + void f246_timelineProcesEvent65_enableGroupGenerator(TimelineEvent *event); // @ F0246_TIMELINE_ProcessEvent65_EnableGroupGenerator }; |