[Scummvm-git-logs] scummvm master -> 8751b6d6735e705d2ff8e9e696f26763b145c925
mgerhardy
noreply at scummvm.org
Tue Oct 8 21:49:11 UTC 2024
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:
8751b6d673 TWINE: added palette menu entries to the debugger
Commit: 8751b6d6735e705d2ff8e9e696f26763b145c925
https://github.com/scummvm/scummvm/commit/8751b6d6735e705d2ff8e9e696f26763b145c925
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2024-10-08T23:45:50+02:00
Commit Message:
TWINE: added palette menu entries to the debugger
Changed paths:
engines/twine/debugger/debugtools.cpp
engines/twine/twine.h
diff --git a/engines/twine/debugger/debugtools.cpp b/engines/twine/debugger/debugtools.cpp
index cc2e7bbf9fa..97e08efc7e0 100644
--- a/engines/twine/debugger/debugtools.cpp
+++ b/engines/twine/debugger/debugtools.cpp
@@ -31,6 +31,7 @@
#include "twine/holomap.h"
#include "twine/parser/entity.h"
#include "twine/renderer/redraw.h"
+#include "twine/renderer/screens.h"
#include "twine/resources/resources.h"
#include "twine/scene/actor.h"
#include "twine/scene/gamestate.h"
@@ -730,6 +731,40 @@ static void debuggerMenu(TwinEEngine *engine) {
actor->_posObj = engine->_grid->_worldCube;
actor->_posObj.y += 1000;
}
+ if (ImGui::BeginMenu("Palettes")) {
+ if (ImGui::MenuItem("Dark palette")) {
+ engine->_screens->setDarkPal();
+ }
+ if (ImGui::MenuItem("Normal palette")) {
+ engine->_screens->setNormalPal();
+ }
+#if 0
+ // TODO: the fade functions are blocking and break the imgui begin/end cycle
+ LifeScriptContext fakeCtx(0, engine->_scene->_sceneHero);
+ if (ImGui::MenuItem("lFADE_PAL_RED")) {
+ engine->_scriptLife->lFADE_PAL_RED(engine, fakeCtx);
+ }
+ if (ImGui::MenuItem("lFADE_ALARM_RED")) {
+ engine->_scriptLife->lFADE_ALARM_RED(engine, fakeCtx);
+ }
+ if (ImGui::MenuItem("lFADE_ALARM_PAL")) {
+ engine->_scriptLife->lFADE_ALARM_PAL(engine, fakeCtx);
+ }
+ if (ImGui::MenuItem("lFADE_RED_PAL")) {
+ engine->_scriptLife->lFADE_RED_PAL(engine, fakeCtx);
+ }
+ if (ImGui::MenuItem("lFADE_RED_ALARM")) {
+ engine->_scriptLife->lFADE_RED_ALARM(engine, fakeCtx);
+ }
+ if (ImGui::MenuItem("lFADE_PAL_ALARM")) {
+ engine->_scriptLife->lFADE_PAL_ALARM(engine, fakeCtx);
+ }
+#endif
+ ImGui::EndMenu();
+ }
+ if (ImGui::MenuItem("Force Redraw")) {
+ engine->_redraw->_firstTime = true;
+ }
ImGui::SeparatorText("Options");
diff --git a/engines/twine/twine.h b/engines/twine/twine.h
index 7fdc4a59356..00b8e644703 100644
--- a/engines/twine/twine.h
+++ b/engines/twine/twine.h
@@ -209,9 +209,6 @@ private:
EngineState _state = EngineState::Menu;
Common::String _queuedFlaMovie;
- ScriptLife *_scriptLife;
- ScriptMove *_scriptMove;
-
Common::RandomSource _rnd;
Common::Language _gameLang;
@@ -304,6 +301,9 @@ public:
Wagon *_wagon; // lba2
DebugState *_debugState;
+ ScriptLife *_scriptLife;
+ ScriptMove *_scriptMove;
+
/** Configuration file structure
* Contains all the data used in the engine to configurate the game in particularly ways. */
ConfigFile _cfgfile;
More information about the Scummvm-git-logs
mailing list