mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-04-28 13:47:58 +03:00
Fixed compilation issues
This commit is contained in:
parent
4ce1bb71e4
commit
7030c23994
24 changed files with 137 additions and 2135 deletions
|
@ -6240,7 +6240,7 @@ qboolean CG_Command_ProcessFile(const char* filename, qboolean quiet, dtiki_t *c
|
|||
const char* bufstart;
|
||||
char com_token[MAX_STRING_CHARS];
|
||||
|
||||
if (cgi.FS_ReadFile(filename, (void**)&buffer) == -1) {
|
||||
if (cgi.FS_ReadFile(filename, (void**)&buffer, quiet) == -1) {
|
||||
return qfalse;
|
||||
}
|
||||
|
||||
|
|
|
@ -982,9 +982,9 @@ void CG_DrawStopwatch()
|
|||
{
|
||||
int iFraction;
|
||||
|
||||
if (!cg_hud->integer || !cgi.stopWatch->startTime
|
||||
|| cgi.stopWatch->startTime >= cgi.stopWatch->endTime
|
||||
|| cgi.stopWatch->endTime <= cg.time
|
||||
if (!cg_hud->integer || !cgi.stopWatch->iStartTime
|
||||
|| cgi.stopWatch->iStartTime >= cgi.stopWatch->iEndTime
|
||||
|| cgi.stopWatch->iEndTime <= cg.time
|
||||
// don't draw the stopwatch with the objective menu
|
||||
|| cg.ObjectivesCurrentAlpha >= 0.02
|
||||
// the player isn't alive
|
||||
|
@ -994,7 +994,7 @@ void CG_DrawStopwatch()
|
|||
return;
|
||||
}
|
||||
|
||||
iFraction = cgi.stopWatch->endTime - cg.time;
|
||||
iFraction = cgi.stopWatch->iEndTime - cg.time;
|
||||
cgi.Cvar_Set("ui_stopwatch", va("%i", iFraction));
|
||||
cgi.Cmd_Execute(EXEC_NOW, "ui_addhud hud_stopwatch\n");
|
||||
}
|
||||
|
|
|
@ -134,7 +134,7 @@ static qboolean LoadTGA(const char * name, byte ** pic, int *width, int *height,
|
|||
//
|
||||
// load the file
|
||||
//
|
||||
cgi.FS_ReadFile(name, (void **)&buffer);
|
||||
cgi.FS_ReadFile(name, (void **)&buffer, qtrue);
|
||||
if (!buffer)
|
||||
{
|
||||
cgi.DPrintf( "TGA File not found: %s\n", name );
|
||||
|
|
|
@ -68,8 +68,8 @@ typedef struct {
|
|||
|
||||
typedef struct stopWatch_s
|
||||
{
|
||||
int startTime;
|
||||
int endTime;
|
||||
int iStartTime;
|
||||
int iEndTime;
|
||||
|
||||
} stopWatch_t;
|
||||
|
||||
|
@ -136,9 +136,9 @@ typedef struct
|
|||
|
||||
// a -1 return means the file does not exist
|
||||
// NULL can be passed for buf to just determine existance
|
||||
int (*FS_ReadFile)( const char *name, void **buf );
|
||||
int (*FS_ReadFile)( const char *name, void **buf, qboolean quiet );
|
||||
void (*FS_FreeFile)( void *buf );
|
||||
void (*FS_WriteFile)( const char *qpath, const void *buffer, int size );
|
||||
int (*FS_WriteFile)( const char *qpath, const void *buffer, int size );
|
||||
void (*FS_WriteTextFile)( const char *qpath, const void *buffer, int size );
|
||||
// add commands to the local console as if they were typed in
|
||||
// for map changing, etc. The command is not executed immediately,
|
||||
|
@ -170,7 +170,7 @@ typedef struct
|
|||
clipHandle_t (*CM_InlineModel)( int index ); // 0 = world, 1+ = bmodels
|
||||
int (*CM_NumInlineModels)( void );
|
||||
int (*CM_PointContents)( const vec3_t p, int headnode );
|
||||
int (*CM_TransformedPointContents)( const vec3_t p, int headnode, vec3_t origin, vec3_t angles );
|
||||
int (*CM_TransformedPointContents)(const vec3_t p, clipHandle_t model, const vec3_t origin, const vec3_t angles);
|
||||
void (*CM_BoxTrace)( trace_t *results, const vec3_t start, const vec3_t end,
|
||||
const vec3_t mins, const vec3_t maxs,
|
||||
int headnode, int brushmask, qboolean cylinder );
|
||||
|
@ -183,7 +183,7 @@ typedef struct
|
|||
clipHandle_t (*CM_TempBoxModel)( const vec3_t mins, const vec3_t maxs, int contents );
|
||||
void (*CM_PrintBSPFileSizes)();
|
||||
qboolean (*CM_LeafInPVS)(int leaf1, int leaf2);
|
||||
int (*CM_PointLeafnum)(vec3_t p);
|
||||
int (*CM_PointLeafnum)(const vec3_t p);
|
||||
int (*R_MarkFragments)( int numPoints, const vec3_t *points, const vec3_t projection,
|
||||
int maxPoints, vec3_t pointBuffer,
|
||||
int maxFragments, markFragment_t *fragmentBuffer, float fRadiusSquared );
|
||||
|
@ -199,12 +199,12 @@ typedef struct
|
|||
|
||||
// =========== sound function calls ===============
|
||||
|
||||
void (*S_StartSound)(vec3_t origin, int entNum, int entChannel, sfxHandle_t sfxHandle, float volume, float minDist, float pitch, float maxDist, int streamed);
|
||||
void (*S_StartLocalSound)(char* soundName, qboolean forceLoad);
|
||||
void (*S_StartSound)(const vec3_t origin, int entNum, int entChannel, sfxHandle_t sfxHandle, float volume, float minDist, float pitch, float maxDist, int streamed);
|
||||
void (*S_StartLocalSound)(const char* soundName, qboolean forceLoad);
|
||||
void (*S_StopSound)( int entnum, int channel );
|
||||
void (*S_ClearLoopingSounds)(void);
|
||||
void (*S_AddLoopingSound)(vec3_t origin, vec3_t velocity, sfxHandle_t sfxHandle, float volume, float minDist, float maxDist, float pitch, int flags);
|
||||
void (*S_Respatialize)( int entityNum, vec3_t origin, vec3_t axis[3] );
|
||||
void (*S_AddLoopingSound)(const vec3_t origin, const vec3_t velocity, sfxHandle_t sfxHandle, float volume, float minDist, float maxDist, float pitch, int flags);
|
||||
void (*S_Respatialize)( int entityNum, const vec3_t origin, vec3_t axis[3] );
|
||||
void (*S_BeginRegistration)( void );
|
||||
sfxHandle_t (*S_RegisterSound)( const char *sample, int streamed );
|
||||
void (*S_EndRegistration)( void );
|
||||
|
@ -212,9 +212,9 @@ typedef struct
|
|||
void (*S_SetReverb)( int reverb_type, float reverb_level );
|
||||
void (*S_SetGlobalAmbientVolumeLevel)( float volume );
|
||||
float (*S_GetSoundTime)(sfxHandle_t handle);
|
||||
int (*S_ChannelNameToNum)(char* name);
|
||||
char* (*S_ChannelNumToName)(int channel);
|
||||
int (*S_IsSoundPlaying)(int channelNumber, char* name);
|
||||
int (*S_ChannelNameToNum)(const char* name);
|
||||
const char* (*S_ChannelNumToName)(int channel);
|
||||
int (*S_IsSoundPlaying)(int channelNumber, const char* name);
|
||||
|
||||
// =========== music function calls ===============
|
||||
|
||||
|
@ -240,10 +240,10 @@ typedef struct
|
|||
qhandle_t (*R_RegisterSkin)( const char *name );
|
||||
qhandle_t (*R_RegisterShader)( const char *name );
|
||||
qhandle_t (*R_RegisterShaderNoMip)( const char *name );
|
||||
void (*R_AddRefEntityToScene)( refEntity_t *ent, int parentEntityNumber );
|
||||
void (*R_AddRefSpriteToScene)( refEntity_t *ent );
|
||||
void (*R_AddLightToScene)( vec3_t origin, float intensity, float r, float g, float b, int type );
|
||||
void (*R_AddPolyToScene)(qhandle_t hShader, int numVerts, const polyVert_t* verts, int renderfx);
|
||||
void (*R_AddRefEntityToScene)(const refEntity_t *ent, int parentEntityNumber );
|
||||
void (*R_AddRefSpriteToScene)(const refEntity_t *ent );
|
||||
void (*R_AddLightToScene)(const vec3_t origin, float intensity, float r, float g, float b, int type );
|
||||
qboolean (*R_AddPolyToScene)(qhandle_t hShader, int numVerts, const polyVert_t* verts, int renderfx);
|
||||
void (*R_AddTerrainMarkToScene)(int terrainIndex, qhandle_t hShader, int numVerts, polyVert_t* verts, int renderFx);
|
||||
void (*R_SetColor)( const vec4_t rgba ); // NULL = 1,1,1,1
|
||||
void (*R_DrawStretchPic) ( float x, float y, float w, float h,
|
||||
|
@ -279,34 +279,34 @@ typedef struct
|
|||
// which is the local predicted command for
|
||||
// the following frame
|
||||
qboolean (*GetUserCmd)( int cmdNumber, usercmd_t *ucmd );
|
||||
qboolean (*GetServerCommand)( int serverCommandNumber );
|
||||
qboolean (*GetServerCommand)(int serverCommandNumber, qboolean differentServer);
|
||||
|
||||
// ALIAS STUFF
|
||||
qboolean (*Alias_Add)( const char * alias, const char * name, const char *parameters );
|
||||
qboolean (*Alias_ListAdd)(AliasList_t* list, const char* alias, const char* name, const char* parameters);
|
||||
const char* (*Alias_FindRandom)(const char* alias, AliasListNode_t **ret);
|
||||
char* (*Alias_ListFindRandom)(AliasList_t* list, const char* alias, AliasListNode_t** ret);
|
||||
const char* (*Alias_ListFindRandom)(AliasList_t* list, const char* alias, AliasListNode_t** ret);
|
||||
void (*Alias_Dump)( void );
|
||||
void (*Alias_Clear)( void );
|
||||
AliasList_t* (*AliasList_New)(char* name);
|
||||
AliasList_t* (*AliasList_New)(const char* name);
|
||||
void (*Alias_ListFindRandomRange)(AliasList_t* list, const char* alias, int* minIndex, int* maxIndex, float* totalWeight);
|
||||
AliasList_t* (*Alias_GetGlobalList)();
|
||||
|
||||
// ==================== UI STUFF ==========================
|
||||
void (*UI_ShowMenu)(char* name, qboolean bForce);
|
||||
void (*UI_HideMenu)(char* name, qboolean bForce);
|
||||
void (*UI_ShowMenu)(const char* name, qboolean bForce);
|
||||
void (*UI_HideMenu)(const char* name, qboolean bForce);
|
||||
int (*UI_FontStringWidth)(fontheader_t* font, const char* string, int maxLen);
|
||||
|
||||
int (*Key_StringToKeynum)(char* str);
|
||||
char* (*Key_KeynumToBindString)(int keyNum);
|
||||
void (*Key_GetKeysForCommand)(char* command, int* key1, int* key2);
|
||||
int (*Key_StringToKeynum)(const char* str);
|
||||
const char* (*Key_KeynumToBindString)(int keyNum);
|
||||
void (*Key_GetKeysForCommand)(const char* command, int* key1, int* key2);
|
||||
|
||||
// ==================== TIKI STUFF ==========================
|
||||
// TIKI SPECIFIC STUFF
|
||||
dtiki_t* (*R_Model_GetHandle)(qhandle_t handle);
|
||||
int (*TIKI_NumAnims)(dtiki_t* pmdl);
|
||||
void (*TIKI_CalculateBounds)(dtiki_t* pmdl, float scale, vec3_t mins, vec3_t maxs);
|
||||
char* (*TIKI_Name)(dtiki_t* tiki);
|
||||
const char* (*TIKI_Name)(dtiki_t* tiki);
|
||||
void* (*TIKI_GetSkeletor)(dtiki_t* tiki, int entNum);
|
||||
void (*TIKI_SetEyeTargetPos)(dtiki_t* tiki, int entNum, vec3_t pos);
|
||||
|
||||
|
@ -347,13 +347,13 @@ typedef struct
|
|||
const char* data2, const char* data3,
|
||||
const char* data4, const char* data5,
|
||||
const char* data6, const char* data7,
|
||||
const char* data8, const float* textColor,
|
||||
const float* backColor, qboolean isHeader);
|
||||
const char* data8, const vec4_t textColor,
|
||||
const vec4_t backColor, qboolean isHeader);
|
||||
void (*UI_DeleteScoreBoardItems)(int maxIndex);
|
||||
void (*UI_ToggleDMMessageConsole)(int consoleMode);
|
||||
dtiki_t* (*TIKI_FindTiki)(const char* path);
|
||||
void (*LoadResource)(const char* name);
|
||||
void (*FS_CanonicalFilename)(const char* name);
|
||||
void (*FS_CanonicalFilename)(char* name);
|
||||
|
||||
cvar_t* fsDebug;
|
||||
hdelement_t* HudDrawElements;
|
||||
|
|
|
@ -156,8 +156,8 @@ static void CG_Stopwatch_f()
|
|||
Com_Error(1, "stopwatch didn't have 2 parameters");
|
||||
}
|
||||
|
||||
cgi.stopWatch->startTime = 1000 * atoi(cgi.Argv(1));
|
||||
cgi.stopWatch->endTime = cgi.stopWatch->startTime + 1000 * atoi(cgi.Argv(2));
|
||||
cgi.stopWatch->iStartTime = 1000 * atoi(cgi.Argv(1));
|
||||
cgi.stopWatch->iEndTime = cgi.stopWatch->iStartTime + 1000 * atoi(cgi.Argv(2));
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -240,10 +240,10 @@ Execute all of the server commands that were received along
|
|||
with this this snapshot.
|
||||
====================
|
||||
*/
|
||||
void CG_ExecuteNewServerCommands(int latestSequence)
|
||||
void CG_ExecuteNewServerCommands(int latestSequence, qboolean differentServer)
|
||||
{
|
||||
while (cgs.serverCommandSequence < latestSequence) {
|
||||
if (cgi.GetServerCommand(++cgs.serverCommandSequence)) {
|
||||
if (cgi.GetServerCommand(++cgs.serverCommandSequence, differentServer)) {
|
||||
CG_ServerCommand();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,11 +23,9 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|||
|
||||
#include "client.h"
|
||||
#include "cl_ui.h"
|
||||
#include "../botlib/botlib.h"
|
||||
#include "tiki.h"
|
||||
#include <localization.h>
|
||||
|
||||
extern botlib_export_t *botlib_export;
|
||||
|
||||
extern qboolean loadCamera(const char *name);
|
||||
extern void startCamera(int time);
|
||||
extern qboolean getCameraInfo(int time, vec3_t *origin, vec3_t *angles);
|
||||
|
@ -47,33 +45,30 @@ CL_GetGlconfig
|
|||
====================
|
||||
*/
|
||||
void CL_GetGlconfig( glconfig_t *glconfig ) {
|
||||
glconfig_ver19_t *pgl = ( glconfig_ver19_t * )glconfig;
|
||||
|
||||
strncpy( pgl->renderer_string, cls.glconfig.renderer_string, sizeof( pgl->renderer_string ) );
|
||||
strncpy( pgl->vendor_string, cls.glconfig.vendor_string, sizeof( pgl->vendor_string ) );
|
||||
strncpy( pgl->version_string, cls.glconfig.version_string, sizeof( pgl->version_string ) );
|
||||
strncpy( pgl->extensions_string, cls.glconfig.extensions_string, sizeof( pgl->extensions_string ) );
|
||||
pgl->maxTextureSize = cls.glconfig.maxTextureSize;
|
||||
pgl->numTextureUnits = cls.glconfig.numTextureUnits;
|
||||
pgl->colorBits = cls.glconfig.colorBits;
|
||||
pgl->depthBits = cls.glconfig.depthBits;
|
||||
pgl->stencilBits = cls.glconfig.stencilBits;
|
||||
pgl->driverType = cls.glconfig.driverType;
|
||||
pgl->hardwareType = cls.glconfig.hardwareType;
|
||||
pgl->deviceSupportsGamma = cls.glconfig.deviceSupportsGamma;
|
||||
pgl->textureCompression = cls.glconfig.textureCompression;
|
||||
pgl->textureEnvAddAvailable = cls.glconfig.textureEnvAddAvailable;
|
||||
pgl->vidWidth = cls.glconfig.vidWidth;
|
||||
pgl->vidHeight = cls.glconfig.vidHeight;
|
||||
pgl->windowAspect = cls.glconfig.windowAspect;
|
||||
pgl->displayFrequency = cls.glconfig.displayFrequency;
|
||||
pgl->isFullscreen = cls.glconfig.isFullscreen;
|
||||
pgl->stereoEnabled = cls.glconfig.stereoEnabled;
|
||||
pgl->smpActive = cls.glconfig.smpActive;
|
||||
pgl->registerCombinerAvailable = cls.glconfig.registerCombinerAvailable;
|
||||
pgl->secondaryColorAvailable = cls.glconfig.secondaryColorAvailable;
|
||||
pgl->VAR = cls.glconfig.VAR;
|
||||
pgl->fence = cls.glconfig.fence;
|
||||
strncpy( glconfig->renderer_string, cls.glconfig.renderer_string, sizeof( glconfig->renderer_string ) );
|
||||
strncpy( glconfig->vendor_string, cls.glconfig.vendor_string, sizeof( glconfig->vendor_string ) );
|
||||
strncpy( glconfig->version_string, cls.glconfig.version_string, sizeof( glconfig->version_string ) );
|
||||
strncpy( glconfig->extensions_string, cls.glconfig.extensions_string, sizeof( glconfig->extensions_string ) );
|
||||
glconfig->maxTextureSize = cls.glconfig.maxTextureSize;
|
||||
glconfig->colorBits = cls.glconfig.colorBits;
|
||||
glconfig->depthBits = cls.glconfig.depthBits;
|
||||
glconfig->stencilBits = cls.glconfig.stencilBits;
|
||||
glconfig->driverType = cls.glconfig.driverType;
|
||||
glconfig->hardwareType = cls.glconfig.hardwareType;
|
||||
glconfig->deviceSupportsGamma = cls.glconfig.deviceSupportsGamma;
|
||||
glconfig->textureCompression = cls.glconfig.textureCompression;
|
||||
glconfig->textureEnvAddAvailable = cls.glconfig.textureEnvAddAvailable;
|
||||
glconfig->vidWidth = cls.glconfig.vidWidth;
|
||||
glconfig->vidHeight = cls.glconfig.vidHeight;
|
||||
glconfig->windowAspect = cls.glconfig.windowAspect;
|
||||
glconfig->displayFrequency = cls.glconfig.displayFrequency;
|
||||
glconfig->isFullscreen = cls.glconfig.isFullscreen;
|
||||
glconfig->stereoEnabled = cls.glconfig.stereoEnabled;
|
||||
glconfig->smpActive = cls.glconfig.smpActive;
|
||||
glconfig->registerCombinerAvailable = cls.glconfig.registerCombinerAvailable;
|
||||
glconfig->secondaryColorAvailable = cls.glconfig.secondaryColorAvailable;
|
||||
glconfig->VAR = cls.glconfig.VAR;
|
||||
glconfig->fence = cls.glconfig.fence;
|
||||
}
|
||||
|
||||
|
||||
|
@ -205,9 +200,9 @@ qboolean CL_GetSnapshot( int snapshotNumber, snapshot_t *snapshot ) {
|
|||
|
||||
// wombat: sounds
|
||||
count = clSnap->number_of_sounds;
|
||||
if ( snapshot->number_of_sounds > MAX_SOUNDS_IN_SNAPSHOT ) {
|
||||
Com_DPrintf( "CL_GetSnapshot: truncated %i sounds to %i\n", count, MAX_SOUNDS_IN_SNAPSHOT );
|
||||
count = MAX_SOUNDS_IN_SNAPSHOT;
|
||||
if ( snapshot->number_of_sounds > MAX_SERVER_SOUNDS) {
|
||||
Com_DPrintf( "CL_GetSnapshot: truncated %i sounds to %i\n", count, MAX_SERVER_SOUNDS);
|
||||
count = MAX_SERVER_SOUNDS;
|
||||
}
|
||||
snapshot->number_of_sounds = count;
|
||||
Com_Memcpy( snapshot->sounds, clSnap->sounds, sizeof(snapshot->sounds[0])*count );
|
||||
|
@ -441,7 +436,7 @@ void CL_CM_LoadMap( const char *mapname ) {
|
|||
CL_CG_Malloc
|
||||
====================
|
||||
*/
|
||||
void *CL_CG_Malloc( int size )
|
||||
void *CL_CG_Malloc(int size )
|
||||
{
|
||||
return Z_TagMalloc( size, TAG_CGAME );
|
||||
}
|
||||
|
@ -523,8 +518,8 @@ sfxHandle_t CL_RegisterSound( const char *sample, qboolean streamed ) {
|
|||
CL_StartLocalSound
|
||||
====================
|
||||
*/
|
||||
void CL_StartLocalSound( const char *sound_name ) {
|
||||
S_StartLocalSound( sound_name, qfalse );
|
||||
void CL_StartLocalSound(const char* soundName, qboolean forceLoad) {
|
||||
S_StartLocalSound(soundName, qfalse );
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -739,10 +734,11 @@ void CL_InitCGameDLL( clientGameImport_t *cgi, clientGameExport_t **cge ) {
|
|||
cgi->FS_CanonicalFilename = FS_CanonicalFilename;
|
||||
|
||||
cgi->fsDebug = fs_debug;
|
||||
cgi->hudDrawElements = cls.HudDrawElements;
|
||||
cgi->HudDrawElements = cls.HudDrawElements;
|
||||
cgi->anim = &cls.anim;
|
||||
cgi->stopWatch = &cls.stopwatch;
|
||||
cgi->pUnknownVar = NULL;
|
||||
// FIXME
|
||||
//cgi->pUnknownVar = NULL;
|
||||
|
||||
cls.cgameStarted = qtrue;
|
||||
}
|
||||
|
@ -756,20 +752,20 @@ static void CL_ViewModelAnimation_Init() {
|
|||
int i;
|
||||
|
||||
for( i = 0; i < MAX_FRAMEINFOS; i++ ) {
|
||||
cls.anim.vmFrameInfo[ i ].index = 0;
|
||||
cls.anim.vmFrameInfo[ i ].time = 0.0;
|
||||
cls.anim.vmFrameInfo[ i ].weight = 0.0;
|
||||
cls.anim.g_VMFrameInfo[ i ].index = 0;
|
||||
cls.anim.g_VMFrameInfo[ i ].time = 0.0;
|
||||
cls.anim.g_VMFrameInfo[ i ].weight = 0.0;
|
||||
}
|
||||
|
||||
VectorClear( cls.anim.currentVMPosOffset );
|
||||
cls.anim.lastVMAnim = -1;
|
||||
cls.anim.lastVMAnimChanged = -1;
|
||||
cls.anim.currentVMAnimSlot = 0;
|
||||
cls.anim.currentVMDuration = 9999;
|
||||
cls.anim.crossBlending = qfalse;
|
||||
cls.anim.lastEquippedWeaponStat = -1;
|
||||
cls.anim.lastActiveItem[ 0 ] = 0;
|
||||
cls.anim.lastAnimPrefixIndex = 0;
|
||||
VectorClear( cls.anim.g_vCurrentVMPosOffset );
|
||||
cls.anim.g_iLastVMAnim = -1;
|
||||
cls.anim.g_iLastVMAnimChanged = -1;
|
||||
cls.anim.g_iCurrentVMAnimSlot = 0;
|
||||
cls.anim.g_iCurrentVMDuration = 9999;
|
||||
cls.anim.g_bCrossblending = qfalse;
|
||||
cls.anim.g_iLastEquippedWeaponStat = -1;
|
||||
cls.anim.g_szLastActiveItem[ 0 ] = 0;
|
||||
cls.anim.g_iLastAnimPrefixIndex = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,789 +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 Quake III Arena source code; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
===========================================================================
|
||||
*/
|
||||
// console.c
|
||||
|
||||
#include "client.h"
|
||||
|
||||
|
||||
int g_console_field_width = 78;
|
||||
int g_console_charWidth = SMALLCHAR_WIDTH, g_console_charHeight = SMALLCHAR_HEIGHT;
|
||||
|
||||
#define NUM_CON_TIMES 4
|
||||
|
||||
#define CON_TEXTSIZE 32768
|
||||
typedef struct {
|
||||
qboolean initialized;
|
||||
|
||||
short text[CON_TEXTSIZE];
|
||||
int current; // line where next message will be printed
|
||||
int x; // offset in current line for next print
|
||||
int display; // bottom of console displays this line
|
||||
|
||||
int linewidth; // characters across screen
|
||||
int totallines; // total lines in console scrollback
|
||||
|
||||
float xadjust; // for wide aspect screens
|
||||
|
||||
float displayFrac; // aproaches finalFrac at scr_conspeed
|
||||
float finalFrac; // 0.0 to 1.0 lines of console to display
|
||||
|
||||
int vislines; // in scanlines
|
||||
|
||||
int times[NUM_CON_TIMES]; // cls.realtime time the line was generated
|
||||
// for transparent notify lines
|
||||
vec4_t color;
|
||||
} console_t;
|
||||
|
||||
extern console_t con;
|
||||
|
||||
console_t con;
|
||||
|
||||
cvar_t *con_conspeed;
|
||||
cvar_t *con_notifytime;
|
||||
cvar_t *con_drawnotify;
|
||||
|
||||
#define DEFAULT_CONSOLE_WIDTH 78
|
||||
|
||||
vec4_t console_color = {1.0, 1.0, 1.0, 1.0};
|
||||
|
||||
|
||||
/*
|
||||
================
|
||||
Con_ToggleConsole_f
|
||||
================
|
||||
*/
|
||||
void Con_ToggleConsole_f (void) {
|
||||
// Can't toggle the console when it's the only thing available
|
||||
if ( cls.state == CA_DISCONNECTED && Key_GetCatcher( ) == KEYCATCH_CONSOLE ) {
|
||||
return;
|
||||
}
|
||||
|
||||
Field_Clear( &g_consoleField );
|
||||
g_consoleField.widthInChars = g_console_field_width;
|
||||
|
||||
Con_ClearNotify ();
|
||||
Key_SetCatcher( Key_GetCatcher( ) ^ KEYCATCH_CONSOLE );
|
||||
}
|
||||
|
||||
/*
|
||||
================
|
||||
Con_MessageMode_f
|
||||
================
|
||||
*/
|
||||
void Con_MessageMode_f (void) {
|
||||
chat_playerNum = -1;
|
||||
chat_team = qfalse;
|
||||
Field_Clear( &chatField );
|
||||
chatField.widthInChars = 30;
|
||||
|
||||
Key_SetCatcher( Key_GetCatcher( ) ^ KEYCATCH_MESSAGE );
|
||||
}
|
||||
|
||||
/*
|
||||
================
|
||||
Con_MessageMode2_f
|
||||
================
|
||||
*/
|
||||
void Con_MessageMode2_f (void) {
|
||||
chat_playerNum = -1;
|
||||
chat_team = qtrue;
|
||||
Field_Clear( &chatField );
|
||||
chatField.widthInChars = 25;
|
||||
Key_SetCatcher( Key_GetCatcher( ) ^ KEYCATCH_MESSAGE );
|
||||
}
|
||||
|
||||
/*
|
||||
================
|
||||
Con_MessageMode3_f
|
||||
================
|
||||
*/
|
||||
void Con_MessageMode3_f (void) {
|
||||
chat_team = qfalse;
|
||||
Field_Clear( &chatField );
|
||||
chatField.widthInChars = 30;
|
||||
Key_SetCatcher( Key_GetCatcher( ) ^ KEYCATCH_MESSAGE );
|
||||
}
|
||||
|
||||
/*
|
||||
================
|
||||
Con_MessageMode4_f
|
||||
================
|
||||
*/
|
||||
void Con_MessageMode4_f (void) {
|
||||
chat_team = qfalse;
|
||||
Field_Clear( &chatField );
|
||||
chatField.widthInChars = 30;
|
||||
Key_SetCatcher( Key_GetCatcher( ) ^ KEYCATCH_MESSAGE );
|
||||
}
|
||||
|
||||
/*
|
||||
================
|
||||
Con_Clear_f
|
||||
================
|
||||
*/
|
||||
void Con_Clear_f (void) {
|
||||
int i;
|
||||
|
||||
for ( i = 0 ; i < CON_TEXTSIZE ; i++ ) {
|
||||
con.text[i] = (ColorIndex(COLOR_WHITE)<<8) | ' ';
|
||||
}
|
||||
|
||||
Con_Bottom(); // go to end
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
================
|
||||
Con_Dump_f
|
||||
|
||||
Save the console contents out to a file
|
||||
================
|
||||
*/
|
||||
void Con_Dump_f (void)
|
||||
{
|
||||
int l, x, i;
|
||||
short *line;
|
||||
fileHandle_t f;
|
||||
char buffer[1024];
|
||||
|
||||
if (Cmd_Argc() != 2)
|
||||
{
|
||||
Com_Printf ("usage: condump <filename>\n");
|
||||
return;
|
||||
}
|
||||
|
||||
Com_Printf ("Dumped console text to %s.\n", Cmd_Argv(1) );
|
||||
|
||||
f = FS_FOpenFileWrite( Cmd_Argv( 1 ) );
|
||||
if (!f)
|
||||
{
|
||||
Com_Printf ("ERROR: couldn't open.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
// skip empty lines
|
||||
for (l = con.current - con.totallines + 1 ; l <= con.current ; l++)
|
||||
{
|
||||
line = con.text + (l%con.totallines)*con.linewidth;
|
||||
for (x=0 ; x<con.linewidth ; x++)
|
||||
if ((line[x] & 0xff) != ' ')
|
||||
break;
|
||||
if (x != con.linewidth)
|
||||
break;
|
||||
}
|
||||
|
||||
// write the remaining lines
|
||||
buffer[con.linewidth] = 0;
|
||||
for ( ; l <= con.current ; l++)
|
||||
{
|
||||
line = con.text + (l%con.totallines)*con.linewidth;
|
||||
for(i=0; i<con.linewidth; i++)
|
||||
buffer[i] = line[i] & 0xff;
|
||||
for (x=con.linewidth-1 ; x>=0 ; x--)
|
||||
{
|
||||
if (buffer[x] == ' ')
|
||||
buffer[x] = 0;
|
||||
else
|
||||
break;
|
||||
}
|
||||
strcat( buffer, "\n" );
|
||||
FS_Write(buffer, strlen(buffer), f);
|
||||
}
|
||||
|
||||
FS_FCloseFile( f );
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
================
|
||||
Con_ClearNotify
|
||||
================
|
||||
*/
|
||||
void Con_ClearNotify( void ) {
|
||||
int i;
|
||||
|
||||
for ( i = 0 ; i < NUM_CON_TIMES ; i++ ) {
|
||||
con.times[i] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
================
|
||||
Con_CheckResize
|
||||
|
||||
If the line width has changed, reformat the buffer.
|
||||
================
|
||||
*/
|
||||
void Con_CheckResize (void)
|
||||
{
|
||||
int i, j, width, oldwidth, oldtotallines, numlines, numchars;
|
||||
short tbuf[CON_TEXTSIZE];
|
||||
|
||||
width = (SCREEN_WIDTH / g_console_charWidth) - 2;
|
||||
|
||||
if (width == con.linewidth)
|
||||
return;
|
||||
|
||||
if (width < 1) // video hasn't been initialized yet
|
||||
{
|
||||
width = DEFAULT_CONSOLE_WIDTH;
|
||||
con.linewidth = width;
|
||||
con.totallines = CON_TEXTSIZE / con.linewidth;
|
||||
for(i=0; i<CON_TEXTSIZE; i++)
|
||||
|
||||
con.text[i] = (ColorIndex(COLOR_WHITE)<<8) | ' ';
|
||||
}
|
||||
else
|
||||
{
|
||||
oldwidth = con.linewidth;
|
||||
con.linewidth = width;
|
||||
oldtotallines = con.totallines;
|
||||
con.totallines = CON_TEXTSIZE / con.linewidth;
|
||||
numlines = oldtotallines;
|
||||
|
||||
if (con.totallines < numlines)
|
||||
numlines = con.totallines;
|
||||
|
||||
numchars = oldwidth;
|
||||
|
||||
if (con.linewidth < numchars)
|
||||
numchars = con.linewidth;
|
||||
|
||||
Com_Memcpy (tbuf, con.text, CON_TEXTSIZE * sizeof(short));
|
||||
for(i=0; i<CON_TEXTSIZE; i++)
|
||||
|
||||
con.text[i] = (ColorIndex(COLOR_WHITE)<<8) | ' ';
|
||||
|
||||
|
||||
for (i=0 ; i<numlines ; i++)
|
||||
{
|
||||
for (j=0 ; j<numchars ; j++)
|
||||
{
|
||||
con.text[(con.totallines - 1 - i) * con.linewidth + j] =
|
||||
tbuf[((con.current - i + oldtotallines) %
|
||||
oldtotallines) * oldwidth + j];
|
||||
}
|
||||
}
|
||||
|
||||
Con_ClearNotify ();
|
||||
}
|
||||
|
||||
con.current = con.totallines - 1;
|
||||
con.display = con.current;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
================
|
||||
Con_Init
|
||||
================
|
||||
*/
|
||||
void Con_Init (void) {
|
||||
int i;
|
||||
|
||||
con_notifytime = Cvar_Get ("con_notifytime", "3", 0);
|
||||
con_conspeed = Cvar_Get ("scr_conspeed", "3", 0);
|
||||
con_drawnotify = Cvar_Get ("con_drawnotify", "0", 0);
|
||||
|
||||
Field_Clear( &g_consoleField );
|
||||
g_consoleField.widthInChars = g_console_field_width;
|
||||
for ( i = 0 ; i < COMMAND_HISTORY ; i++ ) {
|
||||
Field_Clear( &historyEditLines[i] );
|
||||
historyEditLines[i].widthInChars = g_console_field_width;
|
||||
}
|
||||
CL_LoadConsoleHistory( );
|
||||
|
||||
Cmd_AddCommand ("toggleconsole", Con_ToggleConsole_f);
|
||||
Cmd_AddCommand ("messagemode", Con_MessageMode_f);
|
||||
Cmd_AddCommand ("messagemode2", Con_MessageMode2_f);
|
||||
Cmd_AddCommand ("messagemode3", Con_MessageMode3_f);
|
||||
Cmd_AddCommand ("messagemode4", Con_MessageMode4_f);
|
||||
Cmd_AddCommand ("clear", Con_Clear_f);
|
||||
Cmd_AddCommand ("condump", Con_Dump_f);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
===============
|
||||
Con_Linefeed
|
||||
===============
|
||||
*/
|
||||
void Con_Linefeed (qboolean skipnotify)
|
||||
{
|
||||
int i;
|
||||
|
||||
// mark time for transparent overlay
|
||||
if (con.current >= 0)
|
||||
{
|
||||
if (skipnotify)
|
||||
con.times[con.current % NUM_CON_TIMES] = 0;
|
||||
else
|
||||
con.times[con.current % NUM_CON_TIMES] = cls.realtime;
|
||||
}
|
||||
|
||||
con.x = 0;
|
||||
if (con.display == con.current)
|
||||
con.display++;
|
||||
con.current++;
|
||||
for(i=0; i<con.linewidth; i++)
|
||||
con.text[(con.current%con.totallines)*con.linewidth+i] = (ColorIndex(COLOR_WHITE)<<8) | ' ';
|
||||
}
|
||||
|
||||
/*
|
||||
================
|
||||
CL_ConsolePrint
|
||||
|
||||
Handles cursor positioning, line wrapping, etc
|
||||
All console printing must go through this in order to be logged to disk
|
||||
If no console is visible, the text will appear at the top of the game window
|
||||
================
|
||||
*/
|
||||
void CL_ConsolePrint( char *txt ) {
|
||||
int y;
|
||||
int c, l;
|
||||
int color;
|
||||
qboolean skipnotify = qfalse; // NERVE - SMF
|
||||
int prev; // NERVE - SMF
|
||||
|
||||
// TTimo - prefix for text that shows up in console but not in notify
|
||||
// backported from RTCW
|
||||
if ( !Q_strncmp( txt, "[skipnotify]", 12 ) ) {
|
||||
skipnotify = qtrue;
|
||||
txt += 12;
|
||||
}
|
||||
|
||||
// for some demos we don't want to ever show anything on the console
|
||||
if ( cl_noprint && cl_noprint->integer ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!con.initialized) {
|
||||
con.color[0] =
|
||||
con.color[1] =
|
||||
con.color[2] =
|
||||
con.color[3] = 1.0f;
|
||||
con.linewidth = -1;
|
||||
Con_CheckResize ();
|
||||
con.initialized = qtrue;
|
||||
}
|
||||
|
||||
color = ColorIndex(COLOR_WHITE);
|
||||
|
||||
while ( (c = *txt) != 0 ) {
|
||||
if ( Q_IsColorString( txt ) ) {
|
||||
color = ColorIndex( *(txt+1) );
|
||||
txt += 2;
|
||||
continue;
|
||||
}
|
||||
|
||||
// count word length
|
||||
for (l=0 ; l< con.linewidth ; l++) {
|
||||
if ( txt[l] <= ' ') {
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// word wrap
|
||||
if (l != con.linewidth && (con.x + l >= con.linewidth) ) {
|
||||
Con_Linefeed(skipnotify);
|
||||
|
||||
}
|
||||
|
||||
txt++;
|
||||
|
||||
switch (c)
|
||||
{
|
||||
case '\n':
|
||||
Con_Linefeed (skipnotify);
|
||||
break;
|
||||
case '\r':
|
||||
con.x = 0;
|
||||
break;
|
||||
default: // display character and advance
|
||||
y = con.current % con.totallines;
|
||||
con.text[y*con.linewidth+con.x] = (color << 8) | c;
|
||||
con.x++;
|
||||
if (con.x >= con.linewidth) {
|
||||
Con_Linefeed(skipnotify);
|
||||
con.x = 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// mark time for transparent overlay
|
||||
if (con.current >= 0) {
|
||||
// NERVE - SMF
|
||||
if ( skipnotify ) {
|
||||
prev = con.current % NUM_CON_TIMES - 1;
|
||||
if ( prev < 0 )
|
||||
prev = NUM_CON_TIMES - 1;
|
||||
con.times[prev] = 0;
|
||||
}
|
||||
else
|
||||
// -NERVE - SMF
|
||||
con.times[con.current % NUM_CON_TIMES] = cls.realtime;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
==============================================================================
|
||||
|
||||
DRAWING
|
||||
|
||||
==============================================================================
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
================
|
||||
Con_DrawInput
|
||||
|
||||
Draw the editline after a ] prompt
|
||||
================
|
||||
*/
|
||||
void Con_DrawInput (void) {
|
||||
int y;
|
||||
|
||||
if ( cls.state != CA_DISCONNECTED && !(Key_GetCatcher( ) & KEYCATCH_CONSOLE ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
y = con.vislines - ( g_console_charHeight * 2 );
|
||||
|
||||
re.SetColor( con.color );
|
||||
|
||||
re.Text_PaintChar(&cls.consoleFont, con.xadjust + 1 * g_console_charWidth, y, 1.f, ']', 0);
|
||||
|
||||
Field_Draw(&cls.consoleFont, &g_consoleField, con.xadjust + 2 * g_console_charWidth, y,
|
||||
SCREEN_WIDTH - 3 * g_console_charWidth, qtrue, qtrue);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
================
|
||||
Con_DrawNotify
|
||||
|
||||
Draws the last few lines of output transparently over the game top
|
||||
================
|
||||
*/
|
||||
void Con_DrawNotify (void)
|
||||
{
|
||||
int x, v;
|
||||
short *text;
|
||||
int i;
|
||||
int time;
|
||||
int skip;
|
||||
int currentColor;
|
||||
|
||||
currentColor = 7;
|
||||
re.SetColor( g_color_table[currentColor] );
|
||||
|
||||
v = 0;
|
||||
for (i= con.current-NUM_CON_TIMES+1 ; i<=con.current ; i++)
|
||||
{
|
||||
if (i < 0)
|
||||
continue;
|
||||
time = con.times[i % NUM_CON_TIMES];
|
||||
if (time == 0)
|
||||
continue;
|
||||
time = cls.realtime - time;
|
||||
if (time > con_notifytime->value*1000)
|
||||
continue;
|
||||
text = con.text + (i % con.totallines)*con.linewidth;
|
||||
|
||||
if (Key_GetCatcher( ) & (KEYCATCH_UI | KEYCATCH_CGAME) ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
for (x = 0 ; x < con.linewidth ; x++) {
|
||||
if ( ( text[x] & 0xff ) == ' ' ) {
|
||||
continue;
|
||||
}
|
||||
if ( ( (text[x]>>8)&7 ) != currentColor ) {
|
||||
currentColor = (text[x]>>8)&7;
|
||||
re.SetColor( g_color_table[currentColor] );
|
||||
}
|
||||
re.Text_PaintChar(&cls.consoleFont, cl_conXOffset->integer + con.xadjust + (x+1)*g_console_charWidth, v, 1.f, text[x] & 0xff,0);
|
||||
}
|
||||
|
||||
v += g_console_charHeight;
|
||||
}
|
||||
|
||||
re.SetColor( NULL );
|
||||
|
||||
if (Key_GetCatcher( ) & (KEYCATCH_UI | KEYCATCH_CGAME) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// draw the chat line
|
||||
if ( Key_GetCatcher( ) & KEYCATCH_MESSAGE )
|
||||
{
|
||||
if (chat_team)
|
||||
{
|
||||
//SCR_DrawBigString (8, v, "say_team:", 1.0f, qfalse );
|
||||
re.Text_Paint(&cls.consoleFont, 8, v, 1.f, 1.f, "say_team:", 0, 0, qtrue,qfalse);
|
||||
skip = 10;
|
||||
}
|
||||
else
|
||||
{
|
||||
//SCR_DrawBigString (8, v, "say:", 1.0f, qfalse );
|
||||
re.Text_Paint(&cls.consoleFont, 8, v, 1.f, 1.f, "say:", 0, 0, qtrue,qfalse);
|
||||
skip = 5;
|
||||
}
|
||||
|
||||
// TODO: make this use facfont?
|
||||
Field_BigDraw(&cls.consoleFont, &chatField, skip * g_console_charWidth, v,
|
||||
SCREEN_WIDTH - ( skip + 1 ) * g_console_charWidth, qtrue, qtrue );
|
||||
|
||||
v += g_console_charHeight;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
================
|
||||
Con_DrawSolidConsole
|
||||
|
||||
Draws the console with the solid background
|
||||
================
|
||||
*/
|
||||
void Con_DrawSolidConsole( float frac ) {
|
||||
int i, x, y;
|
||||
int rows;
|
||||
short *text;
|
||||
int row;
|
||||
int lines;
|
||||
// qhandle_t conShader;
|
||||
int currentColor;
|
||||
vec4_t color;
|
||||
|
||||
lines = cls.glconfig.vidHeight * frac;
|
||||
if (lines <= 0)
|
||||
return;
|
||||
|
||||
if (lines > cls.glconfig.vidHeight )
|
||||
lines = cls.glconfig.vidHeight;
|
||||
|
||||
// on wide screens, we will center the text
|
||||
con.xadjust = 0;
|
||||
SCR_AdjustFrom640( &con.xadjust, NULL, NULL, NULL );
|
||||
|
||||
// draw the background
|
||||
y = frac * SCREEN_HEIGHT - 2;
|
||||
if ( y < 1 ) {
|
||||
y = 0;
|
||||
}
|
||||
else {
|
||||
//SCR_DrawPic( 0, 0, SCREEN_WIDTH, y, cls.consoleShader );
|
||||
// IneQuation: transparent MoHAA-style console
|
||||
color[0] = 0.1125f;
|
||||
color[1] = 0.15f;
|
||||
color[2] = 0.21f;
|
||||
color[3] = 0.85f;
|
||||
SCR_FillRect(0, 0, SCREEN_WIDTH, y, color);
|
||||
}
|
||||
|
||||
color[0] = 0.7f;
|
||||
color[1] = 0.6f;
|
||||
color[2] = 0.05f;
|
||||
color[3] = 1;
|
||||
SCR_FillRect( 0, y, SCREEN_WIDTH, 2, color );
|
||||
|
||||
|
||||
// draw the version number
|
||||
|
||||
/*color[0] = 0.7;
|
||||
color[1] = 0.6;
|
||||
color[2] = 0.05;
|
||||
color[3] = 1;*/
|
||||
re.SetColor( color/*g_color_table[ColorIndex(COLOR_RED)]*/ );
|
||||
|
||||
i = strlen( Q3_VERSION );
|
||||
|
||||
for (x=0 ; x<i ; x++) {
|
||||
|
||||
re.Text_PaintChar(&cls.consoleFont, cls.glconfig.vidWidth - ( i - x ) * g_console_charWidth,
|
||||
(lines-(g_console_charHeight+g_console_charHeight/2)), 1.f, Q3_VERSION[x], 0);
|
||||
|
||||
}
|
||||
|
||||
// draw the text
|
||||
con.vislines = lines;
|
||||
rows = (lines - g_console_charWidth) / g_console_charWidth; // rows of text to draw
|
||||
|
||||
y = lines - g_console_charHeight * 3;
|
||||
|
||||
// draw from the bottom up
|
||||
if (con.display != con.current)
|
||||
{
|
||||
// draw arrows to show the buffer is backscrolled
|
||||
re.SetColor( g_color_table[ColorIndex(COLOR_RED)] );
|
||||
for (x=0 ; x<con.linewidth ; x+=4)
|
||||
re.Text_PaintChar(&cls.consoleFont, con.xadjust + (x+1)*SMALLCHAR_WIDTH, y, 1.f, '^',0);
|
||||
y -= SMALLCHAR_HEIGHT;
|
||||
rows--;
|
||||
}
|
||||
|
||||
row = con.display;
|
||||
|
||||
if ( con.x == 0 ) {
|
||||
row--;
|
||||
}
|
||||
|
||||
currentColor = 7;
|
||||
re.SetColor( g_color_table[currentColor] );
|
||||
|
||||
for (i=0 ; i<rows ; i++, y -= g_console_charHeight, row--)
|
||||
{
|
||||
if (row < 0)
|
||||
break;
|
||||
if (con.current - row >= con.totallines) {
|
||||
// past scrollback wrap point
|
||||
continue;
|
||||
}
|
||||
|
||||
text = con.text + (row % con.totallines)*con.linewidth;
|
||||
|
||||
for (x=0 ; x<con.linewidth ; x++) {
|
||||
if ( ( text[x] & 0xff ) == ' ' ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( ( (text[x]>>8)&7 ) != currentColor ) {
|
||||
currentColor = (text[x]>>8)&7;
|
||||
re.SetColor(g_color_table[currentColor]);
|
||||
}
|
||||
re.Text_PaintChar(&cls.consoleFont, con.xadjust + (x+1)*g_console_charWidth, y, 1.f, text[x] & 0xff,0);
|
||||
}
|
||||
}
|
||||
|
||||
// draw the input prompt, user text, and cursor if desired
|
||||
Con_DrawInput ();
|
||||
|
||||
re.SetColor( NULL );
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
==================
|
||||
Con_DrawConsole
|
||||
==================
|
||||
*/
|
||||
void Con_DrawConsole( void ) {
|
||||
// check for console width changes from a vid mode change
|
||||
Con_CheckResize ();
|
||||
|
||||
// if disconnected, render console full screen
|
||||
if ( cls.state == CA_DISCONNECTED ) {
|
||||
if ( !( Key_GetCatcher( ) & (KEYCATCH_UI | KEYCATCH_CGAME)) ) {
|
||||
Con_DrawSolidConsole( 1.0 );
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if ( con.displayFrac ) {
|
||||
Con_DrawSolidConsole( con.displayFrac );
|
||||
} else {
|
||||
// draw notify lines
|
||||
if ( cls.state == CA_ACTIVE && con_drawnotify->integer ) {
|
||||
Con_DrawNotify ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//================================================================
|
||||
|
||||
/*
|
||||
==================
|
||||
Con_RunConsole
|
||||
|
||||
Scroll it up or down
|
||||
==================
|
||||
*/
|
||||
void Con_RunConsole (void) {
|
||||
// decide on the destination height of the console
|
||||
if ( Key_GetCatcher( ) & KEYCATCH_CONSOLE )
|
||||
con.finalFrac = 0.5; // half screen
|
||||
else
|
||||
con.finalFrac = 0; // none visible
|
||||
|
||||
// scroll towards the destination height
|
||||
if (con.finalFrac < con.displayFrac)
|
||||
{
|
||||
con.displayFrac -= con_conspeed->value*cls.realFrametime*0.001;
|
||||
if (con.finalFrac > con.displayFrac)
|
||||
con.displayFrac = con.finalFrac;
|
||||
|
||||
}
|
||||
else if (con.finalFrac > con.displayFrac)
|
||||
{
|
||||
con.displayFrac += con_conspeed->value*cls.realFrametime*0.001;
|
||||
if (con.finalFrac < con.displayFrac)
|
||||
con.displayFrac = con.finalFrac;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
void Con_PageUp( void ) {
|
||||
con.display -= 2;
|
||||
if ( con.current - con.display >= con.totallines ) {
|
||||
con.display = con.current - con.totallines + 1;
|
||||
}
|
||||
}
|
||||
|
||||
void Con_PageDown( void ) {
|
||||
con.display += 2;
|
||||
if (con.display > con.current) {
|
||||
con.display = con.current;
|
||||
}
|
||||
}
|
||||
|
||||
void Con_Top( void ) {
|
||||
con.display = con.totallines;
|
||||
if ( con.current - con.display >= con.totallines ) {
|
||||
con.display = con.current - con.totallines + 1;
|
||||
}
|
||||
}
|
||||
|
||||
void Con_Bottom( void ) {
|
||||
con.display = con.current;
|
||||
}
|
||||
|
||||
|
||||
void Con_Close( void ) {
|
||||
if ( !com_cl_running->integer ) {
|
||||
return;
|
||||
}
|
||||
Field_Clear( &g_consoleField );
|
||||
Con_ClearNotify ();
|
||||
Key_SetCatcher( Key_GetCatcher( ) & ~KEYCATCH_CONSOLE );
|
||||
con.finalFrac = 0; // none visible
|
||||
con.displayFrac = 0;
|
||||
}
|
|
@ -23,7 +23,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|||
// cl_consolecmds.cpp : New client console commands.
|
||||
|
||||
#include "client.h"
|
||||
#include "glb_local.h"
|
||||
#include "listener.h"
|
||||
|
||||
/*
|
||||
===============
|
||||
|
|
|
@ -24,6 +24,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|||
#include "client.h"
|
||||
#include "server.h"
|
||||
#include "cl_ui.h"
|
||||
#include "tiki.h"
|
||||
#include <cm_terrain.h>
|
||||
#include "../sys/sys_local.h"
|
||||
#include <limits.h>
|
||||
|
@ -407,7 +408,8 @@ void CL_Record_f( void ) {
|
|||
continue;
|
||||
}
|
||||
MSG_WriteByte (&buf, svc_baseline);
|
||||
MSG_WriteDeltaEntity (&buf, &nullstate, ent, qtrue );
|
||||
// FIXME
|
||||
MSG_WriteDeltaEntity (&buf, &nullstate, ent, qtrue, 0.0 );
|
||||
}
|
||||
|
||||
MSG_WriteByte( &buf, svc_EOF );
|
||||
|
@ -2588,7 +2590,7 @@ void CL_StartHunkUsers( void ) {
|
|||
CL_RefMalloc
|
||||
============
|
||||
*/
|
||||
void *CL_RefMalloc( int size ) {
|
||||
void *CL_RefMalloc(size_t size ) {
|
||||
return Z_TagMalloc( size, TAG_RENDERER );
|
||||
}
|
||||
|
||||
|
|
|
@ -74,7 +74,8 @@ void CL_DeltaEntity (msg_t *msg, clSnapshot_t *frame, int newnum, entityState_t
|
|||
if ( unchanged ) {
|
||||
*state = *old;
|
||||
} else {
|
||||
MSG_ReadDeltaEntity( msg, old, state, newnum );
|
||||
// FIXME: frametime
|
||||
MSG_ReadDeltaEntity( msg, old, state, newnum, 0.0);
|
||||
}
|
||||
|
||||
if ( state->number == (MAX_GENTITIES-1) ) {
|
||||
|
@ -271,11 +272,12 @@ void CL_ParseSnapshot( msg_t *msg ) {
|
|||
MSG_ReadData( msg, &newSnap.areamask, len);
|
||||
|
||||
// read playerinfo
|
||||
SHOWNET( msg, "playerstate" );
|
||||
SHOWNET(msg, "playerstate");
|
||||
// FIXME: frametime
|
||||
if ( old ) {
|
||||
MSG_ReadDeltaPlayerstate( msg, &old->ps, &newSnap.ps );
|
||||
MSG_ReadDeltaPlayerstate( msg, &old->ps, &newSnap.ps, 0.0 );
|
||||
} else {
|
||||
MSG_ReadDeltaPlayerstate( msg, NULL, &newSnap.ps );
|
||||
MSG_ReadDeltaPlayerstate( msg, NULL, &newSnap.ps, 0.0);
|
||||
}
|
||||
|
||||
// read packet entities
|
||||
|
@ -500,7 +502,8 @@ void CL_ParseGamestate( msg_t *msg ) {
|
|||
//Com_Memset (&nullstate, 0, sizeof(nullstate));
|
||||
MSG_GetNullEntityState(&nullstate);
|
||||
es = &cl.entityBaselines[ newnum ];
|
||||
MSG_ReadDeltaEntity( msg, &nullstate, es, newnum );
|
||||
// FIXME: frametime
|
||||
MSG_ReadDeltaEntity( msg, &nullstate, es, newnum, 0.0);
|
||||
} else {
|
||||
Com_Error( ERR_DROP, "CL_ParseGamestate: bad command byte %i", cmd );
|
||||
}
|
||||
|
|
1212
code/client/cl_ui.c
1212
code/client/cl_ui.c
File diff suppressed because it is too large
Load diff
|
@ -22,15 +22,13 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|||
|
||||
#include "client.h"
|
||||
|
||||
#include "../botlib/botlib.h"
|
||||
#include "../server/server.h"
|
||||
#include "../renderercommon/tr_common.h"
|
||||
#include "tiki.h"
|
||||
#include <localization.h>
|
||||
|
||||
#include "cl_ui.h"
|
||||
|
||||
extern botlib_export_t *botlib_export;
|
||||
|
||||
typedef struct {
|
||||
float fadetime;
|
||||
float starttime;
|
||||
|
@ -4557,7 +4555,7 @@ UI_SetScoreBoardItem
|
|||
void UI_SetScoreBoardItem( int iItemNumber,
|
||||
const char *pszData1, const char *pszData2, const char *pszData3, const char *pszData4,
|
||||
const char *pszData5, const char *pszData6, const char *pszData7, const char *pszData8,
|
||||
vec4_t pTextColor, vec4_t pBackColor, qboolean bIsHeader )
|
||||
const vec4_t pTextColor, const vec4_t pBackColor, qboolean bIsHeader )
|
||||
{
|
||||
int i;
|
||||
float x, y, w, h;
|
||||
|
@ -5420,7 +5418,7 @@ UI_BeginLoadResource
|
|||
====================
|
||||
*/
|
||||
void UI_BeginLoadResource( void ) {
|
||||
uint64_t time = rdtsc();
|
||||
uint64_t time = __rdtsc();
|
||||
|
||||
startCountHigh = time >> 32;
|
||||
startCountLow = time;
|
||||
|
|
|
@ -72,7 +72,7 @@ void UI_HideScoreboard_f( void );
|
|||
void UI_SetScoreBoardItem( int iItemNumber,
|
||||
const char *pszData1, const char *pszData2, const char *pszData3, const char *pszData4,
|
||||
const char *pszData5, const char *pszData6, const char *pszData7, const char *pszData8,
|
||||
vec4_t pTextColor, vec4_t pBackColor, qboolean bIsHeader );
|
||||
const vec4_t pTextColor, const vec4_t pBackColor, qboolean bIsHeader );
|
||||
void UI_DeleteScoreBoardItems( int iMaxIndex );
|
||||
|
||||
//
|
||||
|
|
|
@ -21,7 +21,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|||
*/
|
||||
|
||||
#include "cl_ui.h"
|
||||
#include "cl_screen.h"
|
||||
|
||||
CLASS_DECLARATION( UIWidget, View3D, NULL )
|
||||
{
|
||||
|
|
|
@ -207,13 +207,13 @@ void S_ChannelSetup( void ) {
|
|||
Com_Memset( s_channels, 0, sizeof( s_channels ) );
|
||||
|
||||
p = s_channels;;
|
||||
q = p + MAX_CHANNELS;
|
||||
q = p + MAX_SOUNDCHANNELS;
|
||||
while( --q > p ) {
|
||||
*( channel_t ** )q = q - 1;
|
||||
}
|
||||
|
||||
*( channel_t ** )q = NULL;
|
||||
freelist = p + MAX_CHANNELS - 1;
|
||||
freelist = p + MAX_SOUNDCHANNELS - 1;
|
||||
Com_DPrintf( "Channel memory manager started\n" );
|
||||
}
|
||||
|
||||
|
@ -599,7 +599,7 @@ static void S_Base_StartSoundEx( const vec3_t origin, int entityNum, int entchan
|
|||
|
||||
ch = s_channels;
|
||||
inplay = 0;
|
||||
for( i = 0; i < MAX_CHANNELS; i++, ch++ ) {
|
||||
for( i = 0; i < MAX_SOUNDCHANNELS; i++, ch++ ) {
|
||||
if( ch->entnum == entityNum && ch->thesfx == sfx ) {
|
||||
if( time - ch->allocTime < 50 ) {
|
||||
// if (Cvar_VariableValue( "cg_showmiss" )) {
|
||||
|
@ -623,7 +623,7 @@ static void S_Base_StartSoundEx( const vec3_t origin, int entityNum, int entchan
|
|||
|
||||
oldest = sfx->lastTimeUsed;
|
||||
chosen = -1;
|
||||
for( i = 0; i < MAX_CHANNELS; i++, ch++ ) {
|
||||
for( i = 0; i < MAX_SOUNDCHANNELS; i++, ch++ ) {
|
||||
if( ch->entnum != listener_number && ch->entnum == entityNum && ch->allocTime<oldest && ch->entchannel != CHAN_ANNOUNCER ) {
|
||||
oldest = ch->allocTime;
|
||||
chosen = i;
|
||||
|
@ -631,7 +631,7 @@ static void S_Base_StartSoundEx( const vec3_t origin, int entityNum, int entchan
|
|||
}
|
||||
if( chosen == -1 ) {
|
||||
ch = s_channels;
|
||||
for( i = 0; i < MAX_CHANNELS; i++, ch++ ) {
|
||||
for( i = 0; i < MAX_SOUNDCHANNELS; i++, ch++ ) {
|
||||
if( ch->entnum != listener_number && ch->allocTime<oldest && ch->entchannel != CHAN_ANNOUNCER ) {
|
||||
oldest = ch->allocTime;
|
||||
chosen = i;
|
||||
|
@ -640,7 +640,7 @@ static void S_Base_StartSoundEx( const vec3_t origin, int entityNum, int entchan
|
|||
if( chosen == -1 ) {
|
||||
ch = s_channels;
|
||||
if( ch->entnum == listener_number ) {
|
||||
for( i = 0; i < MAX_CHANNELS; i++, ch++ ) {
|
||||
for( i = 0; i < MAX_SOUNDCHANNELS; i++, ch++ ) {
|
||||
if( ch->allocTime<oldest ) {
|
||||
oldest = ch->allocTime;
|
||||
chosen = i;
|
||||
|
@ -726,7 +726,7 @@ void S_Base_ClearSoundBuffer( void ) {
|
|||
|
||||
// stop looping sounds
|
||||
Com_Memset( loopSounds, 0, MAX_GENTITIES*sizeof( loopSound_t ) );
|
||||
Com_Memset( loop_channels, 0, MAX_CHANNELS*sizeof( channel_t ) );
|
||||
Com_Memset( loop_channels, 0, MAX_SOUNDCHANNELS*sizeof( channel_t ) );
|
||||
numLoopChannels = 0;
|
||||
|
||||
S_ChannelSetup();
|
||||
|
@ -972,7 +972,7 @@ void S_AddLoopSounds( void ) {
|
|||
ch->oldDopplerScale = loop->oldDopplerScale;
|
||||
ch->fullVolume = qfalse;
|
||||
numLoopChannels++;
|
||||
if( numLoopChannels == MAX_CHANNELS ) {
|
||||
if( numLoopChannels == MAX_SOUNDCHANNELS ) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -1176,7 +1176,7 @@ void S_Base_Respatialize( int entityNum, const vec3_t head, vec3_t axis[ 3 ], in
|
|||
|
||||
// update spatialization for dynamic sounds
|
||||
ch = s_channels;
|
||||
for( i = 0; i < MAX_CHANNELS; i++, ch++ ) {
|
||||
for( i = 0; i < MAX_SOUNDCHANNELS; i++, ch++ ) {
|
||||
if( !ch->thesfx ) {
|
||||
continue;
|
||||
}
|
||||
|
@ -1217,7 +1217,7 @@ qboolean S_ScanChannelStarts( void ) {
|
|||
newSamples = qfalse;
|
||||
ch = s_channels;
|
||||
|
||||
for( i = 0; i<MAX_CHANNELS; i++, ch++ ) {
|
||||
for( i = 0; i<MAX_SOUNDCHANNELS; i++, ch++ ) {
|
||||
if( !ch->thesfx ) {
|
||||
continue;
|
||||
}
|
||||
|
@ -1262,7 +1262,7 @@ void S_Base_Update( void ) {
|
|||
if( s_show->integer == 2 ) {
|
||||
total = 0;
|
||||
ch = s_channels;
|
||||
for( i = 0; i<MAX_CHANNELS; i++, ch++ ) {
|
||||
for( i = 0; i<MAX_SOUNDCHANNELS; i++, ch++ ) {
|
||||
if( ch->thesfx && ( ch->leftvol || ch->rightvol ) ) {
|
||||
Com_Printf( "%d %d %s\n", ch->leftvol, ch->rightvol, ch->thesfx->soundName );
|
||||
total++;
|
||||
|
|
|
@ -716,7 +716,7 @@ void S_PaintChannels( int endtime ) {
|
|||
|
||||
// paint in the channels.
|
||||
ch = s_channels;
|
||||
for( i = 0; i < MAX_CHANNELS; i++, ch++ ) {
|
||||
for( i = 0; i < MAX_SOUNDCHANNELS; i++, ch++ ) {
|
||||
if( !ch->thesfx || ( ch->leftvol<0.25 && ch->rightvol<0.25 ) ) {
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|||
*/
|
||||
#include "../client/client.h"
|
||||
|
||||
void IN_Init( void ) {
|
||||
void IN_Init( void *windowData ) {
|
||||
}
|
||||
|
||||
void IN_Restart( void ) {
|
||||
|
|
|
@ -148,7 +148,7 @@ void Cbuf_InsertText( const char *text ) {
|
|||
Cbuf_ExecuteText
|
||||
============
|
||||
*/
|
||||
void Cbuf_ExecuteText (int exec_when, const char *text)
|
||||
void Cbuf_ExecuteText (cbufExec_t exec_when, const char *text)
|
||||
{
|
||||
switch (exec_when)
|
||||
{
|
||||
|
|
|
@ -1879,7 +1879,7 @@ FS_WriteFile
|
|||
Filename are reletive to the quake search path
|
||||
============
|
||||
*/
|
||||
size_t FS_WriteFile( const char *qpath, const void *buffer, size_t size ) {
|
||||
int FS_WriteFile( const char *qpath, const void *buffer, int size ) {
|
||||
fileHandle_t f;
|
||||
size_t len;
|
||||
|
||||
|
@ -1911,7 +1911,7 @@ FS_WriteTextFile
|
|||
Filename are reletive to the quake search path
|
||||
============
|
||||
*/
|
||||
void FS_WriteTextFile( const char *qpath, const void *buffer, size_t size ) {
|
||||
void FS_WriteTextFile( const char *qpath, const void *buffer, int size ) {
|
||||
fileHandle_t f;
|
||||
|
||||
f = FS_FOpenTextFileWrite( qpath );
|
||||
|
|
|
@ -2083,7 +2083,7 @@ Can go from either a baseline or a previous packet_entity
|
|||
extern cvar_t *cl_shownet;
|
||||
|
||||
void MSG_ReadDeltaEntity( msg_t *msg, entityState_t *from, entityState_t *to,
|
||||
int number) {
|
||||
int number, float frameTime) {
|
||||
int i, lc;
|
||||
int numFields;
|
||||
netField_t *field;
|
||||
|
|
|
@ -431,7 +431,7 @@ void Cbuf_Init (void);
|
|||
void Cbuf_AddText( const char *text );
|
||||
// Adds command text at the end of the buffer, does NOT add a final \n
|
||||
|
||||
void Cbuf_ExecuteText( int exec_when, const char *text );
|
||||
void Cbuf_ExecuteText(cbufExec_t exec_when, const char *text );
|
||||
// this can be used in place of either Cbuf_AddText or Cbuf_InsertText
|
||||
|
||||
void Cbuf_Execute (int msec);
|
||||
|
@ -704,10 +704,10 @@ void FS_FreeFile( void *buffer );
|
|||
const char *FS_PrepFileWrite( const char *filename );
|
||||
// prepares the file to be written
|
||||
|
||||
size_t FS_WriteFile( const char *qpath, const void *buffer, size_t size );
|
||||
int FS_WriteFile( const char *qpath, const void *buffer, int size );
|
||||
// writes a complete file, creating any subdirectories needed
|
||||
|
||||
void FS_WriteTextFile( const char *qpath, const void *buffer, size_t size );
|
||||
void FS_WriteTextFile( const char *qpath, const void *buffer, int size );
|
||||
// writes a complete text file, creating any subdirectories needed
|
||||
|
||||
int FS_filelength( fileHandle_t f );
|
||||
|
@ -1088,7 +1088,7 @@ qboolean SV_GameCommand( void );
|
|||
//
|
||||
// input interface
|
||||
//
|
||||
void IN_Init();
|
||||
void IN_Init(void *windowData);
|
||||
void IN_Frame(void);
|
||||
void IN_Shutdown(void);
|
||||
void IN_Restart(void);
|
||||
|
|
|
@ -45,7 +45,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|||
#elif defined(CGAME_DLL)
|
||||
|
||||
#define FILE_FS_FreeFile cgi.FS_FreeFile
|
||||
#define FILE_FS_ReadFile(a, b) cgi.FS_ReadFile(a, b)
|
||||
#define FILE_FS_ReadFile(a, b) cgi.FS_ReadFile(a, b, qtrue)
|
||||
#define FILE_Malloc cgi.Malloc
|
||||
#define FILE_Free cgi.Free
|
||||
#define FILE_Error cgi.Error
|
||||
|
|
|
@ -118,8 +118,10 @@ typedef struct {
|
|||
int (*MarkFragments)( int numPoints, const vec3_t *points, const vec3_t projection,
|
||||
int maxPoints, vec3_t pointBuffer, int maxFragments, markFragment_t *fragmentBuffer, float fRadiusSquared );
|
||||
|
||||
int (*MarkFragmentsForInlineModel)( clipHandle_t bmodel, vec3_t angles, vec3_t origin,
|
||||
int numPoints, vec3_t *points, vec3_t projection, int maxPoints, float *pointBuffer, int maxFragments, markFragment_t *fragmentBuffer, float radiusSquared );
|
||||
int (*MarkFragmentsForInlineModel)( clipHandle_t bmodel, vec3_t vAngles, vec3_t vOrigin,
|
||||
int numPoints, const vec3_t *points, const vec3_t projection,
|
||||
int maxPoints, vec3_t pointBuffer,
|
||||
int maxFragments, markFragment_t *fragmentBuffer, float fRadiusSquared );
|
||||
|
||||
void ( *GetInlineModelBounds )( int index, vec3_t mins, vec3_t maxs );
|
||||
void ( *GetLightingForDecal )( vec3_t light, vec3_t facing, vec3_t origin );
|
||||
|
@ -190,12 +192,12 @@ typedef struct {
|
|||
// stack based memory allocation for per-level things that
|
||||
// won't be freed
|
||||
void (*Hunk_Clear )( void );
|
||||
void *(*Hunk_Alloc)( int size );
|
||||
void *(*Hunk_AllocateTempMemory)( int size );
|
||||
void *(*Hunk_Alloc)(size_t size );
|
||||
void *(*Hunk_AllocateTempMemory)(size_t size );
|
||||
void (*Hunk_FreeTempMemory)( void *block );
|
||||
|
||||
// dynamic memory allocator for things that need to be freed
|
||||
void *(*Malloc)( size_t bytes );
|
||||
void *(*Malloc)(size_t bytes );
|
||||
void (*Free)( void *buf );
|
||||
void (*Clear)( void );
|
||||
|
||||
|
@ -209,7 +211,7 @@ typedef struct {
|
|||
int (*Cmd_Argc) (void);
|
||||
char *(*Cmd_Argv) (int i);
|
||||
|
||||
void (*Cmd_ExecuteText) (int exec_when, const char *text);
|
||||
void (*Cmd_ExecuteText) (cbufExec_t exec_when, const char *text);
|
||||
|
||||
// visualization for debugging collision detection
|
||||
void (*CM_DrawDebugSurface)( void (*drawPoly)(int color, int numPoints, float *points) );
|
||||
|
@ -217,7 +219,7 @@ typedef struct {
|
|||
// a -1 return means the file does not exist
|
||||
// NULL can be passed for buf to just determine existance
|
||||
int (*FS_FOpenFile)( const char *filename, fileHandle_t *file, qboolean uniqueFILE, qboolean quiet );
|
||||
int (*FS_Read)( void *buffer, int len, fileHandle_t f );
|
||||
size_t (*FS_Read)( void *buffer, size_t len, fileHandle_t f );
|
||||
void (*FS_CloseFile)( fileHandle_t f );
|
||||
int (*FS_Seek)( fileHandle_t f, long offset, fsOrigin_t origin );
|
||||
int (*FS_FileIsInPAK)( const char *filename, int *pChecksum );
|
||||
|
@ -261,7 +263,7 @@ typedef struct {
|
|||
orientation_t (*TIKI_OrientationInternal)( dtiki_t *tiki, int entnum, int tagnum, float scale );
|
||||
qboolean (*TIKI_IsOnGroundInternal) (dtiki_t *tiki, int entnum, int tagnum, float threshold );
|
||||
void (*TIKI_SetPoseInternal)( void *skeletor, const frameInfo_t *frameInfo, int *bone_tag, vec4_t *bone_quat, float actionWeight );
|
||||
void *(*TIKI_Alloc)( int size );
|
||||
void *(*TIKI_Alloc)(size_t size );
|
||||
float (*GetRadiusInternal)( dtiki_t *tiki, int entnum, float scale );
|
||||
float (*GetCentroidRadiusInternal)( dtiki_t *tiki, int entnum, float scale, float *centroid );
|
||||
void (*GetFrameInternal)( dtiki_t *tiki, int entnum, skelAnimFrame_t *newFrame );
|
||||
|
|
|
@ -23,6 +23,9 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|||
#ifndef __UIMENU_H__
|
||||
#define __UIMENU_H__
|
||||
|
||||
#include "listener.h"
|
||||
#include "stack.h"
|
||||
|
||||
class Menu : public Listener {
|
||||
qboolean m_fullscreen;
|
||||
int m_vidmode;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue