[Scummvm-git-logs] scummvm master -> 3341fb743bbdc8680ba2dbac342f22c4e4a633e1

aquadran aquadran at gmail.com
Sun Feb 28 07:56:56 UTC 2021


This automated email contains information about 6 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
8eb1cecf53 ICB: Replace PreventClassCopy with Common::NonCopyable
286f377d1f ICB: Replace PXmin and PXmax with MIN and MAX
75d5a886df ICB: Replace _ASSERT with assert
1d1de5d974 ICB: Remove pxException
d3c6b4cf69 ICB: Replace cstr with const char *
3341fb743b ICB: Remove leftover joystick code


Commit: 8eb1cecf53ebf48e8bb885034e4cf7e1c2560214
    https://github.com/scummvm/scummvm/commit/8eb1cecf53ebf48e8bb885034e4cf7e1c2560214
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2021-02-28T08:56:49+01:00

Commit Message:
ICB: Replace PreventClassCopy with Common::NonCopyable

Changed paths:
  R engines/icb/common/px_rccommon.h
    engines/icb/actor_view_pc.cpp
    engines/icb/actor_view_pc.h
    engines/icb/animation_mega_set.cpp
    engines/icb/animation_mega_set.h
    engines/icb/async_generic.cpp
    engines/icb/bone.cpp
    engines/icb/breath.cpp
    engines/icb/cluster_manager_pc.cpp
    engines/icb/cluster_manager_pc.h
    engines/icb/common/px_2drealline.h
    engines/icb/common/px_2drealpoint.h
    engines/icb/common/px_3drealpoint.h
    engines/icb/common/px_array.h
    engines/icb/common/px_capri_maths.h
    engines/icb/common/px_capri_maths_pc.h
    engines/icb/common/px_common.h
    engines/icb/common/px_exception.h
    engines/icb/common/px_game_object.h
    engines/icb/common/px_globalvariables.h
    engines/icb/common/px_linkeddatafile.cpp
    engines/icb/common/px_linkeddatafile.h
    engines/icb/common/px_rcutypes.h
    engines/icb/common/px_scriptengine.cpp
    engines/icb/common/px_scriptengine.h
    engines/icb/common/px_string.cpp
    engines/icb/common/px_string.h
    engines/icb/debug.h
    engines/icb/debug_pc.cpp
    engines/icb/direct_input.cpp
    engines/icb/direct_input.h
    engines/icb/event_list.h
    engines/icb/event_manager.h
    engines/icb/event_timer.h
    engines/icb/fn_event_functions.cpp
    engines/icb/fn_fx.cpp
    engines/icb/fn_fx_pc.cpp
    engines/icb/fn_icon_functions.cpp
    engines/icb/fn_movie_pc.cpp
    engines/icb/fn_remora_functions.cpp
    engines/icb/fn_sound.cpp
    engines/icb/fn_sting_pc.cpp
    engines/icb/footstep.cpp
    engines/icb/game_volume.h
    engines/icb/gameover.h
    engines/icb/general_npc_animation.cpp
    engines/icb/gfx/psx_pcdefines.h
    engines/icb/global_objects_pc.cpp
    engines/icb/global_switches.cpp
    engines/icb/icon_list.h
    engines/icb/icon_list_manager.h
    engines/icb/icon_menu.h
    engines/icb/main_menu_pc.cpp
    engines/icb/mission_functions.cpp
    engines/icb/mission_functions.h
    engines/icb/movie_pc.cpp
    engines/icb/movie_pc.h
    engines/icb/object_structs.h
    engines/icb/options_manager_pc.cpp
    engines/icb/options_manager_pc.h
    engines/icb/p4_generic.h
    engines/icb/remora.h
    engines/icb/remora_sprite.h
    engines/icb/res_man.h
    engines/icb/session.cpp
    engines/icb/set_pc.cpp
    engines/icb/stage_view.h
    engines/icb/timer_func.cpp


diff --git a/engines/icb/actor_view_pc.cpp b/engines/icb/actor_view_pc.cpp
index c8f36aa9a8..7b923b2922 100644
--- a/engines/icb/actor_view_pc.cpp
+++ b/engines/icb/actor_view_pc.cpp
@@ -25,7 +25,6 @@
  *
  */
 
-#include "engines/icb/common/px_rccommon.h"
 #include "engines/icb/common/px_common.h"
 #include "engines/icb/p4.h"
 #include "engines/icb/p4_generic.h"
diff --git a/engines/icb/actor_view_pc.h b/engines/icb/actor_view_pc.h
index 15b804da18..5e81139910 100644
--- a/engines/icb/actor_view_pc.h
+++ b/engines/icb/actor_view_pc.h
@@ -28,8 +28,6 @@
 #ifndef ICB_ACTOR_VIEW_PC_H_INCLUDED
 #define ICB_ACTOR_VIEW_PC_H_INCLUDED
 
-#include "engines/icb/common/px_rccommon.h"
-
 namespace ICB {
 
 // Set this to true if the actor view (character profiles) should act as voxview
diff --git a/engines/icb/animation_mega_set.cpp b/engines/icb/animation_mega_set.cpp
index 931b9914a0..0030808ca0 100644
--- a/engines/icb/animation_mega_set.cpp
+++ b/engines/icb/animation_mega_set.cpp
@@ -25,7 +25,6 @@
  *
  */
 
-#include "engines/icb/common/px_rccommon.h"
 #include "engines/icb/global_switches.h"
 #include "engines/icb/session.h"
 #include "engines/icb/animation_mega_set.h"
diff --git a/engines/icb/animation_mega_set.h b/engines/icb/animation_mega_set.h
index a458baa3b9..0bc1eb8345 100644
--- a/engines/icb/animation_mega_set.h
+++ b/engines/icb/animation_mega_set.h
@@ -29,7 +29,6 @@
 #define ICB_ANIMATION_MEGA_SET
 
 #include "engines/icb/common/px_string.h"
-#include "engines/icb/common/px_rccommon.h"
 
 namespace ICB {
 
diff --git a/engines/icb/async_generic.cpp b/engines/icb/async_generic.cpp
index 087b4fbf9b..9b64cb305c 100644
--- a/engines/icb/async_generic.cpp
+++ b/engines/icb/async_generic.cpp
@@ -25,7 +25,6 @@
  *
  */
 
-#include "engines/icb/common/px_rccommon.h"
 #include "engines/icb/debug.h"
 #include "engines/icb/session.h"
 #include "engines/icb/actor.h"
diff --git a/engines/icb/bone.cpp b/engines/icb/bone.cpp
index b08fd7dfbf..ad793b86d1 100644
--- a/engines/icb/bone.cpp
+++ b/engines/icb/bone.cpp
@@ -25,7 +25,6 @@
  *
  */
 
-#include "engines/icb/common/px_rccommon.h"
 #include "engines/icb/debug.h"
 #include "engines/icb/mission.h"
 #include "engines/icb/global_objects.h"
diff --git a/engines/icb/breath.cpp b/engines/icb/breath.cpp
index 78a0963af7..4a66f2e26d 100644
--- a/engines/icb/breath.cpp
+++ b/engines/icb/breath.cpp
@@ -25,8 +25,6 @@
  *
  */
 
-#include "engines/icb/common/px_rccommon.h"
-
 #if !defined(_PSX_ON_PC)
 #include "engines/icb/debug.h"
 #include "engines/icb/mission.h"
diff --git a/engines/icb/cluster_manager_pc.cpp b/engines/icb/cluster_manager_pc.cpp
index ec1c35f4dd..79ab3b4cc2 100644
--- a/engines/icb/cluster_manager_pc.cpp
+++ b/engines/icb/cluster_manager_pc.cpp
@@ -25,7 +25,6 @@
  *
  */
 
-#include "engines/icb/common/px_rccommon.h"
 #include "engines/icb/common/px_string.h"
 #include "engines/icb/res_man_pc.h"
 #include "engines/icb/debug_pc.h"
diff --git a/engines/icb/cluster_manager_pc.h b/engines/icb/cluster_manager_pc.h
index b6c5db4e71..bdd1d8cb35 100644
--- a/engines/icb/cluster_manager_pc.h
+++ b/engines/icb/cluster_manager_pc.h
@@ -28,8 +28,6 @@
 #ifndef ICB_CLUSTER_MANAGER_PC_H_INCLUDED
 #define ICB_CLUSTER_MANAGER_PC_H_INCLUDED
 
-#include "engines/icb/common/px_rccommon.h"
-
 namespace ICB {
 
 // Global cluster controller declaration
diff --git a/engines/icb/common/px_2drealline.h b/engines/icb/common/px_2drealline.h
index d66e8e15a7..237d4e8d6c 100644
--- a/engines/icb/common/px_2drealline.h
+++ b/engines/icb/common/px_2drealline.h
@@ -28,7 +28,6 @@
 #ifndef ICB_PX2DLINE_H_INCLUDED
 #define ICB_PX2DLINE_H_INCLUDED
 
-#include "engines/icb/common/px_rccommon.h"
 #include "engines/icb/common/px_array.h"
 #include "engines/icb/common/px_2drealpoint.h"
 
diff --git a/engines/icb/common/px_2drealpoint.h b/engines/icb/common/px_2drealpoint.h
index 041c683545..0ed3a479c3 100644
--- a/engines/icb/common/px_2drealpoint.h
+++ b/engines/icb/common/px_2drealpoint.h
@@ -28,7 +28,6 @@
 #ifndef ICB_PX_2DREALPOINT_H_INCLUDED
 #define ICB_PX_2DREALPOINT_H_INCLUDED
 
-#include "engines/icb/common/px_rccommon.h"
 #include "engines/icb/common/px_rcutypes.h"
 #include "engines/icb/common/px_common.h"
 
diff --git a/engines/icb/common/px_3drealpoint.h b/engines/icb/common/px_3drealpoint.h
index d215627e9f..337278bee8 100644
--- a/engines/icb/common/px_3drealpoint.h
+++ b/engines/icb/common/px_3drealpoint.h
@@ -29,7 +29,6 @@
 #define ICB_PX_3DREALPOINT_H_INCLUDED
 
 // Include the header files needed by this class.
-#include "engines/icb/common/px_rccommon.h"
 #include "engines/icb/common/px_rcutypes.h"
 
 namespace ICB {
diff --git a/engines/icb/common/px_array.h b/engines/icb/common/px_array.h
index 1b0250b81b..332eda8916 100644
--- a/engines/icb/common/px_array.h
+++ b/engines/icb/common/px_array.h
@@ -29,7 +29,6 @@
 #define ICB_LIBRARY_CMYACTARRAY
 
 #include <cstring>
-#include "engines/icb/common/px_rccommon.h"
 #include "engines/icb/common/px_rcutypes.h"
 
 namespace ICB {
diff --git a/engines/icb/common/px_capri_maths.h b/engines/icb/common/px_capri_maths.h
index 8b7c413538..fd2442dc43 100644
--- a/engines/icb/common/px_capri_maths.h
+++ b/engines/icb/common/px_capri_maths.h
@@ -29,7 +29,6 @@
 #define ICB_PC_CAPRI_MATHS_H
 
 #include "engines/icb/common/px_capri_maths_pc.h"
-#include "engines/icb/common/px_rccommon.h"
 
 namespace ICB {
 
diff --git a/engines/icb/common/px_capri_maths_pc.h b/engines/icb/common/px_capri_maths_pc.h
index 755446c840..34e7249c08 100644
--- a/engines/icb/common/px_capri_maths_pc.h
+++ b/engines/icb/common/px_capri_maths_pc.h
@@ -28,8 +28,6 @@
 #ifndef ICB_PX_CAPRI_MATHS_PC_H
 #define ICB_PX_CAPRI_MATHS_PC_H
 
-#include "engines/icb/common/px_rccommon.h"
-
 #include "common/util.h"
 
 namespace ICB {
diff --git a/engines/icb/common/px_common.h b/engines/icb/common/px_common.h
index f90ee55614..0bfe973a39 100644
--- a/engines/icb/common/px_common.h
+++ b/engines/icb/common/px_common.h
@@ -30,7 +30,6 @@
 
 #include "common/scummsys.h"
 
-#include "engines/icb/common/px_rccommon.h"
 #include "engines/icb/common/px_rcutypes.h"
 
 namespace ICB {
diff --git a/engines/icb/common/px_exception.h b/engines/icb/common/px_exception.h
index 2f1a2dcf46..a4cd5a6031 100644
--- a/engines/icb/common/px_exception.h
+++ b/engines/icb/common/px_exception.h
@@ -28,7 +28,6 @@
 #ifndef ICB_PX_EXCEPTION_H
 #define ICB_PX_EXCEPTION_H
 
-#include "engines/icb/common/px_rccommon.h" // This should be included in every file before anything else
 #include "engines/icb/common/px_string.h"
 
 namespace ICB {
diff --git a/engines/icb/common/px_game_object.h b/engines/icb/common/px_game_object.h
index 2b5b4b3a4d..d84925d964 100644
--- a/engines/icb/common/px_game_object.h
+++ b/engines/icb/common/px_game_object.h
@@ -28,7 +28,6 @@
 #ifndef ICB_GAME_OBJECT_H
 #define ICB_GAME_OBJECT_H
 
-#include "engines/icb/common/px_rccommon.h"
 #include "engines/icb/common/px_rcutypes.h"
 #include "engines/icb/common/px_assert.h"
 
diff --git a/engines/icb/common/px_globalvariables.h b/engines/icb/common/px_globalvariables.h
index 2abd49e0ac..deea908ba5 100644
--- a/engines/icb/common/px_globalvariables.h
+++ b/engines/icb/common/px_globalvariables.h
@@ -28,6 +28,7 @@
 #ifndef ICB_PXGLOBALVARIABLES
 #define ICB_PXGLOBALVARIABLES
 
+#include "common/noncopyable.h"
 #include "engines/icb/common/px_common.h"
 #include "engines/icb/common/px_clu_api.h"
 
@@ -46,7 +47,7 @@ public:
 	int32 value;
 };
 
-class CpxGlobalScriptVariables {
+class CpxGlobalScriptVariables : Common::NonCopyable {
 private:
 	CpxVariable m_vars[MAX_global_vars];
 
@@ -83,9 +84,6 @@ public:
 	uint GetNoItems() { return (m_no_vars); }
 
 	const CpxVariable &operator[](uint n) { return (m_vars[n]); } // Return reference to variable itself (const)
-
-private:
-	PreventClassCopy(CpxGlobalScriptVariables);
 };
 
 } // End of namespace ICB
diff --git a/engines/icb/common/px_linkeddatafile.cpp b/engines/icb/common/px_linkeddatafile.cpp
index bee961bdc8..9a5fed293a 100644
--- a/engines/icb/common/px_linkeddatafile.cpp
+++ b/engines/icb/common/px_linkeddatafile.cpp
@@ -25,7 +25,6 @@
  *
  */
 
-#include "engines/icb/common/px_rccommon.h"
 #include "engines/icb/common/px_rcutypes.h"
 #include "engines/icb/common/px_assert.h"
 #include "engines/icb/common/px_string.h"
diff --git a/engines/icb/common/px_linkeddatafile.h b/engines/icb/common/px_linkeddatafile.h
index f5d8c4705e..f8ce77c13d 100644
--- a/engines/icb/common/px_linkeddatafile.h
+++ b/engines/icb/common/px_linkeddatafile.h
@@ -28,7 +28,6 @@
 #ifndef ICB_PX_LINKED_DATA_FILE_H
 #define ICB_PX_LINKED_DATA_FILE_H
 
-#include "engines/icb/common/px_rccommon.h" // This is required to be included before anything else
 #include "engines/icb/common/px_rcutypes.h"
 #include "engines/icb/common/px_assert.h"
 #include "engines/icb/common/px_common.h"
diff --git a/engines/icb/common/px_rccommon.h b/engines/icb/common/px_rccommon.h
deleted file mode 100644
index 867eb002dc..0000000000
--- a/engines/icb/common/px_rccommon.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/* ResidualVM - A 3D game interpreter
- *
- * ResidualVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the AUTHORS
- * file distributed with this source distribution.
- *
- * Additional copyright for this file:
- * Copyright (C) 1999-2000 Revolution Software Ltd.
- * This code is based on source code created by Revolution Software,
- * used with permission.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-// All the rest of the definitions want defining just the once
-
-#ifndef ICB_PXCOMMON_H_INCLUDED
-#define ICB_PXCOMMON_H_INCLUDED
-
-namespace ICB {
-
-// For certain classes the copy constructor and assignment is not a legal operation
-// Make disabling of these features easier
-#define PreventClassCopy(classname)                                                                                                                                                \
-	classname(const classname &) { ThrowMemoryException; }                                                                                                                     \
-	void operator=(const classname &) { ThrowMemoryException; }
-#define ThrowMemoryException *((volatile char *)NULL) = 0;
-
-} // End of namespace ICB
-
-#endif // #ifndef PXCOMMON_H_INCLUDED
diff --git a/engines/icb/common/px_rcutypes.h b/engines/icb/common/px_rcutypes.h
index ef1d2e1f8c..a238dfad21 100644
--- a/engines/icb/common/px_rcutypes.h
+++ b/engines/icb/common/px_rcutypes.h
@@ -28,8 +28,6 @@
 #ifndef ICB_RCUTYPES_H
 #define ICB_RCUTYPES_H
 
-#include "engines/icb/common/px_rccommon.h" // This should be included in every file before anything else
-
 #include "common/scummsys.h"
 
 namespace ICB {
diff --git a/engines/icb/common/px_scriptengine.cpp b/engines/icb/common/px_scriptengine.cpp
index 93863e8d7d..ec6219fd16 100644
--- a/engines/icb/common/px_scriptengine.cpp
+++ b/engines/icb/common/px_scriptengine.cpp
@@ -25,7 +25,6 @@
  *
  */
 
-#include "engines/icb/common/px_rccommon.h"
 #include "engines/icb/common/px_exception.h"
 #include "engines/icb/common/ptr_util.h"
 #include "engines/icb/p4.h"
diff --git a/engines/icb/common/px_scriptengine.h b/engines/icb/common/px_scriptengine.h
index 26238aa9d3..763ff5b116 100644
--- a/engines/icb/common/px_scriptengine.h
+++ b/engines/icb/common/px_scriptengine.h
@@ -28,7 +28,6 @@
 #ifndef ICB_GAME_ENGINE_SCRIPTENGINE_H
 #define ICB_GAME_ENGINE_SCRIPTENGINE_H
 
-#include "engines/icb/common/px_rccommon.h"
 #include "engines/icb/common/px_string.h"
 #include "engines/icb/common/px_game_object.h"
 #include "engines/icb/common/px_globalvariables.h"
diff --git a/engines/icb/common/px_string.cpp b/engines/icb/common/px_string.cpp
index 06529f5f7a..0c486f562d 100644
--- a/engines/icb/common/px_string.cpp
+++ b/engines/icb/common/px_string.cpp
@@ -25,7 +25,6 @@
  *
  */
 
-#include "engines/icb/common/px_rccommon.h"
 #include "engines/icb/common/px_assert.h"
 #include "engines/icb/common/px_exception.h"
 #include "engines/icb/common/px_common.h"
diff --git a/engines/icb/common/px_string.h b/engines/icb/common/px_string.h
index c2f2953892..711481218b 100644
--- a/engines/icb/common/px_string.h
+++ b/engines/icb/common/px_string.h
@@ -28,7 +28,6 @@
 #ifndef ICB_PX_STRING_H
 #define ICB_PX_STRING_H
 
-#include "engines/icb/common/px_rccommon.h"
 #include "engines/icb/common/px_rcutypes.h"
 
 namespace ICB {
diff --git a/engines/icb/debug.h b/engines/icb/debug.h
index 023df5ee84..9917f90556 100644
--- a/engines/icb/debug.h
+++ b/engines/icb/debug.h
@@ -29,7 +29,6 @@
 #define ICB_D_DEBUG
 
 #include "engines/icb/p4_generic.h"
-#include "engines/icb/common/px_rccommon.h"
 #include "engines/icb/common/px_string.h"
 #include "engines/icb/common/px_array.h"
 #include "engines/icb/debug_pc.h"
diff --git a/engines/icb/debug_pc.cpp b/engines/icb/debug_pc.cpp
index 74220be410..95b477b65c 100644
--- a/engines/icb/debug_pc.cpp
+++ b/engines/icb/debug_pc.cpp
@@ -25,7 +25,6 @@
  *
  */
 
-#include "engines/icb/common/px_rccommon.h"
 #include "engines/icb/common/px_common.h"
 #include "engines/icb/p4_generic.h"
 #include "engines/icb/direct_input.h"
diff --git a/engines/icb/direct_input.cpp b/engines/icb/direct_input.cpp
index 931ebffcea..ce12d8a018 100644
--- a/engines/icb/direct_input.cpp
+++ b/engines/icb/direct_input.cpp
@@ -25,8 +25,6 @@
  *
  */
 
-#include "engines/icb/common/px_rccommon.h"
-
 #include "engines/icb/p4_generic.h"
 #include "engines/icb/debug.h"
 #include "engines/icb/p4.h"
diff --git a/engines/icb/direct_input.h b/engines/icb/direct_input.h
index 4f215ab41a..043f829eb7 100644
--- a/engines/icb/direct_input.h
+++ b/engines/icb/direct_input.h
@@ -28,8 +28,6 @@
 #ifndef ICB_DINPUTH
 #define ICB_DINPUTH
 
-#include "engines/icb/common/px_rccommon.h"
-
 #include "common/keyboard.h"
 
 namespace ICB {
diff --git a/engines/icb/event_list.h b/engines/icb/event_list.h
index bf29b550bd..ab8ca05e3e 100644
--- a/engines/icb/event_list.h
+++ b/engines/icb/event_list.h
@@ -29,7 +29,6 @@
 #define ICB_EVENTLIST_H_INCLUDED
 
 #include "engines/icb/string_vest.h"
-#include "engines/icb/common/px_rccommon.h"
 #include "engines/icb/common/px_string.h"
 #include "engines/icb/common/px_assert.h"
 #include "engines/icb/string_vest.h"
diff --git a/engines/icb/event_manager.h b/engines/icb/event_manager.h
index cbedab40ea..4f69443a67 100644
--- a/engines/icb/event_manager.h
+++ b/engines/icb/event_manager.h
@@ -29,7 +29,6 @@
 #define ICB_EVENTMANAGER_H_INCLUDED
 
 // Include files with relative paths
-#include "engines/icb/common/px_rccommon.h"
 #include "engines/icb/common/px_string.h"
 #include "engines/icb/common/px_assert.h"
 #include "engines/icb/p4.h"
diff --git a/engines/icb/event_timer.h b/engines/icb/event_timer.h
index 229746edae..4782d00abb 100644
--- a/engines/icb/event_timer.h
+++ b/engines/icb/event_timer.h
@@ -29,7 +29,6 @@
 #define ICB_EVENTTIMER_H_INCLUDED
 
 #include "engines/icb/string_vest.h"
-#include "engines/icb/common/px_rccommon.h"
 #include "engines/icb/common/px_string.h"
 #include "engines/icb/event_list.h"
 
diff --git a/engines/icb/fn_event_functions.cpp b/engines/icb/fn_event_functions.cpp
index 4c09a0c79e..22374643a5 100644
--- a/engines/icb/fn_event_functions.cpp
+++ b/engines/icb/fn_event_functions.cpp
@@ -25,7 +25,6 @@
  *
  */
 
-#include "engines/icb/common/px_rccommon.h"
 #include "engines/icb/common/px_rcutypes.h"
 #include "engines/icb/common/ptr_util.h"
 #include "engines/icb/global_objects.h"
diff --git a/engines/icb/fn_fx.cpp b/engines/icb/fn_fx.cpp
index fe919f6965..3afb1f724c 100644
--- a/engines/icb/fn_fx.cpp
+++ b/engines/icb/fn_fx.cpp
@@ -25,7 +25,6 @@
  *
  */
 
-#include "engines/icb/common/px_rccommon.h"
 #include "engines/icb/debug.h"
 #include "engines/icb/mission.h"
 #include "engines/icb/global_objects.h"
diff --git a/engines/icb/fn_fx_pc.cpp b/engines/icb/fn_fx_pc.cpp
index 4ebbcf46c8..88cbaf6573 100644
--- a/engines/icb/fn_fx_pc.cpp
+++ b/engines/icb/fn_fx_pc.cpp
@@ -25,7 +25,6 @@
  *
  */
 
-#include "engines/icb/common/px_rccommon.h"
 #include "engines/icb/debug.h"
 #include "engines/icb/mission.h"
 #include "engines/icb/global_objects.h"
diff --git a/engines/icb/fn_icon_functions.cpp b/engines/icb/fn_icon_functions.cpp
index 9967b222fb..5c1ab26a72 100644
--- a/engines/icb/fn_icon_functions.cpp
+++ b/engines/icb/fn_icon_functions.cpp
@@ -25,7 +25,6 @@
  *
  */
 
-#include "engines/icb/common/px_rccommon.h"
 #include "engines/icb/common/px_rcutypes.h"
 #include "engines/icb/common/ptr_util.h"
 #include "engines/icb/global_objects.h"
diff --git a/engines/icb/fn_movie_pc.cpp b/engines/icb/fn_movie_pc.cpp
index cb9a062ff7..a9ef4ef6fd 100644
--- a/engines/icb/fn_movie_pc.cpp
+++ b/engines/icb/fn_movie_pc.cpp
@@ -25,7 +25,6 @@
  *
  */
 
-#include "engines/icb/common/px_rccommon.h"
 #include "engines/icb/common/ptr_util.h"
 #include "engines/icb/mission.h"
 #include "engines/icb/global_objects.h"
diff --git a/engines/icb/fn_remora_functions.cpp b/engines/icb/fn_remora_functions.cpp
index 27b2e82141..1bb5c38f0e 100644
--- a/engines/icb/fn_remora_functions.cpp
+++ b/engines/icb/fn_remora_functions.cpp
@@ -25,7 +25,6 @@
  *
  */
 
-#include "engines/icb/common/px_rccommon.h"
 #include "engines/icb/common/px_rcutypes.h"
 #include "engines/icb/common/ptr_util.h"
 #include "engines/icb/global_objects.h"
diff --git a/engines/icb/fn_sound.cpp b/engines/icb/fn_sound.cpp
index db6cd53afa..674ed96d6d 100644
--- a/engines/icb/fn_sound.cpp
+++ b/engines/icb/fn_sound.cpp
@@ -25,7 +25,6 @@
  *
  */
 
-#include "engines/icb/common/px_rccommon.h"
 #include "engines/icb/common/ptr_util.h"
 #include "engines/icb/debug.h"
 #include "engines/icb/mission.h"
diff --git a/engines/icb/fn_sting_pc.cpp b/engines/icb/fn_sting_pc.cpp
index 24322c6ef6..3aeee21db2 100644
--- a/engines/icb/fn_sting_pc.cpp
+++ b/engines/icb/fn_sting_pc.cpp
@@ -25,7 +25,6 @@
  *
  */
 
-#include "engines/icb/common/px_rccommon.h"
 #include "engines/icb/debug.h"
 #include "engines/icb/global_objects.h"
 #include "engines/icb/mission.h"
diff --git a/engines/icb/footstep.cpp b/engines/icb/footstep.cpp
index 34232b7e08..58e1ad929e 100644
--- a/engines/icb/footstep.cpp
+++ b/engines/icb/footstep.cpp
@@ -25,7 +25,6 @@
  *
  */
 
-#include "engines/icb/common/px_rccommon.h"
 #include "engines/icb/common/ptr_util.h"
 #include "engines/icb/debug.h"
 #include "engines/icb/mission.h"
diff --git a/engines/icb/game_volume.h b/engines/icb/game_volume.h
index 32a61f6831..0cac1d213d 100644
--- a/engines/icb/game_volume.h
+++ b/engines/icb/game_volume.h
@@ -29,7 +29,6 @@
 #define ICB_GAMEVOLUME_H_INCLUDED
 
 #include "engines/icb/p4.h"
-#include "engines/icb/common/px_rccommon.h"
 #include "engines/icb/common/px_3drealpoint.h"
 #include "engines/icb/common/px_common.h"
 #include "engines/icb/common/px_linkeddatafile.h"
diff --git a/engines/icb/gameover.h b/engines/icb/gameover.h
index 92c8d46b1c..001b3d41ce 100644
--- a/engines/icb/gameover.h
+++ b/engines/icb/gameover.h
@@ -28,8 +28,6 @@
 #ifndef ICB_GAMEOVER_H_INCLUDED
 #define ICB_GAMEOVER_H_INCLUDED
 
-#include "engines/icb/common/px_rccommon.h"
-
 namespace ICB {
 
 // Defined in main_menu_pc.cpp (PC) and gameover_menu_psx.cpp (PSX)
diff --git a/engines/icb/general_npc_animation.cpp b/engines/icb/general_npc_animation.cpp
index a3781e50c4..e3c377e1f2 100644
--- a/engines/icb/general_npc_animation.cpp
+++ b/engines/icb/general_npc_animation.cpp
@@ -26,7 +26,6 @@
  */
 
 #include "engines/icb/p4.h"
-#include "engines/icb/common/px_rccommon.h"
 #include "engines/icb/common/px_anims.h"
 #include "engines/icb/session.h"
 #include "engines/icb/animation_mega_set.h"
diff --git a/engines/icb/gfx/psx_pcdefines.h b/engines/icb/gfx/psx_pcdefines.h
index 8606457494..2a164d53dd 100644
--- a/engines/icb/gfx/psx_pcdefines.h
+++ b/engines/icb/gfx/psx_pcdefines.h
@@ -29,7 +29,6 @@
 #define ICB_PSX_PCDEFINES_H
 
 #include "common/types.h"
-#include "engines/icb/common/px_rccommon.h"
 
 namespace ICB {
 
diff --git a/engines/icb/global_objects_pc.cpp b/engines/icb/global_objects_pc.cpp
index 303ecd56c7..d186d71564 100644
--- a/engines/icb/global_objects_pc.cpp
+++ b/engines/icb/global_objects_pc.cpp
@@ -25,7 +25,6 @@
  *
  */
 
-#include "engines/icb/common/px_rccommon.h"
 #include "engines/icb/common/px_common.h"
 #include "engines/icb/global_objects_pc.h"
 
diff --git a/engines/icb/global_switches.cpp b/engines/icb/global_switches.cpp
index 83ccacbd4d..8932985e1d 100644
--- a/engines/icb/global_switches.cpp
+++ b/engines/icb/global_switches.cpp
@@ -25,7 +25,6 @@
  *
  */
 
-#include "engines/icb/common/px_rccommon.h"
 #include "engines/icb/global_switches.h"
 
 namespace ICB {
diff --git a/engines/icb/icon_list.h b/engines/icb/icon_list.h
index bf4dba7c3f..a59d8cd60b 100644
--- a/engines/icb/icon_list.h
+++ b/engines/icb/icon_list.h
@@ -29,7 +29,6 @@
 #define ICB_ICON_LIST_H_INCLUDED
 
 // Include headers needed by this class.
-#include "engines/icb/common/px_rccommon.h"
 #include "engines/icb/common/px_string.h"
 #include "engines/icb/common/px_assert.h"
 #include "engines/icb/common/px_clu_api.h"
diff --git a/engines/icb/icon_list_manager.h b/engines/icb/icon_list_manager.h
index b56a379fef..57e3711448 100644
--- a/engines/icb/icon_list_manager.h
+++ b/engines/icb/icon_list_manager.h
@@ -28,7 +28,6 @@
 #ifndef ICB_ICON_LIST_MANAGER_H_INCLUDED
 #define ICB_ICON_LIST_MANAGER_H_INCLUDED
 
-#include "engines/icb/common/px_rccommon.h"
 #include "engines/icb/common/px_string.h"
 #include "engines/icb/string_vest.h"
 #include "engines/icb/p4.h"
diff --git a/engines/icb/icon_menu.h b/engines/icb/icon_menu.h
index 804046f17c..c004478319 100644
--- a/engines/icb/icon_menu.h
+++ b/engines/icb/icon_menu.h
@@ -29,7 +29,6 @@
 #define ICB_ICONMENU_H_INCLUDED
 
 // Include headers needed by this class.
-#include "engines/icb/common/px_rccommon.h"
 #include "engines/icb/common/px_string.h"
 #include "engines/icb/common/px_assert.h"
 #include "engines/icb/common/px_common.h"
diff --git a/engines/icb/main_menu_pc.cpp b/engines/icb/main_menu_pc.cpp
index 847ca53b12..3c408ae7ed 100644
--- a/engines/icb/main_menu_pc.cpp
+++ b/engines/icb/main_menu_pc.cpp
@@ -25,7 +25,6 @@
  *
  */
 
-#include "engines/icb/common/px_rccommon.h"
 #include "engines/icb/res_man_pc.h"
 #include "engines/icb/p4.h"
 #include "engines/icb/global_objects.h"
diff --git a/engines/icb/mission_functions.cpp b/engines/icb/mission_functions.cpp
index ca89db9466..3292528a3d 100644
--- a/engines/icb/mission_functions.cpp
+++ b/engines/icb/mission_functions.cpp
@@ -27,7 +27,6 @@
 
 #define FORBIDDEN_SYMBOL_EXCEPTION_strcasecmp
 
-#include "engines/icb/common/px_rccommon.h"
 #include "engines/icb/common/px_common.h"
 #include "engines/icb/global_objects.h"
 #include "engines/icb/global_vars.h"
diff --git a/engines/icb/mission_functions.h b/engines/icb/mission_functions.h
index 6881684310..fa3ec58c7f 100644
--- a/engines/icb/mission_functions.h
+++ b/engines/icb/mission_functions.h
@@ -28,8 +28,6 @@
 #ifndef ICB_MISSION_FUNCTIONS_H_INCLUDED
 #define ICB_MISSION_FUNCTIONS_H_INCLUDED
 
-#include "engines/icb/common/px_rccommon.h"
-
 namespace ICB {
 
 int LoadMission(int m, void *usr);
diff --git a/engines/icb/movie_pc.cpp b/engines/icb/movie_pc.cpp
index f1d8a076c8..3d68c43bee 100644
--- a/engines/icb/movie_pc.cpp
+++ b/engines/icb/movie_pc.cpp
@@ -25,7 +25,6 @@
  *
  */
 
-#include "engines/icb/common/px_rccommon.h"
 #include "engines/icb/movie_pc.h"
 #include "engines/icb/direct_input.h"
 #include "engines/icb/sound/music_manager.h"
diff --git a/engines/icb/movie_pc.h b/engines/icb/movie_pc.h
index 1292edc14e..bdc0772910 100644
--- a/engines/icb/movie_pc.h
+++ b/engines/icb/movie_pc.h
@@ -28,7 +28,6 @@
 #ifndef ICB_MOVIE_PC_H__
 #define ICB_MOVIE_PC_H__
 
-#include "engines/icb/common/px_rccommon.h"
 #include "engines/icb/bink_stub.h"
 #include "engines/icb/global_objects_pc.h"
 #include "engines/icb/sound/direct_sound.h"
diff --git a/engines/icb/object_structs.h b/engines/icb/object_structs.h
index cdbd639d2f..200c996f96 100644
--- a/engines/icb/object_structs.h
+++ b/engines/icb/object_structs.h
@@ -31,7 +31,6 @@
 #include "engines/icb/common/px_common.h"
 #include "engines/icb/common/px_game_object.h"
 #include "engines/icb/common/px_route_barriers.h"
-#include "engines/icb/common/px_rccommon.h"
 #include "engines/icb/common/px_array.h"
 #include "engines/icb/common/px_string.h"
 #include "engines/icb/animation_mega_set.h"
diff --git a/engines/icb/options_manager_pc.cpp b/engines/icb/options_manager_pc.cpp
index cd7ba4a310..a5f37f58e1 100644
--- a/engines/icb/options_manager_pc.cpp
+++ b/engines/icb/options_manager_pc.cpp
@@ -27,7 +27,6 @@
 
 #define FORBIDDEN_SYMBOL_EXCEPTION_time
 
-#include "engines/icb/common/px_rccommon.h"
 #include "engines/icb/icb.h"
 #include "engines/icb/options_manager_pc.h"
 #include "engines/icb/movie_pc.h"
diff --git a/engines/icb/options_manager_pc.h b/engines/icb/options_manager_pc.h
index 983866ac40..034477ecd3 100644
--- a/engines/icb/options_manager_pc.h
+++ b/engines/icb/options_manager_pc.h
@@ -28,7 +28,6 @@
 #ifndef ICB_OPTIONS_MANAGER_PC_H_INCLUDED
 #define ICB_OPTIONS_MANAGER_PC_H_INCLUDED
 
-#include "engines/icb/common/px_rccommon.h"
 #include "engines/icb/p4.h"
 #include "engines/icb/global_objects.h"
 #include "engines/icb/global_switches.h"
diff --git a/engines/icb/p4_generic.h b/engines/icb/p4_generic.h
index bcc3ff79c5..666dda314c 100644
--- a/engines/icb/p4_generic.h
+++ b/engines/icb/p4_generic.h
@@ -28,7 +28,6 @@
 #ifndef ICB_INCLUDED_P4_GENERIC_H
 #define ICB_INCLUDED_P4_GENERIC_H
 
-#include "engines/icb/common/px_rccommon.h"
 #include "engines/icb/p4.h"
 #include "engines/icb/p4_generic_pc.h"
 
diff --git a/engines/icb/remora.h b/engines/icb/remora.h
index 821703345e..fa939b6215 100644
--- a/engines/icb/remora.h
+++ b/engines/icb/remora.h
@@ -29,7 +29,6 @@
 #define ICB_REMORA_H_INCLUDED
 
 // Include headers needed by this class.
-#include "engines/icb/common/px_rccommon.h"
 #include "engines/icb/common/px_string.h"
 #include "engines/icb/common/px_assert.h"
 #include "engines/icb/common/px_common.h"
diff --git a/engines/icb/remora_sprite.h b/engines/icb/remora_sprite.h
index 74c5c80a3b..472e9c3f4d 100644
--- a/engines/icb/remora_sprite.h
+++ b/engines/icb/remora_sprite.h
@@ -32,7 +32,6 @@
 #include "engines/icb/debug.h"
 #include "engines/icb/string_vest.h"
 #include "engines/icb/common/px_clu_api.h"
-#include "engines/icb/common/px_rccommon.h"
 #include "engines/icb/common/px_string.h"
 #include "engines/icb/common/px_assert.h"
 #include "engines/icb/common/px_common.h"
diff --git a/engines/icb/res_man.h b/engines/icb/res_man.h
index 111ff79fa5..2643e641f5 100644
--- a/engines/icb/res_man.h
+++ b/engines/icb/res_man.h
@@ -31,7 +31,6 @@
 #include "engines/icb/p4.h"
 #include "engines/icb/common/px_array.h"
 #include "engines/icb/common/px_string.h"
-#include "engines/icb/common/px_rccommon.h"
 #include "engines/icb/common/px_common.h"
 #include "engines/icb/common/px_clu_api.h"
 
diff --git a/engines/icb/session.cpp b/engines/icb/session.cpp
index 1699c2a36c..8fd94b007c 100644
--- a/engines/icb/session.cpp
+++ b/engines/icb/session.cpp
@@ -26,7 +26,6 @@
  */
 
 #include "engines/icb/p4.h"
-#include "engines/icb/common/px_rccommon.h"
 #include "engines/icb/debug.h"
 #include "engines/icb/p4_generic.h"
 #include "engines/icb/res_man.h"
diff --git a/engines/icb/set_pc.cpp b/engines/icb/set_pc.cpp
index 2ddc51bdc1..b9cf4b7071 100644
--- a/engines/icb/set_pc.cpp
+++ b/engines/icb/set_pc.cpp
@@ -27,7 +27,6 @@
 
 #define FORBIDDEN_SYMBOL_EXCEPTION_rand
 
-#include "engines/icb/common/px_rccommon.h"
 #include "engines/icb/p4_generic.h"
 #include "engines/icb/set.h"
 #include "engines/icb/global_objects.h"
diff --git a/engines/icb/stage_view.h b/engines/icb/stage_view.h
index b8dcf87316..df6fa20860 100644
--- a/engines/icb/stage_view.h
+++ b/engines/icb/stage_view.h
@@ -29,7 +29,6 @@
 #define ICB_STAGE_VIEW_H__
 
 #include "engines/icb/common/px_rcutypes.h"
-#include "engines/icb/common/px_rccommon.h"
 
 namespace ICB {
 
diff --git a/engines/icb/timer_func.cpp b/engines/icb/timer_func.cpp
index 16f7203d9f..a3251df95a 100644
--- a/engines/icb/timer_func.cpp
+++ b/engines/icb/timer_func.cpp
@@ -25,7 +25,6 @@
  *
  */
 
-#include "engines/icb/common/px_rccommon.h"
 #include "engines/icb/debug.h"
 #include "engines/icb/mission.h"
 #include "engines/icb/global_objects.h"


Commit: 286f377d1fd15688b9c4c1a19b3362f651dfc767
    https://github.com/scummvm/scummvm/commit/286f377d1fd15688b9c4c1a19b3362f651dfc767
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2021-02-28T08:56:49+01:00

Commit Message:
ICB: Replace PXmin and PXmax with MIN and MAX

Changed paths:
  R engines/icb/common/px_maths.h
  R engines/icb/common/px_maths_pc.h
    engines/icb/gfx/psx_scrn.h
    engines/icb/logic.cpp
    engines/icb/softskin_pc.cpp


diff --git a/engines/icb/common/px_maths.h b/engines/icb/common/px_maths.h
deleted file mode 100644
index c113912726..0000000000
--- a/engines/icb/common/px_maths.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/* ResidualVM - A 3D game interpreter
- *
- * ResidualVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the AUTHORS
- * file distributed with this source distribution.
- *
- * Additional copyright for this file:
- * Copyright (C) 1999-2000 Revolution Software Ltd.
- * This code is based on source code created by Revolution Software,
- * used with permission.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#ifndef ICB_PX_MATHS_H
-#define ICB_PX_MATHS_H
-
-namespace ICB {
-
-static inline int fastABSc(int a) {
-	int r0 = a >> 31;
-	int r1 = a + r0;
-	int r2 = r1 ^ r0;
-	return r2;
-}
-
-static inline int fastMINc(int a, int b) {
-	int r0 = a - b;
-	int r1 = r0 >> 31;
-	int r2 = a & r1;
-	int r3 = ~r1;
-	int r4 = b & r3;
-	int r5 = r2 | r4;
-
-	return r5;
-}
-
-static inline int fastMAXc(int a, int b) {
-	int r0 = a - b;
-	int r1 = r0 >> 31;
-	int r2 = b & r1;
-	int r3 = ~r1;
-	int r4 = a & r3;
-	int r5 = r2 | r4;
-
-	return r5;
-}
-
-#include "engines/icb/common/px_maths_pc.h"
-
-#define PXmin(a, b) PCfastMIN(a, b)
-#define PXmax(a, b) PCfastMAX(a, b)
-#define PXabs(a) PCfastABS(a)
-
-} // End of namespace ICB
-
-#endif // #ifndef PX_MATHS_H
diff --git a/engines/icb/common/px_maths_pc.h b/engines/icb/common/px_maths_pc.h
deleted file mode 100644
index 73d9ac80cf..0000000000
--- a/engines/icb/common/px_maths_pc.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/* ResidualVM - A 3D game interpreter
- *
- * ResidualVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the AUTHORS
- * file distributed with this source distribution.
- *
- * Additional copyright for this file:
- * Copyright (C) 1999-2000 Revolution Software Ltd.
- * This code is based on source code created by Revolution Software,
- * used with permission.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#ifndef ICB_PX_MATHS_PC_H
-#define ICB_PX_MATHS_PC_H
-
-namespace ICB {
-
-#define PCfastMIN(a, b) (a < b) ? a : b;
-
-#define PCfastMAX(a, b) (a > b) ? a : b;
-
-#define PCfastABS(a) (abs(a))
-
-} // End of namespace ICB
-
-#endif // #ifndef PX_MATHS_PC_H
diff --git a/engines/icb/gfx/psx_scrn.h b/engines/icb/gfx/psx_scrn.h
index dc945f4ad0..5582c85585 100644
--- a/engines/icb/gfx/psx_scrn.h
+++ b/engines/icb/gfx/psx_scrn.h
@@ -31,9 +31,10 @@
 #include "engines/icb/gfx/psx_pcgpu.h"
 #include "engines/icb/gfx/psx_pcdefines.h"
 #include "engines/icb/common/px_assert.h"
-#include "engines/icb/common/px_maths.h"
 #include "engines/icb/gfx/psx_ot.h"
 
+#include "common/util.h"
+
 namespace ICB {
 
 typedef struct DoubleBuffer {
@@ -210,11 +211,11 @@ static inline void myAddDRLOADNoFlush(RECT16 *r, uint32 *pot, int length) {
 static inline int32 myMakeOTPosition(int32 z0) {
 	int32 z1 = (z0 >> otz_shift) - otz_offset;
 
-	minUsedZpos = PXmin(z0, minUsedZpos);
-	maxUsedZpos = PXmax(z0, maxUsedZpos);
+	minUsedZpos = MIN(z0, minUsedZpos);
+	maxUsedZpos = MAX(z0, maxUsedZpos);
 
-	z1 = PXmax(minZOTpos, z1);
-	z1 = PXmin(maxZOTpos, z1);
+	z1 = MAX(minZOTpos, z1);
+	z1 = MIN(maxZOTpos, z1);
 
 	return z1;
 }
diff --git a/engines/icb/logic.cpp b/engines/icb/logic.cpp
index 9c8442a8e7..77d6f2f688 100644
--- a/engines/icb/logic.cpp
+++ b/engines/icb/logic.cpp
@@ -32,7 +32,6 @@
 #include "engines/icb/common/px_common.h"
 #include "engines/icb/common/px_scriptengine.h"
 #include "engines/icb/common/px_game_object.h"
-#include "engines/icb/common/px_maths.h"
 #include "engines/icb/common/ptr_util.h"
 #include "engines/icb/mission.h"
 #include "engines/icb/session.h"
diff --git a/engines/icb/softskin_pc.cpp b/engines/icb/softskin_pc.cpp
index 831d3aa63c..260161084b 100644
--- a/engines/icb/softskin_pc.cpp
+++ b/engines/icb/softskin_pc.cpp
@@ -26,10 +26,11 @@
  */
 
 #include "engines/icb/common/px_common.h"
-#include "engines/icb/common/px_maths.h"
 #include "engines/icb/softskin_pc.h"
 #include "engines/icb/common/px_capri_maths.h"
 
+#include "common/util.h"
+
 namespace ICB {
 
 int softskinPC(rap_API *rap, int poseBone, MATRIXPC *lw, SVECTORPC *local, int16 *xminLocal, int16 *xmaxLocal, int16 *yminLocal, int16 *ymaxLocal, int16 *zminLocal,
@@ -94,13 +95,13 @@ int softskinPC(rap_API *rap, int poseBone, MATRIXPC *lw, SVECTORPC *local, int16
 			lvy = plocal->vy;
 			lvz = plocal->vz;
 
-			xmin = PXmin(lvx, xmin);
-			ymin = PXmin(lvy, ymin);
-			zmin = PXmin(lvz, zmin);
+			xmin = MIN(lvx, xmin);
+			ymin = MIN(lvy, ymin);
+			zmin = MIN(lvz, zmin);
 
-			xmax = PXmax(lvx, xmax);
-			ymax = PXmax(lvy, ymax);
-			zmax = PXmax(lvz, zmax);
+			xmax = MAX(lvx, xmax);
+			ymax = MAX(lvy, ymax);
+			zmax = MAX(lvz, zmax);
 
 			noneLink++;
 		}
@@ -122,13 +123,13 @@ int softskinPC(rap_API *rap, int poseBone, MATRIXPC *lw, SVECTORPC *local, int16
 			lvy = plocal->vy;
 			lvz = plocal->vz;
 
-			xmin = PXmin(lvx, xmin);
-			ymin = PXmin(lvy, ymin);
-			zmin = PXmin(lvz, zmin);
+			xmin = MIN(lvx, xmin);
+			ymin = MIN(lvy, ymin);
+			zmin = MIN(lvz, zmin);
 
-			xmax = PXmax(lvx, xmax);
-			ymax = PXmax(lvy, ymax);
-			zmax = PXmax(lvz, zmax);
+			xmax = MAX(lvx, xmax);
+			ymax = MAX(lvy, ymax);
+			zmax = MAX(lvz, zmax);
 
 			noneLink++;
 		}
@@ -158,13 +159,13 @@ int softskinPC(rap_API *rap, int poseBone, MATRIXPC *lw, SVECTORPC *local, int16
 		lvy = plocal->vy;
 		lvz = plocal->vz;
 
-		xmin = PXmin(lvx, xmin);
-		ymin = PXmin(lvy, ymin);
-		zmin = PXmin(lvz, zmin);
+		xmin = MIN(lvx, xmin);
+		ymin = MIN(lvy, ymin);
+		zmin = MIN(lvz, zmin);
 
-		xmax = PXmax(lvx, xmax);
-		ymax = PXmax(lvy, ymax);
-		zmax = PXmax(lvz, zmax);
+		xmax = MAX(lvx, xmax);
+		ymax = MAX(lvy, ymax);
+		zmax = MAX(lvz, zmax);
 
 		singleLink++;
 	}
@@ -215,13 +216,13 @@ int softskinPC(rap_API *rap, int poseBone, MATRIXPC *lw, SVECTORPC *local, int16
 			lvy = plocal->vy;
 			lvz = plocal->vz;
 
-			xmin = PXmin(lvx, xmin);
-			ymin = PXmin(lvy, ymin);
-			zmin = PXmin(lvz, zmin);
+			xmin = MIN(lvx, xmin);
+			ymin = MIN(lvy, ymin);
+			zmin = MIN(lvz, zmin);
 
-			xmax = PXmax(lvx, xmax);
-			ymax = PXmax(lvy, ymax);
-			zmax = PXmax(lvz, zmax);
+			xmax = MAX(lvx, xmax);
+			ymax = MAX(lvy, ymax);
+			zmax = MAX(lvz, zmax);
 		}
 	}
 


Commit: 75d5a886df50ad310bc34ecd4fc24411af93511a
    https://github.com/scummvm/scummvm/commit/75d5a886df50ad310bc34ecd4fc24411af93511a
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2021-02-28T08:56:49+01:00

Commit Message:
ICB: Replace _ASSERT with assert

Changed paths:
  R engines/icb/common/px_assert.h
    engines/icb/barriers.cpp
    engines/icb/common/px_2drealline.cpp
    engines/icb/common/px_bitmap_pc.h
    engines/icb/common/px_game_object.h
    engines/icb/common/px_linkeddatafile.cpp
    engines/icb/common/px_linkeddatafile.h
    engines/icb/common/px_string.cpp
    engines/icb/event_list.h
    engines/icb/event_manager.h
    engines/icb/function.cpp
    engines/icb/gfx/psx_scrn.h
    engines/icb/icon_list.cpp
    engines/icb/icon_list.h
    engines/icb/icon_menu.h
    engines/icb/logic.cpp
    engines/icb/player.cpp
    engines/icb/prim_route_builder.cpp
    engines/icb/remora.h
    engines/icb/remora_sprite.h
    engines/icb/session.h
    engines/icb/speech.h
    engines/icb/surface_manager.h
    engines/icb/text_pc.cpp


diff --git a/engines/icb/barriers.cpp b/engines/icb/barriers.cpp
index 597ecdd858..e36000dcf0 100644
--- a/engines/icb/barriers.cpp
+++ b/engines/icb/barriers.cpp
@@ -855,7 +855,7 @@ _route_barrier *_barrier_handler::Fetch_barrier(uint32 num) {
 	// return a pointer to numbered barrier
 	_route_barrier *bar;
 
-	_ASSERT(num < total_barriers);
+	assert(num < total_barriers);
 
 	if (num >= total_barriers)
 		Fatal_error("illegal barrier request %d", num);
diff --git a/engines/icb/common/px_2drealline.cpp b/engines/icb/common/px_2drealline.cpp
index 7e675034dc..7a89f5c02b 100644
--- a/engines/icb/common/px_2drealline.cpp
+++ b/engines/icb/common/px_2drealline.cpp
@@ -26,7 +26,6 @@
  */
 
 #include "engines/icb/common/px_2drealline.h"
-#include "engines/icb/common/px_assert.h"
 
 #include "common/math.h"
 
diff --git a/engines/icb/common/px_assert.h b/engines/icb/common/px_assert.h
deleted file mode 100644
index 358df8dc87..0000000000
--- a/engines/icb/common/px_assert.h
+++ /dev/null
@@ -1,104 +0,0 @@
-/* ResidualVM - A 3D game interpreter
- *
- * ResidualVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the AUTHORS
- * file distributed with this source distribution.
- *
- * Additional copyright for this file:
- * Copyright (C) 1999-2000 Revolution Software Ltd.
- * This code is based on source code created by Revolution Software,
- * used with permission.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#ifndef ICB_PX_ASSERT_H_INCLUDED
-#define ICB_PX_ASSERT_H_INCLUDED
-
-#include "common/scummsys.h"
-
-#ifdef _DEBUG
-
-#undef _ASSERT
-#undef ASSERT
-#undef VERIFY
-
-#define _ASSERT(expr) assert(expr)
-
-// Another ASSERT with the ability to display a user message
-#ifdef _ASSERT_MESSAGE
-#undef _ASSERT_MESSAGE
-#endif // #ifdef _ASSERT_MESSAGE
-
-#define _ASSERT_MESSAGE(expr, message) assert(expr, message)
-
-#ifndef ASSERT0
-#define ASSERT0(x, msg) _ASSERT_MESSAGE(x, pxVString("Assertion failed: file %s, line %d", __FILE__, __LINE__));
-#endif
-
-#ifndef ASSERT1
-#define ASSERT1(x, msg, value1) _ASSERT_MESSAGE(x, pxVString("Assertion failed: file %s, line %d : value=%d", __FILE__, __LINE__, value1));
-#endif
-
-#ifndef ASSERT2
-#define ASSERT2(x, msg, value1, value2) _ASSERT_MESSAGE(x, pxVString("Assertion failed: file %s, line %d : values=%d, %d", __FILE__, __LINE__, value1, value2));
-#endif
-
-#ifndef ASSERT3
-#define ASSERT3(x, msg, value1, value2, value3) _ASSERT_MESSAGE(x, pxVString("Assertion failed: file %s, line %d : values=%d, %d, %d", __FILE__, __LINE__, value1, value2, value3));
-#endif
-
-#ifndef ASSERT4
-#define ASSERT4(x, msg, value1, value2, value3, value4)                                                                                                                            \
-	_ASSERT_MESSAGE(x, pxVString("Assertion failed: file %s, line %d : values=%d, %d, %d, %d", __FILE__, __LINE__, value1, value2, value3, value4));
-#endif
-
-// Sometimes you want ASSERT(false) to allways assert, again producing the constant warning.
-// Use _ASSERT_ALLWAYS instead
-
-#ifdef _ASSERT_ALLWAYS
-#undef _ASSERT_ALLWAYS
-#endif // #ifdef define _ASSERT_ALLWAYS
-
-#define _ASSERT_ALLWAYS assert(false)
-
-#define ASSERT(x) _ASSERT(x)
-
-// _VERIFY is not defined in crtdbg.h
-#define _VERIFY(x) _ASSERT(x) // Verify becomes Assert.
-#define VERIFY(x) _ASSERT(x)  // Verify becomes Assert.
-
-#else // _DEBUG
-
-#define ASSERT(expr) ((void)0)
-#define _ASSERT(expr) ((void)0)
-#define _ASSERT_MESSAGE(expr, msg) ((void)0)
-#define _ASSERT_ALLWAYS ((void)0)
-#define ASSERT0(x, msg) ((void)0)
-#define ASSERT1(x, msg, a) ((void)0)
-#define ASSERT2(x, msg, a, b) ((void)0)
-#define ASSERT3(x, msg, a, b, c) ((void)0)
-#define ASSERT4(x, msg, a, b, c, d) ((void)0)
-
-// _VERIFY is not defined in crtdbg.h
-#ifndef VERIFY
-#define VERIFY(x) x // Verify removed, leaving just the code.
-#endif
-#define _VERIFY(x) x // Verify removed, leaving just the code.
-
-#endif // _DEBUG
-
-#endif // #ifndef PX_ASSERT_H_INCLUDED
diff --git a/engines/icb/common/px_bitmap_pc.h b/engines/icb/common/px_bitmap_pc.h
index c794eab21d..5a5ac455b0 100644
--- a/engines/icb/common/px_bitmap_pc.h
+++ b/engines/icb/common/px_bitmap_pc.h
@@ -29,7 +29,6 @@
 #define ICB_PX_BITMAP_PC_H_INCLUDED
 
 #include "engines/icb/common/px_common.h"
-#include "engines/icb/common/px_assert.h"
 
 namespace ICB {
 
@@ -78,7 +77,7 @@ private:
 
 inline _pxPCSprite *_pxPCBitmap::Fetch_item_by_number(uint32 nNumber) {
 	// Make sure requested sprite is in the resource.
-	_ASSERT(nNumber < num_sprites);
+	assert(nNumber < num_sprites);
 
 	// Return the pointer.
 	return ((_pxPCSprite *)(((unsigned char *)this) + sprite_offsets[nNumber]));
diff --git a/engines/icb/common/px_game_object.h b/engines/icb/common/px_game_object.h
index d84925d964..518c771839 100644
--- a/engines/icb/common/px_game_object.h
+++ b/engines/icb/common/px_game_object.h
@@ -29,7 +29,6 @@
 #define ICB_GAME_OBJECT_H
 
 #include "engines/icb/common/px_rcutypes.h"
-#include "engines/icb/common/px_assert.h"
 
 namespace ICB {
 
@@ -127,7 +126,7 @@ inline uint c_un_game_object::GetNoScripts() const {
 }
 
 inline cstr c_un_game_object::GetScriptName(uint32 scriptNo) const {
-	_ASSERT((scriptNo >= 0) && (scriptNo < m_noScripts));
+	assert(scriptNo < m_noScripts);
 	return ((cstr)(((const cstr) this) + ((const int *)(((const char *)this) + m_script_name_table_offset))[scriptNo]));
 }
 
@@ -171,19 +170,19 @@ inline int32 c_un_game_object::GetVariable(cstr name) const {
 }
 
 inline void c_un_game_object::SetIntegerVariable(uint32 lvar, int32 val) {
-	_ASSERT((lvar >= 0) && (lvar < m_noLvars));
+	assert(lvar < m_noLvars);
 	(((int *)(((char *)this) + m_lvars_offset))[lvar]) = val;
 }
 
 inline int32 &c_un_game_object::GetIntegerVariable(uint32 lvar) {
 	// Get an lvar value
-	_ASSERT((lvar >= 0) && (lvar < m_noLvars));
+	assert(lvar < m_noLvars);
 	return (((int32 *)(((char *)this) + m_lvars_offset))[lvar]);
 }
 
 inline cstr c_un_game_object::GetStringVariable(uint32 lvar) const {
 	// Get an lvar value
-	_ASSERT((lvar >= 0) && (lvar < m_noLvars));
+	assert(lvar < m_noLvars);
 	return (((cstr) this) + ((const int *)(((const char *)this) + m_lvars_offset))[lvar]);
 }
 
@@ -279,12 +278,12 @@ inline uint c_compressed_game_object::GetNoScripts() const {
 }
 
 inline uint32 c_compressed_game_object::GetScriptNameFullHash(uint32 scriptNo) const {
-	_ASSERT((scriptNo >= 0) && (scriptNo < m_noScripts));
+	assert(scriptNo < m_noScripts);
 	return (((const int *)(((const char *)this) + m_script_name_hash_table_offset))[scriptNo * 2]);
 }
 
 inline uint32 c_compressed_game_object::GetScriptNamePartHash(uint32 scriptNo) const {
-	_ASSERT((scriptNo >= 0) && (scriptNo < m_noScripts));
+	assert(scriptNo < m_noScripts);
 	return (((const int *)(((const char *)this) + m_script_name_hash_table_offset))[scriptNo * 2 + 1]);
 }
 
@@ -328,19 +327,19 @@ inline int32 c_compressed_game_object::GetVariable(cstr name) const {
 }
 
 inline void c_compressed_game_object::SetIntegerVariable(uint32 lvar, int32 val) {
-	_ASSERT((lvar >= 0) && (lvar < m_noLvars));
+	assert(lvar < m_noLvars);
 	(((int *)(((char *)this) + m_lvars_offset))[lvar]) = val;
 }
 
 inline int32 &c_compressed_game_object::GetIntegerVariable(uint32 lvar) {
 	// Get an lvar value
-	_ASSERT((lvar >= 0) && (lvar < m_noLvars));
+	assert(lvar < m_noLvars);
 	return (((int32 *)(((char *)this) + m_lvars_offset))[lvar]);
 }
 
 inline cstr c_compressed_game_object::GetStringVariable(uint32 lvar) const {
 	// Get an lvar value
-	_ASSERT((lvar >= 0) && (lvar < m_noLvars));
+	assert(lvar < m_noLvars);
 	return (((cstr) this) + ((const int *)(((const char *)this) + m_lvars_offset))[lvar]);
 }
 
diff --git a/engines/icb/common/px_linkeddatafile.cpp b/engines/icb/common/px_linkeddatafile.cpp
index 9a5fed293a..22294038a2 100644
--- a/engines/icb/common/px_linkeddatafile.cpp
+++ b/engines/icb/common/px_linkeddatafile.cpp
@@ -26,7 +26,6 @@
  */
 
 #include "engines/icb/common/px_rcutypes.h"
-#include "engines/icb/common/px_assert.h"
 #include "engines/icb/common/px_string.h"
 #include "engines/icb/common/px_common.h"
 #include "engines/icb/common/px_clu_api.h"
diff --git a/engines/icb/common/px_linkeddatafile.h b/engines/icb/common/px_linkeddatafile.h
index f8ce77c13d..e36a4e2059 100644
--- a/engines/icb/common/px_linkeddatafile.h
+++ b/engines/icb/common/px_linkeddatafile.h
@@ -29,7 +29,6 @@
 #define ICB_PX_LINKED_DATA_FILE_H
 
 #include "engines/icb/common/px_rcutypes.h"
-#include "engines/icb/common/px_assert.h"
 #include "engines/icb/common/px_common.h"
 #include "engines/icb/common/px_clu_api.h"
 #include "engines/icb/debug.h"
@@ -90,7 +89,7 @@ public:
 // get DATA given NUMBER
 inline void *_linked_data_file::Fetch_item_by_number(uint32 number) {
 	// illegal reference number
-	_ASSERT(number < number_of_items);
+	assert(number < number_of_items);
 	// return address of resource
 	return (((uint8 *)&header) + list[number].data_offset);
 }
@@ -98,7 +97,7 @@ inline void *_linked_data_file::Fetch_item_by_number(uint32 number) {
 // get NAME given NUMBER
 inline void *_linked_data_file::Fetch_items_name_by_number(uint32 number) {
 	// illegal reference number
-	_ASSERT(number < number_of_items);
+	assert(number < number_of_items);
 	// return name
 	return (((uint8 *)&header) + list[number].name_offset);
 }
@@ -135,7 +134,7 @@ inline void *_linked_data_file::Fetch_item_by_name(const char *name) {
 
 // get DATA given NAME (uses get NUMBER given NAME and returns 0 if not found or uses get DATA given NUMBER to return DATA)
 inline void *_linked_data_file::Try_fetch_item_by_name(cstr name) {
-	// as Fetch_item_with_name but will return 0 if entry could not be found as opposed to an _ASSERT error
+	// as Fetch_item_with_name but will return 0 if entry could not be found as opposed to an assert
 	uint32 search = 0;
 
 	search = Fetch_item_number_by_name(name);
@@ -148,7 +147,7 @@ inline void *_linked_data_file::Try_fetch_item_by_name(cstr name) {
 
 // get DATA given HASH (uses get NUMBER given HASH and returns 0 if not found or uses get DATA given NUMBER to return DATA)
 inline void *_linked_data_file::Try_fetch_item_by_hash(uint32 hash) {
-	// as Fetch_item_with_name but will return 0 if entry could not be found as opposed to an _ASSERT error
+	// as Fetch_item_with_name but will return 0 if entry could not be found as opposed to an assert
 	uint32 search = 0;
 
 	search = Fetch_item_number_by_hash(hash);
diff --git a/engines/icb/common/px_string.cpp b/engines/icb/common/px_string.cpp
index 0c486f562d..f4e65ca16f 100644
--- a/engines/icb/common/px_string.cpp
+++ b/engines/icb/common/px_string.cpp
@@ -25,7 +25,6 @@
  *
  */
 
-#include "engines/icb/common/px_assert.h"
 #include "engines/icb/common/px_exception.h"
 #include "engines/icb/common/px_common.h"
 #include "engines/icb/common/px_string.h"
@@ -249,8 +248,7 @@ const pxString &pxString::Format(const char *format, ...) {
 
 	// At this point the buffer in s is much larger than it needs to be
 	// In the interest of saving space, it will now be reduced
-	_ASSERT(slen >= 0);
-	_ASSERT(slen == strlen(s));
+	assert(slen == strlen(s));
 	char *tempBuffer = new char[slen + 1];
 
 	// If this allocation fails leave the string as it is
@@ -308,7 +306,7 @@ void pxFlexiCharBuffer::CheckSize(uint size) {
 	if (size >= m_bufLen) {
 		uint newLen = size + 1;
 		char *newb = new char[newLen];
-		_ASSERT(newb);
+		assert(newb);
 		memcpy((unsigned char *)newb, (unsigned char *)m_buffer, m_bufLen);
 		delete[] m_buffer;
 		m_buffer = newb;
diff --git a/engines/icb/event_list.h b/engines/icb/event_list.h
index ab8ca05e3e..ba33ccb148 100644
--- a/engines/icb/event_list.h
+++ b/engines/icb/event_list.h
@@ -30,7 +30,6 @@
 
 #include "engines/icb/string_vest.h"
 #include "engines/icb/common/px_string.h"
-#include "engines/icb/common/px_assert.h"
 #include "engines/icb/string_vest.h"
 
 namespace ICB {
diff --git a/engines/icb/event_manager.h b/engines/icb/event_manager.h
index 4f69443a67..4061788e82 100644
--- a/engines/icb/event_manager.h
+++ b/engines/icb/event_manager.h
@@ -30,7 +30,6 @@
 
 // Include files with relative paths
 #include "engines/icb/common/px_string.h"
-#include "engines/icb/common/px_assert.h"
 #include "engines/icb/p4.h"
 #include "engines/icb/event_timer.h"
 #include "engines/icb/event_list.h"
diff --git a/engines/icb/function.cpp b/engines/icb/function.cpp
index e2aed2550c..6e27d474c2 100644
--- a/engines/icb/function.cpp
+++ b/engines/icb/function.cpp
@@ -1035,7 +1035,7 @@ mcodeFunctionReturnCodes _game_session::fn_teleport_y_to_id(int32 &, int32 *para
 
 	Zdebug("fn_teleport_y_to_id to %d", params[0]);
 
-	_ASSERT((uint32)params[0] < total_objects);
+	assert((uint32)params[0] < total_objects);
 
 	if (logic_structs[params[0]]->image_type == PROP) {
 		logic_structs[cur_id]->mega->actor_xyz.y = floor_def->Gravitise_y(logic_structs[params[0]]->prop_xyz.y); // logic_structs[tar]->prop_xyz.y;
@@ -1875,7 +1875,7 @@ mcodeFunctionReturnCodes _game_session::fn_add_object_id_to_list(int32 &, int32
 	if (L->total_list == MAX_list)
 		Fatal_error("fn_object_id_to_list [%s] has exceeded list size of %d", object->GetName(), MAX_list);
 
-	_ASSERT((uint32)params[0] < total_objects);
+	assert((uint32)params[0] < total_objects);
 
 	L->list[L->total_list++] = params[0];
 
diff --git a/engines/icb/gfx/psx_scrn.h b/engines/icb/gfx/psx_scrn.h
index 5582c85585..9a5627e9f0 100644
--- a/engines/icb/gfx/psx_scrn.h
+++ b/engines/icb/gfx/psx_scrn.h
@@ -30,7 +30,6 @@
 
 #include "engines/icb/gfx/psx_pcgpu.h"
 #include "engines/icb/gfx/psx_pcdefines.h"
-#include "engines/icb/common/px_assert.h"
 #include "engines/icb/gfx/psx_ot.h"
 
 #include "common/util.h"
diff --git a/engines/icb/icon_list.cpp b/engines/icb/icon_list.cpp
index c5add41524..d5ff7ad7a9 100644
--- a/engines/icb/icon_list.cpp
+++ b/engines/icb/icon_list.cpp
@@ -44,7 +44,7 @@ _icon_list::_icon_list() {
 	m_nPad2 = 0;
 
 	// Note, a hash of 0 means unknown HASH value i.e. NULL_HASH = 0.
-	_ASSERT(NULL_HASH == 0);
+	assert(NULL_HASH == 0);
 	memset((uint8 *)m_pnIconListHash, 0, ICON_LIST_MAX_ICONS * sizeof(uint32));
 	memset((uint8 *)m_pnDuplicateCount, 0, ICON_LIST_MAX_ICONS * sizeof(uint8));
 	memset((uint8 *)m_ppcIconList, 0, ICON_LIST_MAX_ICONS * MAXLEN_ICON_NAME * sizeof(char));
diff --git a/engines/icb/icon_list.h b/engines/icb/icon_list.h
index a59d8cd60b..c96f3aad60 100644
--- a/engines/icb/icon_list.h
+++ b/engines/icb/icon_list.h
@@ -30,7 +30,6 @@
 
 // Include headers needed by this class.
 #include "engines/icb/common/px_string.h"
-#include "engines/icb/common/px_assert.h"
 #include "engines/icb/common/px_clu_api.h"
 #include "engines/icb/p4.h"
 #include "engines/icb/debug.h"
diff --git a/engines/icb/icon_menu.h b/engines/icb/icon_menu.h
index c004478319..e353cbd730 100644
--- a/engines/icb/icon_menu.h
+++ b/engines/icb/icon_menu.h
@@ -30,7 +30,6 @@
 
 // Include headers needed by this class.
 #include "engines/icb/common/px_string.h"
-#include "engines/icb/common/px_assert.h"
 #include "engines/icb/common/px_common.h"
 #include "engines/icb/common/px_bitmap.h"
 #include "engines/icb/player.h"
diff --git a/engines/icb/logic.cpp b/engines/icb/logic.cpp
index 77d6f2f688..db0816ee52 100644
--- a/engines/icb/logic.cpp
+++ b/engines/icb/logic.cpp
@@ -575,7 +575,7 @@ void _game_session::Shut_down_id(uint32 id) {
 	// we have id of object
 
 	// must be legal id
-	_ASSERT(id < MS->Fetch_number_of_objects());
+	assert(id < MS->Fetch_number_of_objects());
 
 	logic_structs[id]->ob_status = OB_STATUS_HELD; // lock out
 
diff --git a/engines/icb/player.cpp b/engines/icb/player.cpp
index 277f8fe4bb..933d69e260 100644
--- a/engines/icb/player.cpp
+++ b/engines/icb/player.cpp
@@ -2890,7 +2890,7 @@ void _player::Set_player_id(uint32 id) {
 	// declare object id of player to player system
 
 	// must be legal id
-	_ASSERT(id < MS->Fetch_number_of_objects());
+	assert(id < MS->Fetch_number_of_objects());
 
 	player_id = id;
 
diff --git a/engines/icb/prim_route_builder.cpp b/engines/icb/prim_route_builder.cpp
index e4de060325..b5bbdc9fd2 100644
--- a/engines/icb/prim_route_builder.cpp
+++ b/engines/icb/prim_route_builder.cpp
@@ -57,7 +57,7 @@ void _prim_route_builder::Add_barrier(_route_barrier *new_barrier) {
 	if (!ExtrapolateLine(&barrier_list[total_points - 2], &barrier_list[total_points - 1], &barrier_list[total_points - 2], &barrier_list[total_points - 1], extrap_size))
 		Fatal_error("extrapolate line failed on line %3.2f %3.2f  %3.2f %3.2f", new_barrier->x1(), new_barrier->z1(), new_barrier->x2(), new_barrier->z2());
 
-	_ASSERT(total_points < MAX_barriers);
+	assert(total_points < MAX_barriers);
 }
 
 void _prim_route_builder::Give_barrier_list(_route_description *route) {
diff --git a/engines/icb/remora.h b/engines/icb/remora.h
index fa939b6215..66281cf418 100644
--- a/engines/icb/remora.h
+++ b/engines/icb/remora.h
@@ -30,7 +30,6 @@
 
 // Include headers needed by this class.
 #include "engines/icb/common/px_string.h"
-#include "engines/icb/common/px_assert.h"
 #include "engines/icb/common/px_common.h"
 #include "engines/icb/common/px_bitmap.h"
 #include "engines/icb/common/px_mapfile.h"
diff --git a/engines/icb/remora_sprite.h b/engines/icb/remora_sprite.h
index 472e9c3f4d..72cd426a4b 100644
--- a/engines/icb/remora_sprite.h
+++ b/engines/icb/remora_sprite.h
@@ -33,7 +33,6 @@
 #include "engines/icb/string_vest.h"
 #include "engines/icb/common/px_clu_api.h"
 #include "engines/icb/common/px_string.h"
-#include "engines/icb/common/px_assert.h"
 #include "engines/icb/common/px_common.h"
 #include "engines/icb/common/px_bitmap.h"
 
diff --git a/engines/icb/session.h b/engines/icb/session.h
index a212994778..7b848279be 100644
--- a/engines/icb/session.h
+++ b/engines/icb/session.h
@@ -1048,31 +1048,31 @@ inline uint32 _game_session::Fetch_number_of_objects() {
 }
 
 inline _logic *_game_session::Fetch_object_struct(uint32 id) {
-	_ASSERT(id < total_objects);
+	assert(id < total_objects);
 
 	return (logic_structs[id]);
 }
 
 inline void _game_session::Force_context_check(uint32 id) {
-	_ASSERT(id < total_objects);
+	assert(id < total_objects);
 
 	logic_structs[id]->context_request = TRUE8;
 }
 
 inline _object_status _game_session::Fetch_object_status(uint32 id) {
-	_ASSERT(id < total_objects);
+	assert(id < total_objects);
 
 	return (logic_structs[id]->ob_status);
 }
 
 inline void _game_session::Set_object_status(uint32 id, _object_status val) {
-	_ASSERT(id < total_objects);
+	assert(id < total_objects);
 
 	logic_structs[id]->ob_status = val;
 }
 
 inline const char *_game_session::Fetch_object_name(uint32 id) {
-	_ASSERT(id < total_objects);
+	assert(id < total_objects);
 
 	return ((const char *)(logic_structs[id]->GetName()));
 }
@@ -1120,7 +1120,7 @@ inline uint32 _game_session::External_fetch_no_megas_nudge_barriers(uint32 id) {
 inline uint32 _game_session::Fetch_megas_barrier_number(uint32 barrier) {
 	// can only be called within logic loop
 
-	_ASSERT(barrier < M->number_of_barriers + M->number_of_animating);
+	assert(barrier < M->number_of_barriers + M->number_of_animating);
 
 	return M->barrier_list[barrier];
 }
@@ -1128,21 +1128,21 @@ inline uint32 _game_session::Fetch_megas_barrier_number(uint32 barrier) {
 inline uint32 _game_session::Fetch_megas_nudge_barrier_number(uint32 barrier) {
 	// can only be called within logic loop
 
-	_ASSERT(barrier < M->number_of_nudge);
+	assert(barrier < M->number_of_nudge);
 
 	return M->nudge_list[barrier];
 }
 
 inline uint32 _game_session::External_fetch_megas_barrier(uint32 id, uint32 barrier) {
 	// can only be called within logic loop
-	_ASSERT(barrier < (logic_structs[id]->mega->number_of_barriers) + (logic_structs[id]->mega->number_of_animating));
+	assert(barrier < (logic_structs[id]->mega->number_of_barriers) + (logic_structs[id]->mega->number_of_animating));
 
 	return logic_structs[id]->mega->barrier_list[barrier];
 }
 
 inline uint32 _game_session::External_fetch_megas_nudge_barrier(uint32 id, uint32 barrier) {
 	// can only be called within logic loop
-	_ASSERT(barrier < logic_structs[id]->mega->number_of_nudge);
+	assert(barrier < logic_structs[id]->mega->number_of_nudge);
 
 	return logic_structs[id]->mega->nudge_list[barrier];
 }
@@ -1155,7 +1155,7 @@ inline void _game_session::Set_objects_conversation_uid(uint32 id, uint32 uid) {
 }
 
 inline uint32 _game_session::Return_objects_conversation_uid(uint32 id) {
-	_ASSERT(id < total_objects);
+	assert(id < total_objects);
 
 	return (logic_structs[id]->conversation_uid);
 }
diff --git a/engines/icb/speech.h b/engines/icb/speech.h
index 4c1603b652..3bbd107af8 100644
--- a/engines/icb/speech.h
+++ b/engines/icb/speech.h
@@ -30,7 +30,6 @@
 
 #include "engines/icb/common/px_array.h"
 #include "engines/icb/common/px_string.h"
-#include "engines/icb/common/px_assert.h"
 #include "engines/icb/common/px_common.h"
 #include "engines/icb/string_vest.h"
 
diff --git a/engines/icb/surface_manager.h b/engines/icb/surface_manager.h
index e74ad126c1..9a7018c9a7 100644
--- a/engines/icb/surface_manager.h
+++ b/engines/icb/surface_manager.h
@@ -30,7 +30,6 @@
 
 #include "engines/icb/p4_generic.h"
 #include "engines/icb/common/px_array.h"
-#include "engines/icb/common/px_assert.h"
 #include "engines/icb/common/px_types.h"
 
 #include "graphics/surface.h"
@@ -187,19 +186,19 @@ private:
 };
 
 inline uint32 _surface_manager::Get_width(uint32 nSurfaceID) const {
-	_ASSERT(nSurfaceID < m_Surfaces.GetNoItems());
+	assert(nSurfaceID < m_Surfaces.GetNoItems());
 
 	return (m_Surfaces[nSurfaceID]->m_width);
 }
 
 inline uint32 _surface_manager::Get_height(uint32 nSurfaceID) const {
-	_ASSERT(nSurfaceID < m_Surfaces.GetNoItems());
+	assert(nSurfaceID < m_Surfaces.GetNoItems());
 
 	return (m_Surfaces[nSurfaceID]->m_height);
 }
 
 inline uint32 _surface_manager::Get_BytesPP(uint32 nSurfaceID) const {
-	_ASSERT(nSurfaceID < m_Surfaces.GetNoItems());
+	assert(nSurfaceID < m_Surfaces.GetNoItems());
 
 	return ((m_Surfaces[nSurfaceID]->m_dds->format.bytesPerPixel));
 }
diff --git a/engines/icb/text_pc.cpp b/engines/icb/text_pc.cpp
index 65e46bfa67..8619959d7e 100644
--- a/engines/icb/text_pc.cpp
+++ b/engines/icb/text_pc.cpp
@@ -58,7 +58,7 @@ void Clip_text_print(_rgb *pen, uint32 x, uint32 y, uint8 *base, uint32 pitch, c
 		chr = (int)ascii[j++];
 		chr -= 32;
 
-		_ASSERT((chr >= 0));
+		assert(chr >= 0);
 		head = (_frameHeader *)FetchFrameHeader(charSet, (uint16)chr);
 		sprite_data = (uint8 *)(head + 1);
 


Commit: 1d1de5d97480b3593e019882c35da1b1bad837be
    https://github.com/scummvm/scummvm/commit/1d1de5d97480b3593e019882c35da1b1bad837be
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2021-02-28T08:56:49+01:00

Commit Message:
ICB: Remove pxException

Changed paths:
  R engines/icb/common/px_exception.h
    engines/icb/common/px_scriptengine.cpp
    engines/icb/common/px_string.cpp


diff --git a/engines/icb/common/px_exception.h b/engines/icb/common/px_exception.h
deleted file mode 100644
index a4cd5a6031..0000000000
--- a/engines/icb/common/px_exception.h
+++ /dev/null
@@ -1,108 +0,0 @@
-/* ResidualVM - A 3D game interpreter
- *
- * ResidualVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the AUTHORS
- * file distributed with this source distribution.
- *
- * Additional copyright for this file:
- * Copyright (C) 1999-2000 Revolution Software Ltd.
- * This code is based on source code created by Revolution Software,
- * used with permission.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#ifndef ICB_PX_EXCEPTION_H
-#define ICB_PX_EXCEPTION_H
-
-#include "engines/icb/common/px_string.h"
-
-namespace ICB {
-
-class pxException {
-	pxString m_reason; // A text reason
-	int m_errno;       // An integer error number
-
-#ifdef _DEBUG
-	pxString m_sourceFileName; // Store for the source name
-	int m_sourceFileLine;      // Store for the source line
-#endif
-
-public:
-	// Different constructors for _DEBUG and release
-
-#ifdef _DEBUG
-	pxException(const char *sname, int sline, const char *reason, int reverrno = 0);
-	pxException(const char *sname, int sline, int reverrno = 0, const char *reason = "");
-
-	cstr GetSourceName() { return (m_sourceFileName); }
-	int GetLine() { return (m_sourceFileLine); }
-#else
-	pxException(const char *reason, int reverrno = 0);
-	explicit pxException(int reverrno = 0, const char *reason = "");
-#endif
-
-	cstr GetError() { return (m_reason); }
-
-	// Function for compatibility with CException
-	void Delete() { delete this; }
-
-private:
-	pxException(const pxException &) {}
-	void operator=(const pxException &) {}
-};
-
-#ifdef _DEBUG
-
-inline pxException::pxException(const char *sname, int sline, const char *reason, int reverrno) {
-	m_reason = reason;
-	m_errno = reverrno;
-
-	m_sourceFileName = sname;
-	m_sourceFileLine = sline;
-}
-
-inline pxException::pxException(const char *sname, int sline, int reverrno, const char *reason) {
-	m_reason = reason;
-	m_errno = reverrno;
-
-	m_sourceFileName = sname;
-	m_sourceFileLine = sline;
-}
-
-#else
-
-inline pxException::pxException(const char *reason, int reverrno) {
-	m_reason = reason;
-	m_errno = reverrno;
-}
-
-inline pxException::pxException(int reverrno, const char *reason) {
-	m_reason = reason;
-	m_errno = reverrno;
-}
-
-#endif
-
-#ifdef _DEBUG
-#define ThrowRevolutionException(x) (throw new pxException(__FILE__, __LINE__, x))
-#else
-#define ThrowRevolutionException(x) (throw new pxException(x))
-#endif
-
-} // End of namespace ICB
-
-#endif //#ifndef _PXLIBRARY_pxException_H
diff --git a/engines/icb/common/px_scriptengine.cpp b/engines/icb/common/px_scriptengine.cpp
index ec6219fd16..0020669dd5 100644
--- a/engines/icb/common/px_scriptengine.cpp
+++ b/engines/icb/common/px_scriptengine.cpp
@@ -25,7 +25,6 @@
  *
  */
 
-#include "engines/icb/common/px_exception.h"
 #include "engines/icb/common/ptr_util.h"
 #include "engines/icb/p4.h"
 #include "engines/icb/common/px_scriptengine.h"
diff --git a/engines/icb/common/px_string.cpp b/engines/icb/common/px_string.cpp
index f4e65ca16f..c624a7beb1 100644
--- a/engines/icb/common/px_string.cpp
+++ b/engines/icb/common/px_string.cpp
@@ -25,7 +25,6 @@
  *
  */
 
-#include "engines/icb/common/px_exception.h"
 #include "engines/icb/common/px_common.h"
 #include "engines/icb/common/px_string.h"
 


Commit: d3c6b4cf6967db2c2fd280564edf56b3e5421fed
    https://github.com/scummvm/scummvm/commit/d3c6b4cf6967db2c2fd280564edf56b3e5421fed
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2021-02-28T08:56:49+01:00

Commit Message:
ICB: Replace cstr with const char *

Changed paths:
    engines/icb/common/px_common.h
    engines/icb/common/px_game_object.h
    engines/icb/common/px_linkeddatafile.h
    engines/icb/common/px_rcutypes.h
    engines/icb/common/px_sfx_description.h
    engines/icb/common/px_string.cpp
    engines/icb/common/px_string.h
    engines/icb/fn_movie_pc.cpp
    engines/icb/options_manager_pc.cpp
    engines/icb/session.cpp
    engines/icb/sound.cpp
    engines/icb/sound.h
    engines/icb/sound_lowlevel.h
    engines/icb/sound_lowlevel_pc.cpp


diff --git a/engines/icb/common/px_common.h b/engines/icb/common/px_common.h
index 0bfe973a39..12332d2781 100644
--- a/engines/icb/common/px_common.h
+++ b/engines/icb/common/px_common.h
@@ -107,9 +107,9 @@ class px_standard_header {
 	int32 unused2;                          // For future expansion
 	char name[STANDARD_HEADER_NAME_LENGTH]; // 32 bytes worth of ascii name information
 
-	void SetData(int version, _file_type type, int owner, cstr name);
+	void SetData(int version, _file_type type, int owner, const char *name);
 	_file_type GetType() { return (type); }
-	cstr GetName() { return (name); }
+	const char *GetName() { return (name); }
 	uint GetVersion() { return (version); }
 };
 
diff --git a/engines/icb/common/px_game_object.h b/engines/icb/common/px_game_object.h
index 518c771839..5e27e1dade 100644
--- a/engines/icb/common/px_game_object.h
+++ b/engines/icb/common/px_game_object.h
@@ -52,24 +52,24 @@ class c_un_game_object {
 
 public:
 	// Main access functions
-	cstr GetName() const;             // Get a pointer to the object name
-	uint GetNoLvars() const;          // Get the number of local variables
-	uint GetNoScripts() const;        // Get the number of scripts
-	cstr GetScriptName(uint32) const; // Get the name of a script
+	const char *GetName() const;             // Get a pointer to the object name
+	uint GetNoLvars() const;                 // Get the number of local variables
+	uint GetNoScripts() const;               // Get the number of scripts
+	const char *GetScriptName(uint32) const; // Get the name of a script
 	uint32 GetSize() { return (m_size); }
 	uint32 GetLvarInfoOffset() { return (m_var_table_offset); }
 
-	cstr GetScriptVariableName(uint32) const; // gets name
-	int32 GetVariable(cstr name) const;       // get's number of named variable
+	const char *GetScriptVariableName(uint32) const; // gets name
+	int32 GetVariable(const char *name) const;       // get's number of named variable
 
 	int32 IsVariableString(uint32) const; // is variable a string (1=string, 0=int)
 
 	void SetIntegerVariable(uint32, int32); // Sets the value of an integer variable
 
 	int32 &GetIntegerVariable(uint32); // Get the value of an integer variable
-	cstr GetStringVariable(uint32) const;    // Get the value of a string variable
+	const char *GetStringVariable(uint32) const;    // Get the value of a string variable
 
-	cstr GetStringValueOrDefault(const cstr varName, const cstr defaultStr) {
+	const char *GetStringValueOrDefault(const char *varName, const char *defaultStr) {
 		int32 var;
 		var = GetVariable(varName);
 		if (var == -1)
@@ -78,7 +78,7 @@ public:
 			return GetStringVariable(var);
 	}
 
-	int32 GetIntegerValueOrDefault(const cstr varName, int32 defaultInt) {
+	int32 GetIntegerValueOrDefault(const char *varName, int32 defaultInt) {
 		int32 var;
 		var = GetVariable(varName);
 		if (var == -1)
@@ -110,9 +110,9 @@ protected: // The rest of the data
 	uint32 m_noScripts; // The number of scripts associated with this object
 };
 
-inline cstr c_un_game_object::GetName() const {
+inline const char *c_un_game_object::GetName() const {
 	// Get a pointer to the object name
-	return ((cstr)(((cstr) this) + m_name_offset));
+	return ((const char *)(((const char *) this) + m_name_offset));
 }
 
 inline uint c_un_game_object::GetNoLvars() const {
@@ -125,36 +125,36 @@ inline uint c_un_game_object::GetNoScripts() const {
 	return (m_noScripts);
 }
 
-inline cstr c_un_game_object::GetScriptName(uint32 scriptNo) const {
+inline const char *c_un_game_object::GetScriptName(uint32 scriptNo) const {
 	assert(scriptNo < m_noScripts);
-	return ((cstr)(((const cstr) this) + ((const int *)(((const char *)this) + m_script_name_table_offset))[scriptNo]));
+	return ((const char *)(((const char *) this) + ((const int *)(((const char *)this) + m_script_name_table_offset))[scriptNo]));
 }
 
-inline cstr c_un_game_object::GetScriptVariableName(uint32 varNo) const {
-	cstr currentPos;
+inline const char *c_un_game_object::GetScriptVariableName(uint32 varNo) const {
+	const char *currentPos;
 	const uint32 *table;
 
-	currentPos = (((cstr) this) + m_var_table_offset);
+	currentPos = (((const char *) this) + m_var_table_offset);
 	table = (const uint32 *)currentPos;
 	return currentPos + table[varNo * 2];
 }
 
 inline int32 c_un_game_object::IsVariableString(uint32 varNo) const {
-	cstr currentPos;
+	const char *currentPos;
 	const uint32 *table;
 
-	currentPos = (((cstr) this) + m_var_table_offset);
+	currentPos = (((const char *) this) + m_var_table_offset);
 	table = (const uint32 *)currentPos;
 	return table[varNo * 2 + 1];
 }
 
-inline int32 c_un_game_object::GetVariable(cstr name) const {
-	cstr currentPos;
+inline int32 c_un_game_object::GetVariable(const char *name) const {
+	const char *currentPos;
 	const uint32 *table;
 	int32 retValue;
 	int32 whichVar;
 
-	currentPos = (((cstr) this) + m_var_table_offset);
+	currentPos = (((const char *) this) + m_var_table_offset);
 	table = (const uint32 *)currentPos;
 
 	retValue = -1;
@@ -180,10 +180,10 @@ inline int32 &c_un_game_object::GetIntegerVariable(uint32 lvar) {
 	return (((int32 *)(((char *)this) + m_lvars_offset))[lvar]);
 }
 
-inline cstr c_un_game_object::GetStringVariable(uint32 lvar) const {
+inline const char *c_un_game_object::GetStringVariable(uint32 lvar) const {
 	// Get an lvar value
 	assert(lvar < m_noLvars);
-	return (((cstr) this) + ((const int *)(((const char *)this) + m_lvars_offset))[lvar]);
+	return (((const char *) this) + ((const int *)(((const char *)this) + m_lvars_offset))[lvar]);
 }
 
 class c_compressed_game_object {
@@ -194,7 +194,7 @@ class c_compressed_game_object {
 
 public:
 	// Main access functions
-	cstr GetName() const;      // Get a pointer to the object name
+	const char *GetName() const;      // Get a pointer to the object name
 	uint GetNoLvars() const;   // Get the number of local variables
 	uint GetNoScripts() const; // Get the number of scripts
 	uint32 GetSize() { return (m_size); }
@@ -203,17 +203,17 @@ public:
 	uint32 GetScriptNameFullHash(uint32) const;
 	uint32 GetScriptNamePartHash(uint32) const;
 
-	cstr GetScriptVariableName(uint32) const; // gets name
-	int32 GetVariable(cstr name) const;       // get's number of named variable
+	const char *GetScriptVariableName(uint32) const; // gets name
+	int32 GetVariable(const char *name) const;       // get's number of named variable
 
 	int32 IsVariableString(uint32) const; // is variable a string (1=string, 0=int)
 
 	void SetIntegerVariable(uint32, int32); // Sets the value of an integer variable
 
 	int32 &GetIntegerVariable(uint32); // Get the value of an integer variable
-	cstr GetStringVariable(uint32) const;    // Get the value of a string variable
+	const char *GetStringVariable(uint32) const;    // Get the value of a string variable
 
-	cstr GetStringValueOrDefault(const cstr varName, const cstr defaultStr) {
+	const char *GetStringValueOrDefault(const char *varName, const char *defaultStr) {
 		int32 var;
 		var = GetVariable(varName);
 		if (var == -1)
@@ -222,7 +222,7 @@ public:
 			return GetStringVariable(var);
 	}
 
-	int32 GetIntegerValueOrDefault(const cstr varName, int32 defaultInt) {
+	int32 GetIntegerValueOrDefault(const char *varName, int32 defaultInt) {
 		int32 var;
 		var = GetVariable(varName);
 		if (var == -1)
@@ -262,9 +262,9 @@ protected: // The rest of the data
 	*/
 };
 
-inline cstr c_compressed_game_object::GetName() const {
+inline const char *c_compressed_game_object::GetName() const {
 	// Get a pointer to the object name
-	return ((cstr)(((cstr) this) + m_name_offset));
+	return ((const char *)(((const char *) this) + m_name_offset));
 }
 
 inline uint c_compressed_game_object::GetNoLvars() const {
@@ -287,37 +287,37 @@ inline uint32 c_compressed_game_object::GetScriptNamePartHash(uint32 scriptNo) c
 	return (((const int *)(((const char *)this) + m_script_name_hash_table_offset))[scriptNo * 2 + 1]);
 }
 
-inline cstr c_compressed_game_object::GetScriptVariableName(uint32 varNo) const {
-	cstr currentPos;
+inline const char *c_compressed_game_object::GetScriptVariableName(uint32 varNo) const {
+	const char *currentPos;
 	const uint32 *table;
 
-	currentPos = (((cstr) this) + m_var_table_offset);
+	currentPos = (((const char *) this) + m_var_table_offset);
 	table = (const uint32 *)currentPos;
 	return ((const char *)this) + table[varNo * 2];
 }
 
 inline int32 c_compressed_game_object::IsVariableString(uint32 varNo) const {
-	cstr currentPos;
+	const char *currentPos;
 	const uint32 *table;
 
-	currentPos = (((cstr) this) + m_var_table_offset);
+	currentPos = (((const char *) this) + m_var_table_offset);
 	table = (const uint32 *)currentPos;
 	return table[varNo * 2 + 1];
 }
 
-inline int32 c_compressed_game_object::GetVariable(cstr name) const {
-	cstr currentPos;
+inline int32 c_compressed_game_object::GetVariable(const char *name) const {
+	const char *currentPos;
 	const uint32 *table;
 	int32 retValue;
 	uint32 whichVar;
 
-	currentPos = (((cstr) this) + m_var_table_offset);
+	currentPos = (((const char *) this) + m_var_table_offset);
 	table = (const uint32 *)currentPos;
 
 	retValue = -1;
 
 	for (whichVar = 0; whichVar < m_noLvars; whichVar++) {
-		if (strcmp(name, ((cstr) this) + table[whichVar * 2]) == 0) {
+		if (strcmp(name, ((const char *) this) + table[whichVar * 2]) == 0) {
 			retValue = whichVar;
 			whichVar = (int32)m_noLvars;
 		}
@@ -337,10 +337,10 @@ inline int32 &c_compressed_game_object::GetIntegerVariable(uint32 lvar) {
 	return (((int32 *)(((char *)this) + m_lvars_offset))[lvar]);
 }
 
-inline cstr c_compressed_game_object::GetStringVariable(uint32 lvar) const {
+inline const char *c_compressed_game_object::GetStringVariable(uint32 lvar) const {
 	// Get an lvar value
 	assert(lvar < m_noLvars);
-	return (((cstr) this) + ((const int *)(((const char *)this) + m_lvars_offset))[lvar]);
+	return (((const char *) this) + ((const int *)(((const char *)this) + m_lvars_offset))[lvar]);
 }
 
 class CSettableGameObject : public c_un_game_object {
diff --git a/engines/icb/common/px_linkeddatafile.h b/engines/icb/common/px_linkeddatafile.h
index e36a4e2059..d330a5f66a 100644
--- a/engines/icb/common/px_linkeddatafile.h
+++ b/engines/icb/common/px_linkeddatafile.h
@@ -71,7 +71,7 @@ public:
 
 	void *Fetch_items_name_by_number(uint32 number); // return pointer to name of item number n
 
-	void *Try_fetch_item_by_name(cstr);   // reference a resource by name
+	void *Try_fetch_item_by_name(const char *);   // reference a resource by name
 	void *Try_fetch_item_by_hash(uint32); // reference a resource by hash
 
 	void *Try_fetch_item_by_script_name(const char *name);
@@ -133,7 +133,7 @@ inline void *_linked_data_file::Fetch_item_by_name(const char *name) {
 }
 
 // get DATA given NAME (uses get NUMBER given NAME and returns 0 if not found or uses get DATA given NUMBER to return DATA)
-inline void *_linked_data_file::Try_fetch_item_by_name(cstr name) {
+inline void *_linked_data_file::Try_fetch_item_by_name(const char *name) {
 	// as Fetch_item_with_name but will return 0 if entry could not be found as opposed to an assert
 	uint32 search = 0;
 
diff --git a/engines/icb/common/px_rcutypes.h b/engines/icb/common/px_rcutypes.h
index a238dfad21..9860601714 100644
--- a/engines/icb/common/px_rcutypes.h
+++ b/engines/icb/common/px_rcutypes.h
@@ -32,8 +32,6 @@
 
 namespace ICB {
 
-typedef const char *cstr;
-
 // Definition of a boolean value that can be used across the PC and PSX.  I stopped true being 0xff because
 // C++ weak typing allows you to assign a bool8 to an int8 without warning, whereupon '==' fails for TRUE8 because
 // one is signed and one isn't.
diff --git a/engines/icb/common/px_sfx_description.h b/engines/icb/common/px_sfx_description.h
index 0684089bc7..e8c1d2b79f 100644
--- a/engines/icb/common/px_sfx_description.h
+++ b/engines/icb/common/px_sfx_description.h
@@ -90,7 +90,7 @@ public:
 		m_max_distance = 0;
 	}
 
-	const char *GetSampleName() { return (cstr) this + m_sampleNameOffset; }
+	const char *GetSampleName() { return (const char *) this + m_sampleNameOffset; }
 };
 
 } // End of namespace ICB
diff --git a/engines/icb/common/px_string.cpp b/engines/icb/common/px_string.cpp
index c624a7beb1..b420e19f38 100644
--- a/engines/icb/common/px_string.cpp
+++ b/engines/icb/common/px_string.cpp
@@ -86,7 +86,7 @@ const char *pxString::operator+=(const char *adder) {
 	return (s);
 }
 
-const pxString pxString::operator+(cstr adder) const {
+const pxString pxString::operator+(const char *adder) const {
 	// Produce a string addition without affecting this object
 
 	pxString temp(s);
@@ -94,7 +94,7 @@ const pxString pxString::operator+(cstr adder) const {
 	return (temp);
 }
 
-bool pxString::operator==(cstr string) const {
+bool pxString::operator==(const char *string) const {
 	// Do a character by character comparison
 	if (s == NULL)
 		return ((bool)(string == NULL));
@@ -103,7 +103,7 @@ bool pxString::operator==(cstr string) const {
 	return ((bool)(strcmp(s, const_cast<char *>(string)) == 0));
 }
 
-void pxString::SetString(cstr data, uint len) {
+void pxString::SetString(const char *data, uint len) {
 	// Get the first len characters from another string
 
 	// Lose any string we currently hold
diff --git a/engines/icb/common/px_string.h b/engines/icb/common/px_string.h
index 711481218b..a28389b21d 100644
--- a/engines/icb/common/px_string.h
+++ b/engines/icb/common/px_string.h
@@ -45,9 +45,9 @@ public:
 	operator const char *() const {
 		return (s); // Return a pointer to the string
 	}
-	cstr operator=(const char *);     // Assign a value
+	const char *operator=(const char *);     // Assign a value
 	void operator=(const pxString &); // Assign a value
-	cstr operator+=(const char *);    // Add a string
+	const char *operator+=(const char *);    // Add a string
 	char &operator[](uint n) {
 		return (s[n]); // Get a character (no reason not to allow it to change)
 	}
@@ -65,18 +65,18 @@ public:
 	const char *c_str() { return s; }
 	const pxString &Format(const char *, ...); // Use variable arguments to set the string
 
-	const pxString operator+(cstr) const;
+	const pxString operator+(const char *) const;
 
 	inline pxString Substr(uint nStart, uint nLen) const;       // Return a part of this string
 	void Substr(pxString &rsStr, uint nStart, uint nLen) const; // A faster substring.
 
-	void SetString(cstr data, uint len); // Get the first len characters from another string
+	void SetString(const char *data, uint len); // Get the first len characters from another string
 
 	uint StrChr(char cToFind, uint nStartPos = 0) const; // Find position of a character in a string [PS 17/08/98]
 
 	// char * comparisons
-	bool operator==(cstr string) const; // Do a character by character comparison
-	bool operator!=(cstr string) const; // Do a character by character uncomparison
+	bool operator==(const char *string) const; // Do a character by character comparison
+	bool operator!=(const char *string) const; // Do a character by character uncomparison
 };
 
 inline pxString::pxString(const pxString &str) {
@@ -185,7 +185,7 @@ inline pxString pxString::Substr(uint nStart, uint nNum) const {
 	return rsRetVal;
 }
 
-inline bool pxString::operator!=(cstr string) const {
+inline bool pxString::operator!=(const char *string) const {
 	// Do a character by character uncomparison
 	// Simply return the opposit of the == function
 	return ((bool)!((*this) == string));
diff --git a/engines/icb/fn_movie_pc.cpp b/engines/icb/fn_movie_pc.cpp
index a9ef4ef6fd..7219c33100 100644
--- a/engines/icb/fn_movie_pc.cpp
+++ b/engines/icb/fn_movie_pc.cpp
@@ -74,7 +74,7 @@ void Init_play_movie(const char *param0, bool8 param1) {
 	PauseSounds();
 	g_TimerOn = FALSE8;
 
-	const cstr moviename = (const cstr)param0;
+	const char *moviename = (const char *)param0;
 
 	// Filename checking to help catch Jake's PSX restrictions
 	if (strlen(moviename) > 8)
diff --git a/engines/icb/options_manager_pc.cpp b/engines/icb/options_manager_pc.cpp
index a5f37f58e1..e6837db2ae 100644
--- a/engines/icb/options_manager_pc.cpp
+++ b/engines/icb/options_manager_pc.cpp
@@ -106,7 +106,7 @@ void Init_play_movie(const char *param0, bool8 param1);
 uint32 GetFileSz(const char *path);
 
 // Translation tweaks
-_linked_data_file *LoadTranslatedFile(cstr session, cstr mission);
+_linked_data_file *LoadTranslatedFile(const char *session, const char *mission);
 
 // Death text functions and defines
 #define MAX_DEATH_TEXT 4
diff --git a/engines/icb/session.cpp b/engines/icb/session.cpp
index 8fd94b007c..08e5466f6d 100644
--- a/engines/icb/session.cpp
+++ b/engines/icb/session.cpp
@@ -53,7 +53,7 @@ namespace ICB {
 
 // Translation tweaks
 
-_linked_data_file *LoadTranslatedFile(cstr session, cstr mission);
+_linked_data_file *LoadTranslatedFile(const char *session, const char *mission);
 
 
 // prototypes
@@ -1192,9 +1192,9 @@ void _game_session::Set_init_voxel_floors() {
 	Prepare_megas_route_barriers(TRUE8); // update barriers
 }
 
-_linked_data_file *LoadTranslatedFile(cstr mission, cstr session) {
+_linked_data_file *LoadTranslatedFile(const char *mission, const char *session) {
 	// Get the actual session name
-	cstr sessionstart = session + strlen(mission) + 1;
+	const char *sessionstart = session + strlen(mission) + 1;
 	pxString actsession;
 	actsession.SetString(sessionstart, strlen(sessionstart) - 1);
 
diff --git a/engines/icb/sound.cpp b/engines/icb/sound.cpp
index 28fc7a312b..f0d414461f 100644
--- a/engines/icb/sound.cpp
+++ b/engines/icb/sound.cpp
@@ -465,10 +465,10 @@ public:
 	void UpdateGameCycle(int32 newVol, int32 newPan);
 
 	void GetRandom(CSfx *sfx); // update random value
-	void Register(const cstr sndName, const cstr sfxName, uint32 sfxHash, int8 volume);
+	void Register(const char *sndName, const char *sfxName, uint32 sfxHash, int8 volume);
 
-	void RegisterFromObject(const uint32 objID, const cstr sndName, const cstr sfxName, uint32 sfxHash, PXreal xo, PXreal yo, PXreal zo, int8 volume);
-	void RegisterFromAbsolute(const uint32 objID, const cstr sndName, const cstr sfxName, uint32 sfxHash, PXreal x, PXreal y, PXreal z, int8 volume);
+	void RegisterFromObject(const uint32 objID, const char *sndName, const char *sfxName, uint32 sfxHash, PXreal xo, PXreal yo, PXreal zo, int8 volume);
+	void RegisterFromAbsolute(const uint32 objID, const char *sndName, const char *sfxName, uint32 sfxHash, PXreal x, PXreal y, PXreal z, int8 volume);
 
 	void Remove();
 
@@ -777,7 +777,7 @@ void CRegisteredSound::GetRandom(CSfx *sfx) {
 }
 
 // register a new sound setting internal params
-void CRegisteredSound::Register(const cstr sndName, const cstr sfxName, uint32 sfxHash, int8 volume) {
+void CRegisteredSound::Register(const char *sndName, const char *sfxName, uint32 sfxHash, int8 volume) {
 	CSfx *sfx;
 
 	// simple params
@@ -831,7 +831,7 @@ void CRegisteredSound::Register(const cstr sndName, const cstr sfxName, uint32 s
 }
 
 // register a sound and take position from the position of the object registering the sound
-void CRegisteredSound::RegisterFromObject(const uint32 objID, const cstr sndName, const cstr sfxName, uint32 sfxHash, PXreal xo, PXreal yo, PXreal zo, int8 volume) {
+void CRegisteredSound::RegisterFromObject(const uint32 objID, const char *sndName, const char *sfxName, uint32 sfxHash, PXreal xo, PXreal yo, PXreal zo, int8 volume) {
 	Register(sndName, sfxName, sfxHash, volume);
 	m_xoffset = xo;
 	m_yoffset = yo;
@@ -853,7 +853,7 @@ void CRegisteredSound::RegisterFromObject(const uint32 objID, const cstr sndName
 }
 
 // register a sound as an absolute position
-void CRegisteredSound::RegisterFromAbsolute(const uint32 objID, const cstr sndName, const cstr sfxName, uint32 sfxHash, PXreal x, PXreal y, PXreal z, int8 volume) {
+void CRegisteredSound::RegisterFromAbsolute(const uint32 objID, const char *sndName, const char *sfxName, uint32 sfxHash, PXreal x, PXreal y, PXreal z, int8 volume) {
 
 	Register(sndName, sfxName, sfxHash, volume);
 
@@ -1072,7 +1072,7 @@ void TurnOffSound() { soundOn = FALSE8; }
 
 void TurnOnSound() { soundOn = TRUE8; }
 
-int32 GetFreeSound(const cstr sfxName) {
+int32 GetFreeSound(const char *sfxName) {
 	int32 i;
 
 	for (i = 0; i < MAX_REGISTERED_SOUNDS; i++)
@@ -1098,7 +1098,7 @@ int32 FindSound(uint32 obj, uint32 sndHash, int32 start = 0) {
 
 // fn_play_sfx_offset(sfxName,sndID,x,y,z,isNico)
 // this is the generic function
-void RegisterSoundOffset(uint32 obj, const cstr offsetName, const cstr sfxName, uint32 sfxHash, const cstr sndID, PXreal xo, PXreal yo, PXreal zo, int isNico, int time,
+void RegisterSoundOffset(uint32 obj, const char *offsetName, const char *sfxName, uint32 sfxHash, const char *sndID, PXreal xo, PXreal yo, PXreal zo, int isNico, int time,
                          int8 volume_offset) {
 	// check we have the hash before we register any sounds...!
 	if (menuSoundIDHash == NULL_HASH)
@@ -1145,7 +1145,7 @@ void RegisterSoundOffset(uint32 obj, const cstr offsetName, const cstr sfxName,
 }
 
 // register a sound from an object
-void RegisterSound(uint32 obj, const cstr sfxName, uint32 sfxHash, const cstr sndID, int8 volume_offset) {
+void RegisterSound(uint32 obj, const char *sfxName, uint32 sfxHash, const char *sndID, int8 volume_offset) {
 	const char *name;
 
 	if (obj == SPECIAL_SOUND)
@@ -1157,11 +1157,11 @@ void RegisterSound(uint32 obj, const cstr sfxName, uint32 sfxHash, const cstr sn
 }
 
 // register a sound from an absolute position
-void RegisterSoundAbsolute(uint32 obj, const cstr sfxName, uint32 sfxHash, const cstr sndID, PXreal x, PXreal y, PXreal z, int8 volume_offset) {
+void RegisterSoundAbsolute(uint32 obj, const char *sfxName, uint32 sfxHash, const char *sndID, PXreal x, PXreal y, PXreal z, int8 volume_offset) {
 	RegisterSoundOffset(obj, NULL, sfxName, sfxHash, sndID, x, y, z, 0, 0, volume_offset);
 }
 
-void RegisterSoundTime(uint32 obj, const cstr sfxName, uint32 sfxHash, const cstr sndID, int32 time, int8 volume_offset) {
+void RegisterSoundTime(uint32 obj, const char *sfxName, uint32 sfxHash, const char *sndID, int32 time, int8 volume_offset) {
 	const char *name;
 
 	if (obj == SPECIAL_SOUND)
@@ -1174,19 +1174,19 @@ void RegisterSoundTime(uint32 obj, const cstr sfxName, uint32 sfxHash, const cst
 
 // special sound
 // for menus
-void RegisterMenuSound(const cstr sfxName, uint32 sfxHash, int32 volume, int32 pan, int8 volume_offset) {
+void RegisterMenuSound(const char *sfxName, uint32 sfxHash, int32 volume, int32 pan, int8 volume_offset) {
 	// volume is z of position
 	RegisterSoundOffset(SPECIAL_SOUND, NULL, sfxName, sfxHash, menuSoundID, (PXreal)pan, (PXreal)0, (PXreal)volume, 0, 0, volume_offset);
 }
 
 // special sound
 // for in game (these are paused just like any other...
-void RegisterSoundSpecial(const cstr sfxName, uint32 sfxHash, const cstr sndID, int32 volume, int32 pan, int8 volume_offset) {
+void RegisterSoundSpecial(const char *sfxName, uint32 sfxHash, const char *sndID, int32 volume, int32 pan, int8 volume_offset) {
 	// volume is z of position
 	RegisterSoundOffset(SPECIAL_SOUND, NULL, sfxName, sfxHash, sndID, (PXreal)pan, (PXreal)0, (PXreal)volume, 0, 0, volume_offset);
 }
 
-void RemoveRegisteredSound(uint32 obj, const cstr sndID) {
+void RemoveRegisteredSound(uint32 obj, const char *sndID) {
 	int32 i;
 	uint32 sndIDHash;
 
diff --git a/engines/icb/sound.h b/engines/icb/sound.h
index 2ac714b9da..8502cad05b 100644
--- a/engines/icb/sound.h
+++ b/engines/icb/sound.h
@@ -136,37 +136,37 @@ int32 GetAssignedSounds();
 
 // these functions have both sfxHash and volume_offset which most calls will not use.... they will use the inlines below...
 
-void RegisterSoundOffset(uint32 obj, const cstr offsetName, const cstr sfxName, uint32 sfxHash, const cstr sndID, PXreal xo, PXreal yo, PXreal zo, int isNico, int time,
+void RegisterSoundOffset(uint32 obj, const char *offsetName, const char *sfxName, uint32 sfxHash, const char *sndID, PXreal xo, PXreal yo, PXreal zo, int isNico, int time,
                          int8 volume_offset);
-void RegisterSound(uint32 obj, const cstr sfxName, uint32 sfxHash, const cstr sndID, int8 volume_offset);
-void RegisterSoundAbsolute(uint32 obj, const cstr sfxName, uint32 sfxHash, const cstr sndID, PXreal x, PXreal y, PXreal z, int8 volume_offset);
-void RegisterSoundTime(uint32 obj, const cstr sfxName, uint32 sfxHash, const cstr sndID, int32 time, int8 volume_offset);
-void RegisterSoundSpecial(const cstr sfxName, uint32 sfxHash, const cstr sndID, int32 volume, int32 pan, int8 volume_offset);
+void RegisterSound(uint32 obj, const char *sfxName, uint32 sfxHash, const char *sndID, int8 volume_offset);
+void RegisterSoundAbsolute(uint32 obj, const char *sfxName, uint32 sfxHash, const char *sndID, PXreal x, PXreal y, PXreal z, int8 volume_offset);
+void RegisterSoundTime(uint32 obj, const char *sfxName, uint32 sfxHash, const char *sndID, int32 time, int8 volume_offset);
+void RegisterSoundSpecial(const char *sfxName, uint32 sfxHash, const char *sndID, int32 volume, int32 pan, int8 volume_offset);
 
 // A special function, this plays the sound centrally on the speakers and at the given volume 0-127
-void RegisterMenuSound(const cstr sfxName, uint32 sfxHash, int32 volume, int32 pan, int8 volume_offset);
+void RegisterMenuSound(const char *sfxName, uint32 sfxHash, int32 volume, int32 pan, int8 volume_offset);
 
 // copies of above with no hash.....!
 
-inline void RegisterSoundOffset(uint32 obj, const cstr offsetName, const cstr sfxName, const cstr sndID, PXreal xo, PXreal yo, PXreal zo, int isNico, int time) {
+inline void RegisterSoundOffset(uint32 obj, const char *offsetName, const char *sfxName, const char *sndID, PXreal xo, PXreal yo, PXreal zo, int isNico, int time) {
 	RegisterSoundOffset(obj, offsetName, sfxName, NULL_HASH, sndID, xo, yo, zo, isNico, time, (int8)127);
 }
 
-inline void RegisterSound(uint32 obj, const cstr sfxName, const cstr sndID) { RegisterSound(obj, sfxName, NULL_HASH, sndID, (int8)127); }
+inline void RegisterSound(uint32 obj, const char *sfxName, const char *sndID) { RegisterSound(obj, sfxName, NULL_HASH, sndID, (int8)127); }
 
-inline void RegisterSoundAbsolute(uint32 obj, const cstr sfxName, const cstr sndID, PXreal x, PXreal y, PXreal z) {
+inline void RegisterSoundAbsolute(uint32 obj, const char *sfxName, const char *sndID, PXreal x, PXreal y, PXreal z) {
 	RegisterSoundAbsolute(obj, sfxName, NULL_HASH, sndID, x, y, z, (int8)127);
 }
 
-inline void RegisterSoundTime(uint32 obj, const cstr sfxName, const cstr sndID, int32 time) { RegisterSoundTime(obj, sfxName, NULL_HASH, sndID, time, (int8)127); }
+inline void RegisterSoundTime(uint32 obj, const char *sfxName, const char *sndID, int32 time) { RegisterSoundTime(obj, sfxName, NULL_HASH, sndID, time, (int8)127); }
 
-inline void RegisterSoundSpecial(const cstr sfxName, const cstr sndID, int32 volume, int32 pan) { RegisterSoundSpecial(sfxName, NULL_HASH, sndID, volume, pan, (int8)127); }
+inline void RegisterSoundSpecial(const char *sfxName, const char *sndID, int32 volume, int32 pan) { RegisterSoundSpecial(sfxName, NULL_HASH, sndID, volume, pan, (int8)127); }
 
-inline void RegisterMenuSound(const cstr sfxName, int32 volume, int32 pan) { RegisterMenuSound(sfxName, NULL_HASH, volume, pan, (int8)127); }
+inline void RegisterMenuSound(const char *sfxName, int32 volume, int32 pan) { RegisterMenuSound(sfxName, NULL_HASH, volume, pan, (int8)127); }
 
 // end of no hash copies
 
-void RemoveRegisteredSound(uint32 obj, const cstr sndID);
+void RemoveRegisteredSound(uint32 obj, const char *sndID);
 
 void RemoveAllSoundsWithID(uint32 obj);
 
diff --git a/engines/icb/sound_lowlevel.h b/engines/icb/sound_lowlevel.h
index 0f8ebae0a8..200b09934e 100644
--- a/engines/icb/sound_lowlevel.h
+++ b/engines/icb/sound_lowlevel.h
@@ -34,15 +34,15 @@ namespace ICB {
 
 void SetupSndEngine();
 
-int32 GetSamplePitch(const cstr sampleName, bool8 isInSession);
+int32 GetSamplePitch(const char *sampleName, bool8 isInSession);
 
-void StartSample(int32 ch, const cstr sampleName, bool8 isInSession, int looping);
+void StartSample(int32 ch, const char *sampleName, bool8 isInSession, int looping);
 void StopSample(int32 ch);
 void SetChannelVolumeAndPan(int32 ch, int32 volume, int32 pan);
 void SetChannelPitch(int32 ch, int32 pitch);
 
-void LoadSessionSounds(const cstr cluster);
-void LoadMissionSounds(const cstr cluster);
+void LoadSessionSounds(const char *cluster);
+void LoadMissionSounds(const char *cluster);
 
 // Prototype for useful cluster managing function
 bool8 DoesClusterContainFile(pxString clustername, uint32 hash_to_find, uint32 &fileoffset, uint32 &filesize);
diff --git a/engines/icb/sound_lowlevel_pc.cpp b/engines/icb/sound_lowlevel_pc.cpp
index 958652356c..a7b249c380 100644
--- a/engines/icb/sound_lowlevel_pc.cpp
+++ b/engines/icb/sound_lowlevel_pc.cpp
@@ -100,12 +100,12 @@ bool8 DoesClusterContainFile(pxString clustername, uint32 hash_to_find, uint32 &
 
 void SetupSndEngine() {}
 
-void LoadSessionSounds(const cstr cluster) { Tdebug("sounds.txt", "Setting up session sfx data cluster \"%s\"", cluster); }
+void LoadSessionSounds(const char *cluster) { Tdebug("sounds.txt", "Setting up session sfx data cluster \"%s\"", cluster); }
 
-void LoadMissionSounds(const cstr cluster) { Tdebug("sounds.txt", "Setting up mission sfx data cluster \"%s\"", cluster); }
+void LoadMissionSounds(const char *cluster) { Tdebug("sounds.txt", "Setting up mission sfx data cluster \"%s\"", cluster); }
 
 // in Hz
-int32 GetSamplePitch(const cstr sampleName, bool8 isInSession) {
+int32 GetSamplePitch(const char *sampleName, bool8 isInSession) {
 	if (g_theFxManager) {
 		Tdebug("sounds.txt", "Getting sample rate for %s (isInSession=%d) = %d", sampleName, isInSession,
 		       g_theFxManager->GetDefaultRate(pxVString("samples\\pc\\%s.wav", sampleName)));
@@ -129,7 +129,7 @@ int32 GetSamplePitch(const cstr sampleName, bool8 isInSession) {
 	return false;
 }
 
-void StartSample(int32 ch, const cstr sampleName, bool8 isInSession, int looping) {
+void StartSample(int32 ch, const char *sampleName, bool8 isInSession, int looping) {
 	int32 result;
 
 	if (g_theFxManager) {


Commit: 3341fb743bbdc8680ba2dbac342f22c4e4a633e1
    https://github.com/scummvm/scummvm/commit/3341fb743bbdc8680ba2dbac342f22c4e4a633e1
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2021-02-28T08:56:49+01:00

Commit Message:
ICB: Remove leftover joystick code

Changed paths:
    engines/icb/direct_input.cpp
    engines/icb/direct_input.h
    engines/icb/options_manager_pc.cpp


diff --git a/engines/icb/direct_input.cpp b/engines/icb/direct_input.cpp
index ce12d8a018..717c2c0ea3 100644
--- a/engines/icb/direct_input.cpp
+++ b/engines/icb/direct_input.cpp
@@ -38,21 +38,6 @@
 
 namespace ICB {
 
-// Initialised to unset values
-// For mapping purposes
-uint8 up_joy = 0xFF;
-uint8 down_joy = 0xFF;
-uint8 left_joy = 0xFF;
-uint8 right_joy = 0xFF;
-uint8 sidestep_button = 0xFF;
-uint8 run_button = 0xFF;
-uint8 crouch_button = 0xFF;
-uint8 interact_button = 0xFF;
-uint8 arm_button = 0xFF;
-uint8 fire_button = 0xFF;
-uint8 inventory_button = 0xFF;
-uint8 remora_button = 0xFF;
-uint8 pause_button = 0xFF;
 bool8 keyboard_buf_scancodes[512]; // SDL_NUM_SCANCODES
 bool8 repeats_scancodes[512];      // SDL_NUM_SCANCODES
 
diff --git a/engines/icb/direct_input.h b/engines/icb/direct_input.h
index 043f829eb7..8bd447e1db 100644
--- a/engines/icb/direct_input.h
+++ b/engines/icb/direct_input.h
@@ -32,46 +32,11 @@
 
 namespace ICB {
 
-// Global joystick variables
-extern int currentJoystick;  // Mode the joystick is in
-extern int attachedJoystick; // Mode the joystick is
-
-// Digital defaults (to emulate playstation pad)
-#define JOY_UP -127
-#define JOY_DOWN 127
-#define JOY_LEFT -127
-#define JOY_RIGHT 127
-
-// Used to request analogue values
-#define X_AXIS 0xFE
-#define Y_AXIS 0xFD
-
-// For mapping purposes
-extern uint8 up_joy;
-extern uint8 down_joy;
-extern uint8 left_joy;
-extern uint8 right_joy;
-
-// Equivalent values to call read joystick with
-extern uint8 sidestep_button;
-extern uint8 run_button;
-extern uint8 crouch_button;
-extern uint8 interact_button;
-extern uint8 arm_button;
-extern uint8 fire_button;
-extern uint8 inventory_button;
-extern uint8 remora_button;
-extern uint8 pause_button;
 extern bool8 keyboard_buf_ascii[256];
 extern bool8 repeats_ascii[256];
 extern bool8 keyboard_buf_scancodes[512]; // SDL_NUM_SCANCODES
 extern bool8 repeats_scancodes[512];      // SDL_NUM_SCANCODES
 
-// Generic joystick types (used to regulate control mode)
-#define NO_JOYSTICK 0
-#define ANALOGUE_JOYSTICK 1
-#define DIGITAL_JOYSTICK 2
-
 void Init_direct_input();
 void setKeyState(Common::KeyCode key, bool pressed);
 void Poll_direct_input();
@@ -83,16 +48,6 @@ uint32 Get_DI_key_press();
 void Clear_DI_key_buffer();
 void SetDefaultKeys();
 const char *GetKeyName(uint32 key);
-void SetDefaultJoystick();
-
-int32 Read_Joystick(uint8 part);
-int32 Read_Joystick_once(uint8 part);
-const char *GetJoystickName();
-const char *GetButtonName(uint8 part);
-const char *GetAxisName(uint8 part);
-uint8 GetJoystickButtonPress();
-uint8 GetJoystickAxisPress();
-void UnsetJoystickConfig();
 void UnsetKeys();
 
 } // End of namespace ICB
diff --git a/engines/icb/options_manager_pc.cpp b/engines/icb/options_manager_pc.cpp
index e6837db2ae..109587fcd5 100644
--- a/engines/icb/options_manager_pc.cpp
+++ b/engines/icb/options_manager_pc.cpp
@@ -3347,10 +3347,8 @@ void OptionsManager::DoChoice() {
 		case UP_CROUCH:
 			if (m_controlPage1) {
 				up_key = 0;
-				up_joy = 0xFF;
 			} else {
 				crouch_key = 0;
-				crouch_button = 0xFF;
 			}
 			m_awaitingKeyPress = TRUE8;
 			m_editing = TRUE8;
@@ -3360,10 +3358,8 @@ void OptionsManager::DoChoice() {
 		case DOWN_INTERACT:
 			if (m_controlPage1) {
 				down_key = 0;
-				down_joy = 0xFF;
 			} else {
 				interact_key = 0;
-				interact_button = 0xFF;
 			}
 			m_awaitingKeyPress = TRUE8;
 			m_editing = TRUE8;
@@ -3373,10 +3369,8 @@ void OptionsManager::DoChoice() {
 		case LEFT_ARM:
 			if (m_controlPage1) {
 				left_key = 0;
-				left_joy = 0xFF;
 			} else {
 				arm_key = 0;
-				arm_button = 0xFF;
 			}
 			m_awaitingKeyPress = TRUE8;
 			m_editing = TRUE8;
@@ -3386,10 +3380,8 @@ void OptionsManager::DoChoice() {
 		case RIGHT_ATTACK:
 			if (m_controlPage1) {
 				right_key = 0;
-				right_joy = 0xFF;
 			} else {
 				fire_key = 0;
-				fire_button = 0xFF;
 			}
 			m_awaitingKeyPress = TRUE8;
 			m_editing = TRUE8;
@@ -3399,10 +3391,8 @@ void OptionsManager::DoChoice() {
 		case RUN_INVENTORY:
 			if (m_controlPage1) {
 				run_key = 0;
-				run_button = 0xFF;
 			} else {
 				inventory_key = 0;
-				inventory_button = 0xFF;
 			}
 			m_awaitingKeyPress = TRUE8;
 			m_editing = TRUE8;
@@ -3412,10 +3402,8 @@ void OptionsManager::DoChoice() {
 		case SIDESTEP_REMORA:
 			if (m_controlPage1) {
 				sidestep_key = 0;
-				sidestep_button = 0xFF;
 			} else {
 				remora_key = 0;
-				remora_button = 0xFF;
 			}
 			m_awaitingKeyPress = TRUE8;
 			m_editing = TRUE8;
@@ -3424,7 +3412,6 @@ void OptionsManager::DoChoice() {
 
 		case PAUSE: // Can only select this on page 2 by default
 			pause_key = 0;
-			pause_button = 0xFF;
 			m_awaitingKeyPress = TRUE8;
 			m_editing = TRUE8;
 			Clear_DI_key_buffer();




More information about the Scummvm-git-logs mailing list