diff options
| author | Ľubomír Remák | 2018-10-28 17:45:26 +0100 |
|---|---|---|
| committer | Ľubomír Remák | 2018-10-28 17:45:26 +0100 |
| commit | d4087d790222484465de8c2dd4ed1be5e178d22e (patch) | |
| tree | aec84d74a2d8c88a8b4434195fa5de71c7602381 /engines/mutationofjb/commands/newroomcommand.cpp | |
| parent | bd58c0702bca96c1630d18e358ecc52920d189e1 (diff) | |
| download | scummvm-rg350-d4087d790222484465de8c2dd4ed1be5e178d22e.tar.gz scummvm-rg350-d4087d790222484465de8c2dd4ed1be5e178d22e.tar.bz2 scummvm-rg350-d4087d790222484465de8c2dd4ed1be5e178d22e.zip | |
MUTATIONOFJB: Allow completion of first chapter.
Implement dummy SPECIALSHOW command (skip puzzle).
Fix NEWROOM command parsing.
Fix use action on inventory items.
Fix interaction with certain doors.
Diffstat (limited to 'engines/mutationofjb/commands/newroomcommand.cpp')
| -rw-r--r-- | engines/mutationofjb/commands/newroomcommand.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/engines/mutationofjb/commands/newroomcommand.cpp b/engines/mutationofjb/commands/newroomcommand.cpp index 0f4d214f18..32c5e72bd9 100644 --- a/engines/mutationofjb/commands/newroomcommand.cpp +++ b/engines/mutationofjb/commands/newroomcommand.cpp @@ -27,7 +27,7 @@ #include "common/str.h" /** @file - * "NEWROOM " <sceneId> " " <x> " " <y> " " <frame> + * "NEWROOM " <sceneId> " " <x> " " <y> [ " " <frame> ] * * NEWROOM changes the current scene. While doing that, it also executes STARTUP section for the new room. * However, after that, the execution goes back to the old script to finish commands after NEWROOM. @@ -39,14 +39,16 @@ namespace MutationOfJB { bool NewRoomCommandParser::parse(const Common::String &line, ScriptParseContext &, Command *&command) { - if (line.size() < 23 || !line.hasPrefix("NEWROOM")) { + if (line.size() < 19 || !line.hasPrefix("NEWROOM")) { return false; } const uint8 sceneId = atoi(line.c_str() + 8); const uint16 x = atoi(line.c_str() + 12); const uint16 y = atoi(line.c_str() + 16); - const uint8 frame = atoi(line.c_str() + 20); + uint8 frame = 0; + if (line.size() >= 21) + frame = atoi(line.c_str() + 20); command = new NewRoomCommand(sceneId, x, y, frame); return true; } |
