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
|
// 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 {
|
typedef enum {
|
||||||
PLACE_STRETCH,
|
PLACE_STRETCH,
|
||||||
PLACE_CENTER,
|
PLACE_CENTER,
|
||||||
|
@ -1508,6 +1511,7 @@ typedef enum {
|
||||||
PLACE_TOP,
|
PLACE_TOP,
|
||||||
PLACE_BOTTOM
|
PLACE_BOTTOM
|
||||||
} screenPlacement_e;
|
} screenPlacement_e;
|
||||||
|
#endif
|
||||||
|
|
||||||
void CG_SetScreenPlacement(screenPlacement_e hpos, screenPlacement_e vpos);
|
void CG_SetScreenPlacement(screenPlacement_e hpos, screenPlacement_e vpos);
|
||||||
void CG_PopScreenPlacement(void);
|
void CG_PopScreenPlacement(void);
|
||||||
|
|
|
@ -314,7 +314,7 @@ static cvarTable_t cvarTable[] = {
|
||||||
{ &cg_statusScale, "cg_statusScale", "1", CVAR_ARCHIVE },
|
{ &cg_statusScale, "cg_statusScale", "1", CVAR_ARCHIVE },
|
||||||
{ &cg_fovAspectAdjust, "cg_fovAspectAdjust", "0", CVAR_ARCHIVE },
|
{ &cg_fovAspectAdjust, "cg_fovAspectAdjust", "0", CVAR_ARCHIVE },
|
||||||
{ &cg_fovGunAdjust, "cg_fovGunAdjust", "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_crosshairSize, "cg_crosshairSize", "24", CVAR_ARCHIVE },
|
||||||
{ &cg_crosshairHealth, "cg_crosshairHealth", "1", CVAR_ARCHIVE },
|
{ &cg_crosshairHealth, "cg_crosshairHealth", "1", CVAR_ARCHIVE },
|
||||||
{ &cg_crosshairX, "cg_crosshairX", "0", CVAR_ARCHIVE },
|
{ &cg_crosshairX, "cg_crosshairX", "0", CVAR_ARCHIVE },
|
||||||
|
@ -2111,6 +2111,9 @@ void CG_LoadHudMenu( void ) {
|
||||||
cgDC.stopCinematic = &CG_StopCinematic;
|
cgDC.stopCinematic = &CG_StopCinematic;
|
||||||
cgDC.drawCinematic = &CG_DrawCinematic;
|
cgDC.drawCinematic = &CG_DrawCinematic;
|
||||||
cgDC.runCinematicFrame = &CG_RunCinematicFrame;
|
cgDC.runCinematicFrame = &CG_RunCinematicFrame;
|
||||||
|
cgDC.adjustFrom640 = &CG_AdjustFrom640;
|
||||||
|
cgDC.setScreenPlacement = &CG_SetScreenPlacement;
|
||||||
|
cgDC.popScreenPlacement = &CG_PopScreenPlacement;
|
||||||
|
|
||||||
Init_Display(&cgDC);
|
Init_Display(&cgDC);
|
||||||
|
|
||||||
|
|
|
@ -67,7 +67,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
#define BASETA "missionpack"
|
#define BASETA "missionpack"
|
||||||
|
|
||||||
#ifndef PRODUCT_VERSION
|
#ifndef PRODUCT_VERSION
|
||||||
#define PRODUCT_VERSION "v0.4_r502"
|
#define PRODUCT_VERSION "v0.4_r507"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -5149,6 +5149,9 @@ void _UI_Init( qboolean inGameLoad ) {
|
||||||
uiInfo.uiDC.stopCinematic = &UI_StopCinematic;
|
uiInfo.uiDC.stopCinematic = &UI_StopCinematic;
|
||||||
uiInfo.uiDC.drawCinematic = &UI_DrawCinematic;
|
uiInfo.uiDC.drawCinematic = &UI_DrawCinematic;
|
||||||
uiInfo.uiDC.runCinematicFrame = &UI_RunCinematicFrame;
|
uiInfo.uiDC.runCinematicFrame = &UI_RunCinematicFrame;
|
||||||
|
uiInfo.uiDC.adjustFrom640 = &UI_AdjustFrom640;
|
||||||
|
uiInfo.uiDC.setScreenPlacement = NULL;
|
||||||
|
uiInfo.uiDC.popScreenPlacement = NULL;
|
||||||
|
|
||||||
Init_Display(&uiInfo.uiDC);
|
Init_Display(&uiInfo.uiDC);
|
||||||
|
|
||||||
|
|
|
@ -3638,16 +3638,6 @@ qboolean Item_Bind_HandleKey(itemDef_t *item, int key, qboolean down) {
|
||||||
return qtrue;
|
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) {
|
void Item_Model_Paint(itemDef_t *item) {
|
||||||
float x, y, w, h;
|
float x, y, w, h;
|
||||||
refdef_t refdef;
|
refdef_t refdef;
|
||||||
|
@ -3669,7 +3659,7 @@ void Item_Model_Paint(itemDef_t *item) {
|
||||||
w = item->window.rect.w-2;
|
w = item->window.rect.w-2;
|
||||||
h = item->window.rect.h-2;
|
h = item->window.rect.h-2;
|
||||||
|
|
||||||
AdjustFrom640( &x, &y, &w, &h );
|
DC->adjustFrom640( &x, &y, &w, &h );
|
||||||
|
|
||||||
refdef.x = x;
|
refdef.x = x;
|
||||||
refdef.y = y;
|
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 SLIDER_THUMB_HEIGHT 20.0
|
||||||
#define NUM_CROSSHAIRS 10
|
#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 {
|
typedef struct {
|
||||||
const char *command;
|
const char *command;
|
||||||
const char *args[MAX_SCRIPT_ARGS];
|
const char *args[MAX_SCRIPT_ARGS];
|
||||||
|
@ -366,7 +383,10 @@ typedef struct {
|
||||||
void (*stopCinematic)(int handle);
|
void (*stopCinematic)(int handle);
|
||||||
void (*drawCinematic)(int handle, float x, float y, float w, float h);
|
void (*drawCinematic)(int handle, float x, float y, float w, float h);
|
||||||
void (*runCinematicFrame)(int handle);
|
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 yscale;
|
||||||
float xscale;
|
float xscale;
|
||||||
float bias;
|
float bias;
|
||||||
|
|
|
@ -745,7 +745,7 @@ q3rallycode
|
||||||
engine\code\tools\lcc\LOG
|
engine\code\tools\lcc\LOG
|
||||||
engine\code\tools\lcc\README
|
engine\code\tools\lcc\README
|
||||||
engine\code\tools\lcc\README.id
|
engine\code\tools\lcc\README.id
|
||||||
-ui
|
+ui
|
||||||
engine\code\ui\ui_atoms.c
|
engine\code\ui\ui_atoms.c
|
||||||
engine\code\ui\ui_gameinfo.c
|
engine\code\ui\ui_gameinfo.c
|
||||||
engine\code\ui\ui_local.h
|
engine\code\ui\ui_local.h
|
||||||
|
@ -887,30 +887,30 @@ q3rallycode
|
||||||
engine\resync_svn.sh
|
engine\resync_svn.sh
|
||||||
engine\cross-make-mingw64.sh
|
engine\cross-make-mingw64.sh
|
||||||
[Open project files]
|
[Open project files]
|
||||||
0=engine\code\qcommon\q_shared.h
|
0=engine\code\client\cl_main.c
|
||||||
1=engine\code\client\cl_main.c
|
1=engine\code\q3_ui\ui_video.c
|
||||||
2=engine\code\q3_ui\ui_video.c
|
2=engine\code\qcommon\q_shared.c
|
||||||
3=engine\code\qcommon\q_shared.c
|
3=engine\code\renderercommon\tr_common.h
|
||||||
4=engine\code\renderercommon\tr_common.h
|
4=engine\code\renderergl1\tr_backend.c
|
||||||
5=engine\code\renderergl1\tr_backend.c
|
5=engine\code\renderergl1\tr_image.c
|
||||||
6=engine\code\renderergl1\tr_image.c
|
6=engine\code\renderergl1\tr_init.c
|
||||||
7=engine\code\renderergl1\tr_init.c
|
7=engine\code\renderergl1\tr_local.h
|
||||||
8=engine\code\renderergl1\tr_local.h
|
8=engine\code\renderergl1\tr_model_iqm.c
|
||||||
9=engine\code\renderergl1\tr_model_iqm.c
|
9=engine\code\cgame\cg_draw.c
|
||||||
10=engine\code\cgame\cg_draw.c
|
10=engine\code\cgame\cg_info.c
|
||||||
11=engine\code\cgame\cg_info.c
|
11=engine\code\cgame\cg_scoreboard.c
|
||||||
12=engine\code\cgame\cg_local.h
|
12=engine\code\cgame\cg_view.c
|
||||||
13=engine\code\cgame\cg_main.c
|
13=engine\code\qcommon\q_shared.h
|
||||||
14=engine\code\cgame\cg_scoreboard.c
|
14=engine\code\cgame\cg_weapons.c
|
||||||
15=engine\code\cgame\cg_view.c
|
15=engine\code\cgame\cg_drawtools.c
|
||||||
16=engine\code\cgame\cg_weapons.c
|
16=engine\code\cgame\cg_local.h
|
||||||
17=engine\code\cgame\cg_drawtools.c
|
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]
|
[Selected Project Files]
|
||||||
Main=
|
Main=
|
||||||
Selected=engine\code\cgame\cg_drawtools.c
|
Selected=engine\code\cgame\cg_main.c
|
||||||
[engine\code\qcommon\q_shared.h]
|
|
||||||
TopLine=610
|
|
||||||
Caret=23,638
|
|
||||||
[engine\code\client\cl_main.c]
|
[engine\code\client\cl_main.c]
|
||||||
TopLine=3069
|
TopLine=3069
|
||||||
Caret=3,3108
|
Caret=3,3108
|
||||||
|
@ -944,21 +944,33 @@ Caret=13,3131
|
||||||
[engine\code\cgame\cg_info.c]
|
[engine\code\cgame\cg_info.c]
|
||||||
TopLine=143
|
TopLine=143
|
||||||
Caret=102,176
|
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]
|
[engine\code\cgame\cg_scoreboard.c]
|
||||||
TopLine=615
|
TopLine=615
|
||||||
Caret=5,639
|
Caret=5,639
|
||||||
[engine\code\cgame\cg_view.c]
|
[engine\code\cgame\cg_view.c]
|
||||||
TopLine=522
|
TopLine=522
|
||||||
Caret=3,552
|
Caret=3,552
|
||||||
|
[engine\code\qcommon\q_shared.h]
|
||||||
|
TopLine=49
|
||||||
|
Caret=35,70
|
||||||
[engine\code\cgame\cg_weapons.c]
|
[engine\code\cgame\cg_weapons.c]
|
||||||
TopLine=1607
|
TopLine=1607
|
||||||
Caret=110,1632
|
Caret=110,1632
|
||||||
[engine\code\cgame\cg_drawtools.c]
|
[engine\code\cgame\cg_drawtools.c]
|
||||||
TopLine=95
|
TopLine=95
|
||||||
Caret=1,129
|
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