srb2::Draw: add fonts kRollingNum and kRollingNum4P

This commit is contained in:
James R 2024-03-04 01:42:29 -08:00
parent 840f5b7998
commit 9a7af6c592
5 changed files with 33 additions and 0 deletions

View file

@ -319,6 +319,15 @@ void HU_Init(void)
PR ("PRFN"); PR ("PRFN");
REG; REG;
DIM ('0', 10);
DIG (2);
PR ("ROLNUM");
REG;
PR ("RO4NUM");
REG;
DIG (3); DIG (3);
ADIM (KART); ADIM (KART);

View file

@ -80,6 +80,8 @@ enum
X (NIGHTSNUM), X (NIGHTSNUM),
X (PINGNUM), X (PINGNUM),
X (PROFNUM), X (PROFNUM),
X (ROLNUM),
X (RO4NUM),
X (KART), X (KART),
X (TIMER), X (TIMER),

View file

@ -308,6 +308,12 @@ int Draw::font_to_fontno(Font font)
case Font::kMedium: case Font::kMedium:
return MED_FONT; return MED_FONT;
case Font::kRollingNum:
return ROLNUM_FONT;
case Font::kRollingNum4P:
return RO4NUM_FONT;
} }
return TINY_FONT; return TINY_FONT;

View file

@ -41,6 +41,8 @@ public:
kThinTimer, kThinTimer,
kMenu, kMenu,
kMedium, kMedium,
kRollingNum,
kRollingNum4P,
}; };
enum class Align enum class Align

View file

@ -2342,6 +2342,12 @@ static void V_GetFontSpecification(int fontno, INT32 flags, fontspec_t *result)
case PINGF_FONT: case PINGF_FONT:
result->spacew = 3; result->spacew = 3;
break; break;
case ROLNUM_FONT:
result->spacew = 17;
break;
case RO4NUM_FONT:
result->spacew = 9;
break;
} }
switch (fontno) switch (fontno)
@ -2373,6 +2379,12 @@ static void V_GetFontSpecification(int fontno, INT32 flags, fontspec_t *result)
case PINGF_FONT: case PINGF_FONT:
result->lfh = 10; result->lfh = 10;
break; break;
case ROLNUM_FONT:
result->lfh = 33;
break;
case RO4NUM_FONT:
result->lfh = 15;
break;
} }
switch (fontno) switch (fontno)
@ -2432,6 +2444,8 @@ static void V_GetFontSpecification(int fontno, INT32 flags, fontspec_t *result)
break; break;
case OPPRF_FONT: case OPPRF_FONT:
case PINGF_FONT: case PINGF_FONT:
case ROLNUM_FONT:
case RO4NUM_FONT:
if (result->chw) if (result->chw)
result->dim_fn = FixedCharacterDim; result->dim_fn = FixedCharacterDim;
else else