mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-04-19 08:41:25 +00:00
I was getting annoyed by these arrows and their inconsistency, so I made them use the graphics.
This commit is contained in:
parent
5b27e597d7
commit
67d57d82bc
2 changed files with 21 additions and 43 deletions
|
@ -1366,54 +1366,24 @@ static void HU_drawMiniChat(void)
|
|||
|
||||
}
|
||||
|
||||
// HU_DrawUpArrow
|
||||
// You see, we don't have arrow graphics in 2.1 and I'm too lazy to include a 2 bytes file for it.
|
||||
|
||||
static void HU_DrawUpArrow(INT32 x, INT32 y, INT32 options)
|
||||
{
|
||||
// Ok I'm super lazy so let's make this as the worst draw function:
|
||||
V_DrawFill(x+2, y, 1, 1, 103|options);
|
||||
V_DrawFill(x+1, y+1, 3, 1, 103|options);
|
||||
V_DrawFill(x, y+2, 5, 1, 103|options); // that's the yellow part, I swear
|
||||
|
||||
V_DrawFill(x+3, y, 1, 1, 26|options);
|
||||
V_DrawFill(x+4, y+1, 1, 1, 26|options);
|
||||
V_DrawFill(x+5, y+2, 1, 1, 26|options);
|
||||
V_DrawFill(x, y+3, 6, 1, 26|options); // that's the black part. no racism intended. i swear.
|
||||
}
|
||||
|
||||
// HU_DrawDownArrow
|
||||
// Should we talk about anime waifus to pass the time? This feels retarded.
|
||||
|
||||
static void HU_DrawDownArrow(INT32 x, INT32 y, INT32 options)
|
||||
{
|
||||
// Ok I'm super lazy so let's make this as the worst draw function:
|
||||
V_DrawFill(x, y, 6, 1, 26|options);
|
||||
V_DrawFill(x, y+1, 5, 1, 26|options);
|
||||
V_DrawFill(x+1, y+2, 3, 1, 26|options);
|
||||
V_DrawFill(x+2, y+3, 1, 1, 26|options); // that's the black part. no racism intended. i swear.
|
||||
|
||||
V_DrawFill(x, y, 5, 1, 103|options);
|
||||
V_DrawFill(x+1, y+1, 3, 1, 103|options);
|
||||
V_DrawFill(x+2, y+2, 1, 1, 103|options); // that's the yellow part, I swear
|
||||
}
|
||||
|
||||
// HU_DrawChatLog
|
||||
// TODO: fix dumb word wrapping issues
|
||||
|
||||
static void HU_drawChatLog(INT32 offset)
|
||||
{
|
||||
INT32 charwidth = 4, charheight = 6;
|
||||
INT32 x = chatx+2, y, dx = 0, dy = 0;
|
||||
UINT32 i = 0;
|
||||
INT32 chat_topy, chat_bottomy;
|
||||
boolean atbottom = false;
|
||||
|
||||
// before we do anything, make sure that our scroll position isn't "illegal";
|
||||
// make sure that our scroll position isn't "illegal";
|
||||
if (chat_scroll > chat_maxscroll)
|
||||
chat_scroll = chat_maxscroll;
|
||||
|
||||
INT32 charwidth = 4, charheight = 6;
|
||||
INT32 x = chatx+2, y = chaty - offset*charheight - (chat_scroll*charheight) - cv_chatheight.value*charheight - 12 - (cv_kartspeedometer.value ? 16 : 0), dx = 0, dy = 0;
|
||||
UINT32 i = 0;
|
||||
INT32 chat_topy = y + chat_scroll*charheight;
|
||||
INT32 chat_bottomy = chat_topy + cv_chatheight.value*charheight;
|
||||
boolean atbottom = false;
|
||||
y = chaty - offset*charheight - (chat_scroll*charheight) - cv_chatheight.value*charheight - 12 - (cv_kartspeedometer.value ? 16 : 0);
|
||||
chat_topy = y + chat_scroll*charheight;
|
||||
chat_bottomy = chat_topy + cv_chatheight.value*charheight;
|
||||
|
||||
V_DrawFillConsoleMap(chatx, chat_topy, cv_chatwidth.value, cv_chatheight.value*charheight +2, 239|V_SNAPTOBOTTOM|V_SNAPTOLEFT); // log box
|
||||
|
||||
|
@ -1484,9 +1454,15 @@ static void HU_drawChatLog(INT32 offset)
|
|||
// draw arrows to indicate that we can (or not) scroll.
|
||||
|
||||
if (chat_scroll > 0)
|
||||
HU_DrawUpArrow(chatx-8, ((justscrolledup) ? (chat_topy-1) : (chat_topy)), V_SNAPTOBOTTOM | V_SNAPTOLEFT);
|
||||
{
|
||||
V_DrawCharacter(chatx-9, ((justscrolledup) ? (chat_topy-1) : (chat_topy)),
|
||||
'\x1A' | V_SNAPTOBOTTOM | V_SNAPTOLEFT, false); // up arrow
|
||||
}
|
||||
if (chat_scroll < chat_maxscroll)
|
||||
HU_DrawDownArrow(chatx-8, chat_bottomy-((justscrolleddown) ? 3 : 4), V_SNAPTOBOTTOM | V_SNAPTOLEFT);
|
||||
{
|
||||
V_DrawCharacter(chatx-9, chat_bottomy-((justscrolleddown) ? 5 : 6),
|
||||
'\x1B' | V_SNAPTOBOTTOM | V_SNAPTOLEFT, false); // down arrow
|
||||
}
|
||||
|
||||
justscrolleddown = false;
|
||||
justscrolledup = false;
|
||||
|
|
|
@ -5564,7 +5564,8 @@ static void M_DrawStatsMaps(int location)
|
|||
boolean dotopname = true, dobottomarrow = (location < statsMax);
|
||||
|
||||
if (location)
|
||||
V_DrawString(10, y-(skullAnimCounter/5), highlightflags, "\x1A");
|
||||
V_DrawCharacter(10, y-(skullAnimCounter/5),
|
||||
'\x1A' | highlightflags, false); // up arrow
|
||||
|
||||
while (statsMapList[++i] != -1)
|
||||
{
|
||||
|
@ -5646,7 +5647,8 @@ static void M_DrawStatsMaps(int location)
|
|||
}
|
||||
bottomarrow:
|
||||
if (dobottomarrow)
|
||||
V_DrawString(10, y-8 + (skullAnimCounter/5), highlightflags, "\x1B");
|
||||
V_DrawCharacter(10, y-8 + (skullAnimCounter/5),
|
||||
'\x1B' | highlightflags, false); // up arrow
|
||||
}
|
||||
|
||||
static void M_DrawLevelStats(void)
|
||||
|
|
Loading…
Reference in a new issue