diff options
-rw-r--r-- | simon/items.cpp | 21 | ||||
-rw-r--r-- | simon/res.cpp | 7 | ||||
-rw-r--r-- | simon/simon.h | 1 | ||||
-rw-r--r-- | simon/vga.cpp | 2 |
4 files changed, 20 insertions, 11 deletions
diff --git a/simon/items.cpp b/simon/items.cpp index 9d2ae2eedb..3f6feba41c 100644 --- a/simon/items.cpp +++ b/simon/items.cpp @@ -1012,8 +1012,8 @@ int SimonEngine::runScript() { case 182:{ /* load beard */ if (_game == GAME_FEEBLEFILES) { - // Load Smacker filename - debug(1,"Load Smacker: %s", getStringPtrByID(getNextStringID())); + // Load video file + debug(1,"Load video file: %s", getStringPtrByID(getNextStringID())); } else if (_game & GF_SIMON2) { goto invalid_opcode; } else { @@ -1024,8 +1024,8 @@ int SimonEngine::runScript() { case 183:{ /* unload beard */ if (_game == GAME_FEEBLEFILES) { - // Play Smacker - debug(1, "Play Smacker"); + // Play video + debug(1, "Play video"); } else if (_game & GF_SIMON2) { goto invalid_opcode; } else { @@ -1039,10 +1039,11 @@ int SimonEngine::runScript() { } break; - case 185:{ /* midi sfx file number */ + case 185:{ /* load sound files */ if (_game & GF_SIMON2) goto invalid_opcode; - _soundFileId = getVarOrWord(); + + _soundFileId = getVarOrWord(); if (_game == GAME_SIMON1CD32) { char buf[10]; sprintf(buf, "%d%s", _soundFileId, "Effects"); @@ -1621,7 +1622,7 @@ void SimonEngine::o_play_music_resource() { } void SimonEngine::o_unk_120(uint a) { - uint16 id = TO_BE_16(a); + uint16 id = to16Wrapper(a); _lockWord |= 0x8000; _vcPtr = (byte *)&id; vc15_wakeup_id(); @@ -1647,7 +1648,7 @@ void SimonEngine::o_unk_103() { } void SimonEngine::o_kill_sprite_simon1(uint a) { - uint16 b = TO_BE_16(a); + uint16 b = to16Wrapper(a); _lockWord |= 0x8000; _vcPtr = (byte *)&b; vc60_killSprite(); @@ -1657,8 +1658,8 @@ void SimonEngine::o_kill_sprite_simon1(uint a) { void SimonEngine::o_kill_sprite_simon2(uint a, uint b) { uint16 items[2]; - items[0] = TO_BE_16(a); - items[1] = TO_BE_16(b); + items[0] = to16Wrapper(a); + items[1] = to16Wrapper(b); _lockWord |= 0x8000; _vcPtr = (byte *)&items; diff --git a/simon/res.cpp b/simon/res.cpp index 9ee9e77040..39f573ac62 100644 --- a/simon/res.cpp +++ b/simon/res.cpp @@ -113,6 +113,13 @@ static const char *const opcode_arg_table_feeblefiles[256] = { " ", " ", "BT ", " ", "B ", " ", "BBBB ", " ", " ", "BBBB ", "B ", "B ", "B ", "B " }; +uint16 SimonEngine::to16Wrapper(uint value) { + if (_game == GAME_FEEBLEFILES) + return TO_LE_16(value); + else + return TO_BE_16(value); +} + uint16 SimonEngine::readUint16Wrapper(const void *src) { if (_game == GAME_FEEBLEFILES) return READ_LE_UINT16(src); diff --git a/simon/simon.h b/simon/simon.h index 7635fbd33e..169a133e33 100644 --- a/simon/simon.h +++ b/simon/simon.h @@ -385,6 +385,7 @@ public: virtual ~SimonEngine(); protected: + uint16 to16Wrapper(uint value); uint16 readUint16Wrapper(const void *src); int allocGamePcVars(Common::File *in); diff --git a/simon/vga.cpp b/simon/vga.cpp index 17ec7d9987..2187d58daf 100644 --- a/simon/vga.cpp +++ b/simon/vga.cpp @@ -1664,7 +1664,7 @@ void SimonEngine::vc58() { _vgaCurFileId = vc_read_next_word(); _vgaCurSpriteId = vc_read_next_word(); - tmp = TO_BE_16(vc_read_next_word()); + tmp = to16Wrapper(vc_read_next_word()); vc_ptr_org = _vcPtr; _vcPtr = (byte *)&tmp; |