22 #ifndef MYST_SCRIPTS_SELENITIC_H 23 #define MYST_SCRIPTS_SELENITIC_H 25 #include "common/scummsys.h" 26 #include "common/util.h" 27 #include "mohawk/myst_scripts.h" 31 class MystAreaImageSwitch;
32 struct MystScriptEntry;
34 namespace MystStacks {
36 #define DECLARE_OPCODE(x) void x(uint16 var, const ArgumentsArray &args) 43 void disablePersistentScripts()
override;
44 void runPersistentScripts()
override;
48 uint16 getVar(uint16 var)
override;
49 void toggleVar(uint16 var)
override;
50 bool setVarValue(uint16 var, uint16 value)
override;
52 uint16 getMap()
override {
return 9930; }
54 DECLARE_OPCODE(o_mazeRunnerMove);
55 DECLARE_OPCODE(o_mazeRunnerSoundRepeat);
56 DECLARE_OPCODE(o_soundReceiverSigma);
57 DECLARE_OPCODE(o_soundReceiverRight);
58 DECLARE_OPCODE(o_soundReceiverLeft);
59 DECLARE_OPCODE(o_soundReceiverSource);
60 DECLARE_OPCODE(o_mazeRunnerDoorButton);
61 DECLARE_OPCODE(o_soundReceiverUpdateSound);
62 DECLARE_OPCODE(o_soundLockMove);
63 DECLARE_OPCODE(o_soundLockStartMove);
64 DECLARE_OPCODE(o_soundLockEndMove);
65 DECLARE_OPCODE(o_soundLockButton);
66 DECLARE_OPCODE(o_soundReceiverEndMove);
68 DECLARE_OPCODE(o_mazeRunnerCompass_init);
69 DECLARE_OPCODE(o_mazeRunnerWindow_init);
70 DECLARE_OPCODE(o_mazeRunnerLight_init);
71 DECLARE_OPCODE(o_soundReceiver_init);
72 DECLARE_OPCODE(o_soundLock_init);
73 DECLARE_OPCODE(o_mazeRunnerRight_init);
74 DECLARE_OPCODE(o_mazeRunnerLeft_init);
76 enum SoundReceiverSpeed {
77 kSoundReceiverSpeedStill = 0,
78 kSoundReceiverSpeedSlow = 1,
79 kSoundReceiverSpeedNormal = 5,
80 kSoundReceiverSpeedFast = 10,
81 kSoundReceiverSpeedFaster = 13
84 void soundReceiver_run();
88 bool _soundReceiverRunning;
89 bool _soundReceiverSigmaPressed;
92 uint16 *_soundReceiverPosition;
93 uint16 _soundReceiverDirection;
94 SoundReceiverSpeed _soundReceiverSpeed;
95 uint32 _soundReceiverStartTime;
96 uint _soundReceiverNearBlinkCounter;
106 static const uint16 _mazeRunnerMap[300][4];
107 static const uint8 _mazeRunnerVideos[300][4];
109 uint16 _mazeRunnerPosition;
110 uint16 _mazeRunnerDirection;
116 bool _mazeRunnerDoorOpened;
118 uint16 _soundLockSoundId;
126 void soundReceiverLeftRight(uint direction);
127 void soundReceiverUpdate();
128 void soundReceiverSetSubimageRect()
const;
129 void soundReceiverDrawView();
130 void soundReceiverDrawAngle();
131 void soundReceiverIncreaseSpeed();
132 void soundReceiverUpdateSound();
133 uint16 soundReceiverCurrentSound(uint16 source, uint16 position);
134 void soundReceiverSolution(uint16 source, uint16 &solution,
bool &enabled);
136 uint16 soundLockCurrentSound(uint16 position,
bool pixels);
138 void soundLockCheckSolution(
MystAreaSlider *slider, uint16 value, uint16 solution,
bool &solved);
140 bool mazeRunnerForwardAllowed(uint16 position);
141 void mazeRunnerUpdateCompass();
142 void mazeRunnerPlaySoundHelp();
143 void mazeRunnerPlayVideo(uint16 video, uint16 pos);
144 void mazeRunnerBacktrack(uint16 &oldPosition);
150 #undef DECLARE_OPCODE Definition: myst_state.h:298
Definition: myst_scripts.h:60
Definition: myst_areas.h:216
Definition: selenitic.h:38
Definition: myst_areas.h:154