fixed font sizes - HUD needs to be fixed

This commit is contained in:
P3rlE 2022-03-08 22:54:31 +01:00
parent d8f9599427
commit 6eca172246
5 changed files with 38 additions and 32 deletions

View file

@ -2093,7 +2093,7 @@ static void CG_DrawReward( void ) {
*/ */
if ( cg.rewardCount[0] >= 10 ) { if ( cg.rewardCount[0] >= 10 ) {
y = 100; y = 112;
x = 320 - ICON_SIZE/2; x = 320 - ICON_SIZE/2;
CG_DrawPic( x, y, ICON_SIZE-4, ICON_SIZE-4, cg.rewardShader[0] ); CG_DrawPic( x, y, ICON_SIZE-4, ICON_SIZE-4, cg.rewardShader[0] );
Com_sprintf(buf, sizeof(buf), "%d", cg.rewardCount[0]); Com_sprintf(buf, sizeof(buf), "%d", cg.rewardCount[0]);
@ -2105,7 +2105,7 @@ static void CG_DrawReward( void ) {
count = cg.rewardCount[0]; count = cg.rewardCount[0];
y = 100; y = 112;
x = 320 - count * ICON_SIZE/2; x = 320 - count * ICON_SIZE/2;
for ( i = 0 ; i < count ; i++ ) { for ( i = 0 ; i < count ; i++ ) {
CG_DrawPic( x, y, ICON_SIZE-4, ICON_SIZE-4, cg.rewardShader[0] ); CG_DrawPic( x, y, ICON_SIZE-4, ICON_SIZE-4, cg.rewardShader[0] );
@ -2930,7 +2930,7 @@ static void CG_DrawAmmoWarning( void ) {
s = "LOW AMMO WARNING"; s = "LOW AMMO WARNING";
} }
w = CG_DrawStrlen( s ) * BIGCHAR_WIDTH; w = CG_DrawStrlen( s ) * BIGCHAR_WIDTH;
CG_DrawBigString(320 - w / 2, 64, s, 1.0F); CG_DrawBigString(320 - w / 2, 98, s, 1.0F);
} }

View file

@ -70,8 +70,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
// Q3Rally Code Start // Q3Rally Code Start
//#define CHAR_WIDTH 32 //#define CHAR_WIDTH 32
//#define CHAR_HEIGHT 48 //#define CHAR_HEIGHT 48
#define CHAR_WIDTH 17 #define CHAR_WIDTH 21 //14
#define CHAR_HEIGHT 26 #define CHAR_HEIGHT 21
// Q3Rally Code END // Q3Rally Code END
#define TEXT_ICON_SPACE 4 #define TEXT_ICON_SPACE 4
@ -79,8 +79,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#define TEAMCHAT_HEIGHT 8 #define TEAMCHAT_HEIGHT 8
// very large characters // very large characters
#define GIANT_WIDTH 32 #define GIANT_WIDTH 22
#define GIANT_HEIGHT 48 #define GIANT_HEIGHT 33
#define NUM_CROSSHAIRS 10 #define NUM_CROSSHAIRS 10

View file

@ -71,11 +71,11 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#define SB_NAME_X (SB_SCORELINE_X + 22 * BIGCHAR_WIDTH) // width 15 #define SB_NAME_X (SB_SCORELINE_X + 22 * BIGCHAR_WIDTH) // width 15
*/ */
#define SB_SCORE_X (SB_SCORELINE_X + BIGCHAR_WIDTH) // width 6 #define SB_SCORE_X (SB_SCORELINE_X + 2 * BIGCHAR_WIDTH) // width 6
#define SB_PING_X (SB_SCORELINE_X + 6 * BIGCHAR_WIDTH + 8) // width 5 #define SB_PING_X (SB_SCORELINE_X + 11 * BIGCHAR_WIDTH + 8) // width 5
#define SB_TIME_X (SB_SCORELINE_X + 11 * BIGCHAR_WIDTH + 8) // width 5 #define SB_TIME_X (SB_SCORELINE_X + 18 * BIGCHAR_WIDTH + 8) // width 5
#define SB_TOTAL_TIME_X (SB_SCORELINE_X + 16 * BIGCHAR_WIDTH + 8) // width 5 #define SB_TOTAL_TIME_X (SB_SCORELINE_X + 26 * BIGCHAR_WIDTH + 8) // width 5
#define SB_NAME_X (SB_SCORELINE_X + 21 * BIGCHAR_WIDTH) // width 15 #define SB_NAME_X (SB_SCORELINE_X + 33 * BIGCHAR_WIDTH) // width 15
// END // END
// The new and improved score board // The new and improved score board

View file

@ -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_r509" #define PRODUCT_VERSION "v0.4_r510"
#endif #endif
@ -421,33 +421,23 @@ extern vec3_t bytedirs[NUMVERTEXNORMALS];
#define SCREEN_WIDTH 640 #define SCREEN_WIDTH 640
#define SCREEN_HEIGHT 480 #define SCREEN_HEIGHT 480
// STONELANCE
/*
#define TINYCHAR_WIDTH (SMALLCHAR_WIDTH)
#define TINYCHAR_HEIGHT (SMALLCHAR_HEIGHT/2)
*/
#define TINYCHAR_WIDTH 6 #define TINYCHAR_WIDTH 6
#define TINYCHAR_HEIGHT 10 #define TINYCHAR_HEIGHT 10
// END
// ZTM: Only change size for Q3Rally VMs, not client console text // ZTM: Only change size for Q3Rally VMs, not client console text
#if defined CGAME || defined UI #if defined CGAME || defined UI
// STONELANCE - drawn pic is actually bigger because this
// is the value after the letters are moved closer together
//#define SMALLCHAR_WIDTH 8
#define SMALLCHAR_WIDTH 6 #define SMALLCHAR_WIDTH 6
// END
#define SMALLCHAR_HEIGHT 16 #define SMALLCHAR_HEIGHT 16
#else #else
#define SMALLCHAR_WIDTH 8 #define SMALLCHAR_WIDTH 8
#define SMALLCHAR_HEIGHT 16 #define SMALLCHAR_HEIGHT 16
#endif #endif
#define BIGCHAR_WIDTH 16 #define BIGCHAR_WIDTH 10
#define BIGCHAR_HEIGHT 16 #define BIGCHAR_HEIGHT 10
#define GIANTCHAR_WIDTH 32 #define GIANTCHAR_WIDTH 20
#define GIANTCHAR_HEIGHT 48 #define GIANTCHAR_HEIGHT 30
extern vec4_t colorBlack; extern vec4_t colorBlack;
extern vec4_t colorRed; extern vec4_t colorRed;

View file

@ -889,12 +889,28 @@ q3rallycode
[Open project files] [Open project files]
0=engine\code\qcommon\q_shared.h 0=engine\code\qcommon\q_shared.h
1=engine\code\cgame\cg_draw.c 1=engine\code\cgame\cg_draw.c
2=engine\code\cgame\cg_local.h
3=engine\code\cgame\cg_event.c
4=engine\code\ui\ui_local.h
5=engine\code\cgame\cg_scoreboard.c
[Selected Project Files] [Selected Project Files]
Main= Main=
Selected=engine\code\qcommon\q_shared.h Selected=engine\code\cgame\cg_local.h
[engine\code\qcommon\q_shared.h] [engine\code\qcommon\q_shared.h]
TopLine=49 TopLine=54
Caret=35,70 Caret=35,70
[engine\code\cgame\cg_draw.c] [engine\code\cgame\cg_draw.c]
TopLine=1788 TopLine=230
Caret=23,1799 Caret=30,255
[engine\code\cgame\cg_local.h]
TopLine=57
Caret=29,73
[engine\code\cgame\cg_event.c]
TopLine=275
Caret=58,297
[engine\code\ui\ui_local.h]
TopLine=135
Caret=1,139
[engine\code\cgame\cg_scoreboard.c]
TopLine=54
Caret=41,78