aboutsummaryrefslogtreecommitdiff
path: root/engines/mohawk/myst_stacks
diff options
context:
space:
mode:
authorBastien Bouclet2016-02-06 13:54:02 +0100
committerBastien Bouclet2016-02-07 15:27:03 +0100
commitcddb5cd53a8fb5bb64c15a02950b05f5898f7e34 (patch)
treedfe77ab01f1c0a5a66dd5f9f4bfb49312d71ceff /engines/mohawk/myst_stacks
parent085f3700f7cd6ddb23abe3719ca21b7025695da4 (diff)
downloadscummvm-rg350-cddb5cd53a8fb5bb64c15a02950b05f5898f7e34.tar.gz
scummvm-rg350-cddb5cd53a8fb5bb64c15a02950b05f5898f7e34.tar.bz2
scummvm-rg350-cddb5cd53a8fb5bb64c15a02950b05f5898f7e34.zip
MOHAWK: Rename Myst's Area classes
Diffstat (limited to 'engines/mohawk/myst_stacks')
-rw-r--r--engines/mohawk/myst_stacks/channelwood.cpp34
-rw-r--r--engines/mohawk/myst_stacks/channelwood.h2
-rw-r--r--engines/mohawk/myst_stacks/intro.cpp2
-rw-r--r--engines/mohawk/myst_stacks/intro.h4
-rw-r--r--engines/mohawk/myst_stacks/mechanical.cpp48
-rw-r--r--engines/mohawk/myst_stacks/mechanical.h10
-rw-r--r--engines/mohawk/myst_stacks/myst.cpp108
-rw-r--r--engines/mohawk/myst_stacks/myst.h40
-rw-r--r--engines/mohawk/myst_stacks/preview.cpp6
-rw-r--r--engines/mohawk/myst_stacks/preview.h2
-rw-r--r--engines/mohawk/myst_stacks/selenitic.cpp64
-rw-r--r--engines/mohawk/myst_stacks/selenitic.h48
-rw-r--r--engines/mohawk/myst_stacks/stoneship.cpp34
-rw-r--r--engines/mohawk/myst_stacks/stoneship.h8
14 files changed, 205 insertions, 205 deletions
diff --git a/engines/mohawk/myst_stacks/channelwood.cpp b/engines/mohawk/myst_stacks/channelwood.cpp
index 0718f8e683..7b38e3707f 100644
--- a/engines/mohawk/myst_stacks/channelwood.cpp
+++ b/engines/mohawk/myst_stacks/channelwood.cpp
@@ -377,7 +377,7 @@ void Channelwood::o_waterTankValveOpen(uint16 op, uint16 var, uint16 argc, uint1
void Channelwood::o_leverStartMove(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
debugC(kDebugScript, "Opcode %d: Generic lever start move", op);
- MystResourceType12 *lever = static_cast<MystResourceType12 *>(_invokingResource);
+ MystVideoInfo *lever = static_cast<MystVideoInfo *>(_invokingResource);
lever->drawFrame(0);
_vm->_cursor->setCursor(700);
_leverPulled = false;
@@ -386,7 +386,7 @@ void Channelwood::o_leverStartMove(uint16 op, uint16 var, uint16 argc, uint16 *a
void Channelwood::o_leverMove(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
debugC(kDebugScript, "Opcode %d: Generic lever move", op);
- MystResourceType12 *lever = static_cast<MystResourceType12 *>(_invokingResource);
+ MystVideoInfo *lever = static_cast<MystVideoInfo *>(_invokingResource);
if (lever->pullLeverV()) {
if (!_leverPulled) {
@@ -401,7 +401,7 @@ void Channelwood::o_leverMove(uint16 op, uint16 var, uint16 argc, uint16 *argv)
void Channelwood::o_leverMoveFail(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
debugC(kDebugScript, "Opcode %d: Generic lever move", op);
- MystResourceType12 *lever = static_cast<MystResourceType12 *>(_invokingResource);
+ MystVideoInfo *lever = static_cast<MystVideoInfo *>(_invokingResource);
if (lever->pullLeverV()) {
if (!_leverPulled) {
@@ -419,7 +419,7 @@ void Channelwood::o_leverEndMove(uint16 op, uint16 var, uint16 argc, uint16 *arg
debugC(kDebugScript, "Opcode %d: Generic lever end move", op);
// Get current lever frame
- MystResourceType12 *lever = static_cast<MystResourceType12 *>(_invokingResource);
+ MystVideoInfo *lever = static_cast<MystVideoInfo *>(_invokingResource);
// Release lever
lever->releaseLeverV();
@@ -439,7 +439,7 @@ void Channelwood::o_leverEndMoveResumeBackground(uint16 op, uint16 var, uint16 a
void Channelwood::o_leverEndMoveWithSound(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
o_leverEndMove(op, var, argc, argv);
- MystResourceType12 *lever = static_cast<MystResourceType12 *>(_invokingResource);
+ MystVideoInfo *lever = static_cast<MystVideoInfo *>(_invokingResource);
uint16 soundId = lever->getList3(0);
if (soundId)
_vm->_sound->replaceSoundMyst(soundId);
@@ -461,7 +461,7 @@ void Channelwood::o_leverElev3EndMove(uint16 op, uint16 var, uint16 argc, uint16
void Channelwood::o_pumpLeverMove(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
debugC(kDebugScript, "Opcode %d: Pump lever move", op);
- MystResourceType12 *lever = static_cast<MystResourceType12 *>(_invokingResource);
+ MystVideoInfo *lever = static_cast<MystVideoInfo *>(_invokingResource);
if (lever->pullLeverV()) {
uint16 soundId = lever->getList2(0);
@@ -475,7 +475,7 @@ void Channelwood::o_pumpLeverMove(uint16 op, uint16 var, uint16 argc, uint16 *ar
void Channelwood::o_pumpLeverEndMove(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
o_leverEndMove(op, var, argc, argv);
- MystResourceType12 *lever = static_cast<MystResourceType12 *>(_invokingResource);
+ MystVideoInfo *lever = static_cast<MystVideoInfo *>(_invokingResource);
uint16 soundId = lever->getList3(0);
if (soundId)
_vm->_sound->replaceBackgroundMyst(soundId, 36864);
@@ -484,7 +484,7 @@ void Channelwood::o_pumpLeverEndMove(uint16 op, uint16 var, uint16 argc, uint16
void Channelwood::o_stairsDoorToggle(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
debugC(kDebugScript, "Opcode %d: Play stairs door video", op);
- MystResourceType6 *movie = static_cast<MystResourceType6 *>(_invokingResource);
+ MystAreaVideo *movie = static_cast<MystAreaVideo *>(_invokingResource);
if (_state.stairsUpperDoorState) {
// Close door, play the open movie backwards
@@ -500,7 +500,7 @@ void Channelwood::o_stairsDoorToggle(uint16 op, uint16 var, uint16 argc, uint16
void Channelwood::o_valveHandleMove1(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
debugC(kDebugScript, "Opcode %d: Valve handle move", op);
- MystResourceType12 *handle = static_cast<MystResourceType12 *>(_invokingResource);
+ MystVideoInfo *handle = static_cast<MystVideoInfo *>(_invokingResource);
const Common::Point &mouse = _vm->_system->getEventManager()->getMousePos();
if (handle->getRect().contains(mouse)) {
@@ -516,7 +516,7 @@ void Channelwood::o_valveHandleMove1(uint16 op, uint16 var, uint16 argc, uint16
void Channelwood::o_valveHandleMoveStart1(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
debugC(kDebugScript, "Opcode %d: Valve handle move start", op);
- MystResourceType12 *handle = static_cast<MystResourceType12 *>(_invokingResource);
+ MystVideoInfo *handle = static_cast<MystVideoInfo *>(_invokingResource);
uint16 soundId = handle->getList1(0);
if (soundId)
_vm->_sound->replaceSoundMyst(soundId);
@@ -528,7 +528,7 @@ void Channelwood::o_valveHandleMoveStart1(uint16 op, uint16 var, uint16 argc, ui
void Channelwood::o_valveHandleMoveStop(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
debugC(kDebugScript, "Opcode %d: Valve handle move stop", op);
- MystResourceType12 *handle = static_cast<MystResourceType12 *>(_invokingResource);
+ MystVideoInfo *handle = static_cast<MystVideoInfo *>(_invokingResource);
// Update state with valve position
if (_tempVar <= 5)
@@ -551,7 +551,7 @@ void Channelwood::o_valveHandleMoveStop(uint16 op, uint16 var, uint16 argc, uint
void Channelwood::o_valveHandleMove2(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
debugC(kDebugScript, "Opcode %d: Valve handle move", op);
- MystResourceType12 *handle = static_cast<MystResourceType12 *>(_invokingResource);
+ MystVideoInfo *handle = static_cast<MystVideoInfo *>(_invokingResource);
const Common::Point &mouse = _vm->_system->getEventManager()->getMousePos();
if (handle->getRect().contains(mouse)) {
@@ -567,7 +567,7 @@ void Channelwood::o_valveHandleMove2(uint16 op, uint16 var, uint16 argc, uint16
void Channelwood::o_valveHandleMoveStart2(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
debugC(kDebugScript, "Opcode %d: Valve handle move start", op);
- MystResourceType12 *handle = static_cast<MystResourceType12 *>(_invokingResource);
+ MystVideoInfo *handle = static_cast<MystVideoInfo *>(_invokingResource);
uint16 soundId = handle->getList1(0);
if (soundId)
_vm->_sound->replaceSoundMyst(soundId);
@@ -579,7 +579,7 @@ void Channelwood::o_valveHandleMoveStart2(uint16 op, uint16 var, uint16 argc, ui
void Channelwood::o_valveHandleMove3(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
debugC(kDebugScript, "Opcode %d: Valve handle move", op);
- MystResourceType12 *handle = static_cast<MystResourceType12 *>(_invokingResource);
+ MystVideoInfo *handle = static_cast<MystVideoInfo *>(_invokingResource);
const Common::Point &mouse = _vm->_system->getEventManager()->getMousePos();
if (handle->getRect().contains(mouse)) {
@@ -595,7 +595,7 @@ void Channelwood::o_valveHandleMove3(uint16 op, uint16 var, uint16 argc, uint16
void Channelwood::o_valveHandleMoveStart3(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
debugC(kDebugScript, "Opcode %d: Valve handle move start", op);
- MystResourceType12 *handle = static_cast<MystResourceType12 *>(_invokingResource);
+ MystVideoInfo *handle = static_cast<MystVideoInfo *>(_invokingResource);
uint16 soundId = handle->getList1(0);
if (soundId)
_vm->_sound->replaceSoundMyst(soundId);
@@ -680,7 +680,7 @@ void Channelwood::o_hologramTemple(uint16 op, uint16 var, uint16 argc, uint16 *a
void Channelwood::o_executeMouseUp(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
debugC(kDebugScript, "Opcode %d: Execute mouse up", op);
- MystResourceType5 *resource = static_cast<MystResourceType5 *>(_vm->_resources[argv[0]]);
+ MystAreaAction *resource = static_cast<MystAreaAction *>(_vm->_resources[argv[0]]);
resource->handleMouseUp();
}
@@ -753,7 +753,7 @@ void Channelwood::o_soundReplace(uint16 op, uint16 var, uint16 argc, uint16 *arg
void Channelwood::o_lever_init(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
debugC(kDebugScript, "Opcode %d: Generic lever init", op);
- _leverAction = static_cast<MystResourceType5 *>(_invokingResource);
+ _leverAction = static_cast<MystAreaAction *>(_invokingResource);
}
void Channelwood::o_pipeValve_init(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
diff --git a/engines/mohawk/myst_stacks/channelwood.h b/engines/mohawk/myst_stacks/channelwood.h
index 719257f1ef..c141a62cd6 100644
--- a/engines/mohawk/myst_stacks/channelwood.h
+++ b/engines/mohawk/myst_stacks/channelwood.h
@@ -94,7 +94,7 @@ private:
uint16 _doorOpened; // 68
bool _leverPulled;
- MystResourceType5 *_leverAction; // 72
+ MystAreaAction *_leverAction; // 72
bool pipeChangeValve(bool open, uint16 mask);
};
diff --git a/engines/mohawk/myst_stacks/intro.cpp b/engines/mohawk/myst_stacks/intro.cpp
index dc66984398..a139ca2a9b 100644
--- a/engines/mohawk/myst_stacks/intro.cpp
+++ b/engines/mohawk/myst_stacks/intro.cpp
@@ -170,7 +170,7 @@ void Intro::mystLinkBook_run() {
void Intro::o_mystLinkBook_init(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
debugC(kDebugScript, "Opcode %d: Myst link book init", op);
- _linkBookMovie = static_cast<MystResourceType6 *>(_invokingResource);
+ _linkBookMovie = static_cast<MystAreaVideo *>(_invokingResource);
_startTime = 1;
_linkBookRunning = true;
}
diff --git a/engines/mohawk/myst_stacks/intro.h b/engines/mohawk/myst_stacks/intro.h
index acff03e2a0..0095706795 100644
--- a/engines/mohawk/myst_stacks/intro.h
+++ b/engines/mohawk/myst_stacks/intro.h
@@ -29,7 +29,7 @@
namespace Mohawk {
-class MystResourceType6;
+class MystAreaVideo;
struct MystScriptEntry;
namespace MystStacks {
@@ -60,7 +60,7 @@ private:
uint16 _introStep;
bool _linkBookRunning;
- MystResourceType6 *_linkBookMovie;
+ MystAreaVideo *_linkBookMovie;
};
} // End of namespace MystStacks
diff --git a/engines/mohawk/myst_stacks/mechanical.cpp b/engines/mohawk/myst_stacks/mechanical.cpp
index ffcaa226c6..3f1fbf91e7 100644
--- a/engines/mohawk/myst_stacks/mechanical.cpp
+++ b/engines/mohawk/myst_stacks/mechanical.cpp
@@ -277,7 +277,7 @@ void Mechanical::o_throneEnablePassage(uint16 op, uint16 var, uint16 argc, uint1
void Mechanical::o_birdCrankStart(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
debugC(kDebugScript, "Opcode %d: Mechanical bird crank start", op);
- MystResourceType11 *crank = static_cast<MystResourceType11 *>(_invokingResource);
+ MystAreaDrag *crank = static_cast<MystAreaDrag *>(_invokingResource);
uint16 crankSoundId = crank->getList2(0);
_vm->_sound->replaceSoundMyst(crankSoundId, Audio::Mixer::kMaxChannelVolume, true);
@@ -285,16 +285,16 @@ void Mechanical::o_birdCrankStart(uint16 op, uint16 var, uint16 argc, uint16 *ar
_birdSingEndTime = 0;
_birdCrankStartTime = _vm->_system->getMillis();
- MystResourceType6 *crankMovie = static_cast<MystResourceType6 *>(crank->getSubResource(0));
+ MystAreaVideo *crankMovie = static_cast<MystAreaVideo *>(crank->getSubResource(0));
crankMovie->playMovie();
}
void Mechanical::o_birdCrankStop(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
debugC(kDebugScript, "Opcode %d: Mechanical bird crank stop", op);
- MystResourceType11 *crank = static_cast<MystResourceType11 *>(_invokingResource);
+ MystAreaDrag *crank = static_cast<MystAreaDrag *>(_invokingResource);
- MystResourceType6 *crankMovie = static_cast<MystResourceType6 *>(crank->getSubResource(0));
+ MystAreaVideo *crankMovie = static_cast<MystAreaVideo *>(crank->getSubResource(0));
crankMovie->pauseMovie(true);
uint16 crankSoundId = crank->getList2(1);
@@ -334,7 +334,7 @@ void Mechanical::o_fortressStaircaseMovie(uint16 op, uint16 var, uint16 argc, ui
void Mechanical::o_elevatorRotationStart(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
debugC(kDebugScript, "Opcode %d: Elevator rotation lever start", op);
- MystResourceType12 *lever = static_cast<MystResourceType12 *>(_invokingResource);
+ MystVideoInfo *lever = static_cast<MystVideoInfo *>(_invokingResource);
lever->drawFrame(0);
_elevatorRotationLeverMoving = true;
@@ -349,7 +349,7 @@ void Mechanical::o_elevatorRotationMove(uint16 op, uint16 var, uint16 argc, uint
debugC(kDebugScript, "Opcode %d: Elevator rotation lever move", op);
const Common::Point &mouse = _vm->_system->getEventManager()->getMousePos();
- MystResourceType12 *lever = static_cast<MystResourceType12 *>(_invokingResource);
+ MystVideoInfo *lever = static_cast<MystVideoInfo *>(_invokingResource);
// Make the handle follow the mouse
int16 maxStep = lever->getNumFrames() - 1;
@@ -367,7 +367,7 @@ void Mechanical::o_elevatorRotationStop(uint16 op, uint16 var, uint16 argc, uint
debugC(kDebugScript, "Opcode %d: Elevator rotation lever stop", op);
const Common::Point &mouse = _vm->_system->getEventManager()->getMousePos();
- MystResourceType12 *lever = static_cast<MystResourceType12 *>(_invokingResource);
+ MystVideoInfo *lever = static_cast<MystVideoInfo *>(_invokingResource);
// Get current lever frame
int16 maxStep = lever->getNumFrames() - 1;
@@ -416,7 +416,7 @@ void Mechanical::o_fortressRotationSpeedStart(uint16 op, uint16 var, uint16 argc
_vm->_cursor->setCursor(700);
- MystResourceType12 *lever = static_cast<MystResourceType12 *>(_invokingResource);
+ MystVideoInfo *lever = static_cast<MystVideoInfo *>(_invokingResource);
lever->drawFrame(0);
}
@@ -424,7 +424,7 @@ void Mechanical::o_fortressRotationSpeedMove(uint16 op, uint16 var, uint16 argc,
debugC(kDebugScript, "Opcode %d Fortress rotation speed lever move", op);
const Common::Point &mouse = _vm->_system->getEventManager()->getMousePos();
- MystResourceType12 *lever = static_cast<MystResourceType12 *>(_invokingResource);
+ MystVideoInfo *lever = static_cast<MystVideoInfo *>(_invokingResource);
// Make the handle follow the mouse
int16 maxStep = lever->getNumFrames() - 1;
@@ -441,7 +441,7 @@ void Mechanical::o_fortressRotationSpeedMove(uint16 op, uint16 var, uint16 argc,
void Mechanical::o_fortressRotationSpeedStop(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
debugC(kDebugScript, "Opcode %d Fortress rotation speed lever stop", op);
- MystResourceType12 *lever = static_cast<MystResourceType12 *>(_invokingResource);
+ MystVideoInfo *lever = static_cast<MystVideoInfo *>(_invokingResource);
// Release lever
for (int i = _fortressRotationSpeed; i >= 0; i--) {
@@ -459,7 +459,7 @@ void Mechanical::o_fortressRotationBrakeStart(uint16 op, uint16 var, uint16 argc
_vm->_cursor->setCursor(700);
- MystResourceType12 *lever = static_cast<MystResourceType12 *>(_invokingResource);
+ MystVideoInfo *lever = static_cast<MystVideoInfo *>(_invokingResource);
lever->drawFrame(_fortressRotationBrake);
}
@@ -467,7 +467,7 @@ void Mechanical::o_fortressRotationBrakeMove(uint16 op, uint16 var, uint16 argc,
debugC(kDebugScript, "Opcode %d Fortress rotation brake lever move", op);
const Common::Point &mouse = _vm->_system->getEventManager()->getMousePos();
- MystResourceType12 *lever = static_cast<MystResourceType12 *>(_invokingResource);
+ MystVideoInfo *lever = static_cast<MystVideoInfo *>(_invokingResource);
// Make the handle follow the mouse
int16 maxStep = lever->getNumFrames() - 1;
@@ -484,7 +484,7 @@ void Mechanical::o_fortressRotationBrakeMove(uint16 op, uint16 var, uint16 argc,
void Mechanical::o_fortressRotationBrakeStop(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
debugC(kDebugScript, "Opcode %d Fortress rotation brake lever stop", op);
- MystResourceType12 *lever = static_cast<MystResourceType12 *>(_invokingResource);
+ MystVideoInfo *lever = static_cast<MystVideoInfo *>(_invokingResource);
lever->drawFrame(_fortressRotationBrake);
_vm->checkCursorHints();
@@ -495,7 +495,7 @@ void Mechanical::o_fortressSimulationSpeedStart(uint16 op, uint16 var, uint16 ar
_vm->_cursor->setCursor(700);
- MystResourceType12 *lever = static_cast<MystResourceType12 *>(_invokingResource);
+ MystVideoInfo *lever = static_cast<MystVideoInfo *>(_invokingResource);
lever->drawFrame(0);
}
@@ -503,7 +503,7 @@ void Mechanical::o_fortressSimulationSpeedMove(uint16 op, uint16 var, uint16 arg
debugC(kDebugScript, "Opcode %d Fortress rotation simulator speed lever move", op);
const Common::Point &mouse = _vm->_system->getEventManager()->getMousePos();
- MystResourceType12 *lever = static_cast<MystResourceType12 *>(_invokingResource);
+ MystVideoInfo *lever = static_cast<MystVideoInfo *>(_invokingResource);
// Make the handle follow the mouse
int16 maxStep = lever->getNumFrames() - 1;
@@ -520,7 +520,7 @@ void Mechanical::o_fortressSimulationSpeedMove(uint16 op, uint16 var, uint16 arg
void Mechanical::o_fortressSimulationSpeedStop(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
debugC(kDebugScript, "Opcode %d Fortress rotation simulator speed lever stop", op);
- MystResourceType12 *lever = static_cast<MystResourceType12 *>(_invokingResource);
+ MystVideoInfo *lever = static_cast<MystVideoInfo *>(_invokingResource);
// Release lever
for (int i = _fortressSimulationSpeed; i >= 0; i--) {
@@ -538,7 +538,7 @@ void Mechanical::o_fortressSimulationBrakeStart(uint16 op, uint16 var, uint16 ar
_vm->_cursor->setCursor(700);
- MystResourceType12 *lever = static_cast<MystResourceType12 *>(_invokingResource);
+ MystVideoInfo *lever = static_cast<MystVideoInfo *>(_invokingResource);
lever->drawFrame(_fortressSimulationBrake);
}
@@ -546,7 +546,7 @@ void Mechanical::o_fortressSimulationBrakeMove(uint16 op, uint16 var, uint16 arg
debugC(kDebugScript, "Opcode %d Fortress rotation simulator brake lever move", op);
const Common::Point &mouse = _vm->_system->getEventManager()->getMousePos();
- MystResourceType12 *lever = static_cast<MystResourceType12 *>(_invokingResource);
+ MystVideoInfo *lever = static_cast<MystVideoInfo *>(_invokingResource);
// Make the handle follow the mouse
int16 maxStep = lever->getNumFrames() - 1;
@@ -563,7 +563,7 @@ void Mechanical::o_fortressSimulationBrakeMove(uint16 op, uint16 var, uint16 arg
void Mechanical::o_fortressSimulationBrakeStop(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
debugC(kDebugScript, "Opcode %d Fortress rotation simulator brake lever stop", op);
- MystResourceType12 *lever = static_cast<MystResourceType12 *>(_invokingResource);
+ MystVideoInfo *lever = static_cast<MystVideoInfo *>(_invokingResource);
lever->drawFrame(_fortressSimulationBrake);
_vm->checkCursorHints();
@@ -763,13 +763,13 @@ void Mechanical::o_bird_init(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
_birdSinging = false;
_birdSingEndTime = 0;
- _bird = static_cast<MystResourceType6 *>(_invokingResource);
+ _bird = static_cast<MystAreaVideo *>(_invokingResource);
}
void Mechanical::o_snakeBox_init(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
debugC(kDebugScript, "Opcode %d: Snake box init", op);
- _snakeBox = static_cast<MystResourceType6 *>(_invokingResource);
+ _snakeBox = static_cast<MystAreaVideo *>(_invokingResource);
}
void Mechanical::elevatorRotation_run() {
@@ -872,7 +872,7 @@ void Mechanical::fortressRotation_run() {
void Mechanical::o_fortressRotation_init(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
debugC(kDebugScript, "Opcode %d: Fortress rotation init", op);
- _fortressRotationGears = static_cast<MystResourceType6 *>(_invokingResource);
+ _fortressRotationGears = static_cast<MystAreaVideo *>(_invokingResource);
VideoHandle gears = _fortressRotationGears->playMovie();
gears->setLooping(true);
@@ -997,7 +997,7 @@ void Mechanical::fortressSimulation_run() {
void Mechanical::o_fortressSimulation_init(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
debugC(kDebugScript, "Opcode %d: Fortress rotation simulator init", op);
- _fortressSimulationHolo = static_cast<MystResourceType6 *>(_invokingResource);
+ _fortressSimulationHolo = static_cast<MystAreaVideo *>(_invokingResource);
_fortressSimulationStartSound1 = argv[0];
_fortressSimulationStartSound2 = argv[1];
@@ -1019,7 +1019,7 @@ void Mechanical::o_fortressSimulation_init(uint16 op, uint16 var, uint16 argc, u
void Mechanical::o_fortressSimulationStartup_init(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
debugC(kDebugScript, "Opcode %d: Fortress rotation simulator startup init", op);
- _fortressSimulationStartup = static_cast<MystResourceType6 *>(_invokingResource);
+ _fortressSimulationStartup = static_cast<MystAreaVideo *>(_invokingResource);
}
} // End of namespace MystStacks
diff --git a/engines/mohawk/myst_stacks/mechanical.h b/engines/mohawk/myst_stacks/mechanical.h
index ccc2783712..159a330c79 100644
--- a/engines/mohawk/myst_stacks/mechanical.h
+++ b/engines/mohawk/myst_stacks/mechanical.h
@@ -109,7 +109,7 @@ private:
uint16 _fortressRotationBrake; // 80
uint16 _fortressPosition; // 82
uint16 _fortressRotationSounds[4]; // 86 to 92
- MystResourceType6 *_fortressRotationGears; // 172
+ MystAreaVideo *_fortressRotationGears; // 172
bool _fortressRotationShortMovieWorkaround;
uint32 _fortressRotationShortMovieCount;
@@ -121,8 +121,8 @@ private:
uint16 _fortressSimulationBrake; // 98
uint16 _fortressSimulationStartSound1; // 102
uint16 _fortressSimulationStartSound2; // 100
- MystResourceType6 *_fortressSimulationHolo; // 160
- MystResourceType6 *_fortressSimulationStartup; // 164
+ MystAreaVideo *_fortressSimulationHolo; // 160
+ MystAreaVideo *_fortressSimulationStartup; // 164
uint16 _elevatorGoingDown; // 112
@@ -143,10 +143,10 @@ private:
bool _birdSinging; // 144
uint32 _birdCrankStartTime; // 136
uint32 _birdSingEndTime; // 140
- MystResourceType6 *_bird; // 152
+ MystAreaVideo *_bird; // 152
- MystResourceType6 *_snakeBox; // 156
+ MystAreaVideo *_snakeBox; // 156
};
} // End of namespace MystStacks
diff --git a/engines/mohawk/myst_stacks/myst.cpp b/engines/mohawk/myst_stacks/myst.cpp
index c5f76fe54d..8d2e732c2c 100644
--- a/engines/mohawk/myst_stacks/myst.cpp
+++ b/engines/mohawk/myst_stacks/myst.cpp
@@ -1251,7 +1251,7 @@ void Myst::o_imagerPlayButton(uint16 op, uint16 var, uint16 argc, uint16 *argv)
void Myst::o_imagerEraseButton(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
debugC(kDebugScript, "Opcode %d: Imager erase button", op);
- _imagerRedButton = static_cast<MystResourceType8 *>(_invokingResource->_parent);
+ _imagerRedButton = static_cast<MystAreaImageSwitch *>(_invokingResource->_parent);
for (uint i = 0; i < 4; i++)
_imagerSound[i] = argv[i];
_imagerValidationCard = argv[4];
@@ -1351,7 +1351,7 @@ void Myst::o_towerElevatorAnimation(uint16 op, uint16 var, uint16 argc, uint16 *
void Myst::o_generatorButtonPressed(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
debugC(kDebugScript, "Opcode %d: Generator button pressed", op);
- MystResource *button = _invokingResource->_parent;
+ MystArea *button = _invokingResource->_parent;
generatorRedrawRocket();
@@ -1385,7 +1385,7 @@ void Myst::o_generatorButtonPressed(uint16 op, uint16 var, uint16 argc, uint16 *
}
// Redraw button
- _vm->redrawArea(button->getType8Var());
+ _vm->redrawArea(button->getImageSwitchVar());
// Blow breaker
if (_state.generatorVoltage > 59)
@@ -1398,8 +1398,8 @@ void Myst::generatorRedrawRocket() {
_vm->redrawArea(97);
}
-void Myst::generatorButtonValue(MystResource *button, uint16 &mask, uint16 &value) {
- switch (button->getType8Var()) {
+void Myst::generatorButtonValue(MystArea *button, uint16 &mask, uint16 &value) {
+ switch (button->getImageSwitchVar()) {
case 52: // Generator Switch #1
mask = 1;
value = 10;
@@ -1466,7 +1466,7 @@ void Myst::o_cabinSafeHandleStartMove(uint16 op, uint16 var, uint16 argc, uint16
debugC(kDebugScript, "Opcode %d: Cabin safe handle start move", op);
// Used on Card 4100
- MystResourceType12 *handle = static_cast<MystResourceType12 *>(_invokingResource);
+ MystVideoInfo *handle = static_cast<MystVideoInfo *>(_invokingResource);
handle->drawFrame(0);
_vm->_cursor->setCursor(700);
_tempVar = 0;
@@ -1476,7 +1476,7 @@ void Myst::o_cabinSafeHandleMove(uint16 op, uint16 var, uint16 argc, uint16 *arg
debugC(kDebugScript, "Opcode %d: Cabin safe handle move", op);
// Used on Card 4100
- MystResourceType12 *handle = static_cast<MystResourceType12 *>(_invokingResource);
+ MystVideoInfo *handle = static_cast<MystVideoInfo *>(_invokingResource);
if (handle->pullLeverV()) {
// Sound not played yet
@@ -1506,7 +1506,7 @@ void Myst::o_cabinSafeHandleEndMove(uint16 op, uint16 var, uint16 argc, uint16 *
debugC(kDebugScript, "Opcode %d: Cabin safe handle end move", op);
// Used on Card 4100
- MystResourceType12 *handle = static_cast<MystResourceType12 *>(_invokingResource);
+ MystVideoInfo *handle = static_cast<MystVideoInfo *>(_invokingResource);
handle->drawFrame(0);
_vm->checkCursorHints();
}
@@ -1804,7 +1804,7 @@ void Myst::o_observatoryTimeSliderMove(uint16 op, uint16 var, uint16 argc, uint1
void Myst::o_circuitBreakerStartMove(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
debugC(kDebugScript, "Opcode %d: Circuit breaker start move", op);
- MystResourceType12 *breaker = static_cast<MystResourceType12 *>(_invokingResource);
+ MystVideoInfo *breaker = static_cast<MystVideoInfo *>(_invokingResource);
breaker->drawFrame(0);
_vm->_cursor->setCursor(700);
_tempVar = 0;
@@ -1813,7 +1813,7 @@ void Myst::o_circuitBreakerStartMove(uint16 op, uint16 var, uint16 argc, uint16
void Myst::o_circuitBreakerMove(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
debugC(kDebugScript, "Opcode %d: Circuit breaker move", op);
- MystResourceType12 *breaker = static_cast<MystResourceType12 *>(_invokingResource);
+ MystVideoInfo *breaker = static_cast<MystVideoInfo *>(_invokingResource);
const Common::Point &mouse = _vm->_system->getEventManager()->getMousePos();
int16 maxStep = breaker->getStepsV() - 1;
@@ -1828,7 +1828,7 @@ void Myst::o_circuitBreakerMove(uint16 op, uint16 var, uint16 argc, uint16 *argv
// Breaker switched
if (step == maxStep) {
// Choose breaker
- if (breaker->getType8Var() == 93) {
+ if (breaker->getImageSwitchVar() == 93) {
// Voltage is still too high or not broken
if (_state.generatorVoltage > 59 || _state.generatorBreakers != 1) {
uint16 soundId = breaker->getList2(1);
@@ -1864,8 +1864,8 @@ void Myst::o_circuitBreakerMove(uint16 op, uint16 var, uint16 argc, uint16 *argv
void Myst::o_circuitBreakerEndMove(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
debugC(kDebugScript, "Opcode %d: Circuit breaker end move", op);
- MystResourceType12 *breaker = static_cast<MystResourceType12 *>(_invokingResource);
- _vm->redrawArea(breaker->getType8Var());
+ MystVideoInfo *breaker = static_cast<MystVideoInfo *>(_invokingResource);
+ _vm->redrawArea(breaker->getImageSwitchVar());
_vm->checkCursorHints();
}
@@ -2202,7 +2202,7 @@ void Myst::o_rocketSoundSliderEndMove(uint16 op, uint16 var, uint16 argc, uint16
}
void Myst::rocketSliderMove() {
- MystResourceType10 *slider = static_cast<MystResourceType10 *>(_invokingResource);
+ MystAreaSlider *slider = static_cast<MystAreaSlider *>(_invokingResource);
if (_state.generatorVoltage == 59 && !_state.generatorBreakers) {
uint16 soundId = rocketSliderGetSound(slider->_pos.y);
@@ -2262,7 +2262,7 @@ void Myst::rocketCheckSolution() {
if (solved) {
// Reset lever position
- MystResourceType12 *lever = static_cast<MystResourceType12 *>(_invokingResource);
+ MystVideoInfo *lever = static_cast<MystVideoInfo *>(_invokingResource);
lever->drawFrame(0);
// Book appearing
@@ -2299,7 +2299,7 @@ void Myst::rocketCheckSolution() {
void Myst::o_rocketPianoStart(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
debugC(kDebugScript, "Opcode %d: Rocket piano start move", op);
- MystResourceType11 *key = static_cast<MystResourceType11 *>(_invokingResource);
+ MystAreaDrag *key = static_cast<MystAreaDrag *>(_invokingResource);
// What the hell??
Common::Rect src = key->getSubImage(1).rect;
@@ -2326,7 +2326,7 @@ void Myst::o_rocketPianoMove(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
Common::Rect piano = Common::Rect(85, 123, 460, 270);
// Unpress previous key
- MystResourceType11 *key = static_cast<MystResourceType11 *>(_invokingResource);
+ MystAreaDrag *key = static_cast<MystAreaDrag *>(_invokingResource);
Common::Rect src = key->getSubImage(0).rect;
Common::Rect dest = src;
@@ -2337,10 +2337,10 @@ void Myst::o_rocketPianoMove(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
_vm->_gfx->copyImageSectionToScreen(key->getSubImage(0).wdib, src, dest);
if (piano.contains(mouse)) {
- MystResource *resource = _vm->updateCurrentResource();
- if (resource && resource->type == kMystDragArea) {
+ MystArea *resource = _vm->updateCurrentResource();
+ if (resource && resource->type == kMystAreaDrag) {
// Press new key
- key = static_cast<MystResourceType11 *>(resource);
+ key = static_cast<MystAreaDrag *>(resource);
src = key->getSubImage(1).rect;
Common::Rect rect = key->getSubImage(0).rect;
dest = rect;
@@ -2368,7 +2368,7 @@ void Myst::o_rocketPianoMove(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
void Myst::o_rocketPianoStop(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
debugC(kDebugScript, "Opcode %d: Rocket piano end move", op);
- MystResourceType8 *key = static_cast<MystResourceType8 *>(_invokingResource);
+ MystAreaImageSwitch *key = static_cast<MystAreaImageSwitch *>(_invokingResource);
Common::Rect src = key->getSubImage(0).rect;
Common::Rect dest = src;
@@ -2386,7 +2386,7 @@ void Myst::o_rocketPianoStop(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
void Myst::o_rocketLeverStartMove(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
debugC(kDebugScript, "Opcode %d: Rocket lever start move", op);
- MystResourceType12 *lever = static_cast<MystResourceType12 *>(_invokingResource);
+ MystVideoInfo *lever = static_cast<MystVideoInfo *>(_invokingResource);
_vm->_cursor->setCursor(700);
_rocketLeverPosition = 0;
@@ -2406,7 +2406,7 @@ void Myst::o_rocketOpenBook(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
void Myst::o_rocketLeverMove(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
debugC(kDebugScript, "Opcode %d: Rocket lever move", op);
- MystResourceType12 *lever = static_cast<MystResourceType12 *>(_invokingResource);
+ MystVideoInfo *lever = static_cast<MystVideoInfo *>(_invokingResource);
const Common::Point &mouse = _vm->_system->getEventManager()->getMousePos();
// Make the lever follow the mouse
@@ -2435,7 +2435,7 @@ void Myst::o_rocketLeverMove(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
void Myst::o_rocketLeverEndMove(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
debugC(kDebugScript, "Opcode %d: Rocket lever end move", op);
- MystResourceType12 *lever = static_cast<MystResourceType12 *>(_invokingResource);
+ MystVideoInfo *lever = static_cast<MystVideoInfo *>(_invokingResource);
_vm->checkCursorHints();
_rocketLeverPosition = 0;
@@ -2712,7 +2712,7 @@ void Myst::clockWheel_run() {
}
void Myst::clockWheelStartTurn(uint16 wheel) {
- MystResourceType11 *resource = static_cast<MystResourceType11 *>(_invokingResource);
+ MystAreaDrag *resource = static_cast<MystAreaDrag *>(_invokingResource);
uint16 soundId = resource->getList1(0);
if (soundId)
@@ -2874,7 +2874,7 @@ void Myst::o_imagerEraseStop(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
void Myst::o_clockLeverStartMove(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
debugC(kDebugScript, "Opcode %d: Clock lever start move", op);
- MystResourceType12 *lever = static_cast<MystResourceType12 *>(_invokingResource);
+ MystVideoInfo *lever = static_cast<MystVideoInfo *>(_invokingResource);
lever->drawFrame(0);
_vm->_cursor->setCursor(700);
_clockMiddleGearMovedAlone = false;
@@ -2885,7 +2885,7 @@ void Myst::o_clockLeverMove(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
debugC(kDebugScript, "Opcode %d: Clock left lever move", op);
if (!_clockLeverPulled) {
- MystResourceType12 *lever = static_cast<MystResourceType12 *>(_invokingResource);
+ MystVideoInfo *lever = static_cast<MystVideoInfo *>(_invokingResource);
// If lever pulled
if (lever->pullLeverV()) {
@@ -2977,7 +2977,7 @@ void Myst::o_clockLeverEndMove(uint16 op, uint16 var, uint16 argc, uint16 *argv)
_vm->_sound->replaceSoundMyst(8113);
// Release lever
- MystResourceType12 *lever = static_cast<MystResourceType12 *>(_invokingResource);
+ MystVideoInfo *lever = static_cast<MystVideoInfo *>(_invokingResource);
lever->releaseLeverV();
// Check if puzzle is solved
@@ -3021,7 +3021,7 @@ void Myst::clockGearsCheckSolution() {
void Myst::o_clockResetLeverStartMove(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
debugC(kDebugScript, "Opcode %d: Clock reset lever start move", op);
- MystResourceType12 *lever = static_cast<MystResourceType12 *>(_invokingResource);
+ MystVideoInfo *lever = static_cast<MystVideoInfo *>(_invokingResource);
lever->drawFrame(0);
_vm->_cursor->setCursor(700);
}
@@ -3029,7 +3029,7 @@ void Myst::o_clockResetLeverStartMove(uint16 op, uint16 var, uint16 argc, uint16
void Myst::o_clockResetLeverMove(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
debugC(kDebugScript, "Opcode %d: Clock reset lever move", op);
- MystResourceType12 *lever = static_cast<MystResourceType12 *>(_invokingResource);
+ MystVideoInfo *lever = static_cast<MystVideoInfo *>(_invokingResource);
// If pulled
if (lever->pullLeverV() && _clockWeightPosition != 0)
@@ -3125,7 +3125,7 @@ void Myst::o_clockResetLeverEndMove(uint16 op, uint16 var, uint16 argc, uint16 *
debugC(kDebugScript, "Opcode %d: Clock reset lever end move", op);
// Get current lever frame
- MystResourceType12 *lever = static_cast<MystResourceType12 *>(_invokingResource);
+ MystVideoInfo *lever = static_cast<MystVideoInfo *>(_invokingResource);
lever->releaseLeverV();
@@ -3189,8 +3189,8 @@ void Myst::towerRotationMap_run() {
void Myst::o_towerRotationMap_init(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
_towerRotationMapRunning = true;
- _towerRotationMapTower = static_cast<MystResourceType11 *>(_invokingResource);
- _towerRotationMapLabel = static_cast<MystResourceType8 *>(_vm->_resources[argv[0]]);
+ _towerRotationMapTower = static_cast<MystAreaDrag *>(_invokingResource);
+ _towerRotationMapLabel = static_cast<MystAreaImageSwitch *>(_vm->_resources[argv[0]]);
_tempVar = 0;
_startTime = 0;
_towerRotationMapClicked = false;
@@ -3202,7 +3202,7 @@ void Myst::towerRotationDrawBuildings() {
// Draw other resources
for (uint i = 1; i <= 10; i++) {
- MystResourceType8 *resource = static_cast<MystResourceType8 *>(_vm->_resources[i]);
+ MystAreaImageSwitch *resource = static_cast<MystAreaImageSwitch *>(_vm->_resources[i]);
_vm->redrawResource(resource, false);
}
}
@@ -3322,7 +3322,7 @@ void Myst::o_butterflies_init(uint16 op, uint16 var, uint16 argc, uint16 *argv)
// Used for Card 4256 (Butterfly Movie Activation)
if (!_butterfliesMoviePlayed) {
- MystResourceType6 *butterflies = static_cast<MystResourceType6 *>(_invokingResource);
+ MystAreaVideo *butterflies = static_cast<MystAreaVideo *>(_invokingResource);
butterflies->playMovie();
_butterfliesMoviePlayed = true;
@@ -3333,8 +3333,8 @@ void Myst::o_imager_init(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
debugC(kDebugScript, "Opcode %d: Imager init", op);
debugC(kDebugScript, "Var: %d", var);
- MystResourceType7 *select = static_cast<MystResourceType7 *>(_invokingResource);
- _imagerMovie = static_cast<MystResourceType6 *>(select->getSubResource(getVar(var)));
+ MystAreaActionSwitch *select = static_cast<MystAreaActionSwitch *>(_invokingResource);
+ _imagerMovie = static_cast<MystAreaVideo *>(select->getSubResource(getVar(var)));
_imagerRunning = true;
}
@@ -3377,8 +3377,8 @@ void Myst::libraryBookcaseTransform_run(void) {
void Myst::o_libraryBookcaseTransform_init(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
if (_libraryBookcaseChanged) {
- MystResourceType7 *resource = static_cast<MystResourceType7 *>(_invokingResource);
- _libraryBookcaseMovie = static_cast<MystResourceType6 *>(resource->getSubResource(getVar(0)));
+ MystAreaActionSwitch *resource = static_cast<MystAreaActionSwitch *>(_invokingResource);
+ _libraryBookcaseMovie = static_cast<MystAreaVideo *>(resource->getSubResource(getVar(0)));
_libraryBookcaseSoundId = argv[0];
_libraryBookcaseMoving = true;
}
@@ -3471,17 +3471,17 @@ void Myst::o_observatory_init(uint16 op, uint16 var, uint16 argc, uint16 *argv)
_tempVar = 0;
_observatoryNotInitialized = true;
- _observatoryVisualizer = static_cast<MystResourceType8 *>(_invokingResource);
- _observatoryGoButton = static_cast<MystResourceType8 *>(_vm->_resources[argv[0]]);
+ _observatoryVisualizer = static_cast<MystAreaImageSwitch *>(_invokingResource);
+ _observatoryGoButton = static_cast<MystAreaImageSwitch *>(_vm->_resources[argv[0]]);
if (observatoryIsDDMMYYYY2400()) {
- _observatoryDaySlider = static_cast<MystResourceType10 *>(_vm->_resources[argv[1]]);
- _observatoryMonthSlider = static_cast<MystResourceType10 *>(_vm->_resources[argv[2]]);
+ _observatoryDaySlider = static_cast<MystAreaSlider *>(_vm->_resources[argv[1]]);
+ _observatoryMonthSlider = static_cast<MystAreaSlider *>(_vm->_resources[argv[2]]);
} else {
- _observatoryMonthSlider = static_cast<MystResourceType10 *>(_vm->_resources[argv[1]]);
- _observatoryDaySlider = static_cast<MystResourceType10 *>(_vm->_resources[argv[2]]);
+ _observatoryMonthSlider = static_cast<MystAreaSlider *>(_vm->_resources[argv[1]]);
+ _observatoryDaySlider = static_cast<MystAreaSlider *>(_vm->_resources[argv[2]]);
}
- _observatoryYearSlider = static_cast<MystResourceType10 *>(_vm->_resources[argv[3]]);
- _observatoryTimeSlider = static_cast<MystResourceType10 *>(_vm->_resources[argv[4]]);
+ _observatoryYearSlider = static_cast<MystAreaSlider *>(_vm->_resources[argv[3]]);
+ _observatoryTimeSlider = static_cast<MystAreaSlider *>(_vm->_resources[argv[4]]);
// Set date selection sliders position
_observatoryDaySlider->setPosition(_state.observatoryDaySlider);
@@ -3614,13 +3614,13 @@ void Myst::gullsFly2_run() {
void Myst::o_treeCard_init(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
debugC(kDebugScript, "Opcode %d: Enter tree card", op);
- _tree = static_cast<MystResourceType8 *>(_invokingResource);
+ _tree = static_cast<MystAreaImageSwitch *>(_invokingResource);
}
void Myst::o_treeEntry_init(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
debugC(kDebugScript, "Opcode %d: Enter tree card with entry", op);
- _treeAlcove = static_cast<MystResourceType5 *>(_invokingResource);
+ _treeAlcove = static_cast<MystAreaAction *>(_invokingResource);
_treeMinAccessiblePosition = argv[0];
_treeMaxAccessiblePosition = argv[1];
@@ -3704,11 +3704,11 @@ void Myst::boilerGaugeInit() {
void Myst::o_rocketSliders_init(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
debugC(kDebugScript, "Opcode %d: Rocket sliders init", op);
- _rocketSlider1 = static_cast<MystResourceType10 *>(_vm->_resources[argv[0]]);
- _rocketSlider2 = static_cast<MystResourceType10 *>(_vm->_resources[argv[1]]);
- _rocketSlider3 = static_cast<MystResourceType10 *>(_vm->_resources[argv[2]]);
- _rocketSlider4 = static_cast<MystResourceType10 *>(_vm->_resources[argv[3]]);
- _rocketSlider5 = static_cast<MystResourceType10 *>(_vm->_resources[argv[4]]);
+ _rocketSlider1 = static_cast<MystAreaSlider *>(_vm->_resources[argv[0]]);
+ _rocketSlider2 = static_cast<MystAreaSlider *>(_vm->_resources[argv[1]]);
+ _rocketSlider3 = static_cast<MystAreaSlider *>(_vm->_resources[argv[2]]);
+ _rocketSlider4 = static_cast<MystAreaSlider *>(_vm->_resources[argv[3]]);
+ _rocketSlider5 = static_cast<MystAreaSlider *>(_vm->_resources[argv[4]]);
// Initialize sliders position
for (uint i = 0; i < 5; i++)
diff --git a/engines/mohawk/myst_stacks/myst.h b/engines/mohawk/myst_stacks/myst.h
index 38b6d9918e..576f929d18 100644
--- a/engines/mohawk/myst_stacks/myst.h
+++ b/engines/mohawk/myst_stacks/myst.h
@@ -192,11 +192,11 @@ protected:
bool _generatorControlRoomRunning;
uint16 _generatorVoltage; // 58
- MystResourceType10 *_rocketSlider1; // 248
- MystResourceType10 *_rocketSlider2; // 252
- MystResourceType10 *_rocketSlider3; // 256
- MystResourceType10 *_rocketSlider4; // 260
- MystResourceType10 *_rocketSlider5; // 264
+ MystAreaSlider *_rocketSlider1; // 248
+ MystAreaSlider *_rocketSlider2; // 252
+ MystAreaSlider *_rocketSlider3; // 256
+ MystAreaSlider *_rocketSlider4; // 260
+ MystAreaSlider *_rocketSlider5; // 264
uint16 _rocketSliderSound; // 294
uint16 _rocketLeverPosition; // 296
VideoHandle _rocketLinkBook;
@@ -214,7 +214,7 @@ protected:
uint32 _gullsNextTime; // 216
bool _libraryBookcaseMoving;
- MystResourceType6 *_libraryBookcaseMovie; // 104
+ MystAreaVideo *_libraryBookcaseMovie; // 104
uint16 _libraryBookcaseSoundId; // 284
bool _libraryBookcaseChanged; // 288
uint16 _libraryBookSound1; // 298
@@ -223,13 +223,13 @@ protected:
uint16 _courtyardBoxSound; // 302
bool _imagerValidationRunning;
- MystResourceType8 *_imagerRedButton; // 304
+ MystAreaImageSwitch *_imagerRedButton; // 304
uint16 _imagerSound[4]; // 308 to 314
uint16 _imagerValidationCard; // 316
uint16 _imagerValidationStep; // 318
bool _imagerRunning;
- MystResourceType6 *_imagerMovie; // 64
+ MystAreaVideo *_imagerMovie; // 64
uint16 _fireplaceLines[6]; // 74 to 84
@@ -248,8 +248,8 @@ protected:
bool _towerRotationBlinkLabel;
uint16 _towerRotationBlinkLabelCount;
uint16 _towerRotationMapInitialized; // 292
- MystResourceType11 *_towerRotationMapTower; // 108
- MystResourceType8 *_towerRotationMapLabel; // 112
+ MystAreaDrag *_towerRotationMapTower; // 108
+ MystAreaImageSwitch *_towerRotationMapLabel; // 112
uint16 _towerRotationSpeed; // 124
bool _towerRotationMapClicked; // 132
bool _towerRotationOverSpot; // 136
@@ -269,8 +269,8 @@ protected:
bool _basementPressureDecreasing;
bool _treeStopped; // 236
- MystResourceType8 *_tree; // 220
- MystResourceType5 *_treeAlcove; // 224
+ MystAreaImageSwitch *_tree; // 220
+ MystAreaAction *_treeAlcove; // 224
uint16 _treeMinPosition; // 228
uint16 _treeMinAccessiblePosition; // 230
uint16 _treeMaxAccessiblePosition; // 232
@@ -280,21 +280,21 @@ protected:
bool _observatoryDayChanging;
bool _observatoryYearChanging;
bool _observatoryTimeChanging;
- MystResourceType8 *_observatoryVisualizer; // 184
- MystResourceType8 *_observatoryGoButton; // 188
- MystResourceType10 *_observatoryDaySlider; // 192
- MystResourceType10 *_observatoryMonthSlider; // 196
- MystResourceType10 *_observatoryYearSlider; // 200
- MystResourceType10 *_observatoryTimeSlider; // 204
+ MystAreaImageSwitch *_observatoryVisualizer; // 184
+ MystAreaImageSwitch *_observatoryGoButton; // 188
+ MystAreaSlider *_observatoryDaySlider; // 192
+ MystAreaSlider *_observatoryMonthSlider; // 196
+ MystAreaSlider *_observatoryYearSlider; // 200
+ MystAreaSlider *_observatoryTimeSlider; // 204
uint32 _observatoryLastTime; // 208
bool _observatoryNotInitialized; // 212
int16 _observatoryIncrement; // 346
- MystResourceType10 *_observatoryCurrentSlider; // 348
+ MystAreaSlider *_observatoryCurrentSlider; // 348
bool _greenBookRunning;
void generatorRedrawRocket();
- void generatorButtonValue(MystResource *button, uint16 &offset, uint16 &value);
+ void generatorButtonValue(MystArea *button, uint16 &offset, uint16 &value);
void rocketSliderMove();
uint16 rocketSliderGetSound(uint16 pos);
diff --git a/engines/mohawk/myst_stacks/preview.cpp b/engines/mohawk/myst_stacks/preview.cpp
index 4cae4aaca7..7f6d38da2b 100644
--- a/engines/mohawk/myst_stacks/preview.cpp
+++ b/engines/mohawk/myst_stacks/preview.cpp
@@ -239,13 +239,13 @@ void Preview::o_library_init(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
debugC(kDebugScript, "Opcode %d: Library init", op);
// Used for Card 3002 (Myst Island Overview)
- _library = static_cast<MystResourceType8 *>(_invokingResource);
+ _library = static_cast<MystAreaImageSwitch *>(_invokingResource);
}
void Preview::o_libraryBookcaseTransformDemo_init(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
if (_libraryBookcaseChanged) {
- MystResourceType7 *resource = static_cast<MystResourceType7 *>(_invokingResource);
- _libraryBookcaseMovie = static_cast<MystResourceType6 *>(resource->getSubResource(getVar(303)));
+ MystAreaActionSwitch *resource = static_cast<MystAreaActionSwitch *>(_invokingResource);
+ _libraryBookcaseMovie = static_cast<MystAreaVideo *>(resource->getSubResource(getVar(303)));
_libraryBookcaseSoundId = argv[0];
_libraryBookcaseMoving = true;
}
diff --git a/engines/mohawk/myst_stacks/preview.h b/engines/mohawk/myst_stacks/preview.h
index 04ad6c31cb..9d833b35e2 100644
--- a/engines/mohawk/myst_stacks/preview.h
+++ b/engines/mohawk/myst_stacks/preview.h
@@ -56,7 +56,7 @@ private:
DECLARE_OPCODE(o_library_init);
uint16 _libraryState; // 4
- MystResourceType8 *_library; // 32
+ MystAreaImageSwitch *_library; // 32
bool _speechRunning;
uint _speechStep;
diff --git a/engines/mohawk/myst_stacks/selenitic.cpp b/engines/mohawk/myst_stacks/selenitic.cpp
index 7d1e1b9dff..30333ec47c 100644
--- a/engines/mohawk/myst_stacks/selenitic.cpp
+++ b/engines/mohawk/myst_stacks/selenitic.cpp
@@ -773,7 +773,7 @@ uint16 Selenitic::soundLockCurrentSound(uint16 position, bool pixels) {
return 0;
}
-MystResourceType10 *Selenitic::soundLockSliderFromVar(uint16 var) {
+MystAreaSlider *Selenitic::soundLockSliderFromVar(uint16 var) {
switch (var) {
case 20:
return _soundLockSlider1;
@@ -793,7 +793,7 @@ MystResourceType10 *Selenitic::soundLockSliderFromVar(uint16 var) {
void Selenitic::o_soundLockMove(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
debugC(kDebugScript, "Opcode %d: Sound lock move", op);
- MystResourceType10 *slider = soundLockSliderFromVar(var);
+ MystAreaSlider *slider = soundLockSliderFromVar(var);
uint16 soundId = soundLockCurrentSound(slider->_pos.y, true);
if (_soundLockSoundId != soundId) {
@@ -805,7 +805,7 @@ void Selenitic::o_soundLockMove(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);
+ MystAreaSlider *slider = soundLockSliderFromVar(var);
_vm->_cursor->setCursor(700);
_vm->_sound->pauseBackgroundMyst();
@@ -817,7 +817,7 @@ void Selenitic::o_soundLockStartMove(uint16 op, uint16 var, uint16 argc, uint16
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);
+ MystAreaSlider *slider = soundLockSliderFromVar(var);
uint16 *value = &_state.soundLockSliderPositions[0];
switch (var) {
@@ -861,7 +861,7 @@ void Selenitic::o_soundLockEndMove(uint16 op, uint16 var, uint16 argc, uint16 *a
_vm->_sound->resumeBackgroundMyst();
}
-void Selenitic::soundLockCheckSolution(MystResourceType10 *slider, uint16 value, uint16 solution, bool &solved) {
+void Selenitic::soundLockCheckSolution(MystAreaSlider *slider, uint16 value, uint16 solution, bool &solved) {
slider->drawConditionalDataToScreen(2);
_vm->_sound->replaceSoundMyst(soundLockCurrentSound(value / 12, false));
_vm->_system->delayMillis(1500);
@@ -929,15 +929,15 @@ void Selenitic::o_soundReceiverEndMove(uint16 op, uint16 var, uint16 argc, uint1
}
void Selenitic::o_mazeRunnerCompass_init(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
- _mazeRunnerCompass = static_cast<MystResourceType8 *>(_invokingResource);
+ _mazeRunnerCompass = static_cast<MystAreaImageSwitch *>(_invokingResource);
}
void Selenitic::o_mazeRunnerWindow_init(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
- _mazeRunnerWindow = static_cast<MystResourceType8 *>(_invokingResource);
+ _mazeRunnerWindow = static_cast<MystAreaImageSwitch *>(_invokingResource);
}
void Selenitic::o_mazeRunnerLight_init(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
- _mazeRunnerLight = static_cast<MystResourceType8 *>(_invokingResource);
+ _mazeRunnerLight = static_cast<MystAreaImageSwitch *>(_invokingResource);
}
void Selenitic::soundReceiver_run() {
@@ -1059,19 +1059,19 @@ void Selenitic::o_soundReceiver_init(uint16 op, uint16 var, uint16 argc, uint16
// Used for Card 1245 (Sound Receiver)
_soundReceiverRunning = true;
- _soundReceiverRightButton = static_cast<MystResourceType8 *>(_vm->_resources[0]);
- _soundReceiverLeftButton = static_cast<MystResourceType8 *>(_vm->_resources[1]);
- _soundReceiverSigmaButton = static_cast<MystResourceType8 *>(_vm->_resources[2]);
- _soundReceiverSources[4] = static_cast<MystResourceType8 *>(_vm->_resources[3]);
- _soundReceiverSources[3] = static_cast<MystResourceType8 *>(_vm->_resources[4]);
- _soundReceiverSources[2] = static_cast<MystResourceType8 *>(_vm->_resources[5]);
- _soundReceiverSources[1] = static_cast<MystResourceType8 *>(_vm->_resources[6]);
- _soundReceiverSources[0] = static_cast<MystResourceType8 *>(_vm->_resources[7]);
- _soundReceiverViewer = static_cast<MystResourceType8 *>(_vm->_resources[8]);
- _soundReceiverAngle1 = static_cast<MystResourceType8 *>(_vm->_resources[10]);
- _soundReceiverAngle2 = static_cast<MystResourceType8 *>(_vm->_resources[11]);
- _soundReceiverAngle3 = static_cast<MystResourceType8 *>(_vm->_resources[12]);
- _soundReceiverAngle4 = static_cast<MystResourceType8 *>(_vm->_resources[13]);
+ _soundReceiverRightButton = static_cast<MystAreaImageSwitch *>(_vm->_resources[0]);
+ _soundReceiverLeftButton = static_cast<MystAreaImageSwitch *>(_vm->_resources[1]);
+ _soundReceiverSigmaButton = static_cast<MystAreaImageSwitch *>(_vm->_resources[2]);
+ _soundReceiverSources[4] = static_cast<MystAreaImageSwitch *>(_vm->_resources[3]);
+ _soundReceiverSources[3] = static_cast<MystAreaImageSwitch *>(_vm->_resources[4]);
+ _soundReceiverSources[2] = static_cast<MystAreaImageSwitch *>(_vm->_resources[5]);
+ _soundReceiverSources[1] = static_cast<MystAreaImageSwitch *>(_vm->_resources[6]);
+ _soundReceiverSources[0] = static_cast<MystAreaImageSwitch *>(_vm->_resources[7]);
+ _soundReceiverViewer = static_cast<MystAreaImageSwitch *>(_vm->_resources[8]);
+ _soundReceiverAngle1 = static_cast<MystAreaImageSwitch *>(_vm->_resources[10]);
+ _soundReceiverAngle2 = static_cast<MystAreaImageSwitch *>(_vm->_resources[11]);
+ _soundReceiverAngle3 = static_cast<MystAreaImageSwitch *>(_vm->_resources[12]);
+ _soundReceiverAngle4 = static_cast<MystAreaImageSwitch *>(_vm->_resources[13]);
uint16 currentSource = _state.soundReceiverCurrentSource;
_soundReceiverPosition = &_state.soundReceiverPositions[currentSource];
@@ -1084,31 +1084,31 @@ void Selenitic::o_soundLock_init(uint16 op, uint16 var, uint16 argc, uint16 *arg
debugC(kDebugScript, "Opcode %d: Sound lock init", op);
for (uint i = 0; i < _vm->_resources.size(); i++) {
- if (_vm->_resources[i]->type == kMystSlider) {
- switch (_vm->_resources[i]->getType8Var()) {
+ if (_vm->_resources[i]->type == kMystAreaSlider) {
+ switch (_vm->_resources[i]->getImageSwitchVar()) {
case 20:
- _soundLockSlider1 = static_cast<MystResourceType10 *>(_vm->_resources[i]);
+ _soundLockSlider1 = static_cast<MystAreaSlider *>(_vm->_resources[i]);
_soundLockSlider1->setStep(_state.soundLockSliderPositions[0]);
break;
case 21:
- _soundLockSlider2 = static_cast<MystResourceType10 *>(_vm->_resources[i]);
+ _soundLockSlider2 = static_cast<MystAreaSlider *>(_vm->_resources[i]);
_soundLockSlider2->setStep(_state.soundLockSliderPositions[1]);
break;
case 22:
- _soundLockSlider3 = static_cast<MystResourceType10 *>(_vm->_resources[i]);
+ _soundLockSlider3 = static_cast<MystAreaSlider *>(_vm->_resources[i]);
_soundLockSlider3->setStep(_state.soundLockSliderPositions[2]);
break;
case 23:
- _soundLockSlider4 = static_cast<MystResourceType10 *>(_vm->_resources[i]);
+ _soundLockSlider4 = static_cast<MystAreaSlider *>(_vm->_resources[i]);
_soundLockSlider4->setStep(_state.soundLockSliderPositions[3]);
break;
case 24:
- _soundLockSlider5 = static_cast<MystResourceType10 *>(_vm->_resources[i]);
+ _soundLockSlider5 = static_cast<MystAreaSlider *>(_vm->_resources[i]);
_soundLockSlider5->setStep(_state.soundLockSliderPositions[4]);
break;
}
- } else if (_vm->_resources[i]->type == kMystConditionalImage && _vm->_resources[i]->getType8Var() == 28) {
- _soundLockButton = static_cast<MystResourceType8 *>(_vm->_resources[i]);
+ } else if (_vm->_resources[i]->type == kMystAreaImageSwitch && _vm->_resources[i]->getImageSwitchVar() == 28) {
+ _soundLockButton = static_cast<MystAreaImageSwitch *>(_vm->_resources[i]);
}
}
@@ -1116,11 +1116,11 @@ void Selenitic::o_soundLock_init(uint16 op, uint16 var, uint16 argc, uint16 *arg
}
void Selenitic::o_mazeRunnerRight_init(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
- _mazeRunnerRightButton = static_cast<MystResourceType8 *>(_invokingResource);
+ _mazeRunnerRightButton = static_cast<MystAreaImageSwitch *>(_invokingResource);
}
void Selenitic::o_mazeRunnerLeft_init(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
- _mazeRunnerLeftButton = static_cast<MystResourceType8 *>(_invokingResource);
+ _mazeRunnerLeftButton = static_cast<MystAreaImageSwitch *>(_invokingResource);
}
const uint16 Selenitic::_mazeRunnerMap[300][4] = {
diff --git a/engines/mohawk/myst_stacks/selenitic.h b/engines/mohawk/myst_stacks/selenitic.h
index 7654ffd3c4..ffd8941f2c 100644
--- a/engines/mohawk/myst_stacks/selenitic.h
+++ b/engines/mohawk/myst_stacks/selenitic.h
@@ -29,7 +29,7 @@
namespace Mohawk {
-class MystResourceType8;
+class MystAreaImageSwitch;
struct MystScriptEntry;
namespace MystStacks {
@@ -80,40 +80,40 @@ private:
bool _soundReceiverRunning;
bool _soundReceiverSigmaPressed; // 6
- MystResourceType8 *_soundReceiverSources[5]; // 92 -> 108
- MystResourceType8 *_soundReceiverCurrentSource; // 112
+ MystAreaImageSwitch *_soundReceiverSources[5]; // 92 -> 108
+ MystAreaImageSwitch *_soundReceiverCurrentSource; // 112
uint16 *_soundReceiverPosition; // 116
uint16 _soundReceiverDirection; // 120
uint16 _soundReceiverSpeed; // 122
uint32 _soundReceiverStartTime; //124
- MystResourceType8 *_soundReceiverViewer; // 128
- MystResourceType8 *_soundReceiverRightButton; // 132
- MystResourceType8 *_soundReceiverLeftButton; // 136
- MystResourceType8 *_soundReceiverAngle1; // 140
- MystResourceType8 *_soundReceiverAngle2; // 144
- MystResourceType8 *_soundReceiverAngle3; // 148
- MystResourceType8 *_soundReceiverAngle4; // 152
- MystResourceType8 *_soundReceiverSigmaButton; // 156
+ MystAreaImageSwitch *_soundReceiverViewer; // 128
+ MystAreaImageSwitch *_soundReceiverRightButton; // 132
+ MystAreaImageSwitch *_soundReceiverLeftButton; // 136
+ MystAreaImageSwitch *_soundReceiverAngle1; // 140
+ MystAreaImageSwitch *_soundReceiverAngle2; // 144
+ MystAreaImageSwitch *_soundReceiverAngle3; // 148
+ MystAreaImageSwitch *_soundReceiverAngle4; // 152
+ MystAreaImageSwitch *_soundReceiverSigmaButton; // 156
static const uint16 _mazeRunnerMap[300][4];
static const uint8 _mazeRunnerVideos[300][4];
uint16 _mazeRunnerPosition; // 56
uint16 _mazeRunnerDirection; // 58
- MystResourceType8 *_mazeRunnerWindow; // 68
- MystResourceType8 *_mazeRunnerCompass; // 72
- MystResourceType8 *_mazeRunnerLight; // 76
- MystResourceType8 *_mazeRunnerRightButton; // 80
- MystResourceType8 *_mazeRunnerLeftButton; // 84
+ MystAreaImageSwitch *_mazeRunnerWindow; // 68
+ MystAreaImageSwitch *_mazeRunnerCompass; // 72
+ MystAreaImageSwitch *_mazeRunnerLight; // 76
+ MystAreaImageSwitch *_mazeRunnerRightButton; // 80
+ MystAreaImageSwitch *_mazeRunnerLeftButton; // 84
bool _mazeRunnerDoorOpened; // 160
uint16 _soundLockSoundId;
- MystResourceType10 *_soundLockSlider1; // 164
- MystResourceType10 *_soundLockSlider2; // 168
- MystResourceType10 *_soundLockSlider3; // 172
- MystResourceType10 *_soundLockSlider4; // 176
- MystResourceType10 *_soundLockSlider5; // 180
- MystResourceType8 *_soundLockButton; // 184
+ MystAreaSlider *_soundLockSlider1; // 164
+ MystAreaSlider *_soundLockSlider2; // 168
+ MystAreaSlider *_soundLockSlider3; // 172
+ MystAreaSlider *_soundLockSlider4; // 176
+ MystAreaSlider *_soundLockSlider5; // 180
+ MystAreaImageSwitch *_soundLockButton; // 184
void soundReceiverLeftRight(uint direction);
void soundReceiverUpdate();
@@ -125,8 +125,8 @@ private:
void soundReceiverSolution(uint16 source, uint16 &solution, bool &enabled);
uint16 soundLockCurrentSound(uint16 position, bool pixels);
- MystResourceType10 *soundLockSliderFromVar(uint16 var);
- void soundLockCheckSolution(MystResourceType10 *slider, uint16 value, uint16 solution, bool &solved);
+ MystAreaSlider *soundLockSliderFromVar(uint16 var);
+ void soundLockCheckSolution(MystAreaSlider *slider, uint16 value, uint16 solution, bool &solved);
bool mazeRunnerForwardAllowed(uint16 position);
void mazeRunnerUpdateCompass();
diff --git a/engines/mohawk/myst_stacks/stoneship.cpp b/engines/mohawk/myst_stacks/stoneship.cpp
index 1113ceeac9..d20ed32321 100644
--- a/engines/mohawk/myst_stacks/stoneship.cpp
+++ b/engines/mohawk/myst_stacks/stoneship.cpp
@@ -402,9 +402,9 @@ void Stoneship::o_pumpTurnOff(uint16 op, uint16 var, uint16 argc, uint16 *argv)
}
for (uint i = 0; i < _vm->_resources.size(); i++) {
- MystResource *resource = _vm->_resources[i];
- if (resource->type == kMystConditionalImage && resource->getType8Var() == buttonVar) {
- static_cast<MystResourceType8 *>(resource)->drawConditionalDataToScreen(0, true);
+ MystArea *resource = _vm->_resources[i];
+ if (resource->type == kMystAreaImageSwitch && resource->getImageSwitchVar() == buttonVar) {
+ static_cast<MystAreaImageSwitch *>(resource)->drawConditionalDataToScreen(0, true);
break;
}
}
@@ -437,9 +437,9 @@ void Stoneship::o_cabinBookMovie(uint16 op, uint16 var, uint16 argc, uint16 *arg
void Stoneship::o_drawerOpenSirius(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
debugC(kDebugScript, "Opcode %d: Open drawer", op);
- MystResourceType8 *drawer = static_cast<MystResourceType8 *>(_vm->_resources[argv[0]]);
+ MystAreaImageSwitch *drawer = static_cast<MystAreaImageSwitch *>(_vm->_resources[argv[0]]);
- if (drawer->getType8Var() == 35) {
+ if (drawer->getImageSwitchVar() == 35) {
drawer->drawConditionalDataToScreen(getVar(102), 0);
} else {
drawer->drawConditionalDataToScreen(0, 0);
@@ -466,7 +466,7 @@ void Stoneship::o_telescopeStart(uint16 op, uint16 var, uint16 argc, uint16 *arg
void Stoneship::o_telescopeMove(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
debugC(kDebugScript, "Opcode %d: Telescope move", op);
- MystResourceType11 *display = static_cast<MystResourceType11 *>(_invokingResource);
+ MystAreaDrag *display = static_cast<MystAreaDrag *>(_invokingResource);
const Common::Point &mouse = _vm->_system->getEventManager()->getMousePos();
// Compute telescope position
@@ -489,7 +489,7 @@ void Stoneship::o_telescopeStop(uint16 op, uint16 var, uint16 argc, uint16 *argv
void Stoneship::o_generatorStart(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
debugC(kDebugScript, "Opcode %d: Generator start", op);
- MystResourceType11 *handle = static_cast<MystResourceType11 *>(_invokingResource);
+ MystAreaDrag *handle = static_cast<MystAreaDrag *>(_invokingResource);
uint16 soundId = handle->getList1(0);
if (soundId)
@@ -504,7 +504,7 @@ void Stoneship::o_generatorStart(uint16 op, uint16 var, uint16 argc, uint16 *arg
_batteryNextTime = _vm->_system->getMillis() + 1000;
// Start handle movie
- MystResourceType6 *movie = static_cast<MystResourceType6 *>(handle->getSubResource(0));
+ MystAreaVideo *movie = static_cast<MystAreaVideo *>(handle->getSubResource(0));
movie->playMovie();
soundId = handle->getList2(0);
@@ -530,8 +530,8 @@ void Stoneship::o_generatorStop(uint16 op, uint16 var, uint16 argc, uint16 *argv
}
// Pause handle movie
- MystResourceType11 *handle = static_cast<MystResourceType11 *>(_invokingResource);
- MystResourceType6 *movie = static_cast<MystResourceType6 *>(handle->getSubResource(0));
+ MystAreaDrag *handle = static_cast<MystAreaDrag *>(_invokingResource);
+ MystAreaVideo *movie = static_cast<MystAreaVideo *>(handle->getSubResource(0));
movie->pauseMovie(true);
uint16 soundId = handle->getList3(0);
@@ -582,7 +582,7 @@ void Stoneship::batteryDeplete_run() {
void Stoneship::o_drawerOpenAchenar(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
debugC(kDebugScript, "Opcode %d: Open drawer", op);
- MystResourceType8 *drawer = static_cast<MystResourceType8 *>(_vm->_resources[argv[0]]);
+ MystAreaImageSwitch *drawer = static_cast<MystAreaImageSwitch *>(_vm->_resources[argv[0]]);
drawer->drawConditionalDataToScreen(0, 0);
_vm->_gfx->runTransition(kTransitionTopToBottom, drawer->getRect(), 25, 5);
}
@@ -617,7 +617,7 @@ void Stoneship::o_hologramSelectionStart(uint16 op, uint16 var, uint16 argc, uin
void Stoneship::o_hologramSelectionMove(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
debugC(kDebugScript, "Opcode %d: Hologram move", op);
- MystResourceType11 *handle = static_cast<MystResourceType11 *>(_invokingResource);
+ MystAreaDrag *handle = static_cast<MystAreaDrag *>(_invokingResource);
const Common::Point &mouse = _vm->_system->getEventManager()->getMousePos();
if (handle->getRect().contains(mouse)) {
@@ -822,20 +822,20 @@ void Stoneship::drawerClose(uint16 drawer) {
_vm->drawCardBackground();
_vm->drawResourceImages();
- MystResource *res = _vm->_resources[drawer];
+ MystArea *res = _vm->_resources[drawer];
_vm->_gfx->runTransition(kTransitionBottomToTop, res->getRect(), 25, 5);
}
void Stoneship::o_hologramDisplay_init(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
debugC(kDebugScript, "Opcode %d: Hologram display init", op);
- _hologramDisplay = static_cast<MystResourceType6 *>(_invokingResource);
+ _hologramDisplay = static_cast<MystAreaVideo *>(_invokingResource);
_hologramDisplayPos = 0;
}
void Stoneship::o_hologramSelection_init(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
debugC(kDebugScript, "Opcode %d: Hologram selection init", op);
- _hologramSelection = static_cast<MystResourceType6 *>(_invokingResource);
+ _hologramSelection = static_cast<MystAreaVideo *>(_invokingResource);
}
void Stoneship::batteryGaugeUpdate() {
@@ -856,7 +856,7 @@ void Stoneship::o_battery_init(uint16 op, uint16 var, uint16 argc, uint16 *argv)
// Used for Card 2160 (Lighthouse Battery Pack Closeup)
debugC(kDebugScript, "Opcode %d: Battery init", op);
- _batteryGauge = static_cast<MystResourceType8 *>(_invokingResource);
+ _batteryGauge = static_cast<MystAreaImageSwitch *>(_invokingResource);
batteryGaugeUpdate();
}
@@ -1014,7 +1014,7 @@ void Stoneship::o_achenarDrawers_init(uint16 op, uint16 var, uint16 argc, uint16
void Stoneship::o_cloudOrb_init(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
debugC(kDebugScript, "Opcode %d: Cloud orb init", op);
- _cloudOrbMovie = static_cast<MystResourceType6 *>(_invokingResource);
+ _cloudOrbMovie = static_cast<MystAreaVideo *>(_invokingResource);
_cloudOrbSound = argv[0];
_cloudOrbStopSound = argv[1];
}
diff --git a/engines/mohawk/myst_stacks/stoneship.h b/engines/mohawk/myst_stacks/stoneship.h
index b77776f359..776641a787 100644
--- a/engines/mohawk/myst_stacks/stoneship.h
+++ b/engines/mohawk/myst_stacks/stoneship.h
@@ -98,7 +98,7 @@ private:
bool _batteryGaugeRunning;
uint16 _batteryLastCharge; // 92
- MystResourceType8 *_batteryGauge; // 96
+ MystAreaImageSwitch *_batteryGauge; // 96
void batteryGaugeUpdate();
void batteryGauge_run();
@@ -113,8 +113,8 @@ private:
void drawerClose(uint16 drawer);
uint16 _hologramTurnedOn; // 80
- MystResourceType6 *_hologramDisplay; // 84
- MystResourceType6 *_hologramSelection; // 88
+ MystAreaVideo *_hologramDisplay; // 84
+ MystAreaVideo *_hologramSelection; // 88
uint16 _hologramDisplayPos;
bool _tunnelRunning;
@@ -135,7 +135,7 @@ private:
void telescope_run();
void telescopeLighthouseDraw();
- MystResourceType6 *_cloudOrbMovie; // 136
+ MystAreaVideo *_cloudOrbMovie; // 136
uint16 _cloudOrbSound; // 140
uint16 _cloudOrbStopSound; // 142