[Scummvm-git-logs] scummvm master -> a82904316e6d573c0bda65b2d8b3b7c186a1359e
phcoder
noreply at scummvm.org
Wed Oct 26 02:21:45 UTC 2022
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
a82904316e HADESCH: Add missing cheats in ferryman puzzle
Commit: a82904316e6d573c0bda65b2d8b3b7c186a1359e
https://github.com/scummvm/scummvm/commit/a82904316e6d573c0bda65b2d8b3b7c186a1359e
Author: Vladimir Serbinenko (phcoder at gmail.com)
Date: 2022-10-26T04:21:33+02:00
Commit Message:
HADESCH: Add missing cheats in ferryman puzzle
Changed paths:
engines/hadesch/rooms/ferry.cpp
diff --git a/engines/hadesch/rooms/ferry.cpp b/engines/hadesch/rooms/ferry.cpp
index 31916f14f07..07d410d5be0 100644
--- a/engines/hadesch/rooms/ferry.cpp
+++ b/engines/hadesch/rooms/ferry.cpp
@@ -24,6 +24,9 @@
#include "hadesch/video.h"
#include "common/translation.h"
+#include "gui/message.h"
+
+
namespace Hadesch {
enum {
@@ -483,6 +486,15 @@ public:
}
}
+ void charonIdle() {
+ if (_charonIsBusy)
+ return;
+ hideCharon();
+ int vid = g_vm->getRnd().getRandomNumberRng(0, ARRAYSIZE(charonIdleVideos) - 1);
+ g_vm->getVideoRoom()->playVideo(charonIdleVideos[vid].name,
+ kCharonZ, 24811, charonIdleVideos[vid].getOffset());
+ }
+
void handleEvent(int eventId) override {
Common::SharedPtr<VideoRoom> room = g_vm->getVideoRoom();
Persistent *persistent = g_vm->getPersistent();
@@ -597,12 +609,7 @@ public:
break;
case 24813: {
g_vm->addTimer(24813, g_vm->getRnd().getRandomNumberRng(12000, 18000));
- if (_charonIsBusy)
- break;
- hideCharon();
- int vid = g_vm->getRnd().getRandomNumberRng(0, ARRAYSIZE(charonIdleVideos) - 1);
- room->playVideo(charonIdleVideos[vid].name,
- kCharonZ, 24811, charonIdleVideos[vid].getOffset());
+ charonIdle();
break;
}
case k24801_arg1:
@@ -683,6 +690,31 @@ public:
return true;
}
+ if (cheat == "identify") {
+ GUI::MessageDialog dialog(Common::String::format("l%ds%02d", _levelL, _levelS));
+ dialog.runModal();
+ return true;
+ }
+
+ if (cheat.matchString("l#s##")) {
+ int l = atoi(cheat.substr(1, 1).c_str());
+ int s = atoi(cheat.substr(3, 2).c_str());
+ if (l < 1 || l > 3 || s < 0 || s > 15)
+ return false;
+ levelClear();
+ _levelL = l;
+ _levelS = s;
+ loadLevel();
+ levelRender();
+ showCharon();
+ return true;
+ }
+
+ if (cheat == "idle") {
+ charonIdle();
+ return true;
+ }
+
return false;
}
More information about the Scummvm-git-logs
mailing list