Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Radicalicious
SRB2
Commits
95e0a63e
Commit
95e0a63e
authored
Dec 25, 2021
by
Radicalicious
Browse files
Gray out emblem upon failure, fix fadeout stopping, and fix potential sound issue.
parent
9f92d432
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/st_stuff.c
View file @
95e0a63e
...
...
@@ -1191,6 +1191,7 @@ static void ST_drawInput(void)
static
void
ST_drawEmblemTimer
(
void
)
{
INT32
i
;
UINT8
*
colormap
;
// Get the lowest available time emblem's data.
tic_t
lowestTics
=
(
tic_t
)
UINT32_MAX
;
UINT16
lowestColor
=
0
;
...
...
@@ -1246,30 +1247,43 @@ static void ST_drawEmblemTimer(void)
const
tic_t
len
=
2
*
TICRATE
;
int
vflags
=
0
,
trans
=
0
;
tic_t
time
;
if
(
stplyr
->
exiting
&&
stplyr
->
realtime
>=
lowestTics
)
time
=
leveltime
;
else
time
=
stplyr
->
realtime
;
if
(
stplyr
->
real
time
==
lowestTics
)
if
(
time
==
lowestTics
&&
!
stplyr
->
exiting
)
{
//S_StartSound(NULL, sfx_s3k72); // As much as Kart sound parity would've been great, this sound is FAR too quiet to be heard ingame.
S_StartSound
(
NULL
,
sfx_spkdth
);
// This sound, however, is fine!
}
if
(
stplyr
->
realtime
<
lowestTics
)
if
(
time
<
lowestTics
)
{
vflags
=
V_GREENMAP
;
else
if
(
stplyr
->
realtime
>=
lowestTics
&&
stplyr
->
realtime
<
start
)
colormap
=
R_GetTranslationColormap
(
TC_DEFAULT
,
lowestColor
,
GTC_CACHE
);
}
else
if
(
time
>=
lowestTics
&&
time
<
start
)
{
vflags
=
V_REDMAP
;
else
if
(
stplyr
->
realtime
>=
start
&&
stplyr
->
realtime
<
start
+
len
)
colormap
=
R_GetTranslationColormap
(
TC_RAINBOW
,
SKINCOLOR_GREY
,
GTC_CACHE
);
}
else
if
(
time
>=
start
&&
time
<
start
+
len
)
{
fixed_t
percent
=
(
stplyr
->
real
time
-
start
)
*
FRACUNIT
/
len
;
fixed_t
percent
=
(
time
-
start
)
*
FRACUNIT
/
len
;
trans
=
(
percent
*
10
/
FRACUNIT
)
<<
V_ALPHASHIFT
;
vflags
=
V_GRAYMAP
;
colormap
=
R_GetTranslationColormap
(
TC_RAINBOW
,
SKINCOLOR_GREY
,
GTC_CACHE
);
}
else
return
;
vflags
|=
trans
;
V_DrawFixedPatch
(
60
*
FRACUNIT
,
178
*
FRACUNIT
,
FRACUNIT
,
trans
,
lowestIcon
,
R_GetTranslationColormap
(
TC_DEFAULT
,
lowestColor
,
GTC_CACHE
)
);
V_DrawFixedPatch
(
60
*
FRACUNIT
,
178
*
FRACUNIT
,
FRACUNIT
,
trans
,
lowestIcon
,
colormap
);
V_DrawThinString
(
88
,
187
,
vflags
,
plrTimer
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment