diff options
author | Johannes Schickel | 2006-01-04 07:39:16 +0000 |
---|---|---|
committer | Johannes Schickel | 2006-01-04 07:39:16 +0000 |
commit | ed6c07c66e15890670fd7cc93c17da6f46962518 (patch) | |
tree | c0e1f880f629cbdb82be291e5696a6bbd0ea47e4 /kyra | |
parent | 23f81b8bc67cfec985486a66966fa2f49ac06f85 (diff) | |
download | scummvm-rg350-ed6c07c66e15890670fd7cc93c17da6f46962518.tar.gz scummvm-rg350-ed6c07c66e15890670fd7cc93c17da6f46962518.tar.bz2 scummvm-rg350-ed6c07c66e15890670fd7cc93c17da6f46962518.zip |
Added a simple gui dialog if brandon dies (currently using scummvms gui system)
Implemented cmd_setDeathHandlerFlag and fixed debug call for cmd_drinkPotionAnimation.
svn-id: r19907
Diffstat (limited to 'kyra')
-rw-r--r-- | kyra/kyra.cpp | 10 | ||||
-rw-r--r-- | kyra/script_v1.cpp | 5 |
2 files changed, 13 insertions, 2 deletions
diff --git a/kyra/kyra.cpp b/kyra/kyra.cpp index 970afc012a..3a0f7fcb86 100644 --- a/kyra/kyra.cpp +++ b/kyra/kyra.cpp @@ -37,6 +37,8 @@ #include "sound/voc.h" #include "sound/audiostream.h" +#include "gui/message.h" + #include "kyra/kyra.h" #include "kyra/resource.h" #include "kyra/screen.h" @@ -395,6 +397,7 @@ int KyraEngine::init(GameDetector &detector) { _unkScreenVar1 = 1; _unkScreenVar2 = 0; _unkScreenVar3 = 0; + _unkAmuletVar = 0; memset(_specialPalettes, 0, sizeof(_specialPalettes)); _mousePressFlag = false; @@ -675,6 +678,13 @@ void KyraEngine::mainLoop() { // XXX } + if (_deathHandler != 0xFF) { + // this is only used until the original gui is implemented + GUI::MessageDialog dialog("Brandon is dead! Game over!", "Quit"); + dialog.runModal(); + break; + } + if (_brandonStatusBit & 2) { if (_brandonStatusBit0x02Flag) animRefreshNPC(0); diff --git a/kyra/script_v1.cpp b/kyra/script_v1.cpp index 886e954579..ba17ffb43d 100644 --- a/kyra/script_v1.cpp +++ b/kyra/script_v1.cpp @@ -1204,12 +1204,13 @@ int KyraEngine::cmd_setFireberryGlowPalette(ScriptState *script) { } int KyraEngine::cmd_setDeathHandlerFlag(ScriptState *script) { - warning("STUB: cmd_setDeathHandlerFlag"); + debug(3, "cmd_drinkPotionAnimation(0x%X) (%d)", script, stackPos(0)); + _deathHandler = stackPos(0); return 0; } int KyraEngine::cmd_drinkPotionAnimation(ScriptState *script) { - debug(3, "cmd_drinkPotionAnimation(0x%X) (%d, %d, %d)", script); + debug(3, "cmd_drinkPotionAnimation(0x%X) (%d, %d, %d)", script, stackPos(0), stackPos(1), stackPos(2)); seq_playDrinkPotionAnim(stackPos(0), stackPos(1), stackPos(2)); return 0; } |