1 /* 2 =========================================================================== 3 Copyright (C) 1999-2005 Id Software, Inc. 4 5 This file is part of Quake III Arena source code. 6 7 Quake III Arena source code is free software; you can redistribute it 8 and/or modify it under the terms of the GNU General Public License as 9 published by the Free Software Foundation; either version 2 of the License, 10 or (at your option) any later version. 11 12 Quake III Arena source code is distributed in the hope that it will be 13 useful, but WITHOUT ANY WARRANTY; without even the implied warranty of 14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 GNU General Public License for more details. 16 17 You should have received a copy of the GNU General Public License 18 along with Quake III Arena source code; if not, write to the Free Software 19 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 20 =========================================================================== 21 */ 22 // 23 #ifndef __UI_LOCAL_H__ 24 #define __UI_LOCAL_H__ 25 26 #include "../qcommon/q_shared.h" 27 #include "../renderer/tr_types.h" 28 //NOTE: include the ui_public.h from the new UI 29 #include "../ui/ui_public.h" 30 //redefine to old API version 31 #undef UI_API_VERSION 32 #define UI_API_VERSION 4 33 #include "../client/keycodes.h" 34 #include "../game/bg_public.h" 35 36 typedef void (*voidfunc_f)(void); 37 38 extern vmCvar_t ui_ffa_fraglimit; 39 extern vmCvar_t ui_ffa_timelimit; 40 41 extern vmCvar_t ui_tourney_fraglimit; 42 extern vmCvar_t ui_tourney_timelimit; 43 44 extern vmCvar_t ui_team_fraglimit; 45 extern vmCvar_t ui_team_timelimit; 46 extern vmCvar_t ui_team_friendly; 47 48 extern vmCvar_t ui_ctf_capturelimit; 49 extern vmCvar_t ui_ctf_timelimit; 50 extern vmCvar_t ui_ctf_friendly; 51 52 extern vmCvar_t ui_arenasFile; 53 extern vmCvar_t ui_botsFile; 54 extern vmCvar_t ui_spScores1; 55 extern vmCvar_t ui_spScores2; 56 extern vmCvar_t ui_spScores3; 57 extern vmCvar_t ui_spScores4; 58 extern vmCvar_t ui_spScores5; 59 extern vmCvar_t ui_spAwards; 60 extern vmCvar_t ui_spVideos; 61 extern vmCvar_t ui_spSkill; 62 63 extern vmCvar_t ui_spSelection; 64 65 extern vmCvar_t ui_browserMaster; 66 extern vmCvar_t ui_browserGameType; 67 extern vmCvar_t ui_browserSortKey; 68 extern vmCvar_t ui_browserShowFull; 69 extern vmCvar_t ui_browserShowEmpty; 70 71 extern vmCvar_t ui_brassTime; 72 extern vmCvar_t ui_drawCrosshair; 73 extern vmCvar_t ui_drawCrosshairNames; 74 extern vmCvar_t ui_marks; 75 76 extern vmCvar_t ui_server1; 77 extern vmCvar_t ui_server2; 78 extern vmCvar_t ui_server3; 79 extern vmCvar_t ui_server4; 80 extern vmCvar_t ui_server5; 81 extern vmCvar_t ui_server6; 82 extern vmCvar_t ui_server7; 83 extern vmCvar_t ui_server8; 84 extern vmCvar_t ui_server9; 85 extern vmCvar_t ui_server10; 86 extern vmCvar_t ui_server11; 87 extern vmCvar_t ui_server12; 88 extern vmCvar_t ui_server13; 89 extern vmCvar_t ui_server14; 90 extern vmCvar_t ui_server15; 91 extern vmCvar_t ui_server16; 92 93 extern vmCvar_t ui_cdkey; 94 extern vmCvar_t ui_cdkeychecked; 95 extern vmCvar_t ui_ioq3; 96 97 98 // 99 // ui_qmenu.c 100 // 101 102 #define RCOLUMN_OFFSET ( BIGCHAR_WIDTH ) 103 #define LCOLUMN_OFFSET (-BIGCHAR_WIDTH ) 104 105 #define SLIDER_RANGE 10 106 #define MAX_EDIT_LINE 256 107 108 #define MAX_MENUDEPTH 8 109 #define MAX_MENUITEMS 64 110 111 #define MTYPE_NULL 0 112 #define MTYPE_SLIDER 1 113 #define MTYPE_ACTION 2 114 #define MTYPE_SPINCONTROL 3 115 #define MTYPE_FIELD 4 116 #define MTYPE_RADIOBUTTON 5 117 #define MTYPE_BITMAP 6 118 #define MTYPE_TEXT 7 119 #define MTYPE_SCROLLLIST 8 120 #define MTYPE_PTEXT 9 121 #define MTYPE_BTEXT 10 122 123 #define QMF_BLINK 0x00000001 124 #define QMF_SMALLFONT 0x00000002 125 #define QMF_LEFT_JUSTIFY 0x00000004 126 #define QMF_CENTER_JUSTIFY 0x00000008 127 #define QMF_RIGHT_JUSTIFY 0x00000010 128 #define QMF_NUMBERSONLY 0x00000020 // edit field is only numbers 129 #define QMF_HIGHLIGHT 0x00000040 130 #define QMF_HIGHLIGHT_IF_FOCUS 0x00000080 // steady focus 131 #define QMF_PULSEIFFOCUS 0x00000100 // pulse if focus 132 #define QMF_HASMOUSEFOCUS 0x00000200 133 #define QMF_NOONOFFTEXT 0x00000400 134 #define QMF_MOUSEONLY 0x00000800 // only mouse input allowed 135 #define QMF_HIDDEN 0x00001000 // skips drawing 136 #define QMF_GRAYED 0x00002000 // grays and disables 137 #define QMF_INACTIVE 0x00004000 // disables any input 138 #define QMF_NODEFAULTINIT 0x00008000 // skip default initialization 139 #define QMF_OWNERDRAW 0x00010000 140 #define QMF_PULSE 0x00020000 141 #define QMF_LOWERCASE 0x00040000 // edit field is all lower case 142 #define QMF_UPPERCASE 0x00080000 // edit field is all upper case 143 #define QMF_SILENT 0x00100000 144 145 // callback notifications 146 #define QM_GOTFOCUS 1 147 #define QM_LOSTFOCUS 2 148 #define QM_ACTIVATED 3 149 150 typedef struct _tag_menuframework 151 { 152 int cursor; 153 int cursor_prev; 154 155 int nitems; 156 void *items[MAX_MENUITEMS]; 157 158 void (*draw) (void); 159 sfxHandle_t (*key) (int key); 160 161 qboolean wrapAround; 162 qboolean fullscreen; 163 qboolean showlogo; 164 } menuframework_s; 165 166 typedef struct 167 { 168 int type; 169 const char *name; 170 int id; 171 int x, y; 172 int left; 173 int top; 174 int right; 175 int bottom; 176 menuframework_s *parent; 177 int menuPosition; 178 unsigned flags; 179 180 void (*callback)( void *self, int event ); 181 void (*statusbar)( void *self ); 182 void (*ownerdraw)( void *self ); 183 } menucommon_s; 184 185 typedef struct { 186 int cursor; 187 int scroll; 188 int widthInChars; 189 char buffer[MAX_EDIT_LINE]; 190 int maxchars; 191 } mfield_t; 192 193 typedef struct 194 { 195 menucommon_s generic; 196 mfield_t field; 197 } menufield_s; 198 199 typedef struct 200 { 201 menucommon_s generic; 202 203 float minvalue; 204 float maxvalue; 205 float curvalue; 206 207 float range; 208 } menuslider_s; 209 210 typedef struct 211 { 212 menucommon_s generic; 213 214 int oldvalue; 215 int curvalue; 216 int numitems; 217 int top; 218 219 const char **itemnames; 220 221 int width; 222 int height; 223 int columns; 224 int seperation; 225 } menulist_s; 226 227 typedef struct 228 { 229 menucommon_s generic; 230 } menuaction_s; 231 232 typedef struct 233 { 234 menucommon_s generic; 235 int curvalue; 236 } menuradiobutton_s; 237 238 typedef struct 239 { 240 menucommon_s generic; 241 char* focuspic; 242 char* errorpic; 243 qhandle_t shader; 244 qhandle_t focusshader; 245 int width; 246 int height; 247 float* focuscolor; 248 } menubitmap_s; 249 250 typedef struct 251 { 252 menucommon_s generic; 253 char* string; 254 int style; 255 float* color; 256 } menutext_s; 257 258 extern void Menu_Cache( void ); 259 extern void Menu_Focus( menucommon_s *m ); 260 extern void Menu_AddItem( menuframework_s *menu, void *item ); 261 extern void Menu_AdjustCursor( menuframework_s *menu, int dir ); 262 extern void Menu_Draw( menuframework_s *menu ); 263 extern void *Menu_ItemAtCursor( menuframework_s *m ); 264 extern sfxHandle_t Menu_ActivateItem( menuframework_s *s, menucommon_s* item ); 265 extern void Menu_SetCursor( menuframework_s *s, int cursor ); 266 extern void Menu_SetCursorToItem( menuframework_s *m, void* ptr ); 267 extern sfxHandle_t Menu_DefaultKey( menuframework_s *s, int key ); 268 extern void Bitmap_Init( menubitmap_s *b ); 269 extern void Bitmap_Draw( menubitmap_s *b ); 270 extern void ScrollList_Draw( menulist_s *l ); 271 extern sfxHandle_t ScrollList_Key( menulist_s *l, int key ); 272 extern sfxHandle_t menu_in_sound; 273 extern sfxHandle_t menu_move_sound; 274 extern sfxHandle_t menu_out_sound; 275 extern sfxHandle_t menu_buzz_sound; 276 extern sfxHandle_t menu_null_sound; 277 extern sfxHandle_t weaponChangeSound; 278 extern vec4_t menu_text_color; 279 extern vec4_t menu_grayed_color; 280 extern vec4_t menu_dark_color; 281 extern vec4_t menu_highlight_color; 282 extern vec4_t menu_red_color; 283 extern vec4_t menu_black_color; 284 extern vec4_t menu_dim_color; 285 extern vec4_t color_black; 286 extern vec4_t color_white; 287 extern vec4_t color_yellow; 288 extern vec4_t color_blue; 289 extern vec4_t color_orange; 290 extern vec4_t color_red; 291 extern vec4_t color_dim; 292 extern vec4_t name_color; 293 extern vec4_t list_color; 294 extern vec4_t listbar_color; 295 extern vec4_t text_color_disabled; 296 extern vec4_t text_color_normal; 297 extern vec4_t text_color_highlight; 298 299 extern char *ui_medalNames[]; 300 extern char *ui_medalPicNames[]; 301 extern char *ui_medalSounds[]; 302 303 // 304 // ui_mfield.c 305 // 306 extern void MField_Clear( mfield_t *edit ); 307 extern void MField_KeyDownEvent( mfield_t *edit, int key ); 308 extern void MField_CharEvent( mfield_t *edit, int ch ); 309 extern void MField_Draw( mfield_t *edit, int x, int y, int style, vec4_t color ); 310 extern void MenuField_Init( menufield_s* m ); 311 extern void MenuField_Draw( menufield_s *f ); 312 extern sfxHandle_t MenuField_Key( menufield_s* m, int* key ); 313 314 // 315 // ui_menu.c 316 // 317 extern void MainMenu_Cache( void ); 318 extern void UI_MainMenu(void); 319 extern void UI_RegisterCvars( void ); 320 extern void UI_UpdateCvars( void ); 321 322 // 323 // ui_credits.c 324 // 325 extern void UI_CreditMenu( void ); 326 327 // 328 // ui_ingame.c 329 // 330 extern void InGame_Cache( void ); 331 extern void UI_InGameMenu(void); 332 333 // 334 // ui_confirm.c 335 // 336 extern void ConfirmMenu_Cache( void ); 337 extern void UI_ConfirmMenu( const char *question, void (*draw)( void ), void (*action)( qboolean result ) ); 338 extern void UI_ConfirmMenu_Style( const char *question, int style, void (*draw)( void ), void (*action)( qboolean result ) ); 339 extern void UI_Message( const char **lines ); 340 341 // 342 // ui_setup.c 343 // 344 extern void UI_SetupMenu_Cache( void ); 345 extern void UI_SetupMenu(void); 346 347 // 348 // ui_team.c 349 // 350 extern void UI_TeamMainMenu( void ); 351 extern void TeamMain_Cache( void ); 352 353 // 354 // ui_connect.c 355 // 356 extern void UI_DrawConnectScreen( qboolean overlay ); 357 358 // 359 // ui_controls2.c 360 // 361 extern void UI_ControlsMenu( void ); 362 extern void Controls_Cache( void ); 363 364 // 365 // ui_demo2.c 366 // 367 extern void UI_DemosMenu( void ); 368 extern void Demos_Cache( void ); 369 370 // 371 // ui_cinematics.c 372 // 373 extern void UI_CinematicsMenu( void ); 374 extern void UI_CinematicsMenu_f( void ); 375 extern void UI_CinematicsMenu_Cache( void ); 376 377 // 378 // ui_mods.c 379 // 380 extern void UI_ModsMenu( void ); 381 extern void UI_ModsMenu_Cache( void ); 382 383 // 384 // ui_cdkey.c 385 // 386 extern void UI_CDKeyMenu( void ); 387 extern void UI_CDKeyMenu_Cache( void ); 388 extern void UI_CDKeyMenu_f( void ); 389 390 // 391 // ui_playermodel.c 392 // 393 extern void UI_PlayerModelMenu( void ); 394 extern void PlayerModel_Cache( void ); 395 396 // 397 // ui_playersettings.c 398 // 399 extern void UI_PlayerSettingsMenu( void ); 400 extern void PlayerSettings_Cache( void ); 401 402 // 403 // ui_preferences.c 404 // 405 extern void UI_PreferencesMenu( void ); 406 extern void Preferences_Cache( void ); 407 408 // 409 // ui_specifyleague.c 410 // 411 extern void UI_SpecifyLeagueMenu( void ); 412 extern void SpecifyLeague_Cache( void ); 413 414 // 415 // ui_specifyserver.c 416 // 417 extern void UI_SpecifyServerMenu( void ); 418 extern void SpecifyServer_Cache( void ); 419 420 // 421 // ui_servers2.c 422 // 423 #define MAX_FAVORITESERVERS 16 424 425 extern void UI_ArenaServersMenu( void ); 426 extern void ArenaServers_Cache( void ); 427 428 // 429 // ui_startserver.c 430 // 431 extern void UI_StartServerMenu( qboolean multiplayer ); 432 extern void StartServer_Cache( void ); 433 extern void ServerOptions_Cache( void ); 434 extern void UI_BotSelectMenu( char *bot ); 435 extern void UI_BotSelectMenu_Cache( void ); 436 437 // 438 // ui_serverinfo.c 439 // 440 extern void UI_ServerInfoMenu( void ); 441 extern void ServerInfo_Cache( void ); 442 443 // 444 // ui_video.c 445 // 446 extern void UI_GraphicsOptionsMenu( void ); 447 extern void GraphicsOptions_Cache( void ); 448 extern void DriverInfo_Cache( void ); 449 450 // 451 // ui_players.c 452 // 453 454 //FIXME ripped from cg_local.h 455 typedef struct { 456 int oldFrame; 457 int oldFrameTime; // time when ->oldFrame was exactly on 458 459 int frame; 460 int frameTime; // time when ->frame will be exactly on 461 462 float backlerp; 463 464 float yawAngle; 465 qboolean yawing; 466 float pitchAngle; 467 qboolean pitching; 468 469 int animationNumber; // may include ANIM_TOGGLEBIT 470 animation_t *animation; 471 int animationTime; // time when the first frame of the animation will be exact 472 } lerpFrame_t; 473 474 typedef struct { 475 // model info 476 qhandle_t legsModel; 477 qhandle_t legsSkin; 478 lerpFrame_t legs; 479 480 qhandle_t torsoModel; 481 qhandle_t torsoSkin; 482 lerpFrame_t torso; 483 484 qhandle_t headModel; 485 qhandle_t headSkin; 486 487 animation_t animations[MAX_ANIMATIONS]; 488 489 qhandle_t weaponModel; 490 qhandle_t barrelModel; 491 qhandle_t flashModel; 492 vec3_t flashDlightColor; 493 int muzzleFlashTime; 494 495 // currently in use drawing parms 496 vec3_t viewAngles; 497 vec3_t moveAngles; 498 weapon_t currentWeapon; 499 int legsAnim; 500 int torsoAnim; 501 502 // animation vars 503 weapon_t weapon; 504 weapon_t lastWeapon; 505 weapon_t pendingWeapon; 506 int weaponTimer; 507 int pendingLegsAnim; 508 int torsoAnimationTimer; 509 510 int pendingTorsoAnim; 511 int legsAnimationTimer; 512 513 qboolean chat; 514 qboolean newModel; 515 516 qboolean barrelSpinning; 517 float barrelAngle; 518 int barrelTime; 519 520 int realWeapon; 521 } playerInfo_t; 522 523 void UI_DrawPlayer( float x, float y, float w, float h, playerInfo_t *pi, int time ); 524 void UI_PlayerInfo_SetModel( playerInfo_t *pi, const char *model ); 525 void UI_PlayerInfo_SetInfo( playerInfo_t *pi, int legsAnim, int torsoAnim, vec3_t viewAngles, vec3_t moveAngles, weapon_t weaponNum, qboolean chat ); 526 qboolean UI_RegisterClientModelname( playerInfo_t *pi, const char *modelSkinName ); 527 528 // 529 // ui_atoms.c 530 // 531 typedef struct { 532 int frametime; 533 int realtime; 534 int cursorx; 535 int cursory; 536 int menusp; 537 menuframework_s* activemenu; 538 menuframework_s* stack[MAX_MENUDEPTH]; 539 glconfig_t glconfig; 540 qboolean debug; 541 qhandle_t whiteShader; 542 qhandle_t menuBackShader; 543 qhandle_t menuBackNoLogoShader; 544 qhandle_t charset; 545 qhandle_t charsetProp; 546 qhandle_t charsetPropGlow; 547 qhandle_t charsetPropB; 548 qhandle_t cursor; 549 qhandle_t rb_on; 550 qhandle_t rb_off; 551 float xscale; 552 float yscale; 553 float bias; 554 qboolean demoversion; 555 qboolean firstdraw; 556 } uiStatic_t; 557 558 extern void UI_Init( void ); 559 extern void UI_Shutdown( void ); 560 extern void UI_KeyEvent( int key, int down ); 561 extern void UI_MouseEvent( int dx, int dy ); 562 extern void UI_Refresh( int realtime ); 563 extern qboolean UI_ConsoleCommand( int realTime ); 564 extern float UI_ClampCvar( float min, float max, float value ); 565 extern void UI_DrawNamedPic( float x, float y, float width, float height, const char *picname ); 566 extern void UI_DrawHandlePic( float x, float y, float w, float h, qhandle_t hShader ); 567 extern void UI_FillRect( float x, float y, float width, float height, const float *color ); 568 extern void UI_DrawRect( float x, float y, float width, float height, const float *color ); 569 extern void UI_UpdateScreen( void ); 570 extern void UI_SetColor( const float *rgba ); 571 extern void UI_LerpColor(vec4_t a, vec4_t b, vec4_t c, float t); 572 extern void UI_DrawBannerString( int x, int y, const char* str, int style, vec4_t color ); 573 extern float UI_ProportionalSizeScale( int style ); 574 extern void UI_DrawProportionalString( int x, int y, const char* str, int style, vec4_t color ); 575 extern void UI_DrawProportionalString_AutoWrapped( int x, int ystart, int xmax, int ystep, const char* str, int style, vec4_t color ); 576 extern int UI_ProportionalStringWidth( const char* str ); 577 extern void UI_DrawString( int x, int y, const char* str, int style, vec4_t color ); 578 extern void UI_DrawChar( int x, int y, int ch, int style, vec4_t color ); 579 extern qboolean UI_CursorInRect (int x, int y, int width, int height); 580 extern void UI_AdjustFrom640( float *x, float *y, float *w, float *h ); 581 extern void UI_DrawTextBox (int x, int y, int width, int lines); 582 extern qboolean UI_IsFullscreen( void ); 583 extern void UI_SetActiveMenu( uiMenuCommand_t menu ); 584 extern void UI_PushMenu ( menuframework_s *menu ); 585 extern void UI_PopMenu (void); 586 extern void UI_ForceMenuOff (void); 587 extern char *UI_Argv( int arg ); 588 extern char *UI_Cvar_VariableString( const char *var_name ); 589 extern void UI_Refresh( int time ); 590 extern void UI_StartDemoLoop( void ); 591 extern qboolean m_entersound; 592 extern uiStatic_t uis; 593 594 // 595 // ui_spLevel.c 596 // 597 void UI_SPLevelMenu_Cache( void ); 598 void UI_SPLevelMenu( void ); 599 void UI_SPLevelMenu_f( void ); 600 void UI_SPLevelMenu_ReInit( void ); 601 602 // 603 // ui_spArena.c 604 // 605 void UI_SPArena_Start( const char *arenaInfo ); 606 607 // 608 // ui_spPostgame.c 609 // 610 void UI_SPPostgameMenu_Cache( void ); 611 void UI_SPPostgameMenu_f( void ); 612 613 // 614 // ui_spSkill.c 615 // 616 void UI_SPSkillMenu( const char *arenaInfo ); 617 void UI_SPSkillMenu_Cache( void ); 618 619 // 620 // ui_syscalls.c 621 // 622 void trap_Print( const char *string ); 623 void trap_Error( const char *string ); 624 int trap_Milliseconds( void ); 625 void trap_Cvar_Register( vmCvar_t *vmCvar, const char *varName, const char *defaultValue, int flags ); 626 void trap_Cvar_Update( vmCvar_t *vmCvar ); 627 void trap_Cvar_Set( const char *var_name, const char *value ); 628 float trap_Cvar_VariableValue( const char *var_name ); 629 void trap_Cvar_VariableStringBuffer( const char *var_name, char *buffer, int bufsize ); 630 void trap_Cvar_SetValue( const char *var_name, float value ); 631 void trap_Cvar_Reset( const char *name ); 632 void trap_Cvar_Create( const char *var_name, const char *var_value, int flags ); 633 void trap_Cvar_InfoStringBuffer( int bit, char *buffer, int bufsize ); 634 int trap_Argc( void ); 635 void trap_Argv( int n, char *buffer, int bufferLength ); 636 void trap_Cmd_ExecuteText( int exec_when, const char *text ); // don't use EXEC_NOW! 637 int trap_FS_FOpenFile( const char *qpath, fileHandle_t *f, fsMode_t mode ); 638 void trap_FS_Read( void *buffer, int len, fileHandle_t f ); 639 void trap_FS_Write( const void *buffer, int len, fileHandle_t f ); 640 void trap_FS_FCloseFile( fileHandle_t f ); 641 int trap_FS_GetFileList( const char *path, const char *extension, char *listbuf, int bufsize ); 642 int trap_FS_Seek( fileHandle_t f, long offset, int origin ); // fsOrigin_t 643 qhandle_t trap_R_RegisterModel( const char *name ); 644 qhandle_t trap_R_RegisterSkin( const char *name ); 645 qhandle_t trap_R_RegisterShaderNoMip( const char *name ); 646 void trap_R_ClearScene( void ); 647 void trap_R_AddRefEntityToScene( const refEntity_t *re ); 648 void trap_R_AddPolyToScene( qhandle_t hShader , int numVerts, const polyVert_t *verts ); 649 void trap_R_AddLightToScene( const vec3_t org, float intensity, float r, float g, float b ); 650 void trap_R_RenderScene( const refdef_t *fd ); 651 void trap_R_SetColor( const float *rgba ); 652 void trap_R_DrawStretchPic( float x, float y, float w, float h, float s1, float t1, float s2, float t2, qhandle_t hShader ); 653 void trap_UpdateScreen( void ); 654 int trap_CM_LerpTag( orientation_t *tag, clipHandle_t mod, int startFrame, int endFrame, float frac, const char *tagName ); 655 void trap_S_StartLocalSound( sfxHandle_t sfx, int channelNum ); 656 sfxHandle_t trap_S_RegisterSound( const char *sample, qboolean compressed ); 657 void trap_Key_KeynumToStringBuf( int keynum, char *buf, int buflen ); 658 void trap_Key_GetBindingBuf( int keynum, char *buf, int buflen ); 659 void trap_Key_SetBinding( int keynum, const char *binding ); 660 qboolean trap_Key_IsDown( int keynum ); 661 qboolean trap_Key_GetOverstrikeMode( void ); 662 void trap_Key_SetOverstrikeMode( qboolean state ); 663 void trap_Key_ClearStates( void ); 664 int trap_Key_GetCatcher( void ); 665 void trap_Key_SetCatcher( int catcher ); 666 void trap_GetClipboardData( char *buf, int bufsize ); 667 void trap_GetClientState( uiClientState_t *state ); 668 void trap_GetGlconfig( glconfig_t *glconfig ); 669 int trap_GetConfigString( int index, char* buff, int buffsize ); 670 int trap_LAN_GetServerCount( int source ); 671 void trap_LAN_GetServerAddressString( int source, int n, char *buf, int buflen ); 672 void trap_LAN_GetServerInfo( int source, int n, char *buf, int buflen ); 673 int trap_LAN_GetPingQueueCount( void ); 674 int trap_LAN_ServerStatus( const char *serverAddress, char *serverStatus, int maxLen ); 675 void trap_LAN_ClearPing( int n ); 676 void trap_LAN_GetPing( int n, char *buf, int buflen, int *pingtime ); 677 void trap_LAN_GetPingInfo( int n, char *buf, int buflen ); 678 int trap_MemoryRemaining( void ); 679 void trap_GetCDKey( char *buf, int buflen ); 680 void trap_SetCDKey( char *buf ); 681 682 qboolean trap_VerifyCDKey( const char *key, const char *chksum); 683 684 void trap_SetPbClStatus( int status ); 685 686 // 687 // ui_addbots.c 688 // 689 void UI_AddBots_Cache( void ); 690 void UI_AddBotsMenu( void ); 691 692 // 693 // ui_removebots.c 694 // 695 void UI_RemoveBots_Cache( void ); 696 void UI_RemoveBotsMenu( void ); 697 698 // 699 // ui_teamorders.c 700 // 701 extern void UI_TeamOrdersMenu( void ); 702 extern void UI_TeamOrdersMenu_f( void ); 703 extern void UI_TeamOrdersMenu_Cache( void ); 704 705 // 706 // ui_loadconfig.c 707 // 708 void UI_LoadConfig_Cache( void ); 709 void UI_LoadConfigMenu( void ); 710 711 // 712 // ui_saveconfig.c 713 // 714 void UI_SaveConfigMenu_Cache( void ); 715 void UI_SaveConfigMenu( void ); 716 717 // 718 // ui_display.c 719 // 720 void UI_DisplayOptionsMenu_Cache( void ); 721 void UI_DisplayOptionsMenu( void ); 722 723 // 724 // ui_sound.c 725 // 726 void UI_SoundOptionsMenu_Cache( void ); 727 void UI_SoundOptionsMenu( void ); 728 729 // 730 // ui_network.c 731 // 732 void UI_NetworkOptionsMenu_Cache( void ); 733 void UI_NetworkOptionsMenu( void ); 734 735 // 736 // ui_gameinfo.c 737 // 738 typedef enum { 739 AWARD_ACCURACY, 740 AWARD_IMPRESSIVE, 741 AWARD_EXCELLENT, 742 AWARD_GAUNTLET, 743 AWARD_FRAGS, 744 AWARD_PERFECT 745 } awardType_t; 746 747 const char *UI_GetArenaInfoByNumber( int num ); 748 const char *UI_GetArenaInfoByMap( const char *map ); 749 const char *UI_GetSpecialArenaInfo( const char *tag ); 750 int UI_GetNumArenas( void ); 751 int UI_GetNumSPArenas( void ); 752 int UI_GetNumSPTiers( void ); 753 754 char *UI_GetBotInfoByNumber( int num ); 755 char *UI_GetBotInfoByName( const char *name ); 756 int UI_GetNumBots( void ); 757 758 void UI_GetBestScore( int level, int *score, int *skill ); 759 void UI_SetBestScore( int level, int score ); 760 int UI_TierCompleted( int levelWon ); 761 qboolean UI_ShowTierVideo( int tier ); 762 qboolean UI_CanShowTierVideo( int tier ); 763 int UI_GetCurrentGame( void ); 764 void UI_NewGame( void ); 765 void UI_LogAwardData( int award, int data ); 766 int UI_GetAwardLevel( int award ); 767 768 void UI_SPUnlock_f( void ); 769 void UI_SPUnlockMedals_f( void ); 770 771 void UI_InitGameinfo( void ); 772 773 //GRank 774 775 // 776 // ui_rankings.c 777 // 778 void Rankings_DrawText( void* self ); 779 void Rankings_DrawName( void* self ); 780 void Rankings_DrawPassword( void* self ); 781 void Rankings_Cache( void ); 782 void UI_RankingsMenu( void ); 783 784 // 785 // ui_login.c 786 // 787 void Login_Cache( void ); 788 void UI_LoginMenu( void ); 789 790 // 791 // ui_signup.c 792 // 793 void Signup_Cache( void ); 794 void UI_SignupMenu( void ); 795 796 // 797 // ui_rankstatus.c 798 // 799 void RankStatus_Cache( void ); 800 void UI_RankStatusMenu( void ); 801 802 #endif 803