[Scummvm-git-logs] scummvm master -> efcc8ee6a3862cedbc066e3295fa3cbd166e6fe1
digitall
547637+digitall at users.noreply.github.com
Fri Mar 19 15:42:59 UTC 2021
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:
efcc8ee6a3 ICB: Various Fixes for GCC Warnings and Minor Comment Spelling
Commit: efcc8ee6a3862cedbc066e3295fa3cbd166e6fe1
https://github.com/scummvm/scummvm/commit/efcc8ee6a3862cedbc066e3295fa3cbd166e6fe1
Author: D G Turner (digitall at scummvm.org)
Date: 2021-03-19T15:41:37Z
Commit Message:
ICB: Various Fixes for GCC Warnings and Minor Comment Spelling
Changed paths:
engines/icb/camera.cpp
engines/icb/common/px_scriptengine.cpp
engines/icb/fn_interact.cpp
engines/icb/function.cpp
engines/icb/general_npc_animation.cpp
engines/icb/icon_menu.cpp
engines/icb/icon_menu_pc.cpp
diff --git a/engines/icb/camera.cpp b/engines/icb/camera.cpp
index e1589db105..78e9c1ba68 100644
--- a/engines/icb/camera.cpp
+++ b/engines/icb/camera.cpp
@@ -531,12 +531,11 @@ mcodeFunctionReturnCodes _game_session::fn_is_current_camera(int32 &result, int3
mcodeFunctionReturnCodes _game_session::fn_is_current_location(int32 &result, int32 *params) {
char h_buf[8];
uint32 len;
- uint32 nPlayerFloorIndex;
const char *location_name = (const char *)MemoryUtil::resolvePtr(params[0]);
// First we need to know which location the player is in, because the information level
// for this is automatically at full.
- nPlayerFloorIndex = MS->logic_structs[MS->player.Fetch_player_id()]->owner_floor_rect;
+ //uint32 nPlayerFloorIndex = MS->logic_structs[MS->player.Fetch_player_id()]->owner_floor_rect;
Message_box("is %s current location?", location_name);
diff --git a/engines/icb/common/px_scriptengine.cpp b/engines/icb/common/px_scriptengine.cpp
index 8dc4487153..d888668f9d 100644
--- a/engines/icb/common/px_scriptengine.cpp
+++ b/engines/icb/common/px_scriptengine.cpp
@@ -232,6 +232,7 @@ scriptInterpreterReturnCodes RunScript(const char *&scriptData, // A pointer to
// isInExpression starts off at false as it is set every loop of the while...
case CP_CALL_MCODE_EXPR:
isInExpression = TRUE8; // set to true and carry on running this code...
+ // falls through
case CP_CALL_MCODE: { // 10: Call an mcode routine
// Get the mcode number
int16 fnNumber;
diff --git a/engines/icb/fn_interact.cpp b/engines/icb/fn_interact.cpp
index e7e5e968e8..19edc73dec 100644
--- a/engines/icb/fn_interact.cpp
+++ b/engines/icb/fn_interact.cpp
@@ -246,7 +246,7 @@ mcodeFunctionReturnCodes _game_session::fn_wandering_generic_prop_interact(int32
}
mcodeFunctionReturnCodes _game_session::Core_prop_interact(int32 & /*result*/, int32 *params, bool8 custom, bool8 coord_correction) {
- bool8 initial_turn;
+ //bool8 initial_turn;
bool8 res = FALSE8;
__mega_set_names anim;
PXreal destx, destz;
@@ -332,9 +332,9 @@ mcodeFunctionReturnCodes _game_session::Core_prop_interact(int32 & /*result*/, i
if ((len2 > len) || (M->reverse_route == TRUE8)) { // if further away OR already set to reverse - must have been by fn-sony-door
M->m_main_route.request_form.anim_type = __STEP_BACKWARD;
M->reverse_route = TRUE8;
- initial_turn = FALSE8;
+ //initial_turn = FALSE8;
} else {
- initial_turn = TRUE8;
+ //initial_turn = TRUE8;
if (M->motion == __MOTION_WALK)
M->m_main_route.request_form.anim_type = __WALK;
diff --git a/engines/icb/function.cpp b/engines/icb/function.cpp
index 29f392afb2..1ed1237c54 100644
--- a/engines/icb/function.cpp
+++ b/engines/icb/function.cpp
@@ -3339,12 +3339,10 @@ mcodeFunctionReturnCodes _game_session::fn_set_to_floor(int32 &, int32 *params)
// params[0] ascii name of floor
- _floor *floor;
-
- const char *floor_name = (const char *)MemoryUtil::resolvePtr(params[0]);
+ //const char *floor_name = (const char *)MemoryUtil::resolvePtr(params[0]);
// get the floor
- floor = (_floor *)floor_def->Fetch_named_floor(floor_name);
+ //_floor *floor = (_floor *)floor_def->Fetch_named_floor(floor_name);
return IR_CONT;
}
diff --git a/engines/icb/general_npc_animation.cpp b/engines/icb/general_npc_animation.cpp
index 5b52a327ec..d9fdddf976 100644
--- a/engines/icb/general_npc_animation.cpp
+++ b/engines/icb/general_npc_animation.cpp
@@ -375,7 +375,6 @@ void _game_session::Animate_turn_to_pan(__mega_set_names anim_type, uint32 speed
// restore x,z
PXreal xnext, znext;
- PXreal x, z;
uint32 next_pc, info_pc;
PXfloat this_pan_change;
@@ -388,7 +387,7 @@ void _game_session::Animate_turn_to_pan(__mega_set_names anim_type, uint32 speed
PXanim *pAnim = (PXanim *)rs_anims->Res_open(L->voxel_info->get_info_name(anim_type), L->voxel_info->info_name_hash[anim_type], L->voxel_info->base_path,
L->voxel_info->base_path_hash); //
- // anim pc may be illegal so nutralise it
+ // anim pc may be illegal so neutralise it
L->anim_pc = (L->anim_pc) % (pAnim->frame_qty - 1);
// adjust the frame PC in the direction we're going to turn
@@ -481,9 +480,10 @@ void _game_session::Animate_turn_to_pan(__mega_set_names anim_type, uint32 speed
PXfloat cang = (PXfloat)PXcos(ang);
PXfloat sang = (PXfloat)PXsin(ang);
- x = M->actor_xyz.x + PXfloat2PXreal(xnext * cang + znext * sang);
- z = M->actor_xyz.z + PXfloat2PXreal(znext * cang - xnext * sang);
+ PXreal x = M->actor_xyz.x + PXfloat2PXreal(xnext * cang + znext * sang);
+ PXreal z = M->actor_xyz.z + PXfloat2PXreal(znext * cang - xnext * sang);
// x and z are the new coordinates
+ // FIXME: x and z are not used currently...
if (L->pan >= HALF_TURN)
L->pan -= FULL_TURN;
diff --git a/engines/icb/icon_menu.cpp b/engines/icb/icon_menu.cpp
index 968d3c009f..4503df96ee 100644
--- a/engines/icb/icon_menu.cpp
+++ b/engines/icb/icon_menu.cpp
@@ -136,7 +136,7 @@ bool8 _icon_menu::CycleIconMenu(const _input &sKeyboardState) {
lastInventoryPress = 0;
}
- // CONVESATION QUIT: remora is not activem m_bAllowEscape is probabily true
+ // 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)) {
diff --git a/engines/icb/icon_menu_pc.cpp b/engines/icb/icon_menu_pc.cpp
index c92d9422cc..b79f411ffa 100644
--- a/engines/icb/icon_menu_pc.cpp
+++ b/engines/icb/icon_menu_pc.cpp
@@ -139,7 +139,7 @@ void _icon_menu::Activate(const _icon_list *pIconList, const _icon_menu_duplicat
surface_manager->Unlock_surface(m_pnIconSurfaceIDs[i]);
// Create a surface for the icons hilite
- sprintf(pcIconName, "%sH", pcIconName);
+ sprintf(pcIconName + strlen(pcIconName), "H");
m_pnHiLiteSurfaceIDs[i] = surface_manager->Create_new_surface(pcIconName, ICON_X_SIZE, ICON_Y_SIZE, EITHER);
surface_manager->Set_transparent_colour_key(m_pnHiLiteSurfaceIDs[i], m_nTransparentKey);
pyHiLiteBitmap = surface_manager->Lock_surface(m_pnHiLiteSurfaceIDs[i]);
@@ -227,7 +227,7 @@ void _icon_menu::ReActivate() {
surface_manager->Unlock_surface(m_pnIconSurfaceIDs[i]);
// Create a surface for the icons hilite
- sprintf(pcIconName, "%sH", pcIconName);
+ sprintf(pcIconName + strlen(pcIconName), "H");
m_pnHiLiteSurfaceIDs[i] = surface_manager->Create_new_surface(pcIconName, ICON_X_SIZE, ICON_Y_SIZE, EITHER);
uint8 *pyHiLiteBitmap = surface_manager->Lock_surface(m_pnHiLiteSurfaceIDs[i]);
nPitch = surface_manager->Get_pitch(m_pnHiLiteSurfaceIDs[i]);
@@ -608,7 +608,6 @@ void _icon_menu::SetUpOffScreenArrows() {
uint32 nPitch;
uint32 nFullIconNameHash;
_pxBitmap *psIconBitmap;
- uint32 nBufferCount;
char pcArrowIconName[MAXLEN_URL];
char pcIconPath[MAXLEN_URL];
@@ -626,7 +625,7 @@ void _icon_menu::SetUpOffScreenArrows() {
// Open the icon (contains both the highlighted and normal frames).
sprintf(pcIconPath, ICON_PATH);
- nBufferCount = sprintf(pcArrowIconName, "%s%s.%s", pcIconPath, ICON_MENU_OFF_SCREEN_LEFT, PX_BITMAP_PC_EXT);
+ /*uint32 nBufferCount =*/ sprintf(pcArrowIconName, "%s%s.%s", pcIconPath, ICON_MENU_OFF_SCREEN_LEFT, PX_BITMAP_PC_EXT);
nFullIconNameHash = NULL_HASH;
@@ -656,7 +655,7 @@ void _icon_menu::SetUpOffScreenArrows() {
nPitch = surface_manager->Get_pitch(m_nRightArrowID);
// Open the icon (contains both the highlighted and normal frames).
- nBufferCount = sprintf(pcArrowIconName, "%s%s.%s", pcIconPath, ICON_MENU_OFF_SCREEN_RIGHT, PX_BITMAP_PC_EXT);
+ /*uint32 nBufferCount =*/ sprintf(pcArrowIconName, "%s%s.%s", pcIconPath, ICON_MENU_OFF_SCREEN_RIGHT, PX_BITMAP_PC_EXT);
nFullIconNameHash = NULL_HASH;
More information about the Scummvm-git-logs
mailing list