mirror of
https://github.com/Q3Rally-Team/q3rally.git
synced 2024-11-21 19:41:36 +00:00
enabled aspect correct HUD by default
This commit is contained in:
parent
8d55b07ab7
commit
3f7562eeec
7 changed files with 75 additions and 43 deletions
|
@ -1496,6 +1496,9 @@ void CG_DrawActiveFrame( int serverTime, stereoFrame_t stereoView, qboolean demo
|
|||
//
|
||||
// cg_drawtools.c
|
||||
//
|
||||
// ugly workaround for having it in cg_local.h and ui_shared.h
|
||||
#ifndef HAVE_SCREEN_PLACEMENT
|
||||
#define HAVE_SCREEN_PLACEMENT
|
||||
typedef enum {
|
||||
PLACE_STRETCH,
|
||||
PLACE_CENTER,
|
||||
|
@ -1508,6 +1511,7 @@ typedef enum {
|
|||
PLACE_TOP,
|
||||
PLACE_BOTTOM
|
||||
} screenPlacement_e;
|
||||
#endif
|
||||
|
||||
void CG_SetScreenPlacement(screenPlacement_e hpos, screenPlacement_e vpos);
|
||||
void CG_PopScreenPlacement(void);
|
||||
|
|
|
@ -314,7 +314,7 @@ static cvarTable_t cvarTable[] = {
|
|||
{ &cg_statusScale, "cg_statusScale", "1", CVAR_ARCHIVE },
|
||||
{ &cg_fovAspectAdjust, "cg_fovAspectAdjust", "0", CVAR_ARCHIVE },
|
||||
{ &cg_fovGunAdjust, "cg_fovGunAdjust", "0", CVAR_ARCHIVE },
|
||||
{ &cg_stretch, "cg_stretch", "1", CVAR_ARCHIVE },
|
||||
{ &cg_stretch, "cg_stretch", "0", CVAR_ARCHIVE },
|
||||
{ &cg_crosshairSize, "cg_crosshairSize", "24", CVAR_ARCHIVE },
|
||||
{ &cg_crosshairHealth, "cg_crosshairHealth", "1", CVAR_ARCHIVE },
|
||||
{ &cg_crosshairX, "cg_crosshairX", "0", CVAR_ARCHIVE },
|
||||
|
@ -2111,6 +2111,9 @@ void CG_LoadHudMenu( void ) {
|
|||
cgDC.stopCinematic = &CG_StopCinematic;
|
||||
cgDC.drawCinematic = &CG_DrawCinematic;
|
||||
cgDC.runCinematicFrame = &CG_RunCinematicFrame;
|
||||
cgDC.adjustFrom640 = &CG_AdjustFrom640;
|
||||
cgDC.setScreenPlacement = &CG_SetScreenPlacement;
|
||||
cgDC.popScreenPlacement = &CG_PopScreenPlacement;
|
||||
|
||||
Init_Display(&cgDC);
|
||||
|
||||
|
|
|
@ -67,7 +67,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|||
#define BASETA "missionpack"
|
||||
|
||||
#ifndef PRODUCT_VERSION
|
||||
#define PRODUCT_VERSION "v0.4_r502"
|
||||
#define PRODUCT_VERSION "v0.4_r507"
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
@ -5149,6 +5149,9 @@ void _UI_Init( qboolean inGameLoad ) {
|
|||
uiInfo.uiDC.stopCinematic = &UI_StopCinematic;
|
||||
uiInfo.uiDC.drawCinematic = &UI_DrawCinematic;
|
||||
uiInfo.uiDC.runCinematicFrame = &UI_RunCinematicFrame;
|
||||
uiInfo.uiDC.adjustFrom640 = &UI_AdjustFrom640;
|
||||
uiInfo.uiDC.setScreenPlacement = NULL;
|
||||
uiInfo.uiDC.popScreenPlacement = NULL;
|
||||
|
||||
Init_Display(&uiInfo.uiDC);
|
||||
|
||||
|
|
|
@ -3638,16 +3638,6 @@ qboolean Item_Bind_HandleKey(itemDef_t *item, int key, qboolean down) {
|
|||
return qtrue;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void AdjustFrom640(float *x, float *y, float *w, float *h) {
|
||||
//*x = *x * DC->scale + DC->bias;
|
||||
*x *= DC->xscale;
|
||||
*y *= DC->yscale;
|
||||
*w *= DC->xscale;
|
||||
*h *= DC->yscale;
|
||||
}
|
||||
|
||||
void Item_Model_Paint(itemDef_t *item) {
|
||||
float x, y, w, h;
|
||||
refdef_t refdef;
|
||||
|
@ -3669,7 +3659,7 @@ void Item_Model_Paint(itemDef_t *item) {
|
|||
w = item->window.rect.w-2;
|
||||
h = item->window.rect.h-2;
|
||||
|
||||
AdjustFrom640( &x, &y, &w, &h );
|
||||
DC->adjustFrom640( &x, &y, &w, &h );
|
||||
|
||||
refdef.x = x;
|
||||
refdef.y = y;
|
||||
|
|
|
@ -105,6 +105,23 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|||
#define SLIDER_THUMB_HEIGHT 20.0
|
||||
#define NUM_CROSSHAIRS 10
|
||||
|
||||
// ugly workaround for having it in cg_local.h and ui_shared.h
|
||||
#ifndef HAVE_SCREEN_PLACEMENT
|
||||
#define HAVE_SCREEN_PLACEMENT
|
||||
typedef enum {
|
||||
PLACE_STRETCH,
|
||||
PLACE_CENTER,
|
||||
|
||||
// horizontal only
|
||||
PLACE_LEFT,
|
||||
PLACE_RIGHT,
|
||||
|
||||
// vertical only
|
||||
PLACE_TOP,
|
||||
PLACE_BOTTOM
|
||||
} screenPlacement_e;
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
const char *command;
|
||||
const char *args[MAX_SCRIPT_ARGS];
|
||||
|
@ -366,6 +383,9 @@ typedef struct {
|
|||
void (*stopCinematic)(int handle);
|
||||
void (*drawCinematic)(int handle, float x, float y, float w, float h);
|
||||
void (*runCinematicFrame)(int handle);
|
||||
void (*adjustFrom640)( float *x, float *y, float *w, float *h );
|
||||
void (*setScreenPlacement)( screenPlacement_e hpos, screenPlacement_e vpos );
|
||||
void (*popScreenPlacement)( void );
|
||||
|
||||
float yscale;
|
||||
float xscale;
|
||||
|
|
|
@ -745,7 +745,7 @@ q3rallycode
|
|||
engine\code\tools\lcc\LOG
|
||||
engine\code\tools\lcc\README
|
||||
engine\code\tools\lcc\README.id
|
||||
-ui
|
||||
+ui
|
||||
engine\code\ui\ui_atoms.c
|
||||
engine\code\ui\ui_gameinfo.c
|
||||
engine\code\ui\ui_local.h
|
||||
|
@ -887,30 +887,30 @@ q3rallycode
|
|||
engine\resync_svn.sh
|
||||
engine\cross-make-mingw64.sh
|
||||
[Open project files]
|
||||
0=engine\code\qcommon\q_shared.h
|
||||
1=engine\code\client\cl_main.c
|
||||
2=engine\code\q3_ui\ui_video.c
|
||||
3=engine\code\qcommon\q_shared.c
|
||||
4=engine\code\renderercommon\tr_common.h
|
||||
5=engine\code\renderergl1\tr_backend.c
|
||||
6=engine\code\renderergl1\tr_image.c
|
||||
7=engine\code\renderergl1\tr_init.c
|
||||
8=engine\code\renderergl1\tr_local.h
|
||||
9=engine\code\renderergl1\tr_model_iqm.c
|
||||
10=engine\code\cgame\cg_draw.c
|
||||
11=engine\code\cgame\cg_info.c
|
||||
12=engine\code\cgame\cg_local.h
|
||||
13=engine\code\cgame\cg_main.c
|
||||
14=engine\code\cgame\cg_scoreboard.c
|
||||
15=engine\code\cgame\cg_view.c
|
||||
16=engine\code\cgame\cg_weapons.c
|
||||
17=engine\code\cgame\cg_drawtools.c
|
||||
0=engine\code\client\cl_main.c
|
||||
1=engine\code\q3_ui\ui_video.c
|
||||
2=engine\code\qcommon\q_shared.c
|
||||
3=engine\code\renderercommon\tr_common.h
|
||||
4=engine\code\renderergl1\tr_backend.c
|
||||
5=engine\code\renderergl1\tr_image.c
|
||||
6=engine\code\renderergl1\tr_init.c
|
||||
7=engine\code\renderergl1\tr_local.h
|
||||
8=engine\code\renderergl1\tr_model_iqm.c
|
||||
9=engine\code\cgame\cg_draw.c
|
||||
10=engine\code\cgame\cg_info.c
|
||||
11=engine\code\cgame\cg_scoreboard.c
|
||||
12=engine\code\cgame\cg_view.c
|
||||
13=engine\code\qcommon\q_shared.h
|
||||
14=engine\code\cgame\cg_weapons.c
|
||||
15=engine\code\cgame\cg_drawtools.c
|
||||
16=engine\code\cgame\cg_local.h
|
||||
17=engine\code\ui\ui_main.c
|
||||
18=engine\code\ui\ui_shared.c
|
||||
19=engine\code\cgame\cg_main.c
|
||||
20=engine\code\ui\ui_shared.h
|
||||
[Selected Project Files]
|
||||
Main=
|
||||
Selected=engine\code\cgame\cg_drawtools.c
|
||||
[engine\code\qcommon\q_shared.h]
|
||||
TopLine=610
|
||||
Caret=23,638
|
||||
Selected=engine\code\cgame\cg_main.c
|
||||
[engine\code\client\cl_main.c]
|
||||
TopLine=3069
|
||||
Caret=3,3108
|
||||
|
@ -944,21 +944,33 @@ Caret=13,3131
|
|||
[engine\code\cgame\cg_info.c]
|
||||
TopLine=143
|
||||
Caret=102,176
|
||||
[engine\code\cgame\cg_local.h]
|
||||
TopLine=1479
|
||||
Caret=55,1515
|
||||
[engine\code\cgame\cg_main.c]
|
||||
TopLine=2203
|
||||
Caret=1,2222
|
||||
[engine\code\cgame\cg_scoreboard.c]
|
||||
TopLine=615
|
||||
Caret=5,639
|
||||
[engine\code\cgame\cg_view.c]
|
||||
TopLine=522
|
||||
Caret=3,552
|
||||
[engine\code\qcommon\q_shared.h]
|
||||
TopLine=49
|
||||
Caret=35,70
|
||||
[engine\code\cgame\cg_weapons.c]
|
||||
TopLine=1607
|
||||
Caret=110,1632
|
||||
[engine\code\cgame\cg_drawtools.c]
|
||||
TopLine=95
|
||||
Caret=1,129
|
||||
[engine\code\cgame\cg_local.h]
|
||||
TopLine=1479
|
||||
Caret=30,1501
|
||||
[engine\code\ui\ui_main.c]
|
||||
TopLine=5130
|
||||
Caret=40,5154
|
||||
[engine\code\ui\ui_shared.c]
|
||||
TopLine=322
|
||||
Caret=41,343
|
||||
[engine\code\cgame\cg_main.c]
|
||||
TopLine=295
|
||||
Caret=33,317
|
||||
[engine\code\ui\ui_shared.h]
|
||||
TopLine=364
|
||||
Caret=5,389
|
||||
|
|
Loading…
Reference in a new issue