From 3a2ad504062fbedf04bb3ec13a6cec289e1f115c Mon Sep 17 00:00:00 2001 From: Tim Angus Date: Wed, 26 Oct 2005 19:45:21 +0000 Subject: [PATCH] * Moved various source files from their mod sdk locations to places more appropriate for open source Q3 * This patch looks bigger than it really is, however it will probably break the VC and OS X builds (easy to fix though) --- code/{game => botlib}/be_aas.h | 0 code/botlib/be_aas_bspq3.c | 6 +- code/botlib/be_aas_cluster.c | 6 +- code/botlib/be_aas_debug.c | 6 +- code/botlib/be_aas_entity.c | 6 +- code/botlib/be_aas_file.c | 6 +- code/botlib/be_aas_main.c | 6 +- code/botlib/be_aas_move.c | 6 +- code/botlib/be_aas_optimize.c | 6 +- code/botlib/be_aas_reach.c | 6 +- code/botlib/be_aas_route.c | 6 +- code/botlib/be_aas_routealt.c | 6 +- code/botlib/be_aas_sample.c | 6 +- code/botlib/be_ai_char.c | 8 +- code/{game => botlib}/be_ai_char.h | 0 code/botlib/be_ai_chat.c | 10 +- code/{game => botlib}/be_ai_chat.h | 0 code/botlib/be_ai_gen.c | 8 +- code/{game => botlib}/be_ai_gen.h | 0 code/botlib/be_ai_goal.c | 10 +- code/{game => botlib}/be_ai_goal.h | 0 code/botlib/be_ai_move.c | 14 +- code/{game => botlib}/be_ai_move.h | 0 code/botlib/be_ai_weap.c | 8 +- code/{game => botlib}/be_ai_weap.h | 0 code/botlib/be_ai_weight.c | 6 +- code/botlib/be_ea.c | 4 +- code/{game => botlib}/be_ea.h | 0 code/botlib/be_interface.c | 20 +- code/{game => botlib}/botlib.h | 0 code/botlib/l_crc.c | 4 +- code/botlib/l_libvar.c | 2 +- code/botlib/l_log.c | 4 +- code/botlib/l_memory.c | 4 +- code/botlib/l_precomp.c | 4 +- code/botlib/l_script.c | 4 +- code/botlib/l_struct.c | 4 +- code/bspc/aas_create.c | 2 +- code/bspc/aas_map.c | 2 +- code/bspc/aas_store.h | 2 +- code/bspc/be_aas_bspc.c | 6 +- code/bspc/map_q3.c | 2 +- code/cgame/cg_local.h | 4 +- code/client/cl_cgame.c | 2 +- code/client/cl_net_chan.c | 2 +- code/client/cl_ui.c | 2 +- code/client/client.h | 2 +- code/{q3_ui => client}/keycodes.h | 0 code/client/keys.h | 2 +- code/client/snd_local.h | 2 +- code/game/ai_chat.c | 18 +- code/game/ai_cmd.c | 18 +- code/game/ai_dmnet.c | 20 +- code/game/ai_dmq3.c | 18 +- code/game/ai_main.c | 20 +- code/game/ai_team.c | 18 +- code/game/ai_vcmd.c | 18 +- code/game/bg_lib.c | 2 +- code/game/bg_misc.c | 2 +- code/game/bg_pmove.c | 2 +- code/game/bg_slidemove.c | 2 +- code/game/g_local.h | 2 +- code/jpeg-6/jload.c | 2 +- code/null/mac_net.c | 2 +- code/q3_ui/ui_local.h | 6 +- code/qcommon/cm_local.h | 2 +- code/qcommon/cmd.c | 2 +- code/qcommon/cmd.c.save | 636 -------------------------- code/qcommon/common.c | 2 +- code/qcommon/cvar.c | 2 +- code/qcommon/files.c | 2 +- code/qcommon/huffman.c | 2 +- code/qcommon/msg.c | 2 +- code/qcommon/net_chan.c | 2 +- code/{game => qcommon}/q_math.c | 0 code/{game => qcommon}/q_shared.c | 0 code/{game => qcommon}/q_shared.h | 0 code/{game => qcommon}/surfaceflags.h | 0 code/qcommon/vm_local.h | 2 +- code/renderer/tr_local.h | 2 +- code/renderer/tr_public.h | 2 +- code/{cgame => renderer}/tr_types.h | 0 code/server/server.h | 2 +- code/server/sv_bot.c | 2 +- code/server/sv_game.c | 2 +- code/server/sv_net_chan.c | 2 +- code/ui/keycodes.h | 163 ------- code/ui/ui_local.h | 6 +- code/ui/ui_shared.h | 6 +- code/unix/Makefile | 54 ++- code/unix/linux_signals.c | 2 +- code/unix/linux_snd.c | 2 +- code/unix/sdl_snd.c | 2 +- code/unix/unix_main.c | 2 +- code/unix/unix_net.c | 2 +- code/unix/unix_shared.c | 2 +- code/win32/win_net.c | 2 +- code/win32/win_shared.c | 2 +- 98 files changed, 247 insertions(+), 1030 deletions(-) rename code/{game => botlib}/be_aas.h (100%) rename code/{game => botlib}/be_ai_char.h (100%) rename code/{game => botlib}/be_ai_chat.h (100%) rename code/{game => botlib}/be_ai_gen.h (100%) rename code/{game => botlib}/be_ai_goal.h (100%) rename code/{game => botlib}/be_ai_move.h (100%) rename code/{game => botlib}/be_ai_weap.h (100%) rename code/{game => botlib}/be_ea.h (100%) rename code/{game => botlib}/botlib.h (100%) rename code/{q3_ui => client}/keycodes.h (100%) delete mode 100644 code/qcommon/cmd.c.save rename code/{game => qcommon}/q_math.c (100%) rename code/{game => qcommon}/q_shared.c (100%) rename code/{game => qcommon}/q_shared.h (100%) rename code/{game => qcommon}/surfaceflags.h (100%) rename code/{cgame => renderer}/tr_types.h (100%) delete mode 100644 code/ui/keycodes.h diff --git a/code/game/be_aas.h b/code/botlib/be_aas.h similarity index 100% rename from code/game/be_aas.h rename to code/botlib/be_aas.h diff --git a/code/botlib/be_aas_bspq3.c b/code/botlib/be_aas_bspq3.c index 97c286d6..68084bef 100644 --- a/code/botlib/be_aas_bspq3.c +++ b/code/botlib/be_aas_bspq3.c @@ -29,14 +29,14 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * *****************************************************************************/ -#include "../game/q_shared.h" +#include "../qcommon/q_shared.h" #include "l_memory.h" #include "l_script.h" #include "l_precomp.h" #include "l_struct.h" #include "aasfile.h" -#include "../game/botlib.h" -#include "../game/be_aas.h" +#include "botlib.h" +#include "be_aas.h" #include "be_aas_funcs.h" #include "be_aas_def.h" diff --git a/code/botlib/be_aas_cluster.c b/code/botlib/be_aas_cluster.c index 118dd0a8..cdbce02a 100644 --- a/code/botlib/be_aas_cluster.c +++ b/code/botlib/be_aas_cluster.c @@ -29,7 +29,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * *****************************************************************************/ -#include "../game/q_shared.h" +#include "../qcommon/q_shared.h" #include "l_memory.h" #include "l_script.h" #include "l_precomp.h" @@ -38,8 +38,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include "l_memory.h" #include "l_libvar.h" #include "aasfile.h" -#include "../game/botlib.h" -#include "../game/be_aas.h" +#include "botlib.h" +#include "be_aas.h" #include "be_aas_funcs.h" #include "be_aas_def.h" diff --git a/code/botlib/be_aas_debug.c b/code/botlib/be_aas_debug.c index a665c0cd..c27475e7 100644 --- a/code/botlib/be_aas_debug.c +++ b/code/botlib/be_aas_debug.c @@ -29,15 +29,15 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * *****************************************************************************/ -#include "../game/q_shared.h" +#include "../qcommon/q_shared.h" #include "l_memory.h" #include "l_script.h" #include "l_precomp.h" #include "l_struct.h" #include "l_libvar.h" #include "aasfile.h" -#include "../game/botlib.h" -#include "../game/be_aas.h" +#include "botlib.h" +#include "be_aas.h" #include "be_interface.h" #include "be_aas_funcs.h" #include "be_aas_def.h" diff --git a/code/botlib/be_aas_entity.c b/code/botlib/be_aas_entity.c index e11356b1..0ec201c9 100644 --- a/code/botlib/be_aas_entity.c +++ b/code/botlib/be_aas_entity.c @@ -29,7 +29,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * *****************************************************************************/ -#include "../game/q_shared.h" +#include "../qcommon/q_shared.h" #include "l_memory.h" #include "l_script.h" #include "l_precomp.h" @@ -37,8 +37,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include "l_utils.h" #include "l_log.h" #include "aasfile.h" -#include "../game/botlib.h" -#include "../game/be_aas.h" +#include "botlib.h" +#include "be_aas.h" #include "be_aas_funcs.h" #include "be_interface.h" #include "be_aas_def.h" diff --git a/code/botlib/be_aas_file.c b/code/botlib/be_aas_file.c index f73c9622..6d4103a5 100644 --- a/code/botlib/be_aas_file.c +++ b/code/botlib/be_aas_file.c @@ -29,7 +29,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * *****************************************************************************/ -#include "../game/q_shared.h" +#include "../qcommon/q_shared.h" #include "l_memory.h" #include "l_script.h" #include "l_precomp.h" @@ -37,8 +37,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include "l_libvar.h" #include "l_utils.h" #include "aasfile.h" -#include "../game/botlib.h" -#include "../game/be_aas.h" +#include "botlib.h" +#include "be_aas.h" #include "be_aas_funcs.h" #include "be_interface.h" #include "be_aas_def.h" diff --git a/code/botlib/be_aas_main.c b/code/botlib/be_aas_main.c index dac1ce35..ad04ef7a 100644 --- a/code/botlib/be_aas_main.c +++ b/code/botlib/be_aas_main.c @@ -29,7 +29,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * *****************************************************************************/ -#include "../game/q_shared.h" +#include "../qcommon/q_shared.h" #include "l_memory.h" #include "l_libvar.h" #include "l_utils.h" @@ -38,8 +38,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include "l_struct.h" #include "l_log.h" #include "aasfile.h" -#include "../game/botlib.h" -#include "../game/be_aas.h" +#include "botlib.h" +#include "be_aas.h" #include "be_aas_funcs.h" #include "be_interface.h" #include "be_aas_def.h" diff --git a/code/botlib/be_aas_move.c b/code/botlib/be_aas_move.c index 3433153f..5b3ac1f1 100644 --- a/code/botlib/be_aas_move.c +++ b/code/botlib/be_aas_move.c @@ -29,15 +29,15 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * *****************************************************************************/ -#include "../game/q_shared.h" +#include "../qcommon/q_shared.h" #include "l_memory.h" #include "l_script.h" #include "l_precomp.h" #include "l_struct.h" #include "l_libvar.h" #include "aasfile.h" -#include "../game/botlib.h" -#include "../game/be_aas.h" +#include "botlib.h" +#include "be_aas.h" #include "be_aas_funcs.h" #include "be_aas_def.h" diff --git a/code/botlib/be_aas_optimize.c b/code/botlib/be_aas_optimize.c index 605dc4db..48b6c90d 100644 --- a/code/botlib/be_aas_optimize.c +++ b/code/botlib/be_aas_optimize.c @@ -30,15 +30,15 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * *****************************************************************************/ -#include "../game/q_shared.h" +#include "../qcommon/q_shared.h" #include "l_libvar.h" #include "l_memory.h" #include "l_script.h" #include "l_precomp.h" #include "l_struct.h" #include "aasfile.h" -#include "../game/botlib.h" -#include "../game/be_aas.h" +#include "botlib.h" +#include "be_aas.h" #include "be_aas_funcs.h" #include "be_interface.h" #include "be_aas_def.h" diff --git a/code/botlib/be_aas_reach.c b/code/botlib/be_aas_reach.c index f26523a7..4b7f8eeb 100644 --- a/code/botlib/be_aas_reach.c +++ b/code/botlib/be_aas_reach.c @@ -29,7 +29,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * *****************************************************************************/ -#include "../game/q_shared.h" +#include "../qcommon/q_shared.h" #include "l_log.h" #include "l_memory.h" #include "l_script.h" @@ -37,8 +37,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include "l_precomp.h" #include "l_struct.h" #include "aasfile.h" -#include "../game/botlib.h" -#include "../game/be_aas.h" +#include "botlib.h" +#include "be_aas.h" #include "be_aas_funcs.h" #include "be_aas_def.h" diff --git a/code/botlib/be_aas_route.c b/code/botlib/be_aas_route.c index 642be81e..9275bf22 100644 --- a/code/botlib/be_aas_route.c +++ b/code/botlib/be_aas_route.c @@ -29,7 +29,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * *****************************************************************************/ -#include "../game/q_shared.h" +#include "../qcommon/q_shared.h" #include "l_utils.h" #include "l_memory.h" #include "l_log.h" @@ -39,8 +39,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include "l_precomp.h" #include "l_struct.h" #include "aasfile.h" -#include "../game/botlib.h" -#include "../game/be_aas.h" +#include "botlib.h" +#include "be_aas.h" #include "be_aas_funcs.h" #include "be_interface.h" #include "be_aas_def.h" diff --git a/code/botlib/be_aas_routealt.c b/code/botlib/be_aas_routealt.c index 956302de..20705db3 100644 --- a/code/botlib/be_aas_routealt.c +++ b/code/botlib/be_aas_routealt.c @@ -29,7 +29,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * *****************************************************************************/ -#include "../game/q_shared.h" +#include "../qcommon/q_shared.h" #include "l_utils.h" #include "l_memory.h" #include "l_log.h" @@ -37,8 +37,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include "l_precomp.h" #include "l_struct.h" #include "aasfile.h" -#include "../game/botlib.h" -#include "../game/be_aas.h" +#include "botlib.h" +#include "be_aas.h" #include "be_aas_funcs.h" #include "be_interface.h" #include "be_aas_def.h" diff --git a/code/botlib/be_aas_sample.c b/code/botlib/be_aas_sample.c index f12b5e07..a2f0d0b2 100644 --- a/code/botlib/be_aas_sample.c +++ b/code/botlib/be_aas_sample.c @@ -29,7 +29,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * *****************************************************************************/ -#include "../game/q_shared.h" +#include "../qcommon/q_shared.h" #include "l_memory.h" #include "l_script.h" #include "l_precomp.h" @@ -38,8 +38,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include "l_libvar.h" #endif #include "aasfile.h" -#include "../game/botlib.h" -#include "../game/be_aas.h" +#include "botlib.h" +#include "be_aas.h" #include "be_interface.h" #include "be_aas_funcs.h" #include "be_aas_def.h" diff --git a/code/botlib/be_ai_char.c b/code/botlib/be_ai_char.c index ea34030c..778a70d8 100644 --- a/code/botlib/be_ai_char.c +++ b/code/botlib/be_ai_char.c @@ -29,7 +29,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * *****************************************************************************/ -#include "../game/q_shared.h" +#include "../qcommon/q_shared.h" #include "l_log.h" #include "l_memory.h" #include "l_utils.h" @@ -38,11 +38,11 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include "l_struct.h" #include "l_libvar.h" #include "aasfile.h" -#include "../game/botlib.h" -#include "../game/be_aas.h" +#include "botlib.h" +#include "be_aas.h" #include "be_aas_funcs.h" #include "be_interface.h" -#include "../game/be_ai_char.h" +#include "be_ai_char.h" #define MAX_CHARACTERISTICS 80 diff --git a/code/game/be_ai_char.h b/code/botlib/be_ai_char.h similarity index 100% rename from code/game/be_ai_char.h rename to code/botlib/be_ai_char.h diff --git a/code/botlib/be_ai_chat.c b/code/botlib/be_ai_chat.c index 7c719ddd..a05a8ebe 100644 --- a/code/botlib/be_ai_chat.c +++ b/code/botlib/be_ai_chat.c @@ -29,7 +29,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * *****************************************************************************/ -#include "../game/q_shared.h" +#include "../qcommon/q_shared.h" #include "l_memory.h" #include "l_libvar.h" #include "l_script.h" @@ -38,12 +38,12 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include "l_utils.h" #include "l_log.h" #include "aasfile.h" -#include "../game/botlib.h" -#include "../game/be_aas.h" +#include "botlib.h" +#include "be_aas.h" #include "be_aas_funcs.h" #include "be_interface.h" -#include "../game/be_ea.h" -#include "../game/be_ai_chat.h" +#include "be_ea.h" +#include "be_ai_chat.h" //escape character diff --git a/code/game/be_ai_chat.h b/code/botlib/be_ai_chat.h similarity index 100% rename from code/game/be_ai_chat.h rename to code/botlib/be_ai_chat.h diff --git a/code/botlib/be_ai_gen.c b/code/botlib/be_ai_gen.c index b8977385..e71c8cfa 100644 --- a/code/botlib/be_ai_gen.c +++ b/code/botlib/be_ai_gen.c @@ -29,7 +29,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * *****************************************************************************/ -#include "../game/q_shared.h" +#include "../qcommon/q_shared.h" #include "l_memory.h" #include "l_log.h" #include "l_utils.h" @@ -37,11 +37,11 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include "l_precomp.h" #include "l_struct.h" #include "aasfile.h" -#include "../game/botlib.h" -#include "../game/be_aas.h" +#include "botlib.h" +#include "be_aas.h" #include "be_aas_funcs.h" #include "be_interface.h" -#include "../game/be_ai_gen.h" +#include "be_ai_gen.h" //=========================================================================== // diff --git a/code/game/be_ai_gen.h b/code/botlib/be_ai_gen.h similarity index 100% rename from code/game/be_ai_gen.h rename to code/botlib/be_ai_gen.h diff --git a/code/botlib/be_ai_goal.c b/code/botlib/be_ai_goal.c index c3f721aa..4d53e6cb 100644 --- a/code/botlib/be_ai_goal.c +++ b/code/botlib/be_ai_goal.c @@ -29,7 +29,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * *****************************************************************************/ -#include "../game/q_shared.h" +#include "../qcommon/q_shared.h" #include "l_utils.h" #include "l_libvar.h" #include "l_memory.h" @@ -38,13 +38,13 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include "l_precomp.h" #include "l_struct.h" #include "aasfile.h" -#include "../game/botlib.h" -#include "../game/be_aas.h" +#include "botlib.h" +#include "be_aas.h" #include "be_aas_funcs.h" #include "be_interface.h" #include "be_ai_weight.h" -#include "../game/be_ai_goal.h" -#include "../game/be_ai_move.h" +#include "be_ai_goal.h" +#include "be_ai_move.h" //#define DEBUG_AI_GOAL #ifdef RANDOMIZE diff --git a/code/game/be_ai_goal.h b/code/botlib/be_ai_goal.h similarity index 100% rename from code/game/be_ai_goal.h rename to code/botlib/be_ai_goal.h diff --git a/code/botlib/be_ai_move.c b/code/botlib/be_ai_move.c index 30eefc7d..02b8e4aa 100644 --- a/code/botlib/be_ai_move.c +++ b/code/botlib/be_ai_move.c @@ -29,7 +29,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * *****************************************************************************/ -#include "../game/q_shared.h" +#include "../qcommon/q_shared.h" #include "l_memory.h" #include "l_libvar.h" #include "l_utils.h" @@ -37,21 +37,21 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include "l_precomp.h" #include "l_struct.h" #include "aasfile.h" -#include "../game/botlib.h" -#include "../game/be_aas.h" +#include "botlib.h" +#include "be_aas.h" #include "be_aas_funcs.h" #include "be_interface.h" -#include "../game/be_ea.h" -#include "../game/be_ai_goal.h" -#include "../game/be_ai_move.h" +#include "be_ea.h" +#include "be_ai_goal.h" +#include "be_ai_move.h" //#define DEBUG_AI_MOVE //#define DEBUG_ELEVATOR //#define DEBUG_GRAPPLE -// bk001204 - redundant bot_avoidspot_t, see ../game/be_ai_move.h +// bk001204 - redundant bot_avoidspot_t, see be_ai_move.h //movement state //NOTE: the moveflags MFL_ONGROUND, MFL_TELEPORTED, MFL_WATERJUMP and diff --git a/code/game/be_ai_move.h b/code/botlib/be_ai_move.h similarity index 100% rename from code/game/be_ai_move.h rename to code/botlib/be_ai_move.h diff --git a/code/botlib/be_ai_weap.c b/code/botlib/be_ai_weap.c index 22d989e2..a6fddf8b 100644 --- a/code/botlib/be_ai_weap.c +++ b/code/botlib/be_ai_weap.c @@ -29,7 +29,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * *****************************************************************************/ -#include "../game/q_shared.h" +#include "../qcommon/q_shared.h" #include "l_libvar.h" #include "l_log.h" #include "l_memory.h" @@ -38,12 +38,12 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include "l_precomp.h" #include "l_struct.h" #include "aasfile.h" -#include "../game/botlib.h" -#include "../game/be_aas.h" +#include "botlib.h" +#include "be_aas.h" #include "be_aas_funcs.h" #include "be_interface.h" #include "be_ai_weight.h" //fuzzy weights -#include "../game/be_ai_weap.h" +#include "be_ai_weap.h" //#define DEBUG_AI_WEAP diff --git a/code/game/be_ai_weap.h b/code/botlib/be_ai_weap.h similarity index 100% rename from code/game/be_ai_weap.h rename to code/botlib/be_ai_weap.h diff --git a/code/botlib/be_ai_weight.c b/code/botlib/be_ai_weight.c index 92125199..0e239e46 100644 --- a/code/botlib/be_ai_weight.c +++ b/code/botlib/be_ai_weight.c @@ -29,7 +29,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * *****************************************************************************/ -#include "../game/q_shared.h" +#include "../qcommon/q_shared.h" #include "l_memory.h" #include "l_log.h" #include "l_utils.h" @@ -38,8 +38,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include "l_struct.h" #include "l_libvar.h" #include "aasfile.h" -#include "../game/botlib.h" -#include "../game/be_aas.h" +#include "botlib.h" +#include "be_aas.h" #include "be_aas_funcs.h" #include "be_interface.h" #include "be_ai_weight.h" diff --git a/code/botlib/be_ea.c b/code/botlib/be_ea.c index 5c0dd6ce..918a455f 100644 --- a/code/botlib/be_ea.c +++ b/code/botlib/be_ea.c @@ -29,12 +29,12 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * *****************************************************************************/ -#include "../game/q_shared.h" +#include "../qcommon/q_shared.h" #include "l_memory.h" #include "l_script.h" #include "l_precomp.h" #include "l_struct.h" -#include "../game/botlib.h" +#include "botlib.h" #include "be_interface.h" #define MAX_USERMOVE 400 diff --git a/code/game/be_ea.h b/code/botlib/be_ea.h similarity index 100% rename from code/game/be_ea.h rename to code/botlib/be_ea.h diff --git a/code/botlib/be_interface.c b/code/botlib/be_interface.c index b4f2d3c2..efff32f5 100644 --- a/code/botlib/be_interface.c +++ b/code/botlib/be_interface.c @@ -29,7 +29,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * *****************************************************************************/ -#include "../game/q_shared.h" +#include "../qcommon/q_shared.h" #include "l_memory.h" #include "l_log.h" #include "l_libvar.h" @@ -37,20 +37,20 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include "l_precomp.h" #include "l_struct.h" #include "aasfile.h" -#include "../game/botlib.h" -#include "../game/be_aas.h" +#include "botlib.h" +#include "be_aas.h" #include "be_aas_funcs.h" #include "be_aas_def.h" #include "be_interface.h" -#include "../game/be_ea.h" +#include "be_ea.h" #include "be_ai_weight.h" -#include "../game/be_ai_goal.h" -#include "../game/be_ai_move.h" -#include "../game/be_ai_weap.h" -#include "../game/be_ai_chat.h" -#include "../game/be_ai_char.h" -#include "../game/be_ai_gen.h" +#include "be_ai_goal.h" +#include "be_ai_move.h" +#include "be_ai_weap.h" +#include "be_ai_chat.h" +#include "be_ai_char.h" +#include "be_ai_gen.h" //library globals in a structure botlib_globals_t botlibglobals; diff --git a/code/game/botlib.h b/code/botlib/botlib.h similarity index 100% rename from code/game/botlib.h rename to code/botlib/botlib.h diff --git a/code/botlib/l_crc.c b/code/botlib/l_crc.c index 8b1067bd..b2700455 100644 --- a/code/botlib/l_crc.c +++ b/code/botlib/l_crc.c @@ -33,8 +33,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include #include -#include "../game/q_shared.h" -#include "../game/botlib.h" +#include "../qcommon/q_shared.h" +#include "botlib.h" #include "be_interface.h" //for botimport.Print diff --git a/code/botlib/l_libvar.c b/code/botlib/l_libvar.c index a8629c81..abd17bd1 100644 --- a/code/botlib/l_libvar.c +++ b/code/botlib/l_libvar.c @@ -29,7 +29,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * *****************************************************************************/ -#include "../game/q_shared.h" +#include "../qcommon/q_shared.h" #include "l_memory.h" #include "l_libvar.h" diff --git a/code/botlib/l_log.c b/code/botlib/l_log.c index 7b1a346a..bd622443 100644 --- a/code/botlib/l_log.c +++ b/code/botlib/l_log.c @@ -33,8 +33,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include #include -#include "../game/q_shared.h" -#include "../game/botlib.h" +#include "../qcommon/q_shared.h" +#include "botlib.h" #include "be_interface.h" //for botimport.Print #include "l_libvar.h" diff --git a/code/botlib/l_memory.c b/code/botlib/l_memory.c index 7bc12f69..9cdd408a 100644 --- a/code/botlib/l_memory.c +++ b/code/botlib/l_memory.c @@ -29,8 +29,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * *****************************************************************************/ -#include "../game/q_shared.h" -#include "../game/botlib.h" +#include "../qcommon/q_shared.h" +#include "botlib.h" #include "l_log.h" #include "be_interface.h" diff --git a/code/botlib/l_precomp.c b/code/botlib/l_precomp.c index 5122931a..54199c79 100644 --- a/code/botlib/l_precomp.c +++ b/code/botlib/l_precomp.c @@ -53,8 +53,8 @@ typedef enum {qfalse, qtrue} qboolean; #endif //SCREWUP #ifdef BOTLIB -#include "../game/q_shared.h" -#include "../game/botlib.h" +#include "../qcommon/q_shared.h" +#include "botlib.h" #include "be_interface.h" #include "l_memory.h" #include "l_script.h" diff --git a/code/botlib/l_script.c b/code/botlib/l_script.c index e782e7fb..c4af6387 100644 --- a/code/botlib/l_script.c +++ b/code/botlib/l_script.c @@ -49,8 +49,8 @@ typedef enum {qfalse, qtrue} qboolean; #ifdef BOTLIB //include files for usage in the bot library -#include "../game/q_shared.h" -#include "../game/botlib.h" +#include "../qcommon/q_shared.h" +#include "botlib.h" #include "be_interface.h" #include "l_script.h" #include "l_memory.h" diff --git a/code/botlib/l_struct.c b/code/botlib/l_struct.c index c628821d..ed47c398 100644 --- a/code/botlib/l_struct.c +++ b/code/botlib/l_struct.c @@ -30,8 +30,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA *****************************************************************************/ #ifdef BOTLIB -#include "../game/q_shared.h" -#include "../game/botlib.h" //for the include of be_interface.h +#include "../qcommon/q_shared.h" +#include "botlib.h" //for the include of be_interface.h #include "l_script.h" #include "l_precomp.h" #include "l_struct.h" diff --git a/code/bspc/aas_create.c b/code/bspc/aas_create.c index 17053623..733724b5 100644 --- a/code/bspc/aas_create.c +++ b/code/bspc/aas_create.c @@ -30,7 +30,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include "aas_edgemelting.h" #include "aas_prunenodes.h" #include "aas_cfg.h" -#include "../game/surfaceflags.h" +#include "../qcommon/surfaceflags.h" //#define AW_DEBUG //#define L_DEBUG diff --git a/code/bspc/aas_map.c b/code/bspc/aas_map.c index 10c616a2..7125a927 100644 --- a/code/bspc/aas_map.c +++ b/code/bspc/aas_map.c @@ -25,7 +25,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include "../botlib/aasfile.h" //aas_bbox_t #include "aas_store.h" //AAS_MAX_BBOXES #include "aas_cfg.h" -#include "../game/surfaceflags.h" +#include "../qcommon/surfaceflags.h" #define SPAWNFLAG_NOT_EASY 0x00000100 #define SPAWNFLAG_NOT_MEDIUM 0x00000200 diff --git a/code/bspc/aas_store.h b/code/bspc/aas_store.h index 063adbed..58ea1c15 100644 --- a/code/bspc/aas_store.h +++ b/code/bspc/aas_store.h @@ -36,7 +36,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #define AAS_MAX_CLUSTERS 65536 #define BSPCINCLUDE -#include "../game/be_aas.h" +#include "../botlib/be_aas.h" #include "../botlib/be_aas_def.h" /* diff --git a/code/bspc/be_aas_bspc.c b/code/bspc/be_aas_bspc.c index 9473287b..a569eb71 100644 --- a/code/bspc/be_aas_bspc.c +++ b/code/bspc/be_aas_bspc.c @@ -20,7 +20,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA =========================================================================== */ -#include "../game/q_shared.h" +#include "../qcommon/q_shared.h" #include "../bspc/l_log.h" #include "../bspc/l_qfiles.h" #include "../botlib/l_memory.h" @@ -28,8 +28,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include "../botlib/l_precomp.h" #include "../botlib/l_struct.h" #include "../botlib/aasfile.h" -#include "../game/botlib.h" -#include "../game/be_aas.h" +#include "../botlib/botlib.h" +#include "../botlib/be_aas.h" #include "../botlib/be_aas_def.h" #include "../qcommon/cm_public.h" diff --git a/code/bspc/map_q3.c b/code/bspc/map_q3.c index 375100cb..aed76ea7 100644 --- a/code/bspc/map_q3.c +++ b/code/bspc/map_q3.c @@ -28,7 +28,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include "aas_map.h" //AAS_CreateMapBrushes #include "l_bsp_q3.h" #include "../qcommon/cm_patch.h" -#include "../game/surfaceflags.h" +#include "../qcommon/surfaceflags.h" #define NODESTACKSIZE 1024 diff --git a/code/cgame/cg_local.h b/code/cgame/cg_local.h index 27ec4fc9..be502fc7 100644 --- a/code/cgame/cg_local.h +++ b/code/cgame/cg_local.h @@ -20,8 +20,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA =========================================================================== */ // -#include "../game/q_shared.h" -#include "tr_types.h" +#include "../qcommon/q_shared.h" +#include "../renderer/tr_types.h" #include "../game/bg_public.h" #include "cg_public.h" diff --git a/code/client/cl_cgame.c b/code/client/cl_cgame.c index b6c0855e..09395e50 100644 --- a/code/client/cl_cgame.c +++ b/code/client/cl_cgame.c @@ -23,7 +23,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include "client.h" -#include "../game/botlib.h" +#include "../botlib/botlib.h" extern botlib_export_t *botlib_export; diff --git a/code/client/cl_net_chan.c b/code/client/cl_net_chan.c index f18e5651..3e5ab398 100644 --- a/code/client/cl_net_chan.c +++ b/code/client/cl_net_chan.c @@ -20,7 +20,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA =========================================================================== */ -#include "../game/q_shared.h" +#include "../qcommon/q_shared.h" #include "../qcommon/qcommon.h" #include "client.h" diff --git a/code/client/cl_ui.c b/code/client/cl_ui.c index cda68e24..ab7b62ef 100644 --- a/code/client/cl_ui.c +++ b/code/client/cl_ui.c @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include "client.h" -#include "../game/botlib.h" +#include "../botlib/botlib.h" extern botlib_export_t *botlib_export; diff --git a/code/client/client.h b/code/client/client.h index eace49ce..ebe33748 100644 --- a/code/client/client.h +++ b/code/client/client.h @@ -21,7 +21,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ // client.h -- primary header for client -#include "../game/q_shared.h" +#include "../qcommon/q_shared.h" #include "../qcommon/qcommon.h" #include "../renderer/tr_public.h" #include "../ui/ui_public.h" diff --git a/code/q3_ui/keycodes.h b/code/client/keycodes.h similarity index 100% rename from code/q3_ui/keycodes.h rename to code/client/keycodes.h diff --git a/code/client/keys.h b/code/client/keys.h index 3a131072..d55cb850 100644 --- a/code/client/keys.h +++ b/code/client/keys.h @@ -19,7 +19,7 @@ along with Foobar; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA =========================================================================== */ -#include "../ui/keycodes.h" +#include "keycodes.h" #define MAX_KEYS 256 diff --git a/code/client/snd_local.h b/code/client/snd_local.h index 6131ad3f..1c272fe4 100644 --- a/code/client/snd_local.h +++ b/code/client/snd_local.h @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA // snd_local.h -- private sound definations -#include "../game/q_shared.h" +#include "../qcommon/q_shared.h" #include "../qcommon/qcommon.h" #include "snd_public.h" diff --git a/code/game/ai_chat.c b/code/game/ai_chat.c index ae2554e0..7dc7fc33 100644 --- a/code/game/ai_chat.c +++ b/code/game/ai_chat.c @@ -31,15 +31,15 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA *****************************************************************************/ #include "g_local.h" -#include "botlib.h" -#include "be_aas.h" -#include "be_ea.h" -#include "be_ai_char.h" -#include "be_ai_chat.h" -#include "be_ai_gen.h" -#include "be_ai_goal.h" -#include "be_ai_move.h" -#include "be_ai_weap.h" +#include "../botlib/botlib.h" +#include "../botlib/be_aas.h" +#include "../botlib/be_ea.h" +#include "../botlib/be_ai_char.h" +#include "../botlib/be_ai_chat.h" +#include "../botlib/be_ai_gen.h" +#include "../botlib/be_ai_goal.h" +#include "../botlib/be_ai_move.h" +#include "../botlib/be_ai_weap.h" // #include "ai_main.h" #include "ai_dmq3.h" diff --git a/code/game/ai_cmd.c b/code/game/ai_cmd.c index fadf07f6..2b89a1d2 100644 --- a/code/game/ai_cmd.c +++ b/code/game/ai_cmd.c @@ -31,15 +31,15 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA *****************************************************************************/ #include "g_local.h" -#include "botlib.h" -#include "be_aas.h" -#include "be_ea.h" -#include "be_ai_char.h" -#include "be_ai_chat.h" -#include "be_ai_gen.h" -#include "be_ai_goal.h" -#include "be_ai_move.h" -#include "be_ai_weap.h" +#include "../botlib/botlib.h" +#include "../botlib/be_aas.h" +#include "../botlib/be_ea.h" +#include "../botlib/be_ai_char.h" +#include "../botlib/be_ai_chat.h" +#include "../botlib/be_ai_gen.h" +#include "../botlib/be_ai_goal.h" +#include "../botlib/be_ai_move.h" +#include "../botlib/be_ai_weap.h" // #include "ai_main.h" #include "ai_dmq3.h" diff --git a/code/game/ai_dmnet.c b/code/game/ai_dmnet.c index a791eddc..72306769 100644 --- a/code/game/ai_dmnet.c +++ b/code/game/ai_dmnet.c @@ -31,15 +31,15 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA *****************************************************************************/ #include "g_local.h" -#include "botlib.h" -#include "be_aas.h" -#include "be_ea.h" -#include "be_ai_char.h" -#include "be_ai_chat.h" -#include "be_ai_gen.h" -#include "be_ai_goal.h" -#include "be_ai_move.h" -#include "be_ai_weap.h" +#include "../botlib/botlib.h" +#include "../botlib/be_aas.h" +#include "../botlib/be_ea.h" +#include "../botlib/be_ai_char.h" +#include "../botlib/be_ai_chat.h" +#include "../botlib/be_ai_gen.h" +#include "../botlib/be_ai_goal.h" +#include "../botlib/be_ai_move.h" +#include "../botlib/be_ai_weap.h" // #include "ai_main.h" #include "ai_dmq3.h" @@ -56,7 +56,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA // for the voice chats #include "../../ui/menudef.h" -//goal flag, see be_ai_goal.h for the other GFL_* +//goal flag, see ../botlib/be_ai_goal.h for the other GFL_* #define GFL_AIR 128 int numnodeswitches; diff --git a/code/game/ai_dmq3.c b/code/game/ai_dmq3.c index c373df82..b02d67ce 100644 --- a/code/game/ai_dmq3.c +++ b/code/game/ai_dmq3.c @@ -32,15 +32,15 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include "g_local.h" -#include "botlib.h" -#include "be_aas.h" -#include "be_ea.h" -#include "be_ai_char.h" -#include "be_ai_chat.h" -#include "be_ai_gen.h" -#include "be_ai_goal.h" -#include "be_ai_move.h" -#include "be_ai_weap.h" +#include "../botlib/botlib.h" +#include "../botlib/be_aas.h" +#include "../botlib/be_ea.h" +#include "../botlib/be_ai_char.h" +#include "../botlib/be_ai_chat.h" +#include "../botlib/be_ai_gen.h" +#include "../botlib/be_ai_goal.h" +#include "../botlib/be_ai_move.h" +#include "../botlib/be_ai_weap.h" // #include "ai_main.h" #include "ai_dmq3.h" diff --git a/code/game/ai_main.c b/code/game/ai_main.c index 63de0ce9..b88d96fb 100644 --- a/code/game/ai_main.c +++ b/code/game/ai_main.c @@ -32,16 +32,16 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include "g_local.h" -#include "q_shared.h" -#include "botlib.h" //bot lib interface -#include "be_aas.h" -#include "be_ea.h" -#include "be_ai_char.h" -#include "be_ai_chat.h" -#include "be_ai_gen.h" -#include "be_ai_goal.h" -#include "be_ai_move.h" -#include "be_ai_weap.h" +#include "../qcommon/q_shared.h" +#include "../botlib/botlib.h" //bot lib interface +#include "../botlib/be_aas.h" +#include "../botlib/be_ea.h" +#include "../botlib/be_ai_char.h" +#include "../botlib/be_ai_chat.h" +#include "../botlib/be_ai_gen.h" +#include "../botlib/be_ai_goal.h" +#include "../botlib/be_ai_move.h" +#include "../botlib/be_ai_weap.h" // #include "ai_main.h" #include "ai_dmq3.h" diff --git a/code/game/ai_team.c b/code/game/ai_team.c index 44250d87..742c24f9 100644 --- a/code/game/ai_team.c +++ b/code/game/ai_team.c @@ -31,15 +31,15 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA *****************************************************************************/ #include "g_local.h" -#include "botlib.h" -#include "be_aas.h" -#include "be_ea.h" -#include "be_ai_char.h" -#include "be_ai_chat.h" -#include "be_ai_gen.h" -#include "be_ai_goal.h" -#include "be_ai_move.h" -#include "be_ai_weap.h" +#include "../botlib/botlib.h" +#include "../botlib/be_aas.h" +#include "../botlib/be_ea.h" +#include "../botlib/be_ai_char.h" +#include "../botlib/be_ai_chat.h" +#include "../botlib/be_ai_gen.h" +#include "../botlib/be_ai_goal.h" +#include "../botlib/be_ai_move.h" +#include "../botlib/be_ai_weap.h" // #include "ai_main.h" #include "ai_dmq3.h" diff --git a/code/game/ai_vcmd.c b/code/game/ai_vcmd.c index 026bbf03..c99d2c31 100644 --- a/code/game/ai_vcmd.c +++ b/code/game/ai_vcmd.c @@ -31,15 +31,15 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA *****************************************************************************/ #include "g_local.h" -#include "botlib.h" -#include "be_aas.h" -#include "be_ea.h" -#include "be_ai_char.h" -#include "be_ai_chat.h" -#include "be_ai_gen.h" -#include "be_ai_goal.h" -#include "be_ai_move.h" -#include "be_ai_weap.h" +#include "../botlib/botlib.h" +#include "../botlib/be_aas.h" +#include "../botlib/be_ea.h" +#include "../botlib/be_ai_char.h" +#include "../botlib/be_ai_chat.h" +#include "../botlib/be_ai_gen.h" +#include "../botlib/be_ai_goal.h" +#include "../botlib/be_ai_move.h" +#include "../botlib/be_ai_weap.h" // #include "ai_main.h" #include "ai_dmq3.h" diff --git a/code/game/bg_lib.c b/code/game/bg_lib.c index 140d18a1..b198f72a 100644 --- a/code/game/bg_lib.c +++ b/code/game/bg_lib.c @@ -3,7 +3,7 @@ // bg_lib,c -- standard C library replacement routines used by code // compiled for the virtual machine -#include "q_shared.h" +#include "../qcommon/q_shared.h" /*- * Copyright (c) 1992, 1993 diff --git a/code/game/bg_misc.c b/code/game/bg_misc.c index 2ff7770b..a2049a98 100644 --- a/code/game/bg_misc.c +++ b/code/game/bg_misc.c @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA // // bg_misc.c -- both games misc functions, all completely stateless -#include "q_shared.h" +#include "../qcommon/q_shared.h" #include "bg_public.h" /*QUAKED item_***** ( 0 0 0 ) (-16 -16 -16) (16 16 16) suspended diff --git a/code/game/bg_pmove.c b/code/game/bg_pmove.c index f5f5c687..9fa38871 100644 --- a/code/game/bg_pmove.c +++ b/code/game/bg_pmove.c @@ -23,7 +23,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA // bg_pmove.c -- both games player movement code // takes a playerstate and a usercmd as input and returns a modifed playerstate -#include "q_shared.h" +#include "../qcommon/q_shared.h" #include "bg_public.h" #include "bg_local.h" diff --git a/code/game/bg_slidemove.c b/code/game/bg_slidemove.c index 6c957a57..183d6e55 100644 --- a/code/game/bg_slidemove.c +++ b/code/game/bg_slidemove.c @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA // // bg_slidemove.c -- part of bg_pmove functionality -#include "q_shared.h" +#include "../qcommon/q_shared.h" #include "bg_public.h" #include "bg_local.h" diff --git a/code/game/g_local.h b/code/game/g_local.h index 4ae76fcf..7e20d360 100644 --- a/code/game/g_local.h +++ b/code/game/g_local.h @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA // // g_local.h -- local definitions for game module -#include "q_shared.h" +#include "../qcommon/q_shared.h" #include "bg_public.h" #include "g_public.h" diff --git a/code/jpeg-6/jload.c b/code/jpeg-6/jload.c index dc825555..29e750b3 100644 --- a/code/jpeg-6/jload.c +++ b/code/jpeg-6/jload.c @@ -1,5 +1,5 @@ -#include "../game/q_shared.h" +#include "../qcommon/q_shared.h" #include "../qcommon/qcommon.h" /* diff --git a/code/null/mac_net.c b/code/null/mac_net.c index 5dbb5ddf..486cacd5 100644 --- a/code/null/mac_net.c +++ b/code/null/mac_net.c @@ -20,7 +20,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA =========================================================================== */ -#include "../game/q_shared.h" +#include "../qcommon/q_shared.h" #include "../qcommon/qcommon.h" /* diff --git a/code/q3_ui/ui_local.h b/code/q3_ui/ui_local.h index 5d66770c..e1401904 100644 --- a/code/q3_ui/ui_local.h +++ b/code/q3_ui/ui_local.h @@ -23,14 +23,14 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #ifndef __UI_LOCAL_H__ #define __UI_LOCAL_H__ -#include "../game/q_shared.h" -#include "../cgame/tr_types.h" +#include "../qcommon/q_shared.h" +#include "../renderer/tr_types.h" //NOTE: include the ui_public.h from the new UI #include "../ui/ui_public.h" // bk001205 - yes, do have to use this //redefine to old API version #undef UI_API_VERSION #define UI_API_VERSION 4 -#include "keycodes.h" +#include "../client/keycodes.h" #include "../game/bg_public.h" typedef void (*voidfunc_f)(void); diff --git a/code/qcommon/cm_local.h b/code/qcommon/cm_local.h index 1c3a6328..492a1bc0 100644 --- a/code/qcommon/cm_local.h +++ b/code/qcommon/cm_local.h @@ -20,7 +20,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA =========================================================================== */ -#include "../game/q_shared.h" +#include "q_shared.h" #include "qcommon.h" #include "cm_polylib.h" diff --git a/code/qcommon/cmd.c b/code/qcommon/cmd.c index 92b6e737..052c4e3a 100644 --- a/code/qcommon/cmd.c +++ b/code/qcommon/cmd.c @@ -21,7 +21,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ // cmd.c -- Quake script command processing module -#include "../game/q_shared.h" +#include "q_shared.h" #include "qcommon.h" #define MAX_CMD_BUFFER 16384 diff --git a/code/qcommon/cmd.c.save b/code/qcommon/cmd.c.save deleted file mode 100644 index 47f8eb97..00000000 --- a/code/qcommon/cmd.c.save +++ /dev/null @@ -1,636 +0,0 @@ -// cmd.c -- Quake script command processing module - -#include "../game/q_shared.h" -#include "qcommon.h" - -#define MAX_CMD_BUFFER 8192 -int cmd_wait; -msg_t cmd_text; -byte cmd_text_buf[MAX_CMD_BUFFER]; -char cmd_defer_text_buf[MAX_CMD_BUFFER]; - - -//============================================================================= - -/* -============ -Cmd_Wait_f - -Causes execution of the remainder of the command buffer to be delayed until -next frame. This allows commands like: -bind g "cmd use rocket ; +attack ; wait ; -attack ; cmd use blaster" -============ -*/ -void Cmd_Wait_f( void ) { - if ( Cmd_Argc() == 2 ) { - cmd_wait = atoi( Cmd_Argv( 1 ) ); - } else { - cmd_wait = 1; - } -} - - -/* -============================================================================= - - COMMAND BUFFER - -============================================================================= -*/ - -/* -============ -Cbuf_Init -============ -*/ -void Cbuf_Init (void) -{ - MSG_Init (&cmd_text, cmd_text_buf, sizeof(cmd_text_buf)); -} - -/* -============ -Cbuf_AddText - -Adds command text at the end of the buffer, does NOT add a final \n -============ -*/ -void Cbuf_AddText( const char *text ) { - int l; - - l = strlen (text); - - if (cmd_text.cursize + l >= cmd_text.maxsize) - { - Com_Printf ("Cbuf_AddText: overflow\n"); - return; - } - MSG_WriteData (&cmd_text, text, strlen (text)); -} - - -/* -============ -Cbuf_InsertText - -Adds command text immediately after the current command -Adds a \n to the text -============ -*/ -void Cbuf_InsertText( const char *text ) { - int len; - int i; - - len = strlen( text ) + 1; - if ( len + cmd_text.cursize > cmd_text.maxsize ) { - Com_Printf( "Cbuf_InsertText overflowed\n" ); - return; - } - - // move the existing command text - for ( i = cmd_text.cursize - 1 ; i >= 0 ; i-- ) { - cmd_text.data[ i + len ] = cmd_text.data[ i ]; - } - - // copy the new text in - memcpy( cmd_text.data, text, len - 1 ); - - // add a \n - cmd_text.data[ len - 1 ] = '\n'; - - cmd_text.cursize += len; -} - - -/* -============ -Cbuf_ExecuteText -============ -*/ -void Cbuf_ExecuteText (int exec_when, const char *text) -{ - switch (exec_when) - { - case EXEC_NOW: - Cmd_ExecuteString (text); - break; - case EXEC_INSERT: - Cbuf_InsertText (text); - break; - case EXEC_APPEND: - Cbuf_AddText (text); - break; - default: - Com_Error (ERR_FATAL, "Cbuf_ExecuteText: bad exec_when"); - } -} - -/* -============ -Cbuf_Execute -============ -*/ -void Cbuf_Execute (void) -{ - int i; - char *text; - char line[MAX_CMD_BUFFER]; - int quotes; - - while (cmd_text.cursize) - { - if ( cmd_wait ) { - // skip out while text still remains in buffer, leaving it - // for next frame - cmd_wait--; - break; - } - - // find a \n or ; line break - text = (char *)cmd_text.data; - - quotes = 0; - for (i=0 ; i< cmd_text.cursize ; i++) - { - if (text[i] == '"') - quotes++; - if ( !(quotes&1) && text[i] == ';') - break; // don't break if inside a quoted string - if (text[i] == '\n' || text[i] == '\r' ) - break; - } - - - memcpy (line, text, i); - line[i] = 0; - -// delete the text from the command buffer and move remaining commands down -// this is necessary because commands (exec) can insert data at the -// beginning of the text buffer - - if (i == cmd_text.cursize) - cmd_text.cursize = 0; - else - { - i++; - cmd_text.cursize -= i; - memmove (text, text+i, cmd_text.cursize); - text[cmd_text.cursize] = 0; - } - -// execute the command line - Cmd_ExecuteString (line); - } -} - - -/* -============================================================================== - - SCRIPT COMMANDS - -============================================================================== -*/ - - -/* -=============== -Cmd_Exec_f -=============== -*/ -void Cmd_Exec_f( void ) { - fileHandle_t f; - int len; - char filename[MAX_QPATH]; - char *buffer; - - if (Cmd_Argc () != 2) { - Com_Printf ("exec : execute a script file\n"); - return; - } - - Q_strncpyz( filename, Cmd_Argv(1), sizeof( filename ) ); - COM_DefaultExtension( filename, sizeof( filename ), ".cfg" ); - len = FS_FOpenFileRead( filename, &f, qfalse ); - if ( len <= 0 ) { - Com_Printf ("Couldn't read %s.\n", filename ); - return; - } - - buffer = Z_Malloc(len+1); - - if (FS_Read(buffer, len, f) == len) { - FS_FCloseFile( f ); - buffer[len] = 0; - Com_Printf ("execing %s\n",Cmd_Argv(1)); - Cbuf_InsertText (buffer); - } - else { - Com_Printf ("couldn't exec %s\n",Cmd_Argv(1)); - } - - Z_Free(buffer); -} - - -/* -=============== -Cmd_Vstr_f - -Inserts the current value of a variable as command text -=============== -*/ -void Cmd_Vstr_f( void ) { - char *v; - - if (Cmd_Argc () != 2) { - Com_Printf ("vstr : execute a variable command\n"); - return; - } - - v = Cvar_VariableString( Cmd_Argv( 1 ) ); - Cbuf_InsertText( va("%s\n", v ) ); -} - - -/* -=============== -Cmd_Echo_f - -Just prints the rest of the line to the console -=============== -*/ -void Cmd_Echo_f (void) -{ - int i; - - for (i=1 ; i= cmd_argc ) { - return ""; - } - return cmd_argv[arg]; -} - -/* -============ -Cmd_ArgvBuffer - -The interpreted versions use this because -they can't have pointers returned to them -============ -*/ -void Cmd_ArgvBuffer( int arg, char *buffer, int bufferLength ) { - Q_strncpyz( buffer, Cmd_Argv( arg ), bufferLength ); -} - - -/* -============ -Cmd_Args - -Returns a single string containing argv(1) to argv(argc()-1) -============ -*/ -char *Cmd_Args( void ) { - static char cmd_args[MAX_STRING_CHARS]; - int i; - - cmd_args[0] = 0; - for ( i = 1 ; i < cmd_argc ; i++ ) { - strcat( cmd_args, cmd_argv[i] ); - if ( i != cmd_argc ) { - strcat( cmd_args, " " ); - } - } - - return cmd_args; -} - - -/* -============ -Cmd_ArgsBuffer - -The interpreted versions use this because -they can't have pointers returned to them -============ -*/ -void Cmd_ArgsBuffer( char *buffer, int bufferLength ) { - Q_strncpyz( buffer, Cmd_Args(), bufferLength ); -} - - -/* -============ -Cmd_TokenizeString - -Parses the given string into command line tokens. -The text is copied to a seperate buffer and 0 characters -are inserted in the apropriate place, The argv array -will point into this temporary buffer. -============ -*/ -void Cmd_TokenizeString( const char *text_in ) { - const char *text; - char *textOut; - - // clear previous args - cmd_argc = 0; - - if ( !text_in ) { - return; - } - - text = text_in; - textOut = cmd_tokenized; - - while ( 1 ) { - if ( cmd_argc == MAX_STRING_TOKENS ) { - return; // this is usually something malicious - } - - while ( 1 ) { - // skip whitespace - while ( *text && *text <= ' ' ) { - text++; - } - if ( !*text ) { - return; // all tokens parsed - } - - // skip // comments - if ( text[0] == '/' && text[1] == '/' ) { - return; // all tokens parsed - } - - // skip /* */ comments - if ( text[0] == '/' && text[1] =='*' ) { - while ( *text && ( text[0] != '*' || text[1] != '/' ) ) { - text++; - } - if ( !*text ) { - return; // all tokens parsed - } - text += 2; - } else { - break; // we are ready to parse a token - } - } - - // handle quoted strings - if ( *text == '"' ) { - cmd_argv[cmd_argc] = textOut; - cmd_argc++; - text++; - while ( *text && *text != '"' ) { - *textOut++ = *text++; - } - *textOut++ = 0; - if ( !*text ) { - return; // all tokens parsed - } - text++; - continue; - } - - // regular token - cmd_argv[cmd_argc] = textOut; - cmd_argc++; - - // skip until whitespace, quote, or command - while ( *text > ' ' ) { - if ( text[0] == '"' ) { - break; - } - - if ( text[0] == '/' && text[1] == '/' ) { - break; - } - - // skip /* */ comments - if ( text[0] == '/' && text[1] =='*' ) { - break; - } - - *textOut++ = *text++; - } - - *textOut++ = 0; - - if ( !*text ) { - return; // all tokens parsed - } - } - -} - - -/* -============ -Cmd_AddCommand -============ -*/ -void Cmd_AddCommand( const char *cmd_name, xcommand_t function ) { - cmd_function_t *cmd; - - // fail if the command already exists - for ( cmd = cmd_functions ; cmd ; cmd=cmd->next ) { - if ( !strcmp( cmd_name, cmd->name ) ) { - // allow completion-only commands to be silently doubled - if ( function != NULL ) { - Com_Printf ("Cmd_AddCommand: %s already defined\n", cmd_name); - } - return; - } - } - - cmd = Z_Malloc (sizeof(cmd_function_t)); - cmd->name = CopyString( cmd_name ); - cmd->function = function; - cmd->next = cmd_functions; - cmd_functions = cmd; -} - -/* -============ -Cmd_RemoveCommand -============ -*/ -void Cmd_RemoveCommand( const char *cmd_name ) { - cmd_function_t *cmd, **back; - - back = &cmd_functions; - while( 1 ) { - cmd = *back; - if ( !cmd ) { - // command wasn't active - return; - } - if ( !strcmp( cmd_name, cmd->name ) ) { - *back = cmd->next; - Z_Free (cmd); - return; - } - back = &cmd->next; - } -} - - -/* -============ -Cmd_CommandCompletion -============ -*/ -void Cmd_CommandCompletion( void(*callback)(const char *s) ) { - cmd_function_t *cmd; - - for (cmd=cmd_functions ; cmd ; cmd=cmd->next) { - callback( cmd->name ); - } -} - - -/* -============ -Cmd_ExecuteString - -A complete command line has been parsed, so try to execute it -============ -*/ -void Cmd_ExecuteString( const char *text ) { - cmd_function_t *cmd, **prev; - - // execute the command line - Cmd_TokenizeString( text ); - if ( !Cmd_Argc() ) { - return; // no tokens - } - - // check registered command functions - for ( prev = &cmd_functions ; *prev ; prev = &cmd->next ) { - cmd = *prev; - if ( !Q_stricmp( cmd_argv[0],cmd->name ) ) { - // rearrange the links so that the command will be - // near the head of the list next time it is used - *prev = cmd->next; - cmd->next = cmd_functions; - cmd_functions = cmd; - - // perform the action - if ( !cmd->function ) { - // let the cgame or game handle it - break; - } else { - cmd->function (); - } - return; - } - } - - // check cvars - if ( Cvar_Command() ) { - return; - } - - // check client game commands - if ( com_cl_running && com_cl_running->integer && CL_GameCommand() ) { - return; - } - - // check server game commands - if ( com_sv_running && com_sv_running->integer && SV_GameCommand() ) { - return; - } - - // check ui commands - if ( com_cl_running && com_cl_running->integer && UI_GameCommand() ) { - return; - } - - // send it as a server command if we are connected - // this will usually result in a chat message - CL_ForwardCommandToServer (); -} - -/* -============ -Cmd_List_f -============ -*/ -void Cmd_List_f (void) -{ - cmd_function_t *cmd; - int i; - char *match; - - if ( Cmd_Argc() > 1 ) { - match = Cmd_Argv( 1 ); - } else { - match = NULL; - } - - i = 0; - for (cmd=cmd_functions ; cmd ; cmd=cmd->next) { - if (match && !Com_Filter(match, cmd->name, qfalse)) continue; - - Com_Printf ("%s\n", cmd->name); - i++; - } - Com_Printf ("%i commands\n", i); -} - -/* -============ -Cmd_Init -============ -*/ -void Cmd_Init (void) { - Cmd_AddCommand ("cmdlist",Cmd_List_f); - Cmd_AddCommand ("exec",Cmd_Exec_f); - Cmd_AddCommand ("vstr",Cmd_Vstr_f); - Cmd_AddCommand ("echo",Cmd_Echo_f); - Cmd_AddCommand ("wait", Cmd_Wait_f); -} - diff --git a/code/qcommon/common.c b/code/qcommon/common.c index ac9b210c..44475274 100644 --- a/code/qcommon/common.c +++ b/code/qcommon/common.c @@ -21,7 +21,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ // common.c -- misc functions used in client and server -#include "../game/q_shared.h" +#include "q_shared.h" #include "qcommon.h" #include #if defined __linux__ || defined MACOS_X || defined __FreeBSD__ diff --git a/code/qcommon/cvar.c b/code/qcommon/cvar.c index 8b38712b..f954f0d4 100644 --- a/code/qcommon/cvar.c +++ b/code/qcommon/cvar.c @@ -21,7 +21,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ // cvar.c -- dynamic variable tracking -#include "../game/q_shared.h" +#include "q_shared.h" #include "qcommon.h" cvar_t *cvar_vars; diff --git a/code/qcommon/files.c b/code/qcommon/files.c index c560cc32..401127f3 100644 --- a/code/qcommon/files.c +++ b/code/qcommon/files.c @@ -29,7 +29,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA *****************************************************************************/ -#include "../game/q_shared.h" +#include "q_shared.h" #include "qcommon.h" #include "unzip.h" diff --git a/code/qcommon/huffman.c b/code/qcommon/huffman.c index 1dcaf3f1..dd8da981 100644 --- a/code/qcommon/huffman.c +++ b/code/qcommon/huffman.c @@ -24,7 +24,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * Compression book. The ranks are not actually stored, but implicitly defined * by the location of a node within a doubly-linked list */ -#include "../game/q_shared.h" +#include "q_shared.h" #include "qcommon.h" static int bloc = 0; diff --git a/code/qcommon/msg.c b/code/qcommon/msg.c index 8c8afe8d..4f918f54 100644 --- a/code/qcommon/msg.c +++ b/code/qcommon/msg.c @@ -19,7 +19,7 @@ along with Foobar; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA =========================================================================== */ -#include "../game/q_shared.h" +#include "q_shared.h" #include "qcommon.h" static huffman_t msgHuff; diff --git a/code/qcommon/net_chan.c b/code/qcommon/net_chan.c index b8a9bc1f..941dda96 100644 --- a/code/qcommon/net_chan.c +++ b/code/qcommon/net_chan.c @@ -20,7 +20,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA =========================================================================== */ -#include "../game/q_shared.h" +#include "q_shared.h" #include "qcommon.h" /* diff --git a/code/game/q_math.c b/code/qcommon/q_math.c similarity index 100% rename from code/game/q_math.c rename to code/qcommon/q_math.c diff --git a/code/game/q_shared.c b/code/qcommon/q_shared.c similarity index 100% rename from code/game/q_shared.c rename to code/qcommon/q_shared.c diff --git a/code/game/q_shared.h b/code/qcommon/q_shared.h similarity index 100% rename from code/game/q_shared.h rename to code/qcommon/q_shared.h diff --git a/code/game/surfaceflags.h b/code/qcommon/surfaceflags.h similarity index 100% rename from code/game/surfaceflags.h rename to code/qcommon/surfaceflags.h diff --git a/code/qcommon/vm_local.h b/code/qcommon/vm_local.h index eb58fff6..952639b4 100644 --- a/code/qcommon/vm_local.h +++ b/code/qcommon/vm_local.h @@ -19,7 +19,7 @@ along with Foobar; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA =========================================================================== */ -#include "../game/q_shared.h" +#include "q_shared.h" #include "qcommon.h" typedef enum { diff --git a/code/renderer/tr_local.h b/code/renderer/tr_local.h index e9de83ad..060b4b57 100644 --- a/code/renderer/tr_local.h +++ b/code/renderer/tr_local.h @@ -24,7 +24,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #ifndef TR_LOCAL_H #define TR_LOCAL_H -#include "../game/q_shared.h" +#include "../qcommon/q_shared.h" #include "../qcommon/qfiles.h" #include "../qcommon/qcommon.h" #include "tr_public.h" diff --git a/code/renderer/tr_public.h b/code/renderer/tr_public.h index fa205310..6dec3a55 100644 --- a/code/renderer/tr_public.h +++ b/code/renderer/tr_public.h @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #ifndef __TR_PUBLIC_H #define __TR_PUBLIC_H -#include "../cgame/tr_types.h" +#include "tr_types.h" #define REF_API_VERSION 8 diff --git a/code/cgame/tr_types.h b/code/renderer/tr_types.h similarity index 100% rename from code/cgame/tr_types.h rename to code/renderer/tr_types.h diff --git a/code/server/server.h b/code/server/server.h index b025c982..e58bddbd 100644 --- a/code/server/server.h +++ b/code/server/server.h @@ -21,7 +21,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ // server.h -#include "../game/q_shared.h" +#include "../qcommon/q_shared.h" #include "../qcommon/qcommon.h" #include "../game/g_public.h" #include "../game/bg_public.h" diff --git a/code/server/sv_bot.c b/code/server/sv_bot.c index 0442d469..2923c4f4 100644 --- a/code/server/sv_bot.c +++ b/code/server/sv_bot.c @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA // sv_bot.c #include "server.h" -#include "../game/botlib.h" +#include "../botlib/botlib.h" typedef struct bot_debugpoly_s { diff --git a/code/server/sv_game.c b/code/server/sv_game.c index 86b1ee18..42e8b83c 100644 --- a/code/server/sv_game.c +++ b/code/server/sv_game.c @@ -23,7 +23,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include "server.h" -#include "../game/botlib.h" +#include "../botlib/botlib.h" botlib_export_t *botlib_export; diff --git a/code/server/sv_net_chan.c b/code/server/sv_net_chan.c index feab2710..701ea538 100644 --- a/code/server/sv_net_chan.c +++ b/code/server/sv_net_chan.c @@ -20,7 +20,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA =========================================================================== */ -#include "../game/q_shared.h" +#include "../qcommon/q_shared.h" #include "../qcommon/qcommon.h" #include "server.h" diff --git a/code/ui/keycodes.h b/code/ui/keycodes.h deleted file mode 100644 index 8f58482b..00000000 --- a/code/ui/keycodes.h +++ /dev/null @@ -1,163 +0,0 @@ -/* -=========================================================================== -Copyright (C) 1999-2005 Id Software, Inc. - -This file is part of Quake III Arena source code. - -Quake III Arena source code 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. - -Quake III Arena source code 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 Foobar; if not, write to the Free Software -Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -=========================================================================== -*/ -// -#ifndef __KEYCODES_H__ -#define __KEYCODES_H__ - -// -// these are the key numbers that should be passed to KeyEvent -// - -// normal keys should be passed as lowercased ascii - -typedef enum { - K_TAB = 9, - K_ENTER = 13, - K_ESCAPE = 27, - K_SPACE = 32, - - K_BACKSPACE = 127, - - K_COMMAND = 128, - K_CAPSLOCK, - K_POWER, - K_PAUSE, - - K_UPARROW, - K_DOWNARROW, - K_LEFTARROW, - K_RIGHTARROW, - - K_ALT, - K_CTRL, - K_SHIFT, - K_INS, - K_DEL, - K_PGDN, - K_PGUP, - K_HOME, - K_END, - - K_F1, - K_F2, - K_F3, - K_F4, - K_F5, - K_F6, - K_F7, - K_F8, - K_F9, - K_F10, - K_F11, - K_F12, - K_F13, - K_F14, - K_F15, - - K_KP_HOME, - K_KP_UPARROW, - K_KP_PGUP, - K_KP_LEFTARROW, - K_KP_5, - K_KP_RIGHTARROW, - K_KP_END, - K_KP_DOWNARROW, - K_KP_PGDN, - K_KP_ENTER, - K_KP_INS, - K_KP_DEL, - K_KP_SLASH, - K_KP_MINUS, - K_KP_PLUS, - K_KP_NUMLOCK, - K_KP_STAR, - K_KP_EQUALS, - - K_MOUSE1, - K_MOUSE2, - K_MOUSE3, - K_MOUSE4, - K_MOUSE5, - - K_MWHEELDOWN, - K_MWHEELUP, - - K_JOY1, - K_JOY2, - K_JOY3, - K_JOY4, - K_JOY5, - K_JOY6, - K_JOY7, - K_JOY8, - K_JOY9, - K_JOY10, - K_JOY11, - K_JOY12, - K_JOY13, - K_JOY14, - K_JOY15, - K_JOY16, - K_JOY17, - K_JOY18, - K_JOY19, - K_JOY20, - K_JOY21, - K_JOY22, - K_JOY23, - K_JOY24, - K_JOY25, - K_JOY26, - K_JOY27, - K_JOY28, - K_JOY29, - K_JOY30, - K_JOY31, - K_JOY32, - - K_AUX1, - K_AUX2, - K_AUX3, - K_AUX4, - K_AUX5, - K_AUX6, - K_AUX7, - K_AUX8, - K_AUX9, - K_AUX10, - K_AUX11, - K_AUX12, - K_AUX13, - K_AUX14, - K_AUX15, - K_AUX16, - - K_LAST_KEY // this had better be <256! -} keyNum_t; - - -// The menu code needs to get both key and char events, but -// to avoid duplicating the paths, the char events are just -// distinguished by or'ing in K_CHAR_FLAG (ugly) -#define K_CHAR_FLAG 1024 - -#endif diff --git a/code/ui/ui_local.h b/code/ui/ui_local.h index 7e640d29..ee6ca233 100644 --- a/code/ui/ui_local.h +++ b/code/ui/ui_local.h @@ -23,10 +23,10 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #ifndef __UI_LOCAL_H__ #define __UI_LOCAL_H__ -#include "../game/q_shared.h" -#include "../cgame/tr_types.h" +#include "../qcommon/q_shared.h" +#include "../renderer/tr_types.h" #include "ui_public.h" -#include "keycodes.h" +#include "../client/keycodes.h" #include "../game/bg_public.h" #include "ui_shared.h" diff --git a/code/ui/ui_shared.h b/code/ui/ui_shared.h index 2010571c..0e545c5b 100644 --- a/code/ui/ui_shared.h +++ b/code/ui/ui_shared.h @@ -23,9 +23,9 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #define __UI_SHARED_H -#include "../game/q_shared.h" -#include "../cgame/tr_types.h" -#include "keycodes.h" +#include "../qcommon/q_shared.h" +#include "../renderer/tr_types.h" +#include "../client/keycodes.h" #include "../../ui/menudef.h" diff --git a/code/unix/Makefile b/code/unix/Makefile index 4c2846c1..71db2bd2 100644 --- a/code/unix/Makefile +++ b/code/unix/Makefile @@ -75,7 +75,7 @@ JPDIR=$(MOUNT_DIR)/jpeg-6 SPLNDIR=$(MOUNT_DIR)/splines # extract version info -VERSION=$(shell grep Q3_VERSION ../game/q_shared.h | \ +VERSION=$(shell grep Q3_VERSION ../qcommon/q_shared.h | \ sed -e 's/.*Q3\ \(.*\)"/\1/') ############################################################################# @@ -444,11 +444,13 @@ makedirs: @if [ ! -d $(B)/baseq3/cgame ];then mkdir $(B)/baseq3/cgame;fi @if [ ! -d $(B)/baseq3/game ];then mkdir $(B)/baseq3/game;fi @if [ ! -d $(B)/baseq3/ui ];then mkdir $(B)/baseq3/ui;fi + @if [ ! -d $(B)/baseq3/qcommon ];then mkdir $(B)/baseq3/qcommon;fi @if [ ! -d $(B)/baseq3/vm ];then mkdir $(B)/baseq3/vm;fi @if [ ! -d $(B)/missionpack ];then mkdir $(B)/missionpack;fi @if [ ! -d $(B)/missionpack/cgame ];then mkdir $(B)/missionpack/cgame;fi @if [ ! -d $(B)/missionpack/game ];then mkdir $(B)/missionpack/game;fi @if [ ! -d $(B)/missionpack/ui ];then mkdir $(B)/missionpack/ui;fi + @if [ ! -d $(B)/missionpack/qcommon ];then mkdir $(B)/missionpack/qcommon;fi @if [ ! -d $(B)/missionpack/vm ];then mkdir $(B)/missionpack/vm;fi @if [ ! -d $(B)/q3static ];then mkdir $(B)/q3static;fi @@ -465,7 +467,7 @@ $(Q3LCC): $(Q3ASM): $(MAKE) -C ../tools/asm install -DO_Q3LCC=$(Q3LCC) -o $@ -S -DQ3_VM -I$(CGDIR) -I$(GDIR) -I$(UIDIR) $< +DO_Q3LCC=$(Q3LCC) -o $@ -S -DQ3_VM -I$(CGDIR) -I$(GDIR) -I$(UIDIR) -I$(CMDIR) $< ############################################################################# # CLIENT/SERVER @@ -769,8 +771,8 @@ $(B)/client/md4.o : $(CMDIR)/md4.c; $(DO_CC) $(B)/client/msg.o : $(CMDIR)/msg.c; $(DO_CC) $(B)/client/net_chan.o : $(CMDIR)/net_chan.c; $(DO_CC) $(B)/client/huffman.o : $(CMDIR)/huffman.c; $(DO_CC) -$(B)/client/q_shared.o : $(GDIR)/q_shared.c; $(DO_CC) -$(B)/client/q_math.o : $(GDIR)/q_math.c; $(DO_CC) +$(B)/client/q_shared.o : $(CMDIR)/q_shared.c; $(DO_CC) +$(B)/client/q_math.o : $(CMDIR)/q_math.c; $(DO_CC) $(B)/client/be_aas_bspq3.o : $(BLIBDIR)/be_aas_bspq3.c; $(DO_BOT_CC) $(B)/client/be_aas_cluster.o : $(BLIBDIR)/be_aas_cluster.c; $(DO_BOT_CC) @@ -1018,8 +1020,8 @@ $(B)/ded/md4.o : $(CMDIR)/md4.c; $(DO_DED_CC) $(B)/ded/msg.o : $(CMDIR)/msg.c; $(DO_DED_CC) $(B)/ded/net_chan.o : $(CMDIR)/net_chan.c; $(DO_DED_CC) $(B)/ded/huffman.o : $(CMDIR)/huffman.c; $(DO_DED_CC) -$(B)/ded/q_shared.o : $(GDIR)/q_shared.c; $(DO_DED_CC) -$(B)/ded/q_math.o : $(GDIR)/q_math.c; $(DO_DED_CC) +$(B)/ded/q_shared.o : $(CMDIR)/q_shared.c; $(DO_DED_CC) +$(B)/ded/q_math.o : $(CMDIR)/q_math.c; $(DO_DED_CC) $(B)/ded/be_aas_bspq3.o : $(BLIBDIR)/be_aas_bspq3.c; $(DO_BOT_CC) $(B)/ded/be_aas_cluster.o : $(BLIBDIR)/be_aas_cluster.c; $(DO_BOT_CC) @@ -1099,8 +1101,9 @@ Q3CGOBJ_ = \ $(B)/baseq3/cgame/cg_snapshot.o \ $(B)/baseq3/cgame/cg_view.o \ $(B)/baseq3/cgame/cg_weapons.o \ - $(B)/baseq3/game/q_math.o \ - $(B)/baseq3/game/q_shared.o + \ + $(B)/baseq3/qcommon/q_math.o \ + $(B)/baseq3/qcommon/q_shared.o Q3CGOBJ = $(Q3CGOBJ_) $(B)/baseq3/cgame/cg_syscalls.o Q3CGVMOBJ = $(Q3CGOBJ_:%.o=%.asm) $(B)/baseq3/game/bg_lib.asm @@ -1138,9 +1141,10 @@ MPCGOBJ_ = \ $(B)/missionpack/cgame/cg_snapshot.o \ $(B)/missionpack/cgame/cg_view.o \ $(B)/missionpack/cgame/cg_weapons.o \ - $(B)/missionpack/game/q_math.o \ - $(B)/missionpack/game/q_shared.o \ - $(B)/missionpack/ui/ui_shared.o + $(B)/missionpack/ui/ui_shared.o \ + \ + $(B)/missionpack/qcommon/q_math.o \ + $(B)/missionpack/qcommon/q_shared.o MPCGOBJ = $(MPCGOBJ_) $(B)/missionpack/cgame/cg_syscalls.o MPCGVMOBJ = $(MPCGOBJ_:%.o=%.asm) $(B)/missionpack/game/bg_lib.asm @@ -1189,8 +1193,8 @@ Q3GOBJ_ = \ $(B)/baseq3/game/g_utils.o \ $(B)/baseq3/game/g_weapon.o \ \ - $(B)/baseq3/game/q_math.o \ - $(B)/baseq3/game/q_shared.o + $(B)/baseq3/qcommon/q_math.o \ + $(B)/baseq3/qcommon/q_shared.o Q3GOBJ = $(Q3GOBJ_) $(B)/baseq3/game/g_syscalls.o Q3GVMOBJ = $(Q3GOBJ_:%.o=%.asm) $(B)/baseq3/game/bg_lib.asm @@ -1237,8 +1241,8 @@ MPGOBJ_ = \ $(B)/missionpack/game/g_utils.o \ $(B)/missionpack/game/g_weapon.o \ \ - $(B)/missionpack/game/q_math.o \ - $(B)/missionpack/game/q_shared.o + $(B)/missionpack/qcommon/q_math.o \ + $(B)/missionpack/qcommon/q_shared.o MPGOBJ = $(MPGOBJ_) $(B)/missionpack/game/g_syscalls.o MPGVMOBJ = $(MPGOBJ_:%.o=%.asm) $(B)/missionpack/game/bg_lib.asm @@ -1297,8 +1301,8 @@ Q3UIOBJ_ = \ $(B)/baseq3/ui/ui_teamorders.o \ $(B)/baseq3/ui/ui_video.o \ \ - $(B)/baseq3/game/q_math.o \ - $(B)/baseq3/game/q_shared.o + $(B)/baseq3/qcommon/q_math.o \ + $(B)/baseq3/qcommon/q_shared.o Q3UIOBJ = $(Q3UIOBJ_) $(B)/missionpack/ui/ui_syscalls.o Q3UIVMOBJ = $(Q3UIOBJ_:%.o=%.asm) $(B)/baseq3/game/bg_lib.asm @@ -1322,8 +1326,8 @@ MPUIOBJ_ = \ \ $(B)/missionpack/game/bg_misc.o \ \ - $(B)/missionpack/game/q_math.o \ - $(B)/missionpack/game/q_shared.o + $(B)/missionpack/qcommon/q_math.o \ + $(B)/missionpack/qcommon/q_shared.o MPUIOBJ = $(MPUIOBJ_) $(B)/missionpack/ui/ui_syscalls.o MPUIVMOBJ = $(MPUIOBJ_:%.o=%.asm) $(B)/baseq3/game/bg_lib.asm @@ -1379,6 +1383,18 @@ $(B)/missionpack/ui/%.asm: $(UIDIR)/%.c $(Q3LCC) $(DO_Q3LCC) -DMISSIONPACK +$(B)/baseq3/qcommon/%.o: $(CMDIR)/%.c + $(DO_SHLIB_CC) + +$(B)/baseq3/qcommon/%.asm: $(CMDIR)/%.c $(Q3LCC) + $(DO_Q3LCC) + +$(B)/missionpack/qcommon/%.o: $(CMDIR)/%.c + $(DO_SHLIB_CC) -DMISSIONPACK + +$(B)/missionpack/qcommon/%.asm: $(CMDIR)/%.c $(Q3LCC) + $(DO_Q3LCC) -DMISSIONPACK + ############################################################################# # MISC diff --git a/code/unix/linux_signals.c b/code/unix/linux_signals.c index 686c9477..c1bd3306 100644 --- a/code/unix/linux_signals.c +++ b/code/unix/linux_signals.c @@ -21,7 +21,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include -#include "../game/q_shared.h" +#include "../qcommon/q_shared.h" #include "../qcommon/qcommon.h" #ifndef DEDICATED #include "../renderer/tr_local.h" diff --git a/code/unix/linux_snd.c b/code/unix/linux_snd.c index 676b7d55..c9355c04 100644 --- a/code/unix/linux_snd.c +++ b/code/unix/linux_snd.c @@ -38,7 +38,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #endif #include -#include "../game/q_shared.h" +#include "../qcommon/q_shared.h" #include "../client/snd_local.h" int audio_fd; diff --git a/code/unix/sdl_snd.c b/code/unix/sdl_snd.c index d614c273..4107f81c 100644 --- a/code/unix/sdl_snd.c +++ b/code/unix/sdl_snd.c @@ -53,7 +53,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include "SDL.h" -#include "../game/q_shared.h" +#include "../qcommon/q_shared.h" #include "../client/snd_local.h" int snd_inited=0; diff --git a/code/unix/unix_main.c b/code/unix/unix_main.c index 95e46894..d8c9496e 100644 --- a/code/unix/unix_main.c +++ b/code/unix/unix_main.c @@ -50,7 +50,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA // FIXME TTimo should we gard this? most *nix system should comply? #include -#include "../game/q_shared.h" +#include "../qcommon/q_shared.h" #include "../qcommon/qcommon.h" #include "../renderer/tr_public.h" diff --git a/code/unix/unix_net.c b/code/unix/unix_net.c index 7eda3093..93a47d02 100644 --- a/code/unix/unix_net.c +++ b/code/unix/unix_net.c @@ -21,7 +21,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ // unix_net.c -#include "../game/q_shared.h" +#include "../qcommon/q_shared.h" #include "../qcommon/qcommon.h" #include diff --git a/code/unix/unix_shared.c b/code/unix/unix_shared.c index b39abc8c..39c1550a 100644 --- a/code/unix/unix_shared.c +++ b/code/unix/unix_shared.c @@ -29,7 +29,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include #include -#include "../game/q_shared.h" +#include "../qcommon/q_shared.h" #include "../qcommon/qcommon.h" //============================================================================= diff --git a/code/win32/win_net.c b/code/win32/win_net.c index deadbbfa..930ef7bc 100644 --- a/code/win32/win_net.c +++ b/code/win32/win_net.c @@ -21,7 +21,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ // net_wins.c -#include "../game/q_shared.h" +#include "../qcommon/q_shared.h" #include "../qcommon/qcommon.h" #include "win_local.h" diff --git a/code/win32/win_shared.c b/code/win32/win_shared.c index cbaa8d48..43ff3215 100644 --- a/code/win32/win_shared.c +++ b/code/win32/win_shared.c @@ -20,7 +20,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA =========================================================================== */ -#include "../game/q_shared.h" +#include "../qcommon/q_shared.h" #include "../qcommon/qcommon.h" #include "win_local.h" #include