[Scummvm-git-logs] scummvm branch-2-6 -> 225e527ac6810ff1986e0957f453eb993c10e70b
alxpnv
noreply at scummvm.org
Thu Jun 16 09:22:39 UTC 2022
This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
579d1c25ab ASYLUM: add a shortcut to open character inventory
7e7c4647ed ASYLUM: implement 'version' command
225e527ac6 ASYLUM: remove a shortcut to toggle scrolling debug mode
Commit: 579d1c25ab1fde28fdee8b5297830f3c23137a61
https://github.com/scummvm/scummvm/commit/579d1c25ab1fde28fdee8b5297830f3c23137a61
Author: alxpnv (alxpnv22 at yahoo.com)
Date: 2022-06-16T12:21:06+03:00
Commit Message:
ASYLUM: add a shortcut to open character inventory
Changed paths:
engines/asylum/metaengine.cpp
engines/asylum/shared.h
engines/asylum/views/scene.cpp
diff --git a/engines/asylum/metaengine.cpp b/engines/asylum/metaengine.cpp
index 248c696f239..0842891cf6c 100644
--- a/engines/asylum/metaengine.cpp
+++ b/engines/asylum/metaengine.cpp
@@ -141,6 +141,11 @@ Common::KeymapArray AsylumMetaEngine::initKeymaps(const char *target) const {
act->addDefaultInputMapping("o");
engineKeyMap->addAction(act);
+ act = new Action("INVENTORY", _("Open character inventory"));
+ act->setCustomEngineActionEvent(kAsylumActionOpenInventory);
+ act->addDefaultInputMapping("i");
+ engineKeyMap->addAction(act);
+
return Keymap::arrayOf(engineKeyMap);
}
diff --git a/engines/asylum/shared.h b/engines/asylum/shared.h
index b981802e1b2..474b984bb61 100644
--- a/engines/asylum/shared.h
+++ b/engines/asylum/shared.h
@@ -878,7 +878,8 @@ enum AsylumAction {
kAsylumActionQuickSave,
kAsylumActionSwitchToSarah,
kAsylumActionSwitchToGrimwall,
- kAsylumActionSwitchToOlmec
+ kAsylumActionSwitchToOlmec,
+ kAsylumActionOpenInventory
};
//////////////////////////////////////////////////////////////////////////
diff --git a/engines/asylum/views/scene.cpp b/engines/asylum/views/scene.cpp
index 235f61bb97d..436184d95ee 100644
--- a/engines/asylum/views/scene.cpp
+++ b/engines/asylum/views/scene.cpp
@@ -445,6 +445,16 @@ bool Scene::action(AsylumAction a) {
getScript()->queueScript(_ws->actions[_ws->getActionAreaIndexById(2206 + a - kAsylumActionSwitchToSarah)]->scriptIndex,
getSharedData()->getPlayerIndex());
break;
+
+ case kAsylumActionOpenInventory:
+ if (getActor()->inventory[0] && getActor()->getStatus() == kActorStatusEnabled) {
+ getSound()->playSound(MAKE_RESOURCE(kResourcePackSound, 2));
+ getActor()->changeStatus(kActorStatusShowingInventory);
+ } else if (getActor()->getStatus() == kActorStatusShowingInventory || getActor()->getStatus() == kActorStatus10) {
+ getSound()->playSound(MAKE_RESOURCE(kResourcePackSound, 5));
+ getActor()->changeStatus(kActorStatusEnabled);
+ }
+ break;
}
return true;
Commit: 7e7c4647ed38440b0d73d9a5a13d8d20d7750f58
https://github.com/scummvm/scummvm/commit/7e7c4647ed38440b0d73d9a5a13d8d20d7750f58
Author: alxpnv (alxpnv22 at yahoo.com)
Date: 2022-06-16T12:21:06+03:00
Commit Message:
ASYLUM: implement 'version' command
Changed paths:
engines/asylum/console.cpp
engines/asylum/system/savegame.cpp
engines/asylum/system/savegame.h
engines/asylum/views/scene.cpp
engines/asylum/views/scene.h
diff --git a/engines/asylum/console.cpp b/engines/asylum/console.cpp
index 6b1d93fa565..c4305180fa5 100644
--- a/engines/asylum/console.cpp
+++ b/engines/asylum/console.cpp
@@ -34,6 +34,7 @@
#include "asylum/system/cursor.h"
#include "asylum/system/graphics.h"
+#include "asylum/system/savegame.h"
#include "asylum/system/screen.h"
#include "asylum/system/text.h"
@@ -777,6 +778,7 @@ bool Console::cmdChangeScene(int argc, const char **argv) {
_vm->_puzzles->reset();
getMenu()->setGameStarted();
+ getSaveLoad()->resetVersion();
return false;
}
diff --git a/engines/asylum/system/savegame.cpp b/engines/asylum/system/savegame.cpp
index 37101724a41..4899dde6b33 100644
--- a/engines/asylum/system/savegame.cpp
+++ b/engines/asylum/system/savegame.cpp
@@ -52,7 +52,12 @@ Savegame::Savegame(AsylumEngine *engine) : _vm(engine), _index(0) {
memset(&_moviesViewed, 0, sizeof(_moviesViewed));
memset(&_savegames, 0, sizeof(_savegames));
memset(&_savegameToScene, 0, sizeof(_savegameToScene));
- _build = 0;
+ resetVersion();
+}
+
+void Savegame::resetVersion() {
+ _version = savegame_version;
+ _build = SAVEGAME_BUILD;
}
bool Savegame::hasSavegames() const {
diff --git a/engines/asylum/system/savegame.h b/engines/asylum/system/savegame.h
index ce222e70b62..6f23b48a1f0 100644
--- a/engines/asylum/system/savegame.h
+++ b/engines/asylum/system/savegame.h
@@ -183,6 +183,7 @@ public:
bool hasSavegame(uint32 index) const;
ResourcePackId getScenePack() { return (ResourcePackId)(_savegameToScene[_index] + 4); }
+ void resetVersion();
const char *getVersion() { return _version.c_str(); }
uint32 getBuild() { return _build; }
diff --git a/engines/asylum/views/scene.cpp b/engines/asylum/views/scene.cpp
index 436184d95ee..7a390ba31ae 100644
--- a/engines/asylum/views/scene.cpp
+++ b/engines/asylum/views/scene.cpp
@@ -71,6 +71,7 @@ Scene::Scene(AsylumEngine *engine): _vm(engine),
_savedScreen.create(640, 480, Graphics::PixelFormat::createFormatCLUT8());
+ _debugShowVersion = false;
g_debugActors = 0;
g_debugObjects = 0;
g_debugPolygons = 0;
@@ -423,7 +424,7 @@ bool Scene::update() {
bool Scene::action(AsylumAction a) {
switch (a) {
case kAsylumActionShowVersion:
- // TODO show version!
+ _debugShowVersion = !_debugShowVersion;
break;
case kAsylumActionQuickLoad:
@@ -641,6 +642,13 @@ bool Scene::updateScreen() {
getActor()->drawNumber();
// Original handle all debug commands here (we do it as part of each update command)
+ if (_debugShowVersion) {
+ getText()->setPosition(Common::Point(0, 0));
+ getText()->loadFont(_ws->font1);
+ getText()->draw(Common::String::format("Version %s / Build %d",
+ getSaveLoad()->getVersion(),
+ getSaveLoad()->getBuild()).c_str());
+ }
if (getSharedData()->getFlag(kFlagScene1)) {
getScreen()->clear();
diff --git a/engines/asylum/views/scene.h b/engines/asylum/views/scene.h
index 8c72f53495f..f769066ccdc 100644
--- a/engines/asylum/views/scene.h
+++ b/engines/asylum/views/scene.h
@@ -222,6 +222,8 @@ private:
Graphics::Surface _savedScreen;
byte _savedPalette[PALETTE_SIZE];
+ bool _debugShowVersion;
+
//////////////////////////////////////////////////////////////////////////
// Message handling
void activate();
Commit: 225e527ac6810ff1986e0957f453eb993c10e70b
https://github.com/scummvm/scummvm/commit/225e527ac6810ff1986e0957f453eb993c10e70b
Author: alxpnv (alxpnv22 at yahoo.com)
Date: 2022-06-16T12:21:07+03:00
Commit Message:
ASYLUM: remove a shortcut to toggle scrolling debug mode
Changed paths:
engines/asylum/views/scene.cpp
diff --git a/engines/asylum/views/scene.cpp b/engines/asylum/views/scene.cpp
index 7a390ba31ae..2487ec93030 100644
--- a/engines/asylum/views/scene.cpp
+++ b/engines/asylum/views/scene.cpp
@@ -517,10 +517,6 @@ bool Scene::key(const AsylumEvent &evt) {
getActor()->setLastScreenUpdate(_vm->screenUpdateCount);
}
break;
-
- case Common::KEYCODE_m:
- g_debugScrolling = !g_debugScrolling;
- break;
}
return true;
More information about the Scummvm-git-logs
mailing list