OpenMoHAA 0.82.0
Loading...
Searching...
No Matches
baseimp.h
1/*
2===========================================================================
3Copyright (C) 2024 the OpenMoHAA team
4
5This file is part of OpenMoHAA source code.
6
7OpenMoHAA source code is free software; you can redistribute it
8and/or modify it under the terms of the GNU General Public License as
9published by the Free Software Foundation; either version 2 of the License,
10or (at your option) any later version.
11
12OpenMoHAA source code is distributed in the hope that it will be
13useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15GNU General Public License for more details.
16
17You should have received a copy of the GNU General Public License
18along with OpenMoHAA source code; if not, write to the Free Software
19Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20===========================================================================
21*/
22
23#pragma once
24
25#ifdef __cplusplus
26extern "C" {
27#endif
28
29typedef struct aliasListNode_s aliasListNode_t;
30typedef struct cvar_s cvar_t;
31
32typedef struct baseImport_s
33{
34 void ( *Printf )( const char *format, ... );
35 void ( *DPrintf )( const char *format, ... );
36 const char * ( *LV_ConvertString )( const char *string );
37 cvar_t * ( *Cvar_Get )( const char *varName, const char *varValue, int varFlags );
38 void( *Cvar_Set )( const char *varName, const char *varValue );
39 int( *FS_ReadFile )( const char *qpath, void **buffer, qboolean quiet );
40 void( *FS_FreeFile )( void *buffer );
41 size_t( *FS_WriteFile )( const char *qpath, const void *buffer, size_t size );
42 fileHandle_t( *FS_FOpenFileWrite )( const char *fileName );
43 fileHandle_t( *FS_FOpenFileAppend )( const char *fileName );
44 fileHandle_t( *FS_FOpenFile )( const char *fileName );
45 const char *( *FS_PrepFileWrite )( const char *fileName );
46 size_t( *FS_Write )( const void *buffer, size_t len, fileHandle_t fileHandle );
47 size_t( *FS_Read )( void *buffer, size_t len, fileHandle_t fileHandle );
48 void( *FS_FCloseFile )( fileHandle_t fileHandle );
49 int( *FS_Tell )( fileHandle_t fileHandle );
50 int( *FS_Seek )( fileHandle_t fileHandle, long int offset, fsOrigin_t origin );
51 void( *FS_Flush )( fileHandle_t fileHandle );
52 int( *FS_FileNewer )( const char *source, const char *destination );
53 void( *FS_CanonicalFilename )( char *fileName );
54 char **( *FS_ListFiles )( const char *qpath, const char *extension, qboolean wantSubs, int *numFiles );
55 void( *FS_FreeFileList )( char **list );
56 int( *Milliseconds )( );
57 double( *MillisecondsDbl )( );
58 void( *Error )( int errortype, const char *format, ... );
59 void *( *Malloc )( size_t size );
60 void( *Free )( void *ptr );
61 int( *Key_StringToKeynum )( const char *str );
62 char * ( *Key_KeynumToBindString )( int keyNum );
63 void( *Key_GetKeysForCommand )( const char *command, int *key1, int *key2 );
64 void( *SendConsoleCommand )( const char *text );
65 void( *SendServerCommand )( int client, const char *format, ... );
66 qboolean( *GlobalAlias_Add )( const char *alias, const char *name, const char *parameters );
67 char * ( *GlobalAlias_FindRandom )( const char *alias, aliasListNode_t **ret );
68 void( *GlobalAlias_Dump )( );
69 void( *GlobalAlias_Clear )( );
70 void( *SetConfigstring )( int index, const char *val );
71 char *( *GetConfigstring )( int index );
72 void( *AddSvsTimeFixup )( int *piTime );
73
74} baseImport_t;
75
76extern baseImport_t bi;
77extern cvar_t *developer;
78extern cvar_t *precache;
79extern cvar_t *sv_scriptfiles;
80extern cvar_t *g_scriptcheck;
81extern cvar_t *g_showopcodes;
82
83void CacheResource( const char *name );
84
85#ifdef __cplusplus
86}
87#endif
Definition str.h:77
Definition baseimp.h:33
Definition q_shared.h:1334