2011-05-09 22:00:00 +02:00
|
|
|
/*
|
|
|
|
common.c - misc functions used by dlls'
|
|
|
|
Copyright (C) 2008 Uncle Mike
|
|
|
|
|
|
|
|
This program is free software: you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
*/
|
2008-06-07 22:00:00 +02:00
|
|
|
|
2008-06-09 22:00:00 +02:00
|
|
|
#include "common.h"
|
2010-09-10 22:00:00 +02:00
|
|
|
#include "studio.h"
|
2008-06-08 22:00:00 +02:00
|
|
|
#include "mathlib.h"
|
2008-08-05 22:00:00 +02:00
|
|
|
#include "const.h"
|
2008-06-29 22:00:00 +02:00
|
|
|
#include "client.h"
|
2011-03-08 22:00:00 +01:00
|
|
|
#include "library.h"
|
2008-06-08 22:00:00 +02:00
|
|
|
|
2009-11-10 22:00:00 +01:00
|
|
|
/*
|
|
|
|
==============
|
2010-08-20 22:00:00 +02:00
|
|
|
COM_ParseFile
|
2009-11-10 22:00:00 +01:00
|
|
|
|
2011-04-06 22:00:00 +02:00
|
|
|
text parser
|
2009-11-10 22:00:00 +01:00
|
|
|
==============
|
|
|
|
*/
|
2010-08-20 22:00:00 +02:00
|
|
|
char *COM_ParseFile( char *data, char *token )
|
2009-11-10 22:00:00 +01:00
|
|
|
{
|
2010-08-20 22:00:00 +02:00
|
|
|
int c, len;
|
|
|
|
|
|
|
|
if( !token )
|
|
|
|
return NULL;
|
2009-11-10 22:00:00 +01:00
|
|
|
|
2010-08-20 22:00:00 +02:00
|
|
|
len = 0;
|
2009-11-10 22:00:00 +01:00
|
|
|
token[0] = 0;
|
|
|
|
|
2010-08-20 22:00:00 +02:00
|
|
|
if( !data )
|
2009-11-10 22:00:00 +01:00
|
|
|
return NULL;
|
2010-08-20 22:00:00 +02:00
|
|
|
|
|
|
|
// skip whitespace
|
2009-11-10 22:00:00 +01:00
|
|
|
skipwhite:
|
2011-07-07 22:00:00 +02:00
|
|
|
while(( c = ((byte)*data)) <= ' ' )
|
2009-11-10 22:00:00 +01:00
|
|
|
{
|
|
|
|
if( c == 0 )
|
2010-08-20 22:00:00 +02:00
|
|
|
return NULL; // end of file;
|
2009-11-10 22:00:00 +01:00
|
|
|
data++;
|
|
|
|
}
|
|
|
|
|
|
|
|
// skip // comments
|
|
|
|
if( c=='/' && data[1] == '/' )
|
|
|
|
{
|
|
|
|
while( *data && *data != '\n' )
|
|
|
|
data++;
|
|
|
|
goto skipwhite;
|
|
|
|
}
|
|
|
|
|
|
|
|
// handle quoted strings specially
|
2010-08-20 22:00:00 +02:00
|
|
|
if( c == '\"' )
|
2009-11-10 22:00:00 +01:00
|
|
|
{
|
|
|
|
data++;
|
|
|
|
while( 1 )
|
|
|
|
{
|
2011-07-07 22:00:00 +02:00
|
|
|
c = (byte)*data++;
|
2010-08-20 22:00:00 +02:00
|
|
|
if( c == '\"' || !c )
|
2009-11-10 22:00:00 +01:00
|
|
|
{
|
|
|
|
token[len] = 0;
|
2010-08-20 22:00:00 +02:00
|
|
|
return data;
|
2009-11-10 22:00:00 +01:00
|
|
|
}
|
|
|
|
token[len] = c;
|
|
|
|
len++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// parse single characters
|
2011-03-01 22:00:00 +01:00
|
|
|
if( c == '{' || c == '}' || c == ')' || c == '(' || c == '\'' || c == ',' )
|
2009-11-10 22:00:00 +01:00
|
|
|
{
|
|
|
|
token[len] = c;
|
|
|
|
len++;
|
|
|
|
token[len] = 0;
|
2010-08-20 22:00:00 +02:00
|
|
|
return data + 1;
|
2009-11-10 22:00:00 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// parse a regular word
|
|
|
|
do
|
|
|
|
{
|
|
|
|
token[len] = c;
|
|
|
|
data++;
|
|
|
|
len++;
|
2011-07-07 22:00:00 +02:00
|
|
|
c = ((byte)*data);
|
2010-08-20 22:00:00 +02:00
|
|
|
|
|
|
|
if( c == '{' || c == '}' || c == ')' || c == '(' || c == '\'' || c == ',' )
|
2009-11-10 22:00:00 +01:00
|
|
|
break;
|
|
|
|
} while( c > 32 );
|
|
|
|
|
|
|
|
token[len] = 0;
|
2010-08-20 22:00:00 +02:00
|
|
|
|
|
|
|
return data;
|
2009-11-10 22:00:00 +01:00
|
|
|
}
|
|
|
|
|
2011-04-05 22:00:00 +02:00
|
|
|
/*
|
|
|
|
=============
|
|
|
|
COM_FileSize
|
|
|
|
|
|
|
|
=============
|
|
|
|
*/
|
|
|
|
int COM_FileSize( const char *filename )
|
|
|
|
{
|
|
|
|
return FS_FileSize( filename, false );
|
|
|
|
}
|
|
|
|
|
2010-11-03 22:00:00 +01:00
|
|
|
/*
|
|
|
|
=============
|
|
|
|
COM_AddAppDirectoryToSearchPath
|
|
|
|
|
|
|
|
=============
|
|
|
|
*/
|
|
|
|
void COM_AddAppDirectoryToSearchPath( const char *pszBaseDir, const char *appName )
|
|
|
|
{
|
|
|
|
string dir;
|
|
|
|
|
|
|
|
if( !pszBaseDir || !appName )
|
|
|
|
{
|
|
|
|
MsgDev( D_ERROR, "COM_AddDirectorySearchPath: bad directory or appname\n" );
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2011-03-09 22:00:00 +01:00
|
|
|
Q_snprintf( dir, sizeof( dir ), "%s/%s", pszBaseDir, appName );
|
2010-11-03 22:00:00 +01:00
|
|
|
FS_AddGameDirectory( dir, FS_GAMEDIR_PATH );
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
===========
|
|
|
|
COM_ExpandFilename
|
|
|
|
|
|
|
|
Finds the file in the search path, copies over the name with the full path name.
|
|
|
|
This doesn't search in the pak file.
|
|
|
|
===========
|
|
|
|
*/
|
|
|
|
int COM_ExpandFilename( const char *fileName, char *nameOutBuffer, int nameOutBufferSize )
|
|
|
|
{
|
|
|
|
const char *path;
|
|
|
|
char result[MAX_SYSPATH];
|
|
|
|
|
|
|
|
if( !fileName || !*fileName || !nameOutBuffer || nameOutBufferSize <= 0 )
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
// filename examples:
|
|
|
|
// media\sierra.avi - D:\Xash3D\valve\media\sierra.avi
|
|
|
|
// models\barney.mdl - D:\Xash3D\bshift\models\barney.mdl
|
2011-03-08 22:00:00 +01:00
|
|
|
if(( path = FS_GetDiskPath( fileName, false )) != NULL )
|
2010-11-03 22:00:00 +01:00
|
|
|
{
|
2011-04-05 22:00:00 +02:00
|
|
|
Q_sprintf( result, "%s/%s", host.rootdir, path );
|
2010-11-03 22:00:00 +01:00
|
|
|
|
|
|
|
// check for enough room
|
2011-03-09 22:00:00 +01:00
|
|
|
if( Q_strlen( result ) > nameOutBufferSize )
|
2010-11-03 22:00:00 +01:00
|
|
|
return 0;
|
|
|
|
|
2011-03-09 22:00:00 +01:00
|
|
|
Q_strncpy( nameOutBuffer, result, nameOutBufferSize );
|
2010-11-03 22:00:00 +01:00
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2011-04-05 22:00:00 +02:00
|
|
|
/*
|
|
|
|
============
|
|
|
|
COM_FixSlashes
|
|
|
|
|
|
|
|
Changes all '/' characters into '\' characters, in place.
|
|
|
|
============
|
|
|
|
*/
|
|
|
|
void COM_FixSlashes( char *pname )
|
|
|
|
{
|
|
|
|
while( *pname )
|
|
|
|
{
|
2011-04-10 22:00:00 +02:00
|
|
|
if( *pname == '\\' )
|
|
|
|
*pname = '/';
|
2011-04-05 22:00:00 +02:00
|
|
|
pname++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2009-11-10 22:00:00 +01:00
|
|
|
/*
|
|
|
|
=============
|
2011-04-06 22:00:00 +02:00
|
|
|
COM_MemFgets
|
2009-11-10 22:00:00 +01:00
|
|
|
|
|
|
|
=============
|
|
|
|
*/
|
2011-04-06 22:00:00 +02:00
|
|
|
char *COM_MemFgets( byte *pMemFile, int fileSize, int *filePos, char *pBuffer, int bufferSize )
|
2009-11-10 22:00:00 +01:00
|
|
|
{
|
|
|
|
int i, last, stop;
|
|
|
|
|
|
|
|
if( !pMemFile || !pBuffer || !filePos )
|
|
|
|
return NULL;
|
|
|
|
|
|
|
|
if( *filePos >= fileSize )
|
|
|
|
return NULL;
|
|
|
|
|
|
|
|
i = *filePos;
|
|
|
|
last = fileSize;
|
|
|
|
|
|
|
|
// fgets always NULL terminates, so only read bufferSize-1 characters
|
|
|
|
if( last - *filePos > ( bufferSize - 1 ))
|
|
|
|
last = *filePos + ( bufferSize - 1);
|
|
|
|
|
|
|
|
stop = 0;
|
|
|
|
|
|
|
|
// stop at the next newline (inclusive) or end of buffer
|
|
|
|
while( i < last && !stop )
|
|
|
|
{
|
|
|
|
if( pMemFile[i] == '\n' )
|
|
|
|
stop = 1;
|
|
|
|
i++;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// if we actually advanced the pointer, copy it over
|
|
|
|
if( i != *filePos )
|
|
|
|
{
|
|
|
|
// we read in size bytes
|
|
|
|
int size = i - *filePos;
|
|
|
|
|
|
|
|
// copy it out
|
2011-03-10 22:00:00 +01:00
|
|
|
Q_memcpy( pBuffer, pMemFile + *filePos, size );
|
2009-11-10 22:00:00 +01:00
|
|
|
|
|
|
|
// If the buffer isn't full, terminate (this is always true)
|
|
|
|
if( size < bufferSize ) pBuffer[size] = 0;
|
|
|
|
|
|
|
|
// update file pointer
|
|
|
|
*filePos = i;
|
|
|
|
return pBuffer;
|
|
|
|
}
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2010-08-20 22:00:00 +02:00
|
|
|
/*
|
|
|
|
====================
|
|
|
|
Cache_Check
|
|
|
|
|
|
|
|
consistency check
|
|
|
|
====================
|
|
|
|
*/
|
|
|
|
void *Cache_Check( byte *mempool, cache_user_t *c )
|
|
|
|
{
|
|
|
|
if( !c->data )
|
|
|
|
return NULL;
|
|
|
|
|
2011-03-11 22:00:00 +01:00
|
|
|
if( !Mem_IsAllocatedExt( mempool, c->data ))
|
2010-08-20 22:00:00 +02:00
|
|
|
return NULL;
|
|
|
|
|
|
|
|
return c->data;
|
|
|
|
}
|
|
|
|
|
2008-12-25 22:00:00 +01:00
|
|
|
/*
|
|
|
|
=============
|
2011-04-06 22:00:00 +02:00
|
|
|
COM_LoadFileForMe
|
2008-12-25 22:00:00 +01:00
|
|
|
|
|
|
|
=============
|
|
|
|
*/
|
2011-04-06 22:00:00 +02:00
|
|
|
byte* COM_LoadFileForMe( const char *filename, int *pLength )
|
2008-12-25 22:00:00 +01:00
|
|
|
{
|
2011-04-06 22:00:00 +02:00
|
|
|
string name;
|
2011-10-14 22:00:00 +02:00
|
|
|
byte *file, *pfile;
|
|
|
|
int iLength;
|
2011-04-06 22:00:00 +02:00
|
|
|
|
2010-08-18 22:00:00 +02:00
|
|
|
if( !filename || !*filename )
|
|
|
|
{
|
|
|
|
if( pLength ) *pLength = 0;
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2011-10-14 22:00:00 +02:00
|
|
|
Q_strncpy( name, filename, sizeof( name ));
|
|
|
|
COM_FixSlashes( name );
|
|
|
|
|
|
|
|
pfile = FS_LoadFile( name, &iLength, false );
|
|
|
|
if( pLength ) *pLength = iLength;
|
|
|
|
|
|
|
|
if( pfile )
|
2011-04-06 22:00:00 +02:00
|
|
|
{
|
2011-10-14 22:00:00 +02:00
|
|
|
file = malloc( iLength + 1 );
|
|
|
|
Q_memcpy( file, pfile, iLength );
|
|
|
|
file[iLength] = '\0';
|
|
|
|
Mem_Free( pfile );
|
|
|
|
pfile = file;
|
2011-04-06 22:00:00 +02:00
|
|
|
}
|
2009-09-22 22:00:00 +02:00
|
|
|
|
2011-10-14 22:00:00 +02:00
|
|
|
return pfile;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
=============
|
|
|
|
COM_LoadFile
|
|
|
|
|
|
|
|
=============
|
|
|
|
*/
|
|
|
|
byte *COM_LoadFile( const char *filename, int usehunk, int *pLength )
|
|
|
|
{
|
|
|
|
string name;
|
|
|
|
byte *file, *pfile;
|
|
|
|
int iLength;
|
|
|
|
|
|
|
|
ASSERT( usehunk == 5 );
|
|
|
|
|
|
|
|
if( !filename || !*filename )
|
|
|
|
{
|
|
|
|
if( pLength ) *pLength = 0;
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
Q_strncpy( name, filename, sizeof( name ));
|
|
|
|
COM_FixSlashes( name );
|
|
|
|
|
|
|
|
pfile = FS_LoadFile( name, &iLength, false );
|
|
|
|
if( pLength ) *pLength = iLength;
|
|
|
|
|
|
|
|
if( pfile )
|
|
|
|
{
|
|
|
|
file = malloc( iLength + 1 );
|
|
|
|
Q_memcpy( file, pfile, iLength );
|
|
|
|
file[iLength] = '\0';
|
|
|
|
Mem_Free( pfile );
|
|
|
|
pfile = file;
|
|
|
|
}
|
|
|
|
|
|
|
|
return pfile;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
=============
|
|
|
|
COM_FreeFile
|
|
|
|
|
|
|
|
=============
|
|
|
|
*/
|
|
|
|
void COM_FreeFile( void *buffer )
|
|
|
|
{
|
|
|
|
free( buffer );
|
2009-09-22 22:00:00 +02:00
|
|
|
}
|
2011-04-05 22:00:00 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
=============
|
|
|
|
pfnGetModelType
|
|
|
|
|
|
|
|
=============
|
|
|
|
*/
|
|
|
|
int pfnGetModelType( model_t *mod )
|
|
|
|
{
|
|
|
|
if( !mod ) return mod_bad;
|
|
|
|
return mod->type;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
=============
|
|
|
|
pfnGetModelBounds
|
|
|
|
|
|
|
|
=============
|
|
|
|
*/
|
|
|
|
void pfnGetModelBounds( model_t *mod, float *mins, float *maxs )
|
|
|
|
{
|
|
|
|
if( mod )
|
|
|
|
{
|
|
|
|
if( mins ) VectorCopy( mod->mins, mins );
|
|
|
|
if( maxs ) VectorCopy( mod->maxs, maxs );
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
MsgDev( D_ERROR, "Mod_GetBounds: NULL model\n" );
|
|
|
|
if( mins ) VectorClear( mins );
|
|
|
|
if( maxs ) VectorClear( maxs );
|
|
|
|
}
|
|
|
|
}
|
2010-10-20 22:00:00 +02:00
|
|
|
|
2009-01-22 22:00:00 +01:00
|
|
|
/*
|
|
|
|
=============
|
2010-10-20 22:00:00 +02:00
|
|
|
pfnCvar_RegisterVariable
|
2009-01-22 22:00:00 +01:00
|
|
|
|
|
|
|
=============
|
|
|
|
*/
|
2010-10-22 22:00:00 +02:00
|
|
|
cvar_t *pfnCvar_RegisterVariable( const char *szName, const char *szValue, int flags )
|
2009-01-22 22:00:00 +01:00
|
|
|
{
|
2010-10-22 22:00:00 +02:00
|
|
|
return (cvar_t *)Cvar_Get( szName, szValue, flags|CVAR_CLIENTDLL, "" );
|
2009-01-22 22:00:00 +01:00
|
|
|
}
|
2010-10-22 22:00:00 +02:00
|
|
|
|
2010-08-15 22:00:00 +02:00
|
|
|
/*
|
|
|
|
=============
|
|
|
|
pfnCVarGetPointer
|
|
|
|
|
|
|
|
can return NULL
|
|
|
|
=============
|
|
|
|
*/
|
|
|
|
cvar_t *pfnCVarGetPointer( const char *szVarName )
|
|
|
|
{
|
2011-04-08 22:00:00 +02:00
|
|
|
cvar_t *cvPtr;
|
|
|
|
|
|
|
|
cvPtr = (cvar_t *)Cvar_FindVar( szVarName );
|
|
|
|
|
|
|
|
return cvPtr;
|
2010-08-15 22:00:00 +02:00
|
|
|
}
|
2010-07-18 22:00:00 +02:00
|
|
|
|
2011-03-15 22:00:00 +01:00
|
|
|
/*
|
|
|
|
=============
|
|
|
|
pfnAddClientCommand
|
|
|
|
|
|
|
|
=============
|
|
|
|
*/
|
|
|
|
int pfnAddClientCommand( const char *cmd_name, xcommand_t func )
|
|
|
|
{
|
|
|
|
if( !cmd_name || !*cmd_name )
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
// NOTE: if( func == NULL ) cmd will be forwarded to a server
|
2011-04-06 22:00:00 +02:00
|
|
|
Cmd_AddClientCommand( cmd_name, func );
|
2011-03-15 22:00:00 +01:00
|
|
|
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
2010-08-15 22:00:00 +02:00
|
|
|
/*
|
|
|
|
=============
|
2010-08-20 22:00:00 +02:00
|
|
|
Con_Printf
|
2010-08-15 22:00:00 +02:00
|
|
|
|
|
|
|
=============
|
|
|
|
*/
|
2010-08-20 22:00:00 +02:00
|
|
|
void Con_Printf( char *szFmt, ... )
|
2010-08-15 22:00:00 +02:00
|
|
|
{
|
|
|
|
char buffer[2048]; // must support > 1k messages
|
|
|
|
va_list args;
|
|
|
|
|
2011-03-07 22:00:00 +01:00
|
|
|
if( host.developer <= 0 )
|
|
|
|
return;
|
|
|
|
|
2010-08-15 22:00:00 +02:00
|
|
|
va_start( args, szFmt );
|
2011-03-09 22:00:00 +01:00
|
|
|
Q_vsnprintf( buffer, 2048, szFmt, args );
|
2010-08-15 22:00:00 +02:00
|
|
|
va_end( args );
|
|
|
|
|
2011-03-12 22:00:00 +01:00
|
|
|
Sys_Print( buffer );
|
2010-08-15 22:00:00 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
=============
|
2010-08-20 22:00:00 +02:00
|
|
|
Con_DPrintf
|
2010-08-15 22:00:00 +02:00
|
|
|
|
|
|
|
=============
|
|
|
|
*/
|
2010-08-20 22:00:00 +02:00
|
|
|
void Con_DPrintf( char *szFmt, ... )
|
2010-08-15 22:00:00 +02:00
|
|
|
{
|
|
|
|
char buffer[2048]; // must support > 1k messages
|
|
|
|
va_list args;
|
|
|
|
|
2011-04-05 22:00:00 +02:00
|
|
|
if( host.developer < D_INFO )
|
2010-09-09 22:00:00 +02:00
|
|
|
return;
|
2010-08-15 22:00:00 +02:00
|
|
|
|
|
|
|
va_start( args, szFmt );
|
2011-03-09 22:00:00 +01:00
|
|
|
Q_vsnprintf( buffer, 2048, szFmt, args );
|
2010-08-15 22:00:00 +02:00
|
|
|
va_end( args );
|
|
|
|
|
2011-03-12 22:00:00 +01:00
|
|
|
Sys_Print( buffer );
|
2010-08-15 22:00:00 +02:00
|
|
|
}
|
|
|
|
|
2011-10-14 22:00:00 +02:00
|
|
|
/*
|
|
|
|
=============
|
|
|
|
COM_CompareFileTime
|
|
|
|
|
|
|
|
=============
|
|
|
|
*/
|
|
|
|
int COM_CompareFileTime( const char *filename1, const char *filename2, int *iCompare )
|
|
|
|
{
|
|
|
|
int bRet = 0;
|
|
|
|
|
|
|
|
*iCompare = 0;
|
|
|
|
|
|
|
|
if( filename1 && filename2 )
|
|
|
|
{
|
|
|
|
long ft1 = FS_FileTime( filename1, false );
|
|
|
|
long ft2 = FS_FileTime( filename2, false );
|
|
|
|
|
|
|
|
// one of files is missing
|
|
|
|
if( ft1 == -1 || ft2 == -1 )
|
|
|
|
return bRet;
|
|
|
|
|
|
|
|
*iCompare = Host_CompareFileTime( ft1, ft2 );
|
|
|
|
bRet = 1;
|
|
|
|
}
|
|
|
|
return bRet;
|
|
|
|
}
|
|
|
|
|
2008-12-25 22:00:00 +01:00
|
|
|
/*
|
|
|
|
=============
|
2010-04-09 22:00:00 +02:00
|
|
|
pfnGetGameDir
|
2008-12-25 22:00:00 +01:00
|
|
|
|
|
|
|
=============
|
|
|
|
*/
|
2010-04-09 22:00:00 +02:00
|
|
|
void pfnGetGameDir( char *szGetGameDir )
|
2008-12-25 22:00:00 +01:00
|
|
|
{
|
2010-04-09 22:00:00 +02:00
|
|
|
if( !szGetGameDir ) return;
|
2011-04-05 22:00:00 +02:00
|
|
|
Q_sprintf( szGetGameDir, "%s/%s", host.rootdir, GI->gamedir );
|
2012-04-11 22:00:00 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
=============
|
|
|
|
pfnSequenceGet
|
|
|
|
|
|
|
|
used by CS:CZ
|
|
|
|
=============
|
|
|
|
*/
|
|
|
|
void *pfnSequenceGet( const char *fileName, const char *entryName )
|
|
|
|
{
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
=============
|
|
|
|
pfnSequencePickSentence
|
|
|
|
|
|
|
|
used by CS:CZ
|
|
|
|
=============
|
|
|
|
*/
|
|
|
|
void *pfnSequencePickSentence( const char *groupName, int pickMethod, int *picked )
|
|
|
|
{
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
=============
|
|
|
|
pfnIsCareerMatch
|
|
|
|
|
|
|
|
used by CS:CZ (client stub)
|
|
|
|
=============
|
|
|
|
*/
|
|
|
|
int pfnIsCareerMatch( void )
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
=============
|
|
|
|
pfnRegisterTutorMessageShown
|
|
|
|
|
|
|
|
only exists in PlayStation version
|
|
|
|
=============
|
|
|
|
*/
|
|
|
|
void pfnRegisterTutorMessageShown( int mid )
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
=============
|
|
|
|
pfnGetTimesTutorMessageShown
|
|
|
|
|
|
|
|
only exists in PlayStation version
|
|
|
|
=============
|
|
|
|
*/
|
|
|
|
int pfnGetTimesTutorMessageShown( int mid )
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
=============
|
|
|
|
pfnProcessTutorMessageDecayBuffer
|
|
|
|
|
|
|
|
only exists in PlayStation version
|
|
|
|
=============
|
|
|
|
*/
|
|
|
|
void pfnProcessTutorMessageDecayBuffer( int *buffer, int bufferLength )
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
=============
|
|
|
|
pfnConstructTutorMessageDecayBuffer
|
|
|
|
|
|
|
|
only exists in PlayStation version
|
|
|
|
=============
|
|
|
|
*/
|
|
|
|
void pfnConstructTutorMessageDecayBuffer( int *buffer, int bufferLength )
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
=============
|
|
|
|
pfnResetTutorMessageDecayData
|
|
|
|
|
|
|
|
only exists in PlayStation version
|
|
|
|
=============
|
|
|
|
*/
|
|
|
|
void pfnResetTutorMessageDecayData( void )
|
|
|
|
{
|
2009-11-02 22:00:00 +01:00
|
|
|
}
|