mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-24 13:13:58 +00:00
ICB: Various Fixes for GCC Warnings and Minor Comment Spelling
This commit is contained in:
parent
7c988dbca8
commit
efcc8ee6a3
@ -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);
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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)) {
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user