aboutsummaryrefslogtreecommitdiff
path: root/engines/mohawk/myst_stacks/selenitic.cpp
diff options
context:
space:
mode:
authorBastien Bouclet2011-02-15 21:42:00 +0100
committerBastien Bouclet2011-02-15 21:43:38 +0100
commit369db4fdfd5dac16858505f91cb37f4ae386fe80 (patch)
treee82802984b0e330e167551fd558537d2da7fea4f /engines/mohawk/myst_stacks/selenitic.cpp
parentfc605427a8021029b1e20ea7fca38eef450cc209 (diff)
downloadscummvm-rg350-369db4fdfd5dac16858505f91cb37f4ae386fe80.tar.gz
scummvm-rg350-369db4fdfd5dac16858505f91cb37f4ae386fe80.tar.bz2
scummvm-rg350-369db4fdfd5dac16858505f91cb37f4ae386fe80.zip
MOHAWK: Shorten Myst stack classes names
Diffstat (limited to 'engines/mohawk/myst_stacks/selenitic.cpp')
-rw-r--r--engines/mohawk/myst_stacks/selenitic.cpp96
1 files changed, 48 insertions, 48 deletions
diff --git a/engines/mohawk/myst_stacks/selenitic.cpp b/engines/mohawk/myst_stacks/selenitic.cpp
index a9c77af7bd..f485bab2f9 100644
--- a/engines/mohawk/myst_stacks/selenitic.cpp
+++ b/engines/mohawk/myst_stacks/selenitic.cpp
@@ -37,7 +37,7 @@
namespace Mohawk {
namespace MystStacks {
-MystScriptParser_Selenitic::MystScriptParser_Selenitic(MohawkEngine_Myst *vm) :
+Selenitic::Selenitic(MohawkEngine_Myst *vm) :
MystScriptParser(vm), _state(vm->_gameState->_selenitic) {
setupOpcodes();
_invokingResource = NULL;
@@ -45,12 +45,12 @@ MystScriptParser_Selenitic::MystScriptParser_Selenitic(MohawkEngine_Myst *vm) :
_mazeRunnerDirection = 8;
}
-MystScriptParser_Selenitic::~MystScriptParser_Selenitic() {
+Selenitic::~Selenitic() {
}
-#define OPCODE(op, x) _opcodes.push_back(new MystOpcode(op, (OpcodeProcMyst) &MystScriptParser_Selenitic::x, #x))
+#define OPCODE(op, x) _opcodes.push_back(new MystOpcode(op, (OpcodeProcMyst) &Selenitic::x, #x))
-void MystScriptParser_Selenitic::setupOpcodes() {
+void Selenitic::setupOpcodes() {
// "Stack-Specific" Opcodes
OPCODE(100, o_mazeRunnerMove);
OPCODE(101, o_mazeRunnerSoundRepeat);
@@ -83,16 +83,16 @@ void MystScriptParser_Selenitic::setupOpcodes() {
#undef OPCODE
-void MystScriptParser_Selenitic::disablePersistentScripts() {
+void Selenitic::disablePersistentScripts() {
_soundReceiverRunning = false;
}
-void MystScriptParser_Selenitic::runPersistentScripts() {
+void Selenitic::runPersistentScripts() {
if (_soundReceiverRunning)
soundReceiver_run();
}
-uint16 MystScriptParser_Selenitic::getVar(uint16 var) {
+uint16 Selenitic::getVar(uint16 var) {
switch(var) {
case 0: // Sound receiver emitters enabled
return _state.emitterEnabledWind;
@@ -167,7 +167,7 @@ uint16 MystScriptParser_Selenitic::getVar(uint16 var) {
}
}
-void MystScriptParser_Selenitic::toggleVar(uint16 var) {
+void Selenitic::toggleVar(uint16 var) {
switch(var) {
case 0: // Sound receiver emitters enabled
_state.emitterEnabledWind = (_state.emitterEnabledWind + 1) % 2;
@@ -212,7 +212,7 @@ void MystScriptParser_Selenitic::toggleVar(uint16 var) {
}
}
-bool MystScriptParser_Selenitic::setVarValue(uint16 var, uint16 value) {
+bool Selenitic::setVarValue(uint16 var, uint16 value) {
bool refresh = false;
switch (var) {
@@ -284,7 +284,7 @@ bool MystScriptParser_Selenitic::setVarValue(uint16 var, uint16 value) {
return refresh;
}
-void MystScriptParser_Selenitic::o_mazeRunnerMove(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
+void Selenitic::o_mazeRunnerMove(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
uint16 oldPosition = _mazeRunnerPosition;
uint16 move = var;
@@ -305,7 +305,7 @@ void MystScriptParser_Selenitic::o_mazeRunnerMove(uint16 op, uint16 var, uint16
}
}
-void MystScriptParser_Selenitic::mazeRunnerBacktrack(uint16 &oldPosition) {
+void Selenitic::mazeRunnerBacktrack(uint16 &oldPosition) {
if (oldPosition == 289)
_mazeRunnerDirection = 3;
@@ -366,7 +366,7 @@ void MystScriptParser_Selenitic::mazeRunnerBacktrack(uint16 &oldPosition) {
}
}
-void MystScriptParser_Selenitic::mazeRunnerPlayVideo(uint16 video, uint16 pos) {
+void Selenitic::mazeRunnerPlayVideo(uint16 video, uint16 pos) {
Common::String file;
switch (video) {
@@ -487,7 +487,7 @@ void MystScriptParser_Selenitic::mazeRunnerPlayVideo(uint16 video, uint16 pos) {
}
}
-void MystScriptParser_Selenitic::mazeRunnerUpdateCompass() {
+void Selenitic::mazeRunnerUpdateCompass() {
if (_mazeRunnerPosition == 288 || _mazeRunnerPosition == 289)
_mazeRunnerDirection = 8;
else
@@ -496,12 +496,12 @@ void MystScriptParser_Selenitic::mazeRunnerUpdateCompass() {
_mazeRunnerCompass->drawConditionalDataToScreen(_mazeRunnerDirection);
}
-bool MystScriptParser_Selenitic::mazeRunnerForwardAllowed(uint16 position) {
+bool Selenitic::mazeRunnerForwardAllowed(uint16 position) {
uint16 move = _mazeRunnerVideos[position][1];
return move == 6 || move == 7;
}
-void MystScriptParser_Selenitic::mazeRunnerPlaySoundHelp() {
+void Selenitic::mazeRunnerPlaySoundHelp() {
uint16 soundId = 0;
_mazeRunnerLight->drawConditionalDataToScreen(1);
@@ -565,14 +565,14 @@ void MystScriptParser_Selenitic::mazeRunnerPlaySoundHelp() {
_mazeRunnerLight->drawConditionalDataToScreen(0);
}
-void MystScriptParser_Selenitic::o_mazeRunnerSoundRepeat(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
+void Selenitic::o_mazeRunnerSoundRepeat(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
mazeRunnerPlaySoundHelp();
}
/**
* Sound receiver sigma button
*/
-void MystScriptParser_Selenitic::o_soundReceiverSigma(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
+void Selenitic::o_soundReceiverSigma(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
debugC(kDebugScript, "Opcode %d: Sound receiver sigma button", op);
_vm->_cursor->hideCursor();
@@ -624,7 +624,7 @@ void MystScriptParser_Selenitic::o_soundReceiverSigma(uint16 op, uint16 var, uin
/**
* Sound receiver right button
*/
-void MystScriptParser_Selenitic::o_soundReceiverRight(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
+void Selenitic::o_soundReceiverRight(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
debugC(kDebugScript, "Opcode %d: Sound receiver right", op);
soundReceiverLeftRight(1);
@@ -633,13 +633,13 @@ void MystScriptParser_Selenitic::o_soundReceiverRight(uint16 op, uint16 var, uin
/**
* Sound receiver left button
*/
-void MystScriptParser_Selenitic::o_soundReceiverLeft(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
+void Selenitic::o_soundReceiverLeft(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
debugC(kDebugScript, "Opcode %d: Sound receiver left", op);
soundReceiverLeftRight(2);
}
-void MystScriptParser_Selenitic::soundReceiverLeftRight(uint direction) {
+void Selenitic::soundReceiverLeftRight(uint direction) {
if (_soundReceiverSigmaPressed) {
_soundReceiverSigmaButton->drawConditionalDataToScreen(0);
@@ -660,7 +660,7 @@ void MystScriptParser_Selenitic::soundReceiverLeftRight(uint direction) {
soundReceiverUpdate();
}
-void MystScriptParser_Selenitic::soundReceiverUpdate() {
+void Selenitic::soundReceiverUpdate() {
if (_soundReceiverDirection == 1)
*_soundReceiverPosition = ((*_soundReceiverPosition) + _soundReceiverSpeed) % 3600;
else if (_soundReceiverDirection == 2)
@@ -669,7 +669,7 @@ void MystScriptParser_Selenitic::soundReceiverUpdate() {
soundReceiverDrawView();
}
-void MystScriptParser_Selenitic::soundReceiverDrawView() {
+void Selenitic::soundReceiverDrawView() {
uint32 left = ((*_soundReceiverPosition) * 1800) / 3600;
_soundReceiverViewer->_subImages->rect.left = left;
@@ -680,7 +680,7 @@ void MystScriptParser_Selenitic::soundReceiverDrawView() {
soundReceiverDrawAngle();
}
-void MystScriptParser_Selenitic::soundReceiverDrawAngle() {
+void Selenitic::soundReceiverDrawAngle() {
_vm->redrawResource(_soundReceiverAngle1);
_vm->redrawResource(_soundReceiverAngle2);
_vm->redrawResource(_soundReceiverAngle3);
@@ -690,7 +690,7 @@ void MystScriptParser_Selenitic::soundReceiverDrawAngle() {
/**
* Sound receiver source selection buttons
*/
-void MystScriptParser_Selenitic::o_soundReceiverSource(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
+void Selenitic::o_soundReceiverSource(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
debugC(kDebugScript, "Opcode %d: Sound receiver source", op);
if (_soundReceiverSigmaPressed) {
@@ -724,7 +724,7 @@ void MystScriptParser_Selenitic::o_soundReceiverSource(uint16 op, uint16 var, ui
_vm->_cursor->showCursor();
}
-void MystScriptParser_Selenitic::o_mazeRunnerDoorButton(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
+void Selenitic::o_mazeRunnerDoorButton(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
// Used for Selenitic Maze Runner Exit Logic
uint16 cardIdExit = argv[0];
uint16 cardIdEntry = argv[1];
@@ -740,13 +740,13 @@ void MystScriptParser_Selenitic::o_mazeRunnerDoorButton(uint16 op, uint16 var, u
}
}
-void MystScriptParser_Selenitic::o_soundReceiverUpdateSound(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
+void Selenitic::o_soundReceiverUpdateSound(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
debugC(kDebugScript, "Opcode %d: Sound receiver update sound", op);
soundReceiverUpdateSound();
}
-uint16 MystScriptParser_Selenitic::soundLockCurrentSound(uint16 position, bool pixels) {
+uint16 Selenitic::soundLockCurrentSound(uint16 position, bool pixels) {
if ((pixels && position < 96) || (!pixels && position == 0))
return 289;
else if ((pixels && position < 108) || (!pixels && position == 1))
@@ -771,7 +771,7 @@ uint16 MystScriptParser_Selenitic::soundLockCurrentSound(uint16 position, bool p
return 0;
}
-MystResourceType10 *MystScriptParser_Selenitic::soundLockSliderFromVar(uint16 var) {
+MystResourceType10 *Selenitic::soundLockSliderFromVar(uint16 var) {
switch (var) {
case 20:
return _soundLockSlider1;
@@ -788,7 +788,7 @@ MystResourceType10 *MystScriptParser_Selenitic::soundLockSliderFromVar(uint16 va
return 0;
}
-void MystScriptParser_Selenitic::o_soundLockMove(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
+void Selenitic::o_soundLockMove(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
debugC(kDebugScript, "Opcode %d: Sound lock move", op);
MystResourceType10 *slider = soundLockSliderFromVar(var);
@@ -800,7 +800,7 @@ void MystScriptParser_Selenitic::o_soundLockMove(uint16 op, uint16 var, uint16 a
}
}
-void MystScriptParser_Selenitic::o_soundLockStartMove(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
+void Selenitic::o_soundLockStartMove(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
debugC(kDebugScript, "Opcode %d: Sound lock start move", op);
MystResourceType10 *slider = soundLockSliderFromVar(var);
@@ -812,7 +812,7 @@ void MystScriptParser_Selenitic::o_soundLockStartMove(uint16 op, uint16 var, uin
_vm->_sound->replaceSoundMyst(_soundLockSoundId, Audio::Mixer::kMaxChannelVolume, true);
}
-void MystScriptParser_Selenitic::o_soundLockEndMove(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
+void Selenitic::o_soundLockEndMove(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
debugC(kDebugScript, "Opcode %d: Sound lock end move", op);
MystResourceType10 *slider = soundLockSliderFromVar(var);
@@ -856,7 +856,7 @@ void MystScriptParser_Selenitic::o_soundLockEndMove(uint16 op, uint16 var, uint1
_vm->_sound->resumeBackgroundMyst();
}
-void MystScriptParser_Selenitic::soundLockCheckSolution(MystResourceType10 *slider, uint16 value, uint16 solution, bool &solved) {
+void Selenitic::soundLockCheckSolution(MystResourceType10 *slider, uint16 value, uint16 solution, bool &solved) {
slider->drawConditionalDataToScreen(2);
_vm->_sound->replaceSoundMyst(soundLockCurrentSound(value / 12, false));
_vm->_system->delayMillis(1500);
@@ -868,7 +868,7 @@ void MystScriptParser_Selenitic::soundLockCheckSolution(MystResourceType10 *slid
_vm->_sound->stopSound();
}
-void MystScriptParser_Selenitic::o_soundLockButton(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
+void Selenitic::o_soundLockButton(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
debugC(kDebugScript, "Opcode %d: Sound lock button", op);
bool solved = true;
@@ -906,7 +906,7 @@ void MystScriptParser_Selenitic::o_soundLockButton(uint16 op, uint16 var, uint16
_vm->_cursor->showCursor();
}
-void MystScriptParser_Selenitic::o_soundReceiverEndMove(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
+void Selenitic::o_soundReceiverEndMove(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
debugC(kDebugScript, "Opcode %d: Sound receiver end move", op);
uint16 oldDirection = _soundReceiverDirection;
@@ -923,19 +923,19 @@ void MystScriptParser_Selenitic::o_soundReceiverEndMove(uint16 op, uint16 var, u
}
}
-void MystScriptParser_Selenitic::o_mazeRunnerCompass_init(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
+void Selenitic::o_mazeRunnerCompass_init(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
_mazeRunnerCompass = static_cast<MystResourceType8 *>(_invokingResource);
}
-void MystScriptParser_Selenitic::o_mazeRunnerWindow_init(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
+void Selenitic::o_mazeRunnerWindow_init(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
_mazeRunnerWindow = static_cast<MystResourceType8 *>(_invokingResource);
}
-void MystScriptParser_Selenitic::o_mazeRunnerLight_init(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
+void Selenitic::o_mazeRunnerLight_init(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
_mazeRunnerLight = static_cast<MystResourceType8 *>(_invokingResource);
}
-void MystScriptParser_Selenitic::soundReceiver_run() {
+void Selenitic::soundReceiver_run() {
if (_soundReceiverStartTime) {
if (_soundReceiverDirection) {
uint32 currentTime = _vm->_system->getMillis();
@@ -953,7 +953,7 @@ void MystScriptParser_Selenitic::soundReceiver_run() {
}
}
-void MystScriptParser_Selenitic::soundReceiverIncreaseSpeed() {
+void Selenitic::soundReceiverIncreaseSpeed() {
switch (_soundReceiverSpeed) {
case 1:
_soundReceiverSpeed = 10;
@@ -967,12 +967,12 @@ void MystScriptParser_Selenitic::soundReceiverIncreaseSpeed() {
}
}
-void MystScriptParser_Selenitic::soundReceiverUpdateSound() {
+void Selenitic::soundReceiverUpdateSound() {
uint16 soundId = soundReceiverCurrentSound(_state.soundReceiverCurrentSource, *_soundReceiverPosition);
_vm->_sound->replaceSoundMyst(soundId);
}
-uint16 MystScriptParser_Selenitic::soundReceiverCurrentSound(uint16 source, uint16 position) {
+uint16 Selenitic::soundReceiverCurrentSound(uint16 source, uint16 position) {
uint16 solution = 0;
bool sourceEnabled = false;
soundReceiverSolution(source, solution, sourceEnabled);
@@ -1023,7 +1023,7 @@ uint16 MystScriptParser_Selenitic::soundReceiverCurrentSound(uint16 source, uint
return soundId;
}
-void MystScriptParser_Selenitic::soundReceiverSolution(uint16 source, uint16 &solution, bool &enabled) {
+void Selenitic::soundReceiverSolution(uint16 source, uint16 &solution, bool &enabled) {
switch (source) {
case 0:
enabled = _state.emitterEnabledWater;
@@ -1048,7 +1048,7 @@ void MystScriptParser_Selenitic::soundReceiverSolution(uint16 source, uint16 &so
}
}
-void MystScriptParser_Selenitic::o_soundReceiver_init(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
+void Selenitic::o_soundReceiver_init(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
debugC(kDebugScript, "Opcode %d: Sound receiver init", op);
// Used for Card 1245 (Sound Receiver)
@@ -1075,7 +1075,7 @@ void MystScriptParser_Selenitic::o_soundReceiver_init(uint16 op, uint16 var, uin
_soundReceiverSigmaPressed = false;
}
-void MystScriptParser_Selenitic::o_soundLock_init(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
+void Selenitic::o_soundLock_init(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
debugC(kDebugScript, "Opcode %d: Sound lock init", op);
for (uint i = 0; i < _vm->_resources.size(); i++) {
@@ -1110,15 +1110,15 @@ void MystScriptParser_Selenitic::o_soundLock_init(uint16 op, uint16 var, uint16
_soundLockSoundId = 0;
}
-void MystScriptParser_Selenitic::o_mazeRunnerRight_init(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
+void Selenitic::o_mazeRunnerRight_init(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
_mazeRunnerRightButton = static_cast<MystResourceType8 *>(_invokingResource);
}
-void MystScriptParser_Selenitic::o_mazeRunnerLeft_init(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
+void Selenitic::o_mazeRunnerLeft_init(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
_mazeRunnerLeftButton = static_cast<MystResourceType8 *>(_invokingResource);
}
-const uint16 MystScriptParser_Selenitic::_mazeRunnerMap[300][4] = {
+const uint16 Selenitic::_mazeRunnerMap[300][4] = {
{8, 7, 1, 288},
{1, 0, 2, 288},
{2, 1, 3, 288},
@@ -1421,7 +1421,7 @@ const uint16 MystScriptParser_Selenitic::_mazeRunnerMap[300][4] = {
{ 0, 0, 0, 0}
};
-const uint8 MystScriptParser_Selenitic::_mazeRunnerVideos[300][4] = {
+const uint8 Selenitic::_mazeRunnerVideos[300][4] = {
{3, 6, 10, 17},
{0, 5, 8, 17},
{0, 4, 8, 17},