[Scummvm-git-logs] scummvm master -> 18e0949ac027e1fde5eb8a87db1b56473de2ab79
aquadran
noreply at scummvm.org
Thu Aug 4 23:09:40 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:
18e0949ac0 ICB: ELDORADO: More specifics for ICB flow
Commit: 18e0949ac027e1fde5eb8a87db1b56473de2ab79
https://github.com/scummvm/scummvm/commit/18e0949ac027e1fde5eb8a87db1b56473de2ab79
Author: PaweÅ KoÅodziejski (aquadran at gmail.com)
Date: 2022-08-05T01:09:32+02:00
Commit Message:
ICB: ELDORADO: More specifics for ICB flow
Changed paths:
engines/icb/fn_icon_functions.cpp
engines/icb/function.cpp
engines/icb/global_switches.cpp
engines/icb/icon_list_manager.cpp
engines/icb/icon_menu.cpp
engines/icb/icon_menu_pc.cpp
engines/icb/mission.cpp
engines/icb/player.cpp
engines/icb/prim_route_builder.cpp
engines/icb/remora_sprite.cpp
engines/icb/session.cpp
engines/icb/sound.cpp
engines/icb/speech.cpp
engines/icb/text_sprites_pc.cpp
diff --git a/engines/icb/fn_icon_functions.cpp b/engines/icb/fn_icon_functions.cpp
index 8e06c9c52b5..cd4fdf70d78 100644
--- a/engines/icb/fn_icon_functions.cpp
+++ b/engines/icb/fn_icon_functions.cpp
@@ -24,6 +24,7 @@
*
*/
+#include "engines/icb/icb.h"
#include "engines/icb/common/px_rcutypes.h"
#include "engines/icb/common/ptr_util.h"
#include "engines/icb/global_objects.h"
@@ -144,6 +145,11 @@ mcodeFunctionReturnCodes _game_session::fn_remove_inventory_item(int32 &, int32
}
mcodeFunctionReturnCodes _game_session::fn_add_medipacks(int32 &result, int32 *params) {
+ if (g_icb->getGameType() == GType_ELDORADO) {
+ result = 0;
+ return IR_CONT;
+ }
+
char pcIconPath[ENGINE_STRING_LEN];
bool8 bFlashIcons;
@@ -177,6 +183,10 @@ mcodeFunctionReturnCodes _game_session::fn_use_medipacks(int32 &, int32 *params)
}
mcodeFunctionReturnCodes _game_session::fn_add_ammo_clips(int32 &result, int32 *params) {
+ if (g_icb->getGameType() == GType_ELDORADO) {
+ return IR_CONT;
+ }
+
char pcIconPath[ENGINE_STRING_LEN];
bool8 bFlashIcons;
diff --git a/engines/icb/function.cpp b/engines/icb/function.cpp
index 6deef8fd0ce..70c8b7f3e26 100644
--- a/engines/icb/function.cpp
+++ b/engines/icb/function.cpp
@@ -2401,6 +2401,10 @@ mcodeFunctionReturnCodes _game_session::fn_hold_while_list_near_nico(int32 &resu
}
mcodeFunctionReturnCodes _game_session::fn_set_watch(int32 &, int32 *params) {
+ if (g_icb->getGameType() == GType_ELDORADO) {
+ return IR_CONT;
+ }
+
_input *psInputState;
_input sInputState;
diff --git a/engines/icb/global_switches.cpp b/engines/icb/global_switches.cpp
index 7b8690c91a7..61e56012b78 100644
--- a/engines/icb/global_switches.cpp
+++ b/engines/icb/global_switches.cpp
@@ -24,6 +24,7 @@
*
*/
+#include "engines/icb/icb.h"
#include "engines/icb/global_switches.h"
namespace ICB {
@@ -41,8 +42,13 @@ c_global_switches::c_global_switches() {
// have BASIC top-down shadows ON by default for the both platforms
actorShadows = -1; // = -1 for automatic top-down shadow
cross_hair = FALSE8;
- prop_hilite = FALSE8;
- mega_hilite = FALSE8;
+ if (g_icb->getGameType() == GType_ICB) {
+ prop_hilite = FALSE8;
+ mega_hilite = FALSE8;
+ } else {
+ prop_hilite = TRUE8;
+ mega_hilite = TRUE8;
+ }
game_completed = FALSE8;
los_enabled = TRUE8;
debugging_and_console = TRUE8; // head up switcher, headup info and console allowed - i.e. no in final game
diff --git a/engines/icb/icon_list_manager.cpp b/engines/icb/icon_list_manager.cpp
index f2e145ed052..ec5312b0c93 100644
--- a/engines/icb/icon_list_manager.cpp
+++ b/engines/icb/icon_list_manager.cpp
@@ -24,6 +24,7 @@
*
*/
+#include "engines/icb/icb.h"
#include "engines/icb/icon_list_manager.h"
#include "engines/icb/global_objects.h"
#include "engines/icb/mission.h"
@@ -49,35 +50,37 @@ void _icon_list_manager::ActivateIconMenu(const char *pcListName, bool8 bAllowEs
int32 nListIndex;
_icon_menu_duplicates sDuplicates;
uint32 nHash;
- int32 nInitialSelected;
+ int32 nInitialSelected = 0;
uint32 nNumClips, nNumMedi;
nListIndex = FindListByName(pcListName);
- // The player object now 'owns' the count of medipacks and clips. To find out how many to draw,
- // we need to get these counts here and add them to the inventory. Not in the Remora though.
- if (bDrawStatusIcons) {
- // Get number of clips and medipacks from the player object.
- nNumClips = MS->player.GetNoAmmoClips();
- nNumMedi = MS->player.GetNoMediPacks();
-
- // Set this number in the icon menu.
- m_pListOfLists[nListIndex].SetAbsoluteIconCount(ARMS_AMMO_NAME, nNumClips);
- m_pListOfLists[nListIndex].SetAbsoluteIconCount(ARMS_HEALTH_NAME, nNumMedi);
-
- // Find the medipacks position.
- nInitialSelected = m_pListOfLists[nListIndex].GetIconPosition(ARMS_HEALTH_NAME);
-
- // If we didn't find it, just set the 0 icon to be displayed.
- if (nInitialSelected == -1)
+ if (g_icb->getGameType() == GType_ICB) {
+ // The player object now 'owns' the count of medipacks and clips. To find out how many to draw,
+ // we need to get these counts here and add them to the inventory. Not in the Remora though.
+ if (bDrawStatusIcons) {
+ // Get number of clips and medipacks from the player object.
+ nNumClips = MS->player.GetNoAmmoClips();
+ nNumMedi = MS->player.GetNoMediPacks();
+
+ // Set this number in the icon menu.
+ m_pListOfLists[nListIndex].SetAbsoluteIconCount(ARMS_AMMO_NAME, nNumClips);
+ m_pListOfLists[nListIndex].SetAbsoluteIconCount(ARMS_HEALTH_NAME, nNumMedi);
+
+ // Find the medipacks position.
+ nInitialSelected = m_pListOfLists[nListIndex].GetIconPosition(ARMS_HEALTH_NAME);
+
+ // If we didn't find it, just set the 0 icon to be displayed.
+ if (nInitialSelected == -1)
+ nInitialSelected = 0;
+ } else {
+ // Just select first icon in the Remora.
nInitialSelected = 0;
- } else {
- // Just select first icon in the Remora.
- nInitialSelected = 0;
- // No clips or medipacks in the Remora.
- m_pListOfLists[nListIndex].RemoveIcon(ARMS_AMMO_NAME, TRUE8);
- m_pListOfLists[nListIndex].RemoveIcon(ARMS_HEALTH_NAME, TRUE8);
+ // No clips or medipacks in the Remora.
+ m_pListOfLists[nListIndex].RemoveIcon(ARMS_AMMO_NAME, TRUE8);
+ m_pListOfLists[nListIndex].RemoveIcon(ARMS_HEALTH_NAME, TRUE8);
+ }
}
// We've found the list. If there are no icons in it, add the 'empty' one.
diff --git a/engines/icb/icon_menu.cpp b/engines/icb/icon_menu.cpp
index 1890a4704d0..f022b0fbff1 100644
--- a/engines/icb/icon_menu.cpp
+++ b/engines/icb/icon_menu.cpp
@@ -24,6 +24,7 @@
*
*/
+#include "engines/icb/icb.h"
#include "engines/icb/icon_menu.h"
#include "engines/icb/global_objects.h"
#include "engines/icb/sound.h"
@@ -105,7 +106,8 @@ bool8 _icon_menu::CycleIconMenu(const _input &sKeyboardState) {
// INVENTORY QUIT: we must not be in the remora, m_bAllowEscape must be true
// key not locked, we are pressing inventory and we wern't last time...
- if ((!g_oRemora->IsActive()) && (m_bAllowEscape) && (!m_nKeyLock) && (inventoryPress) && (!lastInventoryPress)) {
+ if (((g_icb->getGameType() == GType_ICB && !g_oRemora->IsActive()) ||
+ (g_icb->getGameType() != GType_ICB)) && (m_bAllowEscape) && (!m_nKeyLock) && (inventoryPress) && (!lastInventoryPress)) {
CloseDownIconMenu();
// Return the player's state to what it was before the menu was activated.
@@ -120,7 +122,8 @@ bool8 _icon_menu::CycleIconMenu(const _input &sKeyboardState) {
}
// REMORA QUIT: remora is active we just let go of inventory button, key not locked we have a return...
- else if ((g_oRemora->IsActive()) && (!m_nKeyLock) && (!inventoryPress) && (lastInventoryPress) && (found != -1)) {
+ else if (((g_icb->getGameType() == GType_ICB && g_oRemora->IsActive()) ||
+ (g_icb->getGameType() != GType_ICB)) && (!m_nKeyLock) && (!inventoryPress) && (lastInventoryPress) && (found != -1)) {
m_nLastSelection = found;
m_bValidSelection = TRUE8;
@@ -138,7 +141,8 @@ bool8 _icon_menu::CycleIconMenu(const _input &sKeyboardState) {
// CONVERSATION QUIT: remora is not active m_bAllowEscape is probably true
// no key lock, inventory was pressed and has now been released...
// and we have a quit!
- else if ((!g_oRemora->IsActive()) && (!m_bAllowEscape) && (!m_nKeyLock) && (!inventoryPress) && (lastInventoryPress) && (found != -1)) {
+ else if (((g_icb->getGameType() == GType_ICB && !g_oRemora->IsActive()) ||
+ (g_icb->getGameType() != GType_ICB)) && (!m_bAllowEscape) && (!m_nKeyLock) && (!inventoryPress) && (lastInventoryPress) && (found != -1)) {
m_nLastSelection = found;
m_bValidSelection = TRUE8;
@@ -158,8 +162,7 @@ bool8 _icon_menu::CycleIconMenu(const _input &sKeyboardState) {
m_nLastSelection = m_nSelectedIcon;
m_bValidSelection = TRUE8;
}
-
- if (!g_oRemora->IsActive()) {
+ if (g_icb->getGameType() == GType_ICB && !g_oRemora->IsActive()) {
// Return the player's state to what it was before the menu was activated.
MS->player.Pop_control_mode();
MS->player.Set_player_status(STOOD);
diff --git a/engines/icb/icon_menu_pc.cpp b/engines/icb/icon_menu_pc.cpp
index 63cf41b15a0..303bf75a763 100644
--- a/engines/icb/icon_menu_pc.cpp
+++ b/engines/icb/icon_menu_pc.cpp
@@ -24,6 +24,7 @@
*
*/
+#include "engines/icb/icb.h"
#include "engines/icb/icon_menu.h"
#include "engines/icb/icon_menu_pc.h"
#include "engines/icb/global_objects.h"
@@ -361,7 +362,7 @@ void _icon_menu::DrawIconMenu() {
nItemCount = m_sDuplicates.s_pnItemCounts[nIconIndex];
// Only write the number on in 3D mode.
- if (g_px->display_mode == THREED) {
+ if (g_px->display_mode == THREED && g_icb->getGameType() == GType_ICB) {
// Write the number if greater than 1 or it is the clips or medipacks count.
if (((nItemCount > 1) || (nHashRef == HashString(ARMS_HEALTH_NAME)) || (nHashRef == HashString(ARMS_AMMO_NAME))) && x > 0) {
snprintf(pcDigits, 16, "%d", m_sDuplicates.s_pnItemCounts[nIconIndex]);
@@ -487,8 +488,10 @@ void _icon_menu::SetAddingClipsCount(uint32 nNumClips) {
// Set the counter that controls the flashing. Starts at 1 just to tidy up the initial flash.
m_nAddedFlashCount = 0;
- // Prepare to draw the flashing icon (on PC only).
- SetupAdding(ARMS_AMMO_NAME, m_nAddedClipsSurface);
+ if (g_icb->getGameType() == GType_ICB) {
+ // Prepare to draw the flashing icon (on PC only).
+ SetupAdding(ARMS_AMMO_NAME, m_nAddedClipsSurface);
+ }
}
void _icon_menu::SetAddingMedipacksCount(uint32 nNumMedipacks) {
@@ -498,8 +501,10 @@ void _icon_menu::SetAddingMedipacksCount(uint32 nNumMedipacks) {
// Set the counter that controls the flashing.
m_nAddedFlashCount = 0;
- // Prepare to draw the flashing icon (on PC only).
- SetupAdding(ARMS_HEALTH_NAME, m_nAddedMedipacksSurface);
+ if (g_icb->getGameType() == GType_ICB) {
+ // Prepare to draw the flashing icon (on PC only).
+ SetupAdding(ARMS_HEALTH_NAME, m_nAddedMedipacksSurface);
+ }
}
void _icon_menu::SetEmailArrived() {
@@ -525,7 +530,9 @@ void _icon_menu::DrawArmedMenu(const int32 nBullets, const int32 maxBullets, con
// Load the 2 icons... We probably only deleted them last frame but whey !
SetupAdding(ARMS_GUN_NAME, gunSurface);
- SetupAdding(ARMS_AMMO_NAME, clipSurface);
+ if (g_icb->getGameType() == GType_ICB) {
+ SetupAdding(ARMS_AMMO_NAME, clipSurface);
+ }
// Icon positioning
LRECT destRect;
destRect.left = ICON_ARMED_MENU_PIXEL_X + 10;
diff --git a/engines/icb/mission.cpp b/engines/icb/mission.cpp
index c0df1bd46e5..d74affe56b7 100644
--- a/engines/icb/mission.cpp
+++ b/engines/icb/mission.cpp
@@ -24,6 +24,7 @@
*
*/
+#include "engines/icb/icb.h"
#include "engines/icb/common/px_common.h"
#include "engines/icb/mission.h"
#include "engines/icb/global_objects.h"
@@ -805,8 +806,10 @@ void _mission::Save_game_position(const char *filename, const char *slot_label,
// save timed events
g_oEventManager->Save(stream);
- // Save the Remora's locations-visited information.
- g_oRemora->Save(stream);
+ if (g_icb->getGameType() == GType_ICB) {
+ // Save the Remora's locations-visited information.
+ g_oRemora->Save(stream);
+ }
// save gfx init info for initing a set...
surface_manager->SaveGFXInfo(stream);
@@ -1085,8 +1088,10 @@ __load_result Load_game(const char *filename) {
// timed events
g_oEventManager->Restore(stream);
- // Restore the Remora's knowledge about where the player has been.
- g_oRemora->Restore(stream);
+ if (g_icb->getGameType() == GType_ICB) {
+ // Restore the Remora's knowledge about where the player has been.
+ g_oRemora->Restore(stream);
+ }
// load gfx init info for initing a set...
surface_manager->LoadGFXInfo(stream);
@@ -1128,8 +1133,10 @@ void _mission::Create_display() {
// The Remora has a function which gets called every cycle when it is active. This is because game
// logic continues to run when the Remora is up.
// But, note the background is NOT drawn whilst in REMORA mode
- if (g_oRemora->IsActive()) {
+ if (g_icb->getGameType() == GType_ICB && g_oRemora->IsActive()) {
g_oRemora->DrawRemora();
+ } else if (g_icb->getGameType() != GType_ICB && /*g_oMap*/g_oRemora->IsActive()) {
+ //g_oMap.DrawMap();
} else {
// full 3d stage draw NOT in REMORA mode
session->Stage_draw_poly();
@@ -1151,17 +1158,18 @@ void _mission::Create_display() {
// If the icon menu is active, draw it.
if (g_oIconMenu->IsActive()) {
g_oIconMenu->DrawIconMenu();
-
- // If not in the REMORA then draw the armed menu & health bar as well
- if ((g_oRemora->IsActive() == FALSE8) && (session->logic_structs[session->player.Fetch_player_id()]->mega->Fetch_armed_status())) {
- int32 nBullets = session->player.GetNoBullets();
- int32 nClips = session->player.GetNoAmmoClips();
- int32 maxBullets = session->player.GetBulletsPerClip();
- int32 maxClips = session->player.GetMaxClips();
- g_oIconMenu->DrawArmedMenu(nBullets, maxBullets, nClips, maxClips);
-
- session->Draw_health_bar();
- session->health_time = 0; // cancel the health bar timer
+ if (g_icb->getGameType() == GType_ICB) {
+ // If not in the REMORA then draw the armed menu & health bar as well
+ if ((g_oRemora->IsActive() == FALSE8) && (session->logic_structs[session->player.Fetch_player_id()]->mega->Fetch_armed_status())) {
+ int32 nBullets = session->player.GetNoBullets();
+ int32 nClips = session->player.GetNoAmmoClips();
+ int32 maxBullets = session->player.GetBulletsPerClip();
+ int32 maxClips = session->player.GetMaxClips();
+ g_oIconMenu->DrawArmedMenu(nBullets, maxBullets, nClips, maxClips);
+
+ session->Draw_health_bar();
+ session->health_time = 0; // cancel the health bar timer
+ }
}
} else if (session->logic_structs[session->player.Fetch_player_id()]->mega->Fetch_armed_status()) { // if player armed
session->Draw_health_bar();
@@ -1178,9 +1186,11 @@ void _mission::Create_display() {
session->Draw_health_bar();
}
- // If the icon menu is currently flashing added medipacks or clips draw it (but not in Remora).
- if (!g_oRemora->IsActive() && g_oIconMenu->IsAdding())
- g_oIconMenu->DrawAdding();
+ if (g_icb->getGameType() == GType_ICB) {
+ // If the icon menu is currently flashing added medipacks or clips draw it (but not in Remora).
+ if (!g_oRemora->IsActive() && g_oIconMenu->IsAdding())
+ g_oIconMenu->DrawAdding();
+ }
if (g_px->mega_timer)
session->Display_mega_times();
diff --git a/engines/icb/player.cpp b/engines/icb/player.cpp
index 416a21f86ce..82ab57d98e4 100644
--- a/engines/icb/player.cpp
+++ b/engines/icb/player.cpp
@@ -158,9 +158,11 @@ __mode_return _player::Player_press_remora_button() {
Push_control_mode(ACTOR_RELATIVE);
MS->Awaken_doors(); // sleeping doors come alive while in remora display!
- // This sets a flag which the Remora will pick up next cycle.
- g_oRemora->ActivateRemora(_remora::MOTION_SCAN);
- g_oRemora->CycleRemoraLogic(cur_state);
+ if (g_icb->getGameType() == GType_ICB) {
+ // This sets a flag which the Remora will pick up next cycle.
+ g_oRemora->ActivateRemora(_remora::MOTION_SCAN);
+ g_oRemora->CycleRemoraLogic(cur_state);
+ }
return (__FINISHED_THIS_CYCLE);
} else if (!(cur_state.IsButtonSet(__REMORA)))
remora_lock = FALSE8;
@@ -815,6 +817,10 @@ mcodeFunctionReturnCodes _player::Gateway() {
break;
case REMORA:
+ if (g_icb->getGameType() == GType_ELDORADO) {
+ return IR_REPEAT;
+ }
+
// The Remora is currently up over the game screen. Most important check is to see if player
// wants to quit it.
if (cur_state.IsButtonSet(__REMORA)) {
@@ -934,7 +940,7 @@ mcodeFunctionReturnCodes _player::Gateway() {
}
} while (ret == __MORE_THIS_CYCLE);
- return (IR_REPEAT);
+ return IR_REPEAT;
}
void _player::Set_player_status(_player_stat new_mode) {
diff --git a/engines/icb/prim_route_builder.cpp b/engines/icb/prim_route_builder.cpp
index b05a4dd8109..54f1d362bfb 100644
--- a/engines/icb/prim_route_builder.cpp
+++ b/engines/icb/prim_route_builder.cpp
@@ -24,6 +24,7 @@
*
*/
+#include "engines/icb/icb.h"
#include "engines/icb/p4.h"
#include "engines/icb/common/px_common.h"
#include "engines/icb/common/px_floor_map.h"
@@ -492,7 +493,11 @@ int32 _prim_route_builder::Get_intersect(PXreal x0, PXreal y0, PXreal x1, PXreal
}
bool8 _prim_route_builder::LineIntersectsRect(DXrect oRect, int32 nX1, int32 nY1, int32 nX2, int32 nY2) const {
- return (g_oRemora->CohenSutherland(oRect, nX1, nY1, nX2, nY2, FALSE8));
+ if (g_icb->getGameType() == GType_ICB) {
+ return (g_oRemora->CohenSutherland(oRect, nX1, nY1, nX2, nY2, FALSE8));
+ } else {
+ return (/*g_oMap*/g_oRemora->CohenSutherland(oRect, nX1, nY1, nX2, nY2, FALSE8));
+ }
}
} // End of namespace ICB
diff --git a/engines/icb/remora_sprite.cpp b/engines/icb/remora_sprite.cpp
index 2360129f51c..e60ae73c74c 100644
--- a/engines/icb/remora_sprite.cpp
+++ b/engines/icb/remora_sprite.cpp
@@ -24,6 +24,7 @@
*
*/
+#include "engines/icb/icb.h"
#include "engines/icb/remora_sprite.h"
#include "engines/icb/global_objects.h"
#include "engines/icb/res_man.h"
@@ -31,6 +32,10 @@
namespace ICB {
void _remora_sprite::InitialiseFromBitmapName(const char *pcBitmapName, const char *pcClusterName, uint32 nClusterHash) {
+ if (g_icb->getGameType() == GType_ELDORADO) {
+ return;
+ }
+
_pxBitmap *psBitmap;
_pxSprite *psSprite;
diff --git a/engines/icb/session.cpp b/engines/icb/session.cpp
index c8ed439c524..c8282fd7375 100644
--- a/engines/icb/session.cpp
+++ b/engines/icb/session.cpp
@@ -287,8 +287,10 @@ void _game_session::___init(const char *mission, const char *new_session_name) {
// reference file which is opened here so the global reference can be set.
g_oIconMenu->SetTransparencyColourKey();
- // Initialise the remora
- g_oRemora->InitialiseRemora();
+ if (g_icb->getGameType() == GType_ICB) {
+ // Initialise the remora
+ g_oRemora->InitialiseRemora();
+ }
// Set the default colour for voice over text.
voice_over_red = VOICE_OVER_DEFAULT_RED;
diff --git a/engines/icb/sound.cpp b/engines/icb/sound.cpp
index b8383138558..8d7c696fe69 100644
--- a/engines/icb/sound.cpp
+++ b/engines/icb/sound.cpp
@@ -889,7 +889,7 @@ void UpdateHearableSounds() {
if ((g_mission) && (g_mission->session) && (MS->speech_info[CONV_ID].total_subscribers > 0) && (GetSpeechVolume() > 0))
speechOnSliderTarget = SPEECH_ON_VOLUME;
// if remora active even lower volume
- else if (g_oRemora->IsActive())
+ else if (g_icb->getGameType() == GType_ICB && g_oRemora->IsActive())
speechOnSliderTarget = REMORA_ACTIVE_VOLUME;
// otherwise our target is full volume
else
diff --git a/engines/icb/speech.cpp b/engines/icb/speech.cpp
index 935d1d10f76..b3a16a9c310 100644
--- a/engines/icb/speech.cpp
+++ b/engines/icb/speech.cpp
@@ -24,6 +24,7 @@
*
*/
+#include "engines/icb/icb.h"
#include "engines/icb/floors.h"
#include "engines/icb/speech.h"
#include "engines/icb/fn_routines.h"
@@ -87,17 +88,19 @@ mcodeFunctionReturnCodes _game_session::fn_get_speech_status(int32 &result, int3
result = total_convs;
- if ((cur_id == player.Fetch_player_id()) && (player.player_status == REMORA))
- Fatal_error("fn_get_speech_status - player cant start conversation inside remora!");
+ if (g_icb->getGameType() == GType_ICB) {
+ if ((cur_id == player.Fetch_player_id()) && (player.player_status == REMORA))
+ Fatal_error("fn_get_speech_status - player cant start conversation inside remora!");
- 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_oIconMenu->IsActive()) || (player.player_status == REMORA))
- result = 1;
+ 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;
}
@@ -120,17 +123,22 @@ mcodeFunctionReturnCodes _game_session::fn_request_speech(int32 &result, int32 *
return IR_REPEAT; // just wait until other is done
}
- if (player.player_status == REMORA)
- return IR_REPEAT;
+ if (g_icb->getGameType() == GType_ICB) {
+ if (player.player_status == REMORA)
+ return IR_REPEAT;
- 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_oIconMenu->IsActive()) || (player.player_status == REMORA))
+ if ((g_oIconMenu->IsActive()) || (player.player_status == REMORA))
return IR_REPEAT;
- // not started yet
- S.state = __PENDING;
+ // not started yet
+ S.state = __PENDING;
+ } else {
+ if ((g_oIconMenu->IsActive()) || (player.player_status == REMORA/*MAP*/))
+ return IR_REPEAT;
+ }
// get the system now - in case another object tries to start a conversation
total_convs++; // to 1 ;)
diff --git a/engines/icb/text_sprites_pc.cpp b/engines/icb/text_sprites_pc.cpp
index 38e9eb84948..b65059d68e5 100644
--- a/engines/icb/text_sprites_pc.cpp
+++ b/engines/icb/text_sprites_pc.cpp
@@ -24,6 +24,7 @@
*
*/
+#include "engines/icb/icb.h"
#include "engines/icb/common/px_common.h"
#include "engines/icb/text_sprites.h"
#include "engines/icb/global_objects.h"
@@ -94,6 +95,20 @@ _TSrtn text_sprite::BuildTextSprite(int32 stopAtLine, bool8 bRemoraLeftFormattin
// Save the first 6 entries of the palette.
memcpy(pnSavePalette, pal, 24);
+ if (g_icb->getGameType() == GType_ELDORADO) {
+ pal[0] = 0;
+ pal[1] = 0;
+ pal[2] = 0;
+
+ pal[4] = 0;
+ pal[5] = 0;
+ pal[6] = 0;
+
+ pal[8] = 1;
+ pal[9] = 1;
+ pal[10] = 1;
+ }
+
// Put in the main text colour.
pal[12] = psTempSpeechColour->blue;
pal[13] = psTempSpeechColour->green;
@@ -104,10 +119,12 @@ _TSrtn text_sprite::BuildTextSprite(int32 stopAtLine, bool8 bRemoraLeftFormattin
pal[17] = (uint8)((float)psTempSpeechColour->green * 0.65);
pal[18] = (uint8)((float)psTempSpeechColour->red * 0.65);
- // Put in second anti-alias colour.
- pal[20] = (uint8)((float)psTempSpeechColour->blue * 0.3);
- pal[21] = (uint8)((float)psTempSpeechColour->green * 0.3);
- pal[22] = (uint8)((float)psTempSpeechColour->red * 0.3);
+ if (g_icb->getGameType() == GType_ICB) {
+ // Put in second anti-alias colour.
+ pal[20] = (uint8)((float)psTempSpeechColour->blue * 0.3);
+ pal[21] = (uint8)((float)psTempSpeechColour->green * 0.3);
+ pal[22] = (uint8)((float)psTempSpeechColour->red * 0.3);
+ }
}
// fill sprite with characters, one line at a time
More information about the Scummvm-git-logs
mailing list