Created Luigi's life icon

This commit is contained in:
MysterD 2020-09-05 19:44:58 -07:00
parent 5857b71209
commit c232cf01fd
3 changed files with 14 additions and 3 deletions

View File

@ -208,6 +208,10 @@ ALIGNED8 static const u8 texture_hud_char_mario_head[] = {
#include "textures/segment2/segment2.05A00.rgba16.inc.c" #include "textures/segment2/segment2.05A00.rgba16.inc.c"
}; };
ALIGNED8 static const u8 texture_hud_char_luigi_head[] = {
#include "textures/segment2/custom_luigi_head.rgba16.inc.c"
};
ALIGNED8 static const u8 texture_hud_char_star[] = { ALIGNED8 static const u8 texture_hud_char_star[] = {
#include "textures/segment2/segment2.05C00.rgba16.inc.c" #include "textures/segment2/segment2.05C00.rgba16.inc.c"
}; };
@ -1816,7 +1820,7 @@ const u8 *const main_hud_lut[] = {
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, texture_hud_char_multiply, texture_hud_char_coin, 0x0, 0x0, texture_hud_char_multiply, texture_hud_char_coin,
texture_hud_char_mario_head, texture_hud_char_star, 0x0, 0x0, texture_hud_char_mario_head, texture_hud_char_star, texture_hud_char_luigi_head, 0x0,
texture_hud_char_apostrophe, texture_hud_char_double_quote, texture_hud_char_umlaut, texture_hud_char_apostrophe, texture_hud_char_double_quote, texture_hud_char_umlaut,
#elif defined(VERSION_US) #elif defined(VERSION_US)
texture_hud_char_0, texture_hud_char_1, texture_hud_char_2, texture_hud_char_3, texture_hud_char_0, texture_hud_char_1, texture_hud_char_2, texture_hud_char_3,
@ -1832,7 +1836,7 @@ const u8 *const main_hud_lut[] = {
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, texture_hud_char_multiply, texture_hud_char_coin, 0x0, 0x0, texture_hud_char_multiply, texture_hud_char_coin,
texture_hud_char_mario_head, texture_hud_char_star, 0x0, 0x0, texture_hud_char_mario_head, texture_hud_char_star, texture_hud_char_luigi_head, 0x0,
texture_hud_char_apostrophe, texture_hud_char_double_quote, texture_hud_char_apostrophe, texture_hud_char_double_quote,
#else #else
texture_hud_char_0, texture_hud_char_1, texture_hud_char_2, texture_hud_char_3, texture_hud_char_0, texture_hud_char_1, texture_hud_char_2, texture_hud_char_3,

View File

@ -15,6 +15,7 @@
#include "save_file.h" #include "save_file.h"
#include "print.h" #include "print.h"
#include "pc/configfile.h" #include "pc/configfile.h"
#include "pc/network/network.h"
/* @file hud.c /* @file hud.c
* This file implements HUD rendering and power meter animations. * This file implements HUD rendering and power meter animations.
@ -291,7 +292,13 @@ void render_hud_power_meter(void) {
* Renders the amount of lives Mario has. * Renders the amount of lives Mario has.
*/ */
void render_hud_mario_lives(void) { void render_hud_mario_lives(void) {
print_text(GFX_DIMENSIONS_RECT_FROM_LEFT_EDGE(22), HUD_TOP_Y, ","); // 'Mario Head' glyph // two-player hack
#ifdef VERSION_JP
char* displayHead = ",";
#else
char* displayHead = (networkType == NT_SERVER) ? "," : ".";
#endif
print_text(GFX_DIMENSIONS_RECT_FROM_LEFT_EDGE(22), HUD_TOP_Y, displayHead); // 'Mario Head' glyph
print_text(GFX_DIMENSIONS_RECT_FROM_LEFT_EDGE(38), HUD_TOP_Y, "*"); // 'X' glyph print_text(GFX_DIMENSIONS_RECT_FROM_LEFT_EDGE(38), HUD_TOP_Y, "*"); // 'X' glyph
print_text_fmt_int(GFX_DIMENSIONS_RECT_FROM_LEFT_EDGE(54), HUD_TOP_Y, "%d", gHudDisplay.lives); print_text_fmt_int(GFX_DIMENSIONS_RECT_FROM_LEFT_EDGE(54), HUD_TOP_Y, "%d", gHudDisplay.lives);
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB