Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
SRB2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Disk Poppy
SRB2
Compare revisions
next to keycodes
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
diskpoppy/SRB2
Select target project
No results found
keycodes
Select Git revision
Swap
Target
STJr/SRB2
Select target project
STJr/SRB2
Sryder/SRB2
wolfy852/SRB2
Alpha2244/SRB2
Inuyasha/SRB2
yoshibot/SRB2
TehRealSalt/SRB2
PrisimaTF/SRB2
Hatninja/SRB2
SteelT/SRB2
james/SRB2
ShaderWraith/SRB2
SinnamonLat/SRB2
mazmazz_/SRB2
filpAM/SRB2
chaoloveicemdboy/SRB2
Whooa21/SRB2
Machturne/SRB2
Golden/SRB2
Tatsuru/SRB2
Snu/SRB2
Zwip-Zwap_Zapony/SRB2
fickleheart/SRB2
alphaRexJames/SRB2
JJK/SRB2
diskpoppy/SRB2
Hannu_Hanhi/SRB2
ZipperQR/SRB2
kays/SRB2
spherallic/SRB2
Zippy_Zolton/SRB2
namiishere/SRB2
Ors/SRB2
SMS_Alfredo/SRB2
sonic_edge/SRB2
lavla/SRB2
ashi/SRB2
X.organic/SRB2
Fafabis/SRB2
Meziu/SRB2
v-rob/SRB2
tertu/SRB2
bitten2up/SRB2
flarn2006/SRB2
Krabs/SRB2
clairebun/SRB2
Lactozilla/SRB2
thehackstack/SRB2
Spice/SRB2
win8linux/SRB2
JohnFrostFox/SRB2
talktoneon726/SRB2
Wane/SRB2
Lamibe/SRB2
spectrumuk2/srb-2
nerdyminer18/srb-2
256nil/SRB2
ARJr/SRB2
Alam/SRB2
Zenya/srb-2-marathon-demos
Acelite/srb-2-archivedmodifications
MIDIMan/SRB2
Lach/SRB2
Frostiikin/bounce-tweaks
Jaden/SRB2
Tyron/SRB2
Astronight/SRB2
Mari0shi06/SRB2
aiire/SRB2
Galactice/SRB2
srb2-ports/srb2-dreamcast
sdasdas/SRB2
chreas/srb-2-vr
StarManiaKG/the-story-of-sinically-rocketing-and-botching-the-2nd
LoganAir/SRB2
NepDisk/srb-2
alufolie91/SRB2
Felicia.iso/SRB2
twi/SRB2
BarrelsOFun/SRB2
Speed2411/SRB2
Leather_Realms/SRB2
Ayemar/SRB2
Acelite/SRB2
VladDoc/SRB2
kaldrum/model-features
strawberryfox417/SRB2
Lugent/SRB2
Rem/SRB2
Refrag/SRB2
Henry_3230/srb-3230
TehPuertoRicanSpartan2/tprs-srb2
Leminn/srb-2-marathon-stuff
chromaticpipe2/SRB2
MiguelGustavo15/SRB2
Maru/srb-2-tests
SilicDev/SRB2
UnmatchedBracket/SRB2
HybridDog/SRB2
xordspar0/SRB2
jsjhbewfhh/SRB2
Fancy2209/SRB2
Lorsoen/SRB2
shindoukin/SRB2
GamerOfDays/SRB2
Craftyawesome/SRB2
tenshi-tensai-tennoji/SRB2
Scarfdudebalder/SRB2
luigi-budd/srb-2-fix-interplag-lockon
mskluesner/SRB2
johnpetersa19/SRB2
Pheazant/SRB2
chromaticpipe2/srb2classic
romoney5/SRB2
PAS/SRB2Classic
BlueStaggo/SRB2
Jisk/srb-2-beef-jerky
117 results
next
Select Git revision
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/st_stuff.c
+2
-2
2 additions, 2 deletions
src/st_stuff.c
src/v_video.c
+58
-35
58 additions, 35 deletions
src/v_video.c
src/v_video.h
+3
-2
3 additions, 2 deletions
src/v_video.h
with
63 additions
and
39 deletions
src/st_stuff.c
View file @
3917fb9a
...
@@ -897,7 +897,7 @@ static void ST_drawLivesArea(void)
...
@@ -897,7 +897,7 @@ static void ST_drawLivesArea(void)
if
(
livescount
==
INFLIVES
)
if
(
livescount
==
INFLIVES
)
V_DrawCharacter
(
hudinfo
[
HUD_LIVES
].
x
+
50
,
hudinfo
[
HUD_LIVES
].
y
+
8
,
V_DrawCharacter
(
hudinfo
[
HUD_LIVES
].
x
+
50
,
hudinfo
[
HUD_LIVES
].
y
+
8
,
'\x16'
|
0x80
|
hudinfo
[
HUD_LIVES
].
f
|
V_PERPLAYER
|
V_HUDTRANS
,
false
);
'\x16'
,
0x80
|
hudinfo
[
HUD_LIVES
].
f
|
V_PERPLAYER
|
V_HUDTRANS
,
false
);
else
else
{
{
if
(
stplyr
->
playerstate
==
PST_DEAD
&&
!
(
stplyr
->
spectator
)
&&
(
livescount
||
stplyr
->
deadtimer
<
(
TICRATE
<<
1
)))
if
(
stplyr
->
playerstate
==
PST_DEAD
&&
!
(
stplyr
->
spectator
)
&&
(
livescount
||
stplyr
->
deadtimer
<
(
TICRATE
<<
1
)))
...
@@ -1105,7 +1105,7 @@ static void ST_drawInput(void)
...
@@ -1105,7 +1105,7 @@ static void ST_drawInput(void)
V_DrawFill(x+16+(xoffs), y+9+(yoffs), 10, 1, hudinfo[HUD_LIVES].f|29);\
V_DrawFill(x+16+(xoffs), y+9+(yoffs), 10, 1, hudinfo[HUD_LIVES].f|29);\
}\
}\
V_DrawFill(x+16+(xoffs), y+(yoffs)-offs, 10, 10, col);\
V_DrawFill(x+16+(xoffs), y+(yoffs)-offs, 10, 10, col);\
V_DrawCharacter(x+16+1+(xoffs), y+1+(yoffs)-offs, hudinfo[HUD_LIVES].f
|symb
, false)
V_DrawCharacter(x+16+1+(xoffs), y+1+(yoffs)-offs,
symb,
hudinfo[HUD_LIVES].f, false)
drawbutt
(
4
,
-
3
,
BT_JUMP
,
'J'
);
drawbutt
(
4
,
-
3
,
BT_JUMP
,
'J'
);
drawbutt
(
15
,
-
3
,
BT_USE
,
'S'
);
drawbutt
(
15
,
-
3
,
BT_USE
,
'S'
);
...
...
This diff is collapsed.
Click to expand it.
src/v_video.c
View file @
3917fb9a
...
@@ -2000,17 +2000,19 @@ UINT8 *V_GetStringColormap(INT32 colorflags)
...
@@ -2000,17 +2000,19 @@ UINT8 *V_GetStringColormap(INT32 colorflags)
// Writes a single character (draw WHITE if bit 7 set)
// Writes a single character (draw WHITE if bit 7 set)
//
//
void
V_DrawCharacter
(
INT32
x
,
INT32
y
,
INT32
c
,
boolean
lowercaseallowed
)
void
V_DrawCharacter
(
INT32
x
,
INT32
y
,
INT32
c
,
INT32
eflags
,
boolean
lowercaseallowed
)
{
{
INT32
w
,
flags
;
INT32
w
,
flags
;
const
UINT8
*
colormap
=
V_GetStringColormap
(
c
);
const
UINT8
*
colormap
=
V_GetStringColormap
(
eflags
);
flags
=
c
&
~
(
V_CHARCOLORMASK
|
V_PARAMMASK
);
flags
=
eflags
&
~
(
V_CHARCOLORMASK
|
V_PARAMMASK
);
if
(
c
<
HU_FONTEXT
)
c
&=
0x7f
;
c
&=
0x7f
;
if
(
lowercaseallowed
)
if
(
lowercaseallowed
)
c
-=
HU_FONTSTART
;
c
-=
HU_FONTSTART
;
else
else
c
=
toupper
(
c
)
-
HU_FONTSTART
;
c
=
V_CharUppercase
(
c
)
-
HU_FONTSTART
;
if
(
c
<
0
||
c
>=
HU_FONTSIZE
||
!
hu_font
[
c
])
if
(
c
<
0
||
c
>=
HU_FONTSIZE
||
!
hu_font
[
c
])
return
;
return
;
...
@@ -2027,17 +2029,19 @@ void V_DrawCharacter(INT32 x, INT32 y, INT32 c, boolean lowercaseallowed)
...
@@ -2027,17 +2029,19 @@ void V_DrawCharacter(INT32 x, INT32 y, INT32 c, boolean lowercaseallowed)
// Writes a single character for the chat. (draw WHITE if bit 7 set)
// Writes a single character for the chat. (draw WHITE if bit 7 set)
// Essentially the same as the above but it's small or big depending on what resolution you've chosen to huge..
// Essentially the same as the above but it's small or big depending on what resolution you've chosen to huge..
//
//
void
V_DrawChatCharacter
(
INT32
x
,
INT32
y
,
INT32
c
,
boolean
lowercaseallowed
,
UINT8
*
colormap
)
void
V_DrawChatCharacter
(
INT32
x
,
INT32
y
,
INT32
c
,
INT32
eflags
,
boolean
lowercaseallowed
,
UINT8
*
colormap
)
{
{
INT32
w
,
flags
;
INT32
w
,
flags
;
//const UINT8 *colormap = V_GetStringColormap(
c
);
//const UINT8 *colormap = V_GetStringColormap(
eflags
);
flags
=
c
&
~
(
V_CHARCOLORMASK
|
V_PARAMMASK
);
flags
=
eflags
&
~
(
V_CHARCOLORMASK
|
V_PARAMMASK
);
if
(
c
<
HU_FONTEXT
)
c
&=
0x7f
;
c
&=
0x7f
;
if
(
lowercaseallowed
)
if
(
lowercaseallowed
)
c
-=
HU_FONTSTART
;
c
-=
HU_FONTSTART
;
else
else
c
=
toupper
(
c
)
-
HU_FONTSTART
;
c
=
V_CharUppercase
(
c
)
-
HU_FONTSTART
;
if
(
c
<
0
||
c
>=
HU_FONTSIZE
||
!
hu_font
[
c
])
if
(
c
<
0
||
c
>=
HU_FONTSIZE
||
!
hu_font
[
c
])
return
;
return
;
...
@@ -2046,8 +2050,6 @@ void V_DrawChatCharacter(INT32 x, INT32 y, INT32 c, boolean lowercaseallowed, UI
...
@@ -2046,8 +2050,6 @@ void V_DrawChatCharacter(INT32 x, INT32 y, INT32 c, boolean lowercaseallowed, UI
return
;
return
;
V_DrawFixedPatch
(
x
*
FRACUNIT
,
y
*
FRACUNIT
,
(
vid
.
width
<
640
)
?
(
FRACUNIT
)
:
(
FRACUNIT
/
2
),
flags
,
hu_font
[
c
],
colormap
);
V_DrawFixedPatch
(
x
*
FRACUNIT
,
y
*
FRACUNIT
,
(
vid
.
width
<
640
)
?
(
FRACUNIT
)
:
(
FRACUNIT
/
2
),
flags
,
hu_font
[
c
],
colormap
);
}
}
// Precompile a wordwrapped string to any given width.
// Precompile a wordwrapped string to any given width.
...
@@ -2084,7 +2086,7 @@ char *V_WordWrap(INT32 x, INT32 w, INT32 option, const char *string)
...
@@ -2084,7 +2086,7 @@ char *V_WordWrap(INT32 x, INT32 w, INT32 option, const char *string)
for
(
i
=
0
;
i
<
slen
;
++
i
)
for
(
i
=
0
;
i
<
slen
;
++
i
)
{
{
c
=
newstring
[
i
];
c
=
newstring
[
i
];
if
((
UINT8
)
c
&
0x80
)
//color parsing! -Inuyasha 2.16.09
if
(
HU_IsColorCode
((
UINT8
)
c
)
)
//color parsing! -Inuyasha 2.16.09
continue
;
continue
;
if
(
c
==
'\n'
)
if
(
c
==
'\n'
)
...
@@ -2095,7 +2097,7 @@ char *V_WordWrap(INT32 x, INT32 w, INT32 option, const char *string)
...
@@ -2095,7 +2097,7 @@ char *V_WordWrap(INT32 x, INT32 w, INT32 option, const char *string)
}
}
if
(
!
(
option
&
V_ALLOWLOWERCASE
))
if
(
!
(
option
&
V_ALLOWLOWERCASE
))
c
=
toupper
(
c
);
c
=
V_CharUppercase
(
c
);
c
-=
HU_FONTSTART
;
c
-=
HU_FONTSTART
;
if
(
c
<
0
||
c
>=
HU_FONTSIZE
||
!
hu_font
[
c
])
if
(
c
<
0
||
c
>=
HU_FONTSIZE
||
!
hu_font
[
c
])
...
@@ -2119,6 +2121,27 @@ char *V_WordWrap(INT32 x, INT32 w, INT32 option, const char *string)
...
@@ -2119,6 +2121,27 @@ char *V_WordWrap(INT32 x, INT32 w, INT32 option, const char *string)
return
newstring
;
return
newstring
;
}
}
// Lactozilla
UINT8
V_CharUppercase
(
UINT8
chr
)
{
// No uppercase variant of this character
// At least, not in Latin-1 Supplement
// But it's present Latin Extended-A
// Though it can't fit in a single byte
if
(
chr
==
0xFF
)
// "Latin Small Letter Y with diaeresis"
return
chr
;
// No uppercase variant of these characters
// "Latin Small Letter sharp S", "Multiplication sign" and "Division sign"
if
(
chr
==
0xDF
||
chr
==
0xD7
||
chr
==
0xF7
)
return
chr
;
// U+00C0 to U+00FE
// Lowercase characters start at U+00E0
// "Latin Small Letter A with grave" and "Latin Small Letter Thorn"
if
(
chr
>=
0xE0
&&
chr
<=
0xFE
)
return
chr
-
32
;
return
(
UINT8
)
toupper
((
char
)
chr
);
}
//
//
// Write a string using the hu_font
// Write a string using the hu_font
// NOTE: the text is centered for screens larger than the base width
// NOTE: the text is centered for screens larger than the base width
...
@@ -2126,7 +2149,7 @@ char *V_WordWrap(INT32 x, INT32 w, INT32 option, const char *string)
...
@@ -2126,7 +2149,7 @@ char *V_WordWrap(INT32 x, INT32 w, INT32 option, const char *string)
void
V_DrawString
(
INT32
x
,
INT32
y
,
INT32
option
,
const
char
*
string
)
void
V_DrawString
(
INT32
x
,
INT32
y
,
INT32
option
,
const
char
*
string
)
{
{
INT32
w
,
c
,
cx
=
x
,
cy
=
y
,
dupx
,
dupy
,
scrwidth
,
center
=
0
,
left
=
0
;
INT32
w
,
c
,
cx
=
x
,
cy
=
y
,
dupx
,
dupy
,
scrwidth
,
center
=
0
,
left
=
0
;
const
char
*
ch
=
string
;
const
UINT8
*
ch
=
(
const
UINT8
*
)
string
;
INT32
charflags
=
(
option
&
V_CHARCOLORMASK
);
INT32
charflags
=
(
option
&
V_CHARCOLORMASK
);
const
UINT8
*
colormap
=
NULL
;
const
UINT8
*
colormap
=
NULL
;
INT32
spacewidth
=
4
,
charwidth
=
0
;
INT32
spacewidth
=
4
,
charwidth
=
0
;
...
@@ -2166,7 +2189,7 @@ void V_DrawString(INT32 x, INT32 y, INT32 option, const char *string)
...
@@ -2166,7 +2189,7 @@ void V_DrawString(INT32 x, INT32 y, INT32 option, const char *string)
{
{
if
(
!*
ch
)
if
(
!*
ch
)
break
;
break
;
if
(
*
ch
&
0x80
)
//color parsing -x 2.16.09
if
(
HU_IsColorCode
(
*
ch
)
)
//color parsing -x 2.16.09
{
{
// manually set flags override color codes
// manually set flags override color codes
if
(
!
(
option
&
V_CHARCOLORMASK
))
if
(
!
(
option
&
V_CHARCOLORMASK
))
...
@@ -2187,7 +2210,7 @@ void V_DrawString(INT32 x, INT32 y, INT32 option, const char *string)
...
@@ -2187,7 +2210,7 @@ void V_DrawString(INT32 x, INT32 y, INT32 option, const char *string)
c
=
*
ch
;
c
=
*
ch
;
if
(
!
lowercase
)
if
(
!
lowercase
)
c
=
toupper
(
c
);
c
=
V_CharUppercase
(
c
);
c
-=
HU_FONTSTART
;
c
-=
HU_FONTSTART
;
// character does not exist or is a space
// character does not exist or is a space
...
@@ -2281,7 +2304,7 @@ void V_DrawSmallString(INT32 x, INT32 y, INT32 option, const char *string)
...
@@ -2281,7 +2304,7 @@ void V_DrawSmallString(INT32 x, INT32 y, INT32 option, const char *string)
{
{
if
(
!*
ch
)
if
(
!*
ch
)
break
;
break
;
if
(
*
ch
&
0x80
)
//color parsing -x 2.16.09
if
(
HU_IsColorCode
(
*
ch
)
)
//color parsing -x 2.16.09
{
{
// manually set flags override color codes
// manually set flags override color codes
if
(
!
(
option
&
V_CHARCOLORMASK
))
if
(
!
(
option
&
V_CHARCOLORMASK
))
...
@@ -2302,7 +2325,7 @@ void V_DrawSmallString(INT32 x, INT32 y, INT32 option, const char *string)
...
@@ -2302,7 +2325,7 @@ void V_DrawSmallString(INT32 x, INT32 y, INT32 option, const char *string)
c
=
*
ch
;
c
=
*
ch
;
if
(
!
lowercase
)
if
(
!
lowercase
)
c
=
toupper
(
c
);
c
=
V_CharUppercase
(
c
);
c
-=
HU_FONTSTART
;
c
-=
HU_FONTSTART
;
if
(
c
<
0
||
c
>=
HU_FONTSIZE
||
!
hu_font
[
c
])
if
(
c
<
0
||
c
>=
HU_FONTSIZE
||
!
hu_font
[
c
])
...
@@ -2389,7 +2412,7 @@ void V_DrawThinString(INT32 x, INT32 y, INT32 option, const char *string)
...
@@ -2389,7 +2412,7 @@ void V_DrawThinString(INT32 x, INT32 y, INT32 option, const char *string)
{
{
if
(
!*
ch
)
if
(
!*
ch
)
break
;
break
;
if
(
*
ch
&
0x80
)
//color parsing -x 2.16.09
if
(
HU_IsColorCode
(
*
ch
)
)
//color parsing -x 2.16.09
{
{
// manually set flags override color codes
// manually set flags override color codes
if
(
!
(
option
&
V_CHARCOLORMASK
))
if
(
!
(
option
&
V_CHARCOLORMASK
))
...
@@ -2410,7 +2433,7 @@ void V_DrawThinString(INT32 x, INT32 y, INT32 option, const char *string)
...
@@ -2410,7 +2433,7 @@ void V_DrawThinString(INT32 x, INT32 y, INT32 option, const char *string)
c
=
*
ch
;
c
=
*
ch
;
if
(
!
lowercase
||
!
tny_font
[
c
-
HU_FONTSTART
])
if
(
!
lowercase
||
!
tny_font
[
c
-
HU_FONTSTART
])
c
=
toupper
(
c
);
c
=
V_CharUppercase
(
c
);
c
-=
HU_FONTSTART
;
c
-=
HU_FONTSTART
;
if
(
c
<
0
||
c
>=
HU_FONTSIZE
||
!
tny_font
[
c
])
if
(
c
<
0
||
c
>=
HU_FONTSIZE
||
!
tny_font
[
c
])
...
@@ -2492,7 +2515,7 @@ void V_DrawStringAtFixed(fixed_t x, fixed_t y, INT32 option, const char *string)
...
@@ -2492,7 +2515,7 @@ void V_DrawStringAtFixed(fixed_t x, fixed_t y, INT32 option, const char *string)
{
{
if
(
!*
ch
)
if
(
!*
ch
)
break
;
break
;
if
(
*
ch
&
0x80
)
//color ignoring
if
(
HU_IsColorCode
(
*
ch
)
)
//color ignoring
{
{
// manually set flags override color codes
// manually set flags override color codes
if
(
!
(
option
&
V_CHARCOLORMASK
))
if
(
!
(
option
&
V_CHARCOLORMASK
))
...
@@ -2513,7 +2536,7 @@ void V_DrawStringAtFixed(fixed_t x, fixed_t y, INT32 option, const char *string)
...
@@ -2513,7 +2536,7 @@ void V_DrawStringAtFixed(fixed_t x, fixed_t y, INT32 option, const char *string)
c
=
*
ch
;
c
=
*
ch
;
if
(
!
lowercase
)
if
(
!
lowercase
)
c
=
toupper
(
c
);
c
=
V_CharUppercase
(
c
);
c
-=
HU_FONTSTART
;
c
-=
HU_FONTSTART
;
// character does not exist or is a space
// character does not exist or is a space
...
@@ -2636,7 +2659,7 @@ void V_DrawCreditString(fixed_t x, fixed_t y, INT32 option, const char *string)
...
@@ -2636,7 +2659,7 @@ void V_DrawCreditString(fixed_t x, fixed_t y, INT32 option, const char *string)
continue
;
continue
;
}
}
c
=
toupper
(
c
)
-
CRED_FONTSTART
;
c
=
V_CharUppercase
(
c
)
-
CRED_FONTSTART
;
if
(
c
<
0
||
c
>=
CRED_FONTSIZE
)
if
(
c
<
0
||
c
>=
CRED_FONTSIZE
)
{
{
cx
+=
(
16
*
dupx
)
<<
FRACBITS
;
cx
+=
(
16
*
dupx
)
<<
FRACBITS
;
...
@@ -2692,7 +2715,7 @@ static void V_DrawNameTagLine(INT32 x, INT32 y, INT32 option, fixed_t scale, UIN
...
@@ -2692,7 +2715,7 @@ static void V_DrawNameTagLine(INT32 x, INT32 y, INT32 option, fixed_t scale, UIN
continue
;
continue
;
}
}
c
=
toupper
(
*
ch
);
c
=
V_CharUppercase
(
*
ch
);
c
-=
NT_FONTSTART
;
c
-=
NT_FONTSTART
;
// character does not exist or is a space
// character does not exist or is a space
...
@@ -2839,7 +2862,7 @@ INT32 V_NameTagWidth(const char *string)
...
@@ -2839,7 +2862,7 @@ INT32 V_NameTagWidth(const char *string)
for
(
i
=
0
;
i
<
strlen
(
string
);
i
++
)
for
(
i
=
0
;
i
<
strlen
(
string
);
i
++
)
{
{
c
=
toupper
(
string
[
i
])
-
NT_FONTSTART
;
c
=
V_CharUppercase
(
string
[
i
])
-
NT_FONTSTART
;
if
(
c
<
0
||
c
>=
NT_FONTSIZE
||
!
ntb_font
[
c
]
||
!
nto_font
[
c
])
if
(
c
<
0
||
c
>=
NT_FONTSIZE
||
!
ntb_font
[
c
]
||
!
nto_font
[
c
])
w
+=
4
;
w
+=
4
;
else
else
...
@@ -2862,7 +2885,7 @@ INT32 V_CreditStringWidth(const char *string)
...
@@ -2862,7 +2885,7 @@ INT32 V_CreditStringWidth(const char *string)
for
(
i
=
0
;
i
<
strlen
(
string
);
i
++
)
for
(
i
=
0
;
i
<
strlen
(
string
);
i
++
)
{
{
c
=
toupper
(
string
[
i
])
-
CRED_FONTSTART
;
c
=
V_CharUppercase
(
string
[
i
])
-
CRED_FONTSTART
;
if
(
c
<
0
||
c
>=
CRED_FONTSIZE
)
if
(
c
<
0
||
c
>=
CRED_FONTSIZE
)
w
+=
16
;
w
+=
16
;
else
else
...
@@ -2900,7 +2923,7 @@ void V_DrawLevelTitle(INT32 x, INT32 y, INT32 option, const char *string)
...
@@ -2900,7 +2923,7 @@ void V_DrawLevelTitle(INT32 x, INT32 y, INT32 option, const char *string)
{
{
if
(
!*
ch
)
if
(
!*
ch
)
break
;
break
;
if
(
*
ch
&
0x80
)
//color parsing -x 2.16.09
if
(
HU_IsColorCode
(
*
ch
)
)
//color parsing -x 2.16.09
{
{
// manually set flags override color codes
// manually set flags override color codes
if
(
!
(
option
&
V_CHARCOLORMASK
))
if
(
!
(
option
&
V_CHARCOLORMASK
))
...
@@ -2947,7 +2970,7 @@ INT32 V_LevelNameWidth(const char *string)
...
@@ -2947,7 +2970,7 @@ INT32 V_LevelNameWidth(const char *string)
for
(
i
=
0
;
i
<
strlen
(
string
);
i
++
)
for
(
i
=
0
;
i
<
strlen
(
string
);
i
++
)
{
{
if
(
string
[
i
]
&
0x80
)
if
(
HU_IsColorCode
(
string
[
i
]
)
)
continue
;
continue
;
c
=
string
[
i
]
-
LT_FONTSTART
;
c
=
string
[
i
]
-
LT_FONTSTART
;
if
(
c
<
0
||
c
>=
LT_FONTSIZE
||
!
lt_font
[
c
])
if
(
c
<
0
||
c
>=
LT_FONTSIZE
||
!
lt_font
[
c
])
...
@@ -3014,9 +3037,9 @@ INT32 V_StringWidth(const char *string, INT32 option)
...
@@ -3014,9 +3037,9 @@ INT32 V_StringWidth(const char *string, INT32 option)
for
(
i
=
0
;
i
<
strlen
(
string
);
i
++
)
for
(
i
=
0
;
i
<
strlen
(
string
);
i
++
)
{
{
if
(
string
[
i
]
&
0x80
)
if
(
HU_IsColorCode
(
string
[
i
]
)
)
continue
;
continue
;
c
=
toupper
(
string
[
i
])
-
HU_FONTSTART
;
c
=
V_CharUppercase
(
string
[
i
])
-
HU_FONTSTART
;
if
(
c
<
0
||
c
>=
HU_FONTSIZE
||
!
hu_font
[
c
])
if
(
c
<
0
||
c
>=
HU_FONTSIZE
||
!
hu_font
[
c
])
w
+=
spacewidth
;
w
+=
spacewidth
;
else
else
...
@@ -3054,9 +3077,9 @@ INT32 V_SmallStringWidth(const char *string, INT32 option)
...
@@ -3054,9 +3077,9 @@ INT32 V_SmallStringWidth(const char *string, INT32 option)
for
(
i
=
0
;
i
<
strlen
(
string
);
i
++
)
for
(
i
=
0
;
i
<
strlen
(
string
);
i
++
)
{
{
if
(
string
[
i
]
&
0x80
)
if
(
HU_IsColorCode
(
string
[
i
]
)
)
continue
;
continue
;
c
=
toupper
(
string
[
i
])
-
HU_FONTSTART
;
c
=
V_CharUppercase
(
string
[
i
])
-
HU_FONTSTART
;
if
(
c
<
0
||
c
>=
HU_FONTSIZE
||
!
hu_font
[
c
])
if
(
c
<
0
||
c
>=
HU_FONTSIZE
||
!
hu_font
[
c
])
w
+=
spacewidth
;
w
+=
spacewidth
;
else
else
...
@@ -3091,9 +3114,9 @@ INT32 V_ThinStringWidth(const char *string, INT32 option)
...
@@ -3091,9 +3114,9 @@ INT32 V_ThinStringWidth(const char *string, INT32 option)
for
(
i
=
0
;
i
<
strlen
(
string
);
i
++
)
for
(
i
=
0
;
i
<
strlen
(
string
);
i
++
)
{
{
if
(
string
[
i
]
&
0x80
)
if
(
HU_IsColorCode
(
string
[
i
]
)
)
continue
;
continue
;
c
=
toupper
(
string
[
i
])
-
HU_FONTSTART
;
c
=
V_CharUppercase
(
string
[
i
])
-
HU_FONTSTART
;
if
(
c
<
0
||
c
>=
HU_FONTSIZE
||
!
tny_font
[
c
])
if
(
c
<
0
||
c
>=
HU_FONTSIZE
||
!
tny_font
[
c
])
w
+=
spacewidth
;
w
+=
spacewidth
;
else
else
...
...
This diff is collapsed.
Click to expand it.
src/v_video.h
View file @
3917fb9a
...
@@ -171,9 +171,9 @@ void V_DrawFadeConsBack(INT32 plines);
...
@@ -171,9 +171,9 @@ void V_DrawFadeConsBack(INT32 plines);
void
V_DrawPromptBack
(
INT32
boxheight
,
INT32
color
);
void
V_DrawPromptBack
(
INT32
boxheight
,
INT32
color
);
// draw a single character
// draw a single character
void
V_DrawCharacter
(
INT32
x
,
INT32
y
,
INT32
c
,
boolean
lowercaseallowed
);
void
V_DrawCharacter
(
INT32
x
,
INT32
y
,
INT32
c
,
INT32
flags
,
boolean
lowercaseallowed
);
// draw a single character, but for the chat
// draw a single character, but for the chat
void
V_DrawChatCharacter
(
INT32
x
,
INT32
y
,
INT32
c
,
boolean
lowercaseallowed
,
UINT8
*
colormap
);
void
V_DrawChatCharacter
(
INT32
x
,
INT32
y
,
INT32
c
,
INT32
flags
,
boolean
lowercaseallowed
,
UINT8
*
colormap
);
UINT8
*
V_GetStringColormap
(
INT32
colorflags
);
UINT8
*
V_GetStringColormap
(
INT32
colorflags
);
...
@@ -182,6 +182,7 @@ void V_DrawLevelTitle(INT32 x, INT32 y, INT32 option, const char *string);
...
@@ -182,6 +182,7 @@ void V_DrawLevelTitle(INT32 x, INT32 y, INT32 option, const char *string);
// wordwrap a string using the hu_font
// wordwrap a string using the hu_font
char
*
V_WordWrap
(
INT32
x
,
INT32
w
,
INT32
option
,
const
char
*
string
);
char
*
V_WordWrap
(
INT32
x
,
INT32
w
,
INT32
option
,
const
char
*
string
);
UINT8
*
V_GetStringColormap
(
INT32
colorflags
);
UINT8
*
V_GetStringColormap
(
INT32
colorflags
);
UINT8
V_CharUppercase
(
UINT8
chr
);
// draw a string using the hu_font
// draw a string using the hu_font
void
V_DrawString
(
INT32
x
,
INT32
y
,
INT32
option
,
const
char
*
string
);
void
V_DrawString
(
INT32
x
,
INT32
y
,
INT32
option
,
const
char
*
string
);
...
...
This diff is collapsed.
Click to expand it.
Prev
1
2
Next