codemp/ui/ui_public.h

Go to the documentation of this file.
00001 // Copyright (C) 1999-2000 Id Software, Inc.
00002 //
00003 #ifndef __UI_PUBLIC_H__
00004 #define __UI_PUBLIC_H__
00005 
00006 #define UI_API_VERSION  7
00007 
00008 typedef struct {
00009         connstate_t             connState;
00010         int                             connectPacketCount;
00011         int                             clientNum;
00012         char                    servername[MAX_STRING_CHARS];
00013         char                    updateInfoString[MAX_STRING_CHARS];
00014         char                    messageString[MAX_STRING_CHARS];
00015 } uiClientState_t;
00016 
00017 typedef enum {
00018         UI_ERROR,
00019         UI_PRINT,
00020         UI_MILLISECONDS,
00021         UI_CVAR_SET,
00022         UI_CVAR_VARIABLEVALUE,
00023         UI_CVAR_VARIABLESTRINGBUFFER,
00024         UI_CVAR_SETVALUE,
00025         UI_CVAR_RESET,
00026         UI_CVAR_CREATE,
00027         UI_CVAR_INFOSTRINGBUFFER,
00028         UI_ARGC,
00029         UI_ARGV,
00030         UI_CMD_EXECUTETEXT,
00031         UI_FS_FOPENFILE,
00032         UI_FS_READ,
00033         UI_FS_WRITE,
00034         UI_FS_FCLOSEFILE,
00035         UI_FS_GETFILELIST,
00036         UI_R_REGISTERMODEL,
00037         UI_R_REGISTERSKIN,
00038         UI_R_REGISTERSHADERNOMIP,
00039         UI_R_SHADERNAMEFROMINDEX,
00040         UI_R_CLEARSCENE,
00041         UI_R_ADDREFENTITYTOSCENE,
00042         UI_R_ADDPOLYTOSCENE,
00043         UI_R_ADDLIGHTTOSCENE,
00044         UI_R_RENDERSCENE,
00045         UI_R_SETCOLOR,
00046         UI_R_DRAWSTRETCHPIC,
00047         UI_UPDATESCREEN,
00048         UI_CM_LERPTAG,
00049         UI_CM_LOADMODEL,
00050         UI_S_REGISTERSOUND,
00051         UI_S_STARTLOCALSOUND,
00052         UI_KEY_KEYNUMTOSTRINGBUF,
00053         UI_KEY_GETBINDINGBUF,
00054         UI_KEY_SETBINDING,
00055         UI_KEY_ISDOWN,
00056         UI_KEY_GETOVERSTRIKEMODE,
00057         UI_KEY_SETOVERSTRIKEMODE,
00058         UI_KEY_CLEARSTATES,
00059         UI_KEY_GETCATCHER,
00060         UI_KEY_SETCATCHER,
00061         UI_GETCLIPBOARDDATA,
00062         UI_GETGLCONFIG,
00063         UI_GETCLIENTSTATE,
00064         UI_GETCONFIGSTRING,
00065         UI_LAN_GETPINGQUEUECOUNT,
00066         UI_LAN_CLEARPING,
00067         UI_LAN_GETPING,
00068         UI_LAN_GETPINGINFO,
00069         UI_CVAR_REGISTER,
00070         UI_CVAR_UPDATE,
00071         UI_MEMORY_REMAINING,
00072         UI_GET_CDKEY,
00073         UI_SET_CDKEY,
00074         UI_VERIFY_CDKEY,
00075         UI_R_REGISTERFONT,
00076         UI_R_FONT_STRLENPIXELS,
00077         UI_R_FONT_STRLENCHARS,
00078         UI_R_FONT_STRHEIGHTPIXELS,
00079         UI_R_FONT_DRAWSTRING,
00080         UI_LANGUAGE_ISASIAN,
00081         UI_LANGUAGE_USESSPACES,
00082         UI_ANYLANGUAGE_READCHARFROMSTRING,
00083         UI_R_MODELBOUNDS,
00084         UI_PC_ADD_GLOBAL_DEFINE,
00085         UI_PC_LOAD_SOURCE,
00086         UI_PC_FREE_SOURCE,
00087         UI_PC_READ_TOKEN,
00088         UI_PC_SOURCE_FILE_AND_LINE,
00089         UI_PC_LOAD_GLOBAL_DEFINES,
00090         UI_PC_REMOVE_ALL_GLOBAL_DEFINES,
00091 
00092         UI_S_STOPBACKGROUNDTRACK,
00093         UI_S_STARTBACKGROUNDTRACK,
00094         UI_REAL_TIME,
00095         UI_LAN_GETSERVERCOUNT,
00096         UI_LAN_GETSERVERADDRESSSTRING,
00097         UI_LAN_GETSERVERINFO,
00098         UI_LAN_MARKSERVERVISIBLE,
00099         UI_LAN_UPDATEVISIBLEPINGS,
00100         UI_LAN_RESETPINGS,
00101         UI_LAN_LOADCACHEDSERVERS,
00102         UI_LAN_SAVECACHEDSERVERS,
00103         UI_LAN_ADDSERVER,
00104         UI_LAN_REMOVESERVER,
00105         UI_CIN_PLAYCINEMATIC,
00106         UI_CIN_STOPCINEMATIC,
00107         UI_CIN_RUNCINEMATIC,
00108         UI_CIN_DRAWCINEMATIC,
00109         UI_CIN_SETEXTENTS,
00110         UI_R_REMAP_SHADER,
00111         UI_LAN_SERVERSTATUS,
00112         UI_LAN_GETSERVERPING,
00113         UI_LAN_SERVERISVISIBLE,
00114         UI_LAN_COMPARESERVERS,
00115 
00116         UI_MEMSET = 100,
00117         UI_MEMCPY,
00118         UI_STRNCPY,
00119         UI_SIN,
00120         UI_COS,
00121         UI_ATAN2,
00122         UI_SQRT,
00123         UI_MATRIXMULTIPLY,
00124         UI_ANGLEVECTORS,
00125         UI_PERPENDICULARVECTOR,
00126         UI_FLOOR,
00127         UI_CEIL,
00128 
00129         UI_TESTPRINTINT,
00130         UI_TESTPRINTFLOAT,
00131 
00132         UI_ACOS,
00133         UI_ASIN,
00134 
00135         UI_SP_GETNUMLANGUAGES,
00136         UI_SP_GETLANGUAGENAME,
00137         UI_SP_GETSTRINGTEXTSTRING = 200,
00138 
00139 /*
00140 Ghoul2 Insert Start
00141 */
00142         UI_G2_LISTSURFACES,
00143         UI_G2_LISTBONES,
00144         UI_G2_SETMODELS,
00145         UI_G2_HAVEWEGHOULMODELS,
00146         UI_G2_GETBOLT,
00147         UI_G2_GETBOLT_NOREC,
00148         UI_G2_GETBOLT_NOREC_NOROT,
00149         UI_G2_INITGHOUL2MODEL,
00150         UI_G2_COLLISIONDETECT,
00151         UI_G2_COLLISIONDETECTCACHE,
00152         UI_G2_CLEANMODELS,
00153         UI_G2_ANGLEOVERRIDE,
00154         UI_G2_PLAYANIM,
00155         UI_G2_GETBONEANIM,
00156         UI_G2_GETBONEFRAME, //trimmed down version of GBA, so I don't have to pass all those unused args across the VM-exe border
00157         UI_G2_GETGLANAME,
00158         UI_G2_COPYGHOUL2INSTANCE,
00159         UI_G2_COPYSPECIFICGHOUL2MODEL,
00160         UI_G2_DUPLICATEGHOUL2INSTANCE,
00161         UI_G2_HASGHOUL2MODELONINDEX,
00162         UI_G2_REMOVEGHOUL2MODEL,
00163         UI_G2_ADDBOLT,
00164         UI_G2_SETBOLTON,
00165         UI_G2_SETROOTSURFACE,
00166         UI_G2_SETSURFACEONOFF,
00167         UI_G2_SETNEWORIGIN,
00168 
00169         UI_G2_GETTIME,
00170         UI_G2_SETTIME,
00171 
00172 /*
00173         //rww - RAGDOLL_BEGIN
00174 */
00175         UI_G2_SETRAGDOLL,
00176         UI_G2_ANIMATEG2MODELS,
00177 /*
00178         //rww - RAGDOLL_END
00179 */
00180 
00181         //rww - ik move method, allows you to specify a bone and move it to a world point (within joint constraints)
00182         //by using the majority of gil's existing bone angling stuff from the ragdoll code.
00183         UI_G2_SETBONEIKSTATE,
00184         UI_G2_IKMOVE,
00185 
00186         UI_G2_GETSURFACENAME,
00187         UI_G2_SETSKIN,
00188         UI_G2_ATTACHG2MODEL,
00189 /*
00190 Ghoul2 Insert End
00191 */
00192 } uiImport_t;
00193 
00194 typedef enum {
00195         UIMENU_NONE,
00196         UIMENU_MAIN,
00197         UIMENU_INGAME,
00198         UIMENU_PLAYERCONFIG,
00199         UIMENU_TEAM,
00200         UIMENU_POSTGAME,
00201         UIMENU_PLAYERFORCE,
00202         UIMENU_SIEGEMESSAGE,
00203         UIMENU_SIEGEOBJECTIVES,
00204         UIMENU_VOICECHAT,
00205         UIMENU_CLOSEALL,
00206         UIMENU_CLASSSEL
00207 };
00208 typedef int uiMenuCommand_t;
00209 
00210 #define SORT_HOST                       0
00211 #define SORT_MAP                        1
00212 #define SORT_CLIENTS            2
00213 #define SORT_GAME                       3
00214 #define SORT_PING                       4
00215 
00216 typedef enum {
00217         UI_GETAPIVERSION = 0,   // system reserved
00218 
00219         UI_INIT,
00220 //      void    UI_Init( void );
00221 
00222         UI_SHUTDOWN,
00223 //      void    UI_Shutdown( void );
00224 
00225         UI_KEY_EVENT,
00226 //      void    UI_KeyEvent( int key );
00227 
00228         UI_MOUSE_EVENT,
00229 //      void    UI_MouseEvent( int dx, int dy );
00230 
00231         UI_REFRESH,
00232 //      void    UI_Refresh( int time );
00233 
00234         UI_IS_FULLSCREEN,
00235 //      qboolean UI_IsFullscreen( void );
00236 
00237         UI_SET_ACTIVE_MENU,
00238 //      void    UI_SetActiveMenu( uiMenuCommand_t menu );
00239 
00240         UI_CONSOLE_COMMAND,
00241 //      qboolean UI_ConsoleCommand( int realTime );
00242 
00243         UI_DRAW_CONNECT_SCREEN,
00244 //      void    UI_DrawConnectScreen( qboolean overlay );
00245         UI_HASUNIQUECDKEY,
00246 // if !overlay, the background will be drawn, otherwise it will be
00247 // overlayed over whatever the cgame has drawn.
00248 // a GetClientState syscall will be made to get the current strings
00249 
00250         UI_MENU_RESET
00251 } uiExport_t;
00252 
00253 #endif