mirror of
https://github.com/DrBeef/ioq3quest.git
synced 2025-01-18 15:11:43 +00:00
* 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)
This commit is contained in:
parent
3ff42330e5
commit
3a2ad50406
98 changed files with 247 additions and 1030 deletions
|
@ -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"
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -33,8 +33,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "../game/q_shared.h"
|
||||
#include "../game/botlib.h"
|
||||
#include "../qcommon/q_shared.h"
|
||||
#include "botlib.h"
|
||||
#include "be_interface.h" //for botimport.Print
|
||||
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -33,8 +33,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#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"
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
||||
/*
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
#include "../game/q_shared.h"
|
||||
#include "../qcommon/q_shared.h"
|
||||
#include "../qcommon/qcommon.h"
|
||||
|
||||
/*
|
||||
|
|
|
@ -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"
|
||||
|
||||
/*
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 <filename> : 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 <variablename> : 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() ; i++)
|
||||
Com_Printf ("%s ",Cmd_Argv(i));
|
||||
Com_Printf ("\n");
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
=============================================================================
|
||||
|
||||
COMMAND EXECUTION
|
||||
|
||||
=============================================================================
|
||||
*/
|
||||
|
||||
typedef struct cmd_function_s
|
||||
{
|
||||
struct cmd_function_s *next;
|
||||
char *name;
|
||||
xcommand_t function;
|
||||
} cmd_function_t;
|
||||
|
||||
|
||||
static int cmd_argc;
|
||||
static char *cmd_argv[MAX_STRING_TOKENS]; // points into cmd_tokenized
|
||||
static char cmd_tokenized[MAX_STRING_CHARS+MAX_STRING_TOKENS]; // will have 0 bytes inserted
|
||||
|
||||
static cmd_function_t *cmd_functions; // possible commands to execute
|
||||
|
||||
/*
|
||||
============
|
||||
Cmd_Argc
|
||||
============
|
||||
*/
|
||||
int Cmd_Argc( void ) {
|
||||
return cmd_argc;
|
||||
}
|
||||
|
||||
/*
|
||||
============
|
||||
Cmd_Argv
|
||||
============
|
||||
*/
|
||||
char *Cmd_Argv( int arg ) {
|
||||
if ( (unsigned)arg >= 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);
|
||||
}
|
||||
|
|
@ -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 <setjmp.h>
|
||||
#if defined __linux__ || defined MACOS_X || defined __FreeBSD__
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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"
|
||||
|
||||
/*
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -21,7 +21,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|||
*/
|
||||
#include <signal.h>
|
||||
|
||||
#include "../game/q_shared.h"
|
||||
#include "../qcommon/q_shared.h"
|
||||
#include "../qcommon/qcommon.h"
|
||||
#ifndef DEDICATED
|
||||
#include "../renderer/tr_local.h"
|
||||
|
|
|
@ -38,7 +38,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|||
#endif
|
||||
#include <stdio.h>
|
||||
|
||||
#include "../game/q_shared.h"
|
||||
#include "../qcommon/q_shared.h"
|
||||
#include "../client/snd_local.h"
|
||||
|
||||
int audio_fd;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 <termios.h>
|
||||
|
||||
#include "../game/q_shared.h"
|
||||
#include "../qcommon/q_shared.h"
|
||||
#include "../qcommon/qcommon.h"
|
||||
#include "../renderer/tr_public.h"
|
||||
|
||||
|
|
|
@ -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 <unistd.h>
|
||||
|
|
|
@ -29,7 +29,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|||
#include <sys/time.h>
|
||||
#include <pwd.h>
|
||||
|
||||
#include "../game/q_shared.h"
|
||||
#include "../qcommon/q_shared.h"
|
||||
#include "../qcommon/qcommon.h"
|
||||
|
||||
//=============================================================================
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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 <lmerr.h>
|
||||
|
|
Loading…
Reference in a new issue