Debian Codegraph @

code/q3_ui/ui_local.h

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