From 95765feb55bdac148a95af99e01232b5f0e6d5bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Ko=C5=82odziejski?= Date: Fri, 5 Aug 2022 18:49:46 +0200 Subject: [PATCH] ICB: ELDORADO: Fixed my earlier change in speech.cpp --- engines/icb/speech.cpp | 48 ++++++++++++++++++++++-------------------- 1 file changed, 25 insertions(+), 23 deletions(-) diff --git a/engines/icb/speech.cpp b/engines/icb/speech.cpp index f1cfd97fc37..63fb148889e 100644 --- a/engines/icb/speech.cpp +++ b/engines/icb/speech.cpp @@ -97,11 +97,11 @@ mcodeFunctionReturnCodes _game_session::fn_get_speech_status(int32 &result, int3 if ((g_oIconMenu->IsActive()) || (player.player_status == REMORA)) result = 1; - - if ((result) && (cur_id == player.Fetch_player_id())) - Tdebug("speech_check.txt", "get status"); } + if ((result) && (cur_id == player.Fetch_player_id())) + Tdebug("speech_check.txt", "get status"); + return IR_CONT; } @@ -126,32 +126,34 @@ mcodeFunctionReturnCodes _game_session::fn_request_speech(int32 &result, int32 * if (g_icb->getGameType() == GType_ICB) { if (player.player_status == REMORA) return IR_REPEAT; + } else { + // TODO: enable later + #if 0 + if (cur_id == player.Fetch_player_id() && (player.player_status == MAP)) { + g_oMap.CloseDownMap(); + } + #endif + } - if ((cur_id == player.Fetch_player_id()) && (g_oIconMenu->IsActive())) - g_oIconMenu->CloseDownIconMenu(); + if ((cur_id == player.Fetch_player_id()) && (g_oIconMenu->IsActive())) + g_oIconMenu->CloseDownIconMenu(); + if (g_icb->getGameType() == GType_ICB) { if ((g_oIconMenu->IsActive()) || (player.player_status == REMORA)) return IR_REPEAT; - } else { - //TODO: -#if 0 - if ((cur_id == player.Fetch_player_id()) && (player.player_status==MAP)) - g_oMap.CloseDownMap(); - - if ((cur_id == player.Fetch_player_id()) && (g_oIconMenu.IsActive())) - g_oIconMenu.CloseDownIconMenu(); - - // if object is a mega, check what anim it has and turn its ambient anims off or on depending... - if (L->mega) { - if (L->cur_anim_type == __STAND) { - M->idleAnimsOn = TRUE8; - M->idlePhase = NEEDS_INIT; - } else - M->idleAnimsOn = FALSE8; - } -#endif } + // TODO: enable later + #if 0 + if (g_icb->getGameType() == GType_ELDORADO && L->mega) { + if (L->cur_anim_type == __STAND) { + M->idleAnimsOn = TRUE8; + M->idlePhase = NEEDS_INIT; + } else + M->idleAnimsOn = FALSE8; + } + #endif + // not started yet S.state = __PENDING;