[openjk] 86/130: Merge in the latest master

Simon McVittie smcv at debian.org
Fri Oct 28 11:09:23 UTC 2016


This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to branch debian/master
in repository openjk.

commit 1cb254e926cfa093ab2ca08cf6d64159916bd112
Merge: d490600 dfd512e
Author: bibendovsky <bibendovsky at hotmail.com>
Date:   Tue Aug 30 19:58:27 2016 +0300

    Merge in the latest master

 CMakeLists.txt                      |    6 +
 CreateVisualStudio2010Projects.bat  |   18 -
 CreateVisualStudio2012Projects.bat  |   18 -
 code/CMakeLists.txt                 |    1 -
 code/cgame/FxPrimitives.cpp         |   22 +-
 code/cgame/FxScheduler.cpp          |   16 +-
 code/cgame/cg_camera.cpp            |   16 +-
 code/cgame/cg_credits.cpp           |    8 +-
 code/cgame/cg_draw.cpp              |   16 +-
 code/cgame/cg_effects.cpp           |   58 +-
 code/cgame/cg_ents.cpp              |    4 +-
 code/cgame/cg_main.cpp              |    2 +-
 code/cgame/cg_players.cpp           |   87 +-
 code/cgame/cg_predict.cpp           |    4 +-
 code/cgame/cg_syscalls.cpp          |   14 +-
 code/cgame/cg_text.cpp              |    4 +-
 code/cgame/cg_view.cpp              |   11 +-
 code/cgame/cg_weapons.cpp           |   12 +-
 code/client/cl_cgame.cpp            |   10 +-
 code/client/cl_cin.cpp              |   22 +-
 code/client/cl_keys.cpp             |   12 +-
 code/client/cl_mp3.cpp              |    6 +-
 code/client/cl_mp3.h                |    2 +-
 code/client/cl_ui.cpp               |    2 +-
 code/client/snd_dma.cpp             |   36 +-
 code/client/snd_mem.cpp             |    6 +-
 code/client/snd_music.cpp           |   20 +-
 code/game/AI_BobaFett.cpp           |    8 +-
 code/game/AI_Default.cpp            |   17 +-
 code/game/AI_Droid.cpp              |    6 +-
 code/game/AI_GalakMech.cpp          |    2 +-
 code/game/AI_HazardTrooper.cpp      |    4 +-
 code/game/AI_Howler.cpp             |    4 +-
 code/game/AI_ImperialProbe.cpp      |    4 +-
 code/game/AI_Interrogator.cpp       |    2 +-
 code/game/AI_Jedi.cpp               |    4 +-
 code/game/AI_MineMonster.cpp        |   12 +-
 code/game/AI_Rancor.cpp             |    8 +-
 code/game/AI_Remote.cpp             |    2 +-
 code/game/AI_RocketTrooper.cpp      |   10 +-
 code/game/AI_Seeker.cpp             |   14 +-
 code/game/AI_Sentry.cpp             |    2 +-
 code/game/AI_Stormtrooper.cpp       |    6 +-
 code/game/AI_Tusken.cpp             |    8 +-
 code/game/AI_Utils.cpp              |    2 +-
 code/game/AI_Wampa.cpp              |   10 +-
 code/game/CMakeLists.txt            |    1 -
 code/game/FighterNPC.cpp            |    6 +-
 code/game/G_Timer.cpp               |    4 +-
 code/game/NPC_behavior.cpp          |   10 +-
 code/game/NPC_combat.cpp            |   10 +-
 code/game/NPC_goal.cpp              |    2 +-
 code/game/NPC_move.cpp              |    4 +-
 code/game/NPC_reactions.cpp         |    6 +-
 code/game/NPC_senses.cpp            |    6 +-
 code/game/NPC_spawn.cpp             |    2 +-
 code/game/NPC_stats.cpp             |   38 +-
 code/game/NPC_utils.cpp             |    4 +-
 code/game/Q3_Interface.cpp          |   30 +-
 code/game/b_local.h                 |    4 +-
 code/game/bg_panimate.cpp           |    4 +-
 code/game/bg_pmove.cpp              |    2 +-
 code/game/bg_slidemove.cpp          |    2 +-
 code/game/g_active.cpp              |   10 +-
 code/game/g_breakable.cpp           |    4 +-
 code/game/g_client.cpp              |    4 +-
 code/game/g_cmds.cpp                |    2 +-
 code/game/g_combat.cpp              |   43 +-
 code/game/g_emplaced.cpp            |    4 +-
 code/game/g_fx.cpp                  |    2 +-
 code/game/g_inventory.cpp           |    2 +-
 code/game/g_items.cpp               |   10 +-
 code/game/g_main.cpp                |    4 +-
 code/game/g_misc.cpp                |    6 +-
 code/game/g_misc_model.cpp          |   34 +-
 code/game/g_missile.cpp             |    6 +-
 code/game/g_mover.cpp               |    4 +-
 code/game/g_navigator.cpp           |    6 +-
 code/game/g_navnew.cpp              |    4 +-
 code/game/g_object.cpp              |    2 +-
 code/game/g_roff.cpp                |    2 +-
 code/game/g_savegame.cpp            |    4 +-
 code/game/g_session.cpp             |    2 +-
 code/game/g_svcmds.cpp              |    4 +-
 code/game/g_target.cpp              |    4 +-
 code/game/g_trigger.cpp             |    6 +-
 code/game/g_turret.cpp              |   26 +-
 code/game/g_vehicles.cpp            |    2 +-
 code/game/g_weapon.cpp              |    4 +-
 code/game/wp_blaster_pistol.cpp     |    8 +-
 code/game/wp_blaster_rifle.cpp      |   12 +-
 code/game/wp_bowcaster.cpp          |    8 +-
 code/game/wp_concussion.cpp         |   10 +-
 code/game/wp_det_pack.cpp           |    2 +-
 code/game/wp_flechette.cpp          |   10 +-
 code/game/wp_noghri_stick.cpp       |    4 +-
 code/game/wp_repeater.cpp           |    8 +-
 code/game/wp_rocket_launcher.cpp    |    4 +-
 code/game/wp_saber.cpp              |   10 +-
 code/game/wp_saber.h                |    2 +-
 code/game/wp_saberLoad.cpp          |    8 +-
 code/game/wp_thermal.cpp            |    8 +-
 code/game/wp_tusken.cpp             |    8 +-
 code/icarus/Sequencer.cpp           |    4 +-
 code/icarus/TaskManager.cpp         |    6 +-
 code/qcommon/cm_patch.cpp           |   36 +-
 code/qcommon/common.cpp             |    2 +-
 code/qcommon/files.cpp              |    2 +-
 code/qcommon/net_chan.cpp           |    2 +-
 code/qcommon/q_math.cpp             |  946 --------
 code/qcommon/q_shared.cpp           |  465 ----
 code/qcommon/q_shared.h             |  742 +-----
 code/qcommon/safe/memory.h          |    2 +-
 code/qcommon/sstring.h              |    8 +-
 code/qcommon/strip.cpp              |    4 +-
 code/qcommon/tri_coll_test.cpp      |   10 +-
 code/qcommon/z_memman_pc.cpp        |    2 +-
 code/rd-common/tr_font.cpp          |   86 +-
 code/rd-common/tr_public.h          |    2 +-
 code/rd-vanilla/CMakeLists.txt      |    1 -
 code/rd-vanilla/G2_API.cpp          |   10 +-
 code/rd-vanilla/G2_bones.cpp        |    2 +-
 code/rd-vanilla/tr_WorldEffects.cpp |    2 +-
 code/rd-vanilla/tr_bsp.cpp          |    9 +-
 code/rd-vanilla/tr_cmds.cpp         |    2 +-
 code/rd-vanilla/tr_ghoul2.cpp       |    4 +-
 code/rd-vanilla/tr_image.cpp        |    4 +-
 code/rd-vanilla/tr_light.cpp        |    2 +-
 code/rd-vanilla/tr_mesh.cpp         |    2 +-
 code/rd-vanilla/tr_model.cpp        |    8 +-
 code/rd-vanilla/tr_quicksprite.cpp  |    4 +-
 code/rd-vanilla/tr_shader.cpp       |   25 +-
 code/rd-vanilla/tr_skin.cpp         |   13 +-
 code/rd-vanilla/tr_sky.cpp          |    2 +-
 code/rd-vanilla/tr_surface.cpp      |   16 +-
 code/server/sv_game.cpp             |    6 +-
 code/server/sv_savegame.cpp         |    4 +-
 code/server/sv_snapshot.cpp         |    2 +-
 code/server/sv_world.cpp            |    5 +-
 code/ui/ui_main.cpp                 |   53 +-
 code/ui/ui_saber.cpp                |   16 +-
 code/ui/ui_shared.cpp               |   30 +-
 code/win32/glw_win.h                |   30 -
 code/win32/win_gamma.cpp            |  157 --
 code/win32/win_glimp.cpp            | 1861 ---------------
 code/win32/win_input.cpp            | 1706 --------------
 code/win32/win_local.h              |   89 -
 code/win32/win_qgl.cpp              | 4289 -----------------------------------
 code/win32/win_shared.cpp           |  181 --
 code/win32/win_snd.cpp              |  406 ----
 code/win32/win_syscon.cpp           |  617 -----
 code/win32/win_wndproc.cpp          |  509 -----
 codeJK2/cgame/FxPrimitives.cpp      |   22 +-
 codeJK2/cgame/FxScheduler.cpp       |   16 +-
 codeJK2/cgame/cg_camera.cpp         |   16 +-
 codeJK2/cgame/cg_credits.cpp        |    4 +-
 codeJK2/cgame/cg_draw.cpp           |   16 +-
 codeJK2/cgame/cg_effects.cpp        |   58 +-
 codeJK2/cgame/cg_ents.cpp           |    4 +-
 codeJK2/cgame/cg_main.cpp           |    2 +-
 codeJK2/cgame/cg_players.cpp        |   80 +-
 codeJK2/cgame/cg_predict.cpp        |    4 +-
 codeJK2/cgame/cg_syscalls.cpp       |   10 +-
 codeJK2/cgame/cg_text.cpp           |    4 +-
 codeJK2/cgame/cg_view.cpp           |    6 +-
 codeJK2/cgame/cg_weapons.cpp        |    8 +-
 codeJK2/game/AI_Default.cpp         |   16 +-
 codeJK2/game/AI_Droid.cpp           |    6 +-
 codeJK2/game/AI_GalakMech.cpp       |    6 +-
 codeJK2/game/AI_Howler.cpp          |    6 +-
 codeJK2/game/AI_ImperialProbe.cpp   |    4 +-
 codeJK2/game/AI_Interrogator.cpp    |    2 +-
 codeJK2/game/AI_Jedi.cpp            |    3 +-
 codeJK2/game/AI_MineMonster.cpp     |   14 +-
 codeJK2/game/AI_Remote.cpp          |    2 +-
 codeJK2/game/AI_Seeker.cpp          |   14 +-
 codeJK2/game/AI_Sentry.cpp          |    2 +-
 codeJK2/game/AI_Stormtrooper.cpp    |    6 +-
 codeJK2/game/AI_Utils.cpp           |    2 +-
 codeJK2/game/CMakeLists.txt         |    1 -
 codeJK2/game/G_Timer.cpp            |    4 +-
 codeJK2/game/NPC_behavior.cpp       |   11 +-
 codeJK2/game/NPC_combat.cpp         |   10 +-
 codeJK2/game/NPC_reactions.cpp      |    6 +-
 codeJK2/game/NPC_senses.cpp         |    4 +-
 codeJK2/game/NPC_spawn.cpp          |    2 +-
 codeJK2/game/NPC_stats.cpp          |   78 +-
 codeJK2/game/NPC_utils.cpp          |    4 +-
 codeJK2/game/Q3_Interface.cpp       |   24 +-
 codeJK2/game/b_local.h              |   36 +-
 codeJK2/game/bg_panimate.cpp        |    2 +-
 codeJK2/game/bg_slidemove.cpp       |    2 +-
 codeJK2/game/g_active.cpp           |   10 +-
 codeJK2/game/g_breakable.cpp        |    4 +-
 codeJK2/game/g_client.cpp           |    4 +-
 codeJK2/game/g_cmds.cpp             |    2 +-
 codeJK2/game/g_combat.cpp           |   12 +-
 codeJK2/game/g_fx.cpp               |    2 +-
 codeJK2/game/g_inventory.cpp        |    3 +-
 codeJK2/game/g_items.cpp            |   10 +-
 codeJK2/game/g_main.cpp             |    4 +-
 codeJK2/game/g_misc.cpp             |   10 +-
 codeJK2/game/g_misc_model.cpp       |   34 +-
 codeJK2/game/g_missile.cpp          |    6 +-
 codeJK2/game/g_mover.cpp            |    4 +-
 codeJK2/game/g_nav.cpp              |   16 +-
 codeJK2/game/g_navigator.h          |    2 +-
 codeJK2/game/g_navnew.cpp           |    4 +-
 codeJK2/game/g_object.cpp           |    2 +-
 codeJK2/game/g_roff.cpp             |    4 +-
 codeJK2/game/g_savegame.cpp         |    4 +-
 codeJK2/game/g_shared.h             |    2 +-
 codeJK2/game/g_target.cpp           |    4 +-
 codeJK2/game/g_trigger.cpp          |    6 +-
 codeJK2/game/g_turret.cpp           |   22 +-
 codeJK2/game/g_weapon.cpp           |    4 +-
 codeJK2/game/wp_blaster_rifle.cpp   |   12 +-
 codeJK2/game/wp_bowcaster.cpp       |    8 +-
 codeJK2/game/wp_bryar_pistol.cpp    |    8 +-
 codeJK2/game/wp_det_pack.cpp        |    2 +-
 codeJK2/game/wp_flechette.cpp       |   10 +-
 codeJK2/game/wp_repeater.cpp        |    8 +-
 codeJK2/game/wp_rocket_launcher.cpp |    4 +-
 codeJK2/game/wp_saber.cpp           |   20 +-
 codeJK2/game/wp_saber.h             |    2 +-
 codeJK2/game/wp_thermal.cpp         |    6 +-
 codeJK2/icarus/Sequencer.cpp        |    4 +-
 codeJK2/icarus/TaskManager.cpp      |    8 +-
 codeJK2/qcommon/safe/memory.h       |    2 +-
 codemp/CMakeLists.txt               |    1 -
 codemp/botlib/be_aas_route.cpp      |    2 +-
 codemp/botlib/be_ai_chat.cpp        |    8 +-
 codemp/botlib/be_ai_gen.cpp         |    4 +-
 codemp/botlib/be_ai_move.cpp        |    8 +-
 codemp/botlib/be_ai_weight.cpp      |   14 +-
 codemp/cgame/CMakeLists.txt         |    1 -
 codemp/cgame/cg_draw.c              |   12 +-
 codemp/cgame/cg_effects.c           |   66 +-
 codemp/cgame/cg_ents.c              |   12 +-
 codemp/cgame/cg_localents.c         |    4 +-
 codemp/cgame/cg_main.c              |   84 -
 codemp/cgame/cg_players.c           |   58 +-
 codemp/cgame/cg_view.c              |    4 +-
 codemp/cgame/cg_weapons.c           |    6 +-
 codemp/cgame/fx_demp2.c             |   24 +-
 codemp/client/cl_uiapi.cpp          |  290 ++-
 codemp/game/CMakeLists.txt          |    1 -
 codemp/game/NPC_AI_Default.c        |    6 +-
 codemp/game/NPC_AI_Droid.c          |    6 +-
 codemp/game/NPC_AI_GalakMech.c      |    6 +-
 codemp/game/NPC_AI_Howler.c         |    4 +-
 codemp/game/NPC_AI_ImperialProbe.c  |    4 +-
 codemp/game/NPC_AI_Interrogator.c   |    2 +-
 codemp/game/NPC_AI_MineMonster.c    |   12 +-
 codemp/game/NPC_AI_Rancor.c         |    4 +-
 codemp/game/NPC_AI_Remote.c         |    2 +-
 codemp/game/NPC_AI_Seeker.c         |   14 +-
 codemp/game/NPC_AI_Sentry.c         |    2 +-
 codemp/game/NPC_AI_Stormtrooper.c   |    2 +-
 codemp/game/NPC_AI_Wampa.c          |    4 +-
 codemp/game/NPC_behavior.c          |    4 +-
 codemp/game/NPC_combat.c            |    8 +-
 codemp/game/NPC_reactions.c         |    4 +-
 codemp/game/NPC_utils.c             |    4 +-
 codemp/game/g_bot.c                 |    2 +-
 codemp/game/g_client.c              |    4 +-
 codemp/game/g_items.c               |   12 +-
 codemp/game/g_misc.c                |    6 +-
 codemp/game/g_mover.c               |    2 +-
 codemp/game/g_nav.c                 |    2 +-
 codemp/game/g_navnew.c              |    2 +-
 codemp/game/g_target.c              |    2 +-
 codemp/game/g_trigger.c             |    6 +-
 codemp/game/g_turret.c              |    8 +-
 codemp/game/g_turret_G2.c           |    8 +-
 codemp/game/g_utils.c               |    8 -
 codemp/game/g_weapon.c              |   26 +-
 codemp/game/w_saber.c               |    9 -
 codemp/icarus/Sequencer.cpp         |    4 +-
 codemp/icarus/TaskManager.cpp       |    6 +-
 codemp/qcommon/files.cpp            |    2 +-
 codemp/qcommon/q_math.cpp           |   24 -
 codemp/qcommon/q_shared.c           |  475 ----
 codemp/qcommon/q_shared.h           |  484 +---
 codemp/rd-vanilla/CMakeLists.txt    |    1 -
 codemp/rd-vanilla/G2_API.cpp        |    8 +-
 codemp/rd-vanilla/G2_misc.cpp       |    2 +-
 codemp/rd-vanilla/tr_skin.cpp       |   11 +-
 codemp/rd-vanilla/tr_surface.cpp    |   16 +-
 codemp/ui/CMakeLists.txt            |    1 -
 codemp/ui/ui_main.c                 |   32 +-
 codemp/ui/ui_saber.c                |    8 +-
 codemp/win32/glw_win.h              |   27 -
 codemp/win32/win_gamma.cpp          |  161 --
 codemp/win32/win_glimp.cpp          | 1878 ---------------
 codemp/win32/win_input.cpp          | 1685 --------------
 codemp/win32/win_local.h            |   70 -
 codemp/win32/win_qgl.cpp            | 4264 ----------------------------------
 codemp/win32/win_shared.cpp         |   26 -
 codemp/win32/win_snd.cpp            |  385 ----
 codemp/win32/win_syscon.cpp         |  593 -----
 codemp/win32/win_wndproc.cpp        |  492 ----
 shared/qcommon/q_color.c            |  157 ++
 shared/qcommon/q_color.h            |  153 ++
 {codemp => shared}/qcommon/q_math.c | 1929 ++++++++--------
 shared/qcommon/q_math.h             |  279 +++
 shared/qcommon/q_platform.h         |   35 +
 shared/qcommon/q_string.c           |  435 ++++
 shared/qcommon/q_string.h           |   52 +
 shared/sdl/sdl_sound.cpp            |    8 +-
 310 files changed, 3745 insertions(+), 24910 deletions(-)

diff --cc code/game/CMakeLists.txt
index 989e462,b0e5e82..c54a67f
--- a/code/game/CMakeLists.txt
+++ b/code/game/CMakeLists.txt
@@@ -257,13 -257,9 +257,12 @@@ set(SPGameCommonFile
  	"${SPDir}/qcommon/sstring.h"
  	"${SPDir}/qcommon/tags.h"
  	"${SPDir}/qcommon/timing.h"
- 	"${SPDir}/qcommon/q_math.cpp"
  	"${SPDir}/qcommon/q_shared.cpp"
  	"${SPDir}/qcommon/q_shared.h"
 -	
 +	"${SharedDir}/qcommon/ojk_i_saved_game.h"
 +	"${SharedDir}/qcommon/ojk_saved_game_helper.h"
 +	"${SharedDir}/qcommon/ojk_saved_game_helper_fwd.h"
 +	"${SharedDir}/qcommon/ojk_scope_guard.h"
  	${SharedCommonFiles}
  	)
  source_group("common" FILES ${SPGameCommonFiles})
diff --cc code/qcommon/q_shared.h
index 47c1427,69f13ae..98e4bdb
--- a/code/qcommon/q_shared.h
+++ b/code/qcommon/q_shared.h
@@@ -156,10 -157,7 +160,9 @@@ along with this program; if not, see <h
  	#define idppc	0
  #endif
  
- 
  #include "qcommon/q_platform.h"
 +#include "qcommon/ojk_saved_game_helper_fwd.h"
 +
  
  // ================================================================
  // TYPE DEFINITIONS
@@@ -2404,13 -1310,12 +1676,13 @@@ public
  	int			lastStationary;	//last time you were on the ground
  	int			weaponShotCount;
  
 +#ifndef JK2_MODE
  	//FIXME: maybe allocate all these structures (saber, force powers, vehicles)
  	//			or descend them as classes - so not every client has all this info
 -	saberInfo_t	saber[MAX_SABERS];
 +	TSaberInfo	saber[MAX_SABERS];
  	qboolean	dualSabers;
- 	qboolean	SaberStaff( void ) { return ( saber[0].type == SABER_STAFF || (dualSabers && saber[1].type == SABER_STAFF) ); };
- 	qboolean	SaberActive() { return ( saber[0].Active() || (dualSabers&&saber[1].Active()) ); };
+ 	qboolean	SaberStaff( void ) { return (qboolean)( saber[0].type == SABER_STAFF || (dualSabers && saber[1].type == SABER_STAFF) ); };
+ 	qboolean	SaberActive() { return (qboolean)( saber[0].Active() || (dualSabers&&saber[1].Active()) ); };
  	void		SetSaberLength( float length )
  				{
  					saber[0].SetLength( length );
diff --cc code/rd-vanilla/CMakeLists.txt
index b947b99,30f5456..1dc0b57
--- a/code/rd-vanilla/CMakeLists.txt
+++ b/code/rd-vanilla/CMakeLists.txt
@@@ -75,13 -75,9 +75,12 @@@ if(BuildSPRdVanilla OR BuildJK2SPRdVani
  	# Misc files
  	set(SPRDVanillaCommonFiles
  		"${SPDir}/qcommon/matcomp.cpp"
- 		"${SPDir}/qcommon/q_math.cpp"
  		"${SPDir}/qcommon/q_shared.cpp"
  		"${SPDir}/qcommon/q_shared.h"
 -		
 +		"${SharedDir}/qcommon/ojk_i_saved_game.h"
 +		"${SharedDir}/qcommon/ojk_saved_game_helper.h"
 +		"${SharedDir}/qcommon/ojk_saved_game_helper_fwd.h"
 +		"${SharedDir}/qcommon/ojk_scope_guard.h"
  		${SharedCommonFiles}
  		)
  	source_group("common" FILES ${SPRDVanillaCommonFiles})
diff --cc code/server/sv_savegame.cpp
index 7901014,d488cf2..2fe4cd1
--- a/code/server/sv_savegame.cpp
+++ b/code/server/sv_savegame.cpp
@@@ -1335,7 -1599,10 +1335,7 @@@ void SG_TestSave(void
  {
  	if (sv_testsave->integer && sv.state == SS_GAME)
  	{
- 		WriteGame (false);
- 		ge->WriteLevel(false);
+ 		WriteGame(qfalse);
+ 		ge->WriteLevel(qfalse);
  	}
  }
 -
 -////////////////// eof ////////////////////
 -
diff --cc codeJK2/game/g_main.cpp
index 1b19c4b,47edd14..b34a18d
--- a/codeJK2/game/g_main.cpp
+++ b/codeJK2/game/g_main.cpp
@@@ -85,28 -84,17 +85,28 @@@ qboolean PInUse2(gentity_t *ent
  	assert(((uintptr_t)ent)>=(uintptr_t)g_entities);
  	assert(((uintptr_t)ent)<=(uintptr_t)(g_entities+MAX_GENTITIES-1));
  	unsigned int entNum=ent-g_entities;
- 	return((g_entityInUseBits[entNum/32]&(((unsigned int)1)<<(entNum&0x1f)))!=0);
+ 	return (qboolean)((g_entityInUseBits[entNum / 32] & (1u << (entNum & 0x1f))) != 0);
  }
  
 -void WriteInUseBits(void)
 +void WriteInUseBits()
  {
 -	gi.AppendToSaveGame(INT_ID('I','N','U','S'), &g_entityInUseBits, sizeof(g_entityInUseBits) );
 +	ojk::SavedGameHelper saved_game(
 +		::gi.saved_game);
 +
 +	saved_game.write_chunk<uint32_t>(
 +		INT_ID('I', 'N', 'U', 'S'),
 +		::g_entityInUseBits);
  }
  
 -void ReadInUseBits(void)
 +void ReadInUseBits()
  {
 -	gi.ReadFromSaveGame(INT_ID('I','N','U','S'), &g_entityInUseBits, sizeof(g_entityInUseBits), NULL);
 +	ojk::SavedGameHelper saved_game(
 +		::gi.saved_game);
 +
 +	saved_game.read_chunk<uint32_t>(
 +		INT_ID('I', 'N', 'U', 'S'),
 +		::g_entityInUseBits);
 +
  	// This is only temporary. Once I have converted all the ent->inuse refs,
  	// it won;t be needed -MW.
  	for(int i=0;i<MAX_GENTITIES;i++)
diff --cc codeJK2/game/g_shared.h
index 9e0ac00,c0a9a1f..3bd4449
--- a/codeJK2/game/g_shared.h
+++ b/codeJK2/game/g_shared.h
@@@ -482,63 -308,14 +482,63 @@@ public
  	float		lastreturnedflag;
  	float		flagsince;
  	float		lastfraggedcarrier;
 -} playerTeamState_t;
 +
 +
 +	void sg_export(
 +		ojk::SavedGameHelper& saved_game) const
 +	{
 +		saved_game.write<int32_t>(state);
 +		saved_game.write<int32_t>(captures);
 +		saved_game.write<int32_t>(basedefense);
 +		saved_game.write<int32_t>(carrierdefense);
 +		saved_game.write<int32_t>(flagrecovery);
 +		saved_game.write<int32_t>(fragcarrier);
 +		saved_game.write<int32_t>(assists);
 +		saved_game.write<float>(lasthurtcarrier);
 +		saved_game.write<float>(lastreturnedflag);
 +		saved_game.write<float>(flagsince);
 +		saved_game.write<float>(lastfraggedcarrier);
 +	}
 +
 +	void sg_import(
 +		ojk::SavedGameHelper& saved_game)
 +	{
 +		saved_game.read<int32_t>(state);
 +		saved_game.read<int32_t>(captures);
 +		saved_game.read<int32_t>(basedefense);
 +		saved_game.read<int32_t>(carrierdefense);
 +		saved_game.read<int32_t>(flagrecovery);
 +		saved_game.read<int32_t>(fragcarrier);
 +		saved_game.read<int32_t>(assists);
 +		saved_game.read<float>(lasthurtcarrier);
 +		saved_game.read<float>(lastreturnedflag);
 +		saved_game.read<float>(flagsince);
 +		saved_game.read<float>(lastfraggedcarrier);
 +	}
 +}; // playerTeamState_t
  
  // !!!!!!!!!! LOADSAVE-affecting structure !!!!!!!!!!
 -typedef struct objectives_s
 +class objectives_t
  {
 -	int display;	// A displayable objective?
 -	int	status;	// Succeed or fail or pending
 -} objectives_t;
 +public:
- 	qboolean	display;	// A displayable objective?
++	int			display;	// A displayable objective?
 +	int			status;	// Succeed or fail or pending
 +
 +
 +	void sg_export(
 +		ojk::SavedGameHelper& saved_game) const
 +	{
 +		saved_game.write<int32_t>(display);
 +		saved_game.write<int32_t>(status);
 +	}
 +
 +	void sg_import(
 +		ojk::SavedGameHelper& saved_game)
 +	{
 +		saved_game.read<int32_t>(display);
 +		saved_game.read<int32_t>(status);
 +	}
 +}; // objectives_t
  #define MAX_MISSION_OBJ 80
  
  // !!!!!!!!!! LOADSAVE-affecting structure !!!!!!!!!!

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/openjk.git



More information about the Pkg-games-commits mailing list