#include "../ghoul2/G2.h"#include "ui_local.h"#include "../qcommon/qfiles.h"#include "../qcommon/game_version.h"#include "ui_force.h"#include "../cgame/animtable.h"#include "../game/bg_saga.h"#include "..\cgame\holocronicons.h"#include "../namespace_begin.h"#include "../namespace_end.h"Go to the source code of this file.
|
|
|
|
|
Definition at line 5737 of file ui_main.c. Referenced by UI_SaberGetHiltInfo(). |
|
|
Definition at line 936 of file ui_main.c. Referenced by _UI_Refresh(). |
|
|
Definition at line 49 of file ui_main.c.
00050 {
00051 MDS_NONE = 0,
00052 MDS_FORCE_JUMP,
00053 MDS_ROLL,
00054 MDS_SABER,
00055 MDS_MOVE_SOUNDS_MAX
00056 };
|
|
|
Definition at line 58 of file ui_main.c.
00059 {
00060 MD_ACROBATICS = 0,
00061 MD_SINGLE_FAST,
00062 MD_SINGLE_MEDIUM,
00063 MD_SINGLE_STRONG,
00064 MD_DUAL_SABERS,
00065 MD_SABER_STAFF,
00066 MD_MOVE_TITLE_MAX
00067 };
|
|
||||||||||||||||||||||||||||
|
Definition at line 744 of file ui_main.c. References _UI_DrawSides(), _UI_DrawTopBottom(), NULL, and trap_R_SetColor(). Referenced by _UI_Init().
00744 {
00745 trap_R_SetColor( color );
00746
00747 _UI_DrawTopBottom(x, y, width, height, size);
00748 _UI_DrawSides(x, y, width, height, size);
00749
00750 trap_R_SetColor( NULL );
00751 }
|
|
||||||||||||||||||||||||
|
Definition at line 726 of file ui_main.c. References trap_R_DrawStretchPic(), uiInfo_t::uiDC, uiInfo, displayContextDef_t::whiteShader, and displayContextDef_t::xscale. Referenced by _UI_DrawRect(), and _UI_Init().
00726 {
00727 size *= uiInfo.uiDC.xscale;
00728 trap_R_DrawStretchPic( x, y, size, h, 0, 0, 0, 0, uiInfo.uiDC.whiteShader );
00729 trap_R_DrawStretchPic( x + w - size, y, size, h, 0, 0, 0, 0, uiInfo.uiDC.whiteShader );
00730 }
|
|
||||||||||||||||||||||||
|
Definition at line 732 of file ui_main.c. References trap_R_DrawStretchPic(), uiInfo_t::uiDC, uiInfo, displayContextDef_t::whiteShader, and displayContextDef_t::yscale. Referenced by _UI_DrawRect(), and _UI_Init().
00732 {
00733 size *= uiInfo.uiDC.yscale;
00734 trap_R_DrawStretchPic( x, y, w, size, 0, 0, 0, 0, uiInfo.uiDC.whiteShader );
00735 trap_R_DrawStretchPic( x, y + h - size, w, size, 0, 0, 0, 0, uiInfo.uiDC.whiteShader );
00736 }
|
|
|
|
Definition at line 10533 of file ui_main.c. References Menus_AnyFullScreenVisible(), and qboolean. Referenced by vmMain().
10533 {
10534 return Menus_AnyFullScreenVisible();
10535 }
|
|
||||||||||||
|
Definition at line 10340 of file ui_main.c. References A_ESCAPE, KEYCATCH_UI, Menu_Count(), Menu_GetFocused(), Menu_HandleKey(), Menus_AnyFullScreenVisible(), Menus_CloseAll(), trap_Cvar_Set(), trap_Key_ClearStates(), trap_Key_GetCatcher(), and trap_Key_SetCatcher(). Referenced by vmMain().
10340 {
10341
10342 if (Menu_Count() > 0) {
10343 menuDef_t *menu = Menu_GetFocused();
10344 if (menu) {
10345 //JLF
10346 #ifdef _XBOX
10347
10348 UpdateDemoTimer();
10349
10350 #endif
10351 if (key == A_ESCAPE && down && !Menus_AnyFullScreenVisible()) {
10352 Menus_CloseAll();
10353 } else {
10354 Menu_HandleKey(menu, key, down );
10355 }
10356 } else {
10357 trap_Key_SetCatcher( trap_Key_GetCatcher() & ~KEYCATCH_UI );
10358 trap_Key_ClearStates();
10359 trap_Cvar_Set( "cl_paused", "0" );
10360 }
10361 }
10362
10363 //if ((s > 0) && (s != menu_null_sound)) {
10364 // trap_S_StartLocalSound( s, CHAN_LOCAL_SOUND );
10365 //}
10366 }
|
|
||||||||||||
|
Definition at line 10374 of file ui_main.c. References displayContextDef_t::cursorx, displayContextDef_t::cursory, Display_MouseMove(), Menu_Count(), NULL, SCREEN_HEIGHT, SCREEN_WIDTH, uiInfo_t::uiDC, and uiInfo. Referenced by vmMain().
10375 {
10376 // update mouse screen position
10377 uiInfo.uiDC.cursorx += dx;
10378 if (uiInfo.uiDC.cursorx < 0)
10379 uiInfo.uiDC.cursorx = 0;
10380 else if (uiInfo.uiDC.cursorx > SCREEN_WIDTH)
10381 uiInfo.uiDC.cursorx = SCREEN_WIDTH;
10382
10383 uiInfo.uiDC.cursory += dy;
10384 if (uiInfo.uiDC.cursory < 0)
10385 uiInfo.uiDC.cursory = 0;
10386 else if (uiInfo.uiDC.cursory > SCREEN_HEIGHT)
10387 uiInfo.uiDC.cursory = SCREEN_HEIGHT;
10388
10389 if (Menu_Count() > 0) {
10390 //menuDef_t *menu = Menu_GetFocused();
10391 //Menu_HandleMouseMove(menu, uiInfo.uiDC.cursorx, uiInfo.uiDC.cursory);
10392 Display_MouseMove(NULL, uiInfo.uiDC.cursorx, uiInfo.uiDC.cursory);
10393 }
10394
10395 }
|
|
|
Definition at line 937 of file ui_main.c. References displayContextDef_t::Assets, bgForcePowerCost, cachedAssets_t::cursor, displayContextDef_t::cursorx, displayContextDef_t::cursory, displayContextDef_t::debug, FORCE_LEVEL_1, FP_SABER_DEFENSE, FP_SABER_OFFENSE, FPMessageTime, displayContextDef_t::FPS, displayContextDef_t::frameTime, vmCvar_t::integer, Menu_Count(), Menu_PaintAll(), NULL, parsedFPMessage, qfalse, displayContextDef_t::realTime, trap_Cvar_Set(), trap_G2API_SetTime(), UI_DrawHandlePic(), UI_FPS_FRAMES, ui_freeSaber, UI_GetStringEdString(), ui_rankChange, UI_ReadLegalForce(), UI_SetColor(), UI_UpdateCvars(), uiInfo_t::uiDC, uiForcePowersRank, uiForceRank, uiInfo, uiMaxRank, and UpdateForceUsed(). Referenced by vmMain().
00938 {
00939 static int index;
00940 static int previousTimes[UI_FPS_FRAMES];
00941
00942 //if ( !( trap_Key_GetCatcher() & KEYCATCH_UI ) ) {
00943 // return;
00944 //}
00945
00946 trap_G2API_SetTime(realtime, 0);
00947 trap_G2API_SetTime(realtime, 1);
00948 //ghoul2 timer must be explicitly updated during ui rendering.
00949
00950 uiInfo.uiDC.frameTime = realtime - uiInfo.uiDC.realTime;
00951 uiInfo.uiDC.realTime = realtime;
00952
00953 previousTimes[index % UI_FPS_FRAMES] = uiInfo.uiDC.frameTime;
00954 index++;
00955 if ( index > UI_FPS_FRAMES ) {
00956 int i, total;
00957 // average multiple frames together to smooth changes out a bit
00958 total = 0;
00959 for ( i = 0 ; i < UI_FPS_FRAMES ; i++ ) {
00960 total += previousTimes[i];
00961 }
00962 if ( !total ) {
00963 total = 1;
00964 }
00965 uiInfo.uiDC.FPS = 1000 * UI_FPS_FRAMES / total;
00966 }
00967
00968
00969
00970 UI_UpdateCvars();
00971
00972 if (Menu_Count() > 0) {
00973 // paint all the menus
00974 Menu_PaintAll();
00975 // refresh server browser list
00976 UI_DoServerRefresh();
00977 // refresh server status
00978 UI_BuildServerStatus(qfalse);
00979 // refresh find player list
00980 UI_BuildFindPlayerList(qfalse);
00981 }
00982 #ifndef _XBOX
00983 // draw cursor
00984 UI_SetColor( NULL );
00985 if (Menu_Count() > 0) {
00986 UI_DrawHandlePic( uiInfo.uiDC.cursorx, uiInfo.uiDC.cursory, 48, 48, uiInfo.uiDC.Assets.cursor);
00987 }
00988 #endif
00989
00990 #ifndef NDEBUG
00991 if (uiInfo.uiDC.debug)
00992 {
00993 // cursor coordinat |