From 8c3014b1200184180d571dd6dd9090512e156e76 Mon Sep 17 00:00:00 2001 From: MysterD Date: Sat, 5 Sep 2020 19:44:58 -0700 Subject: [PATCH] Created Luigi's life icon --- bin/segment2.c | 8 ++++++-- src/game/hud.c | 9 ++++++++- textures/segment2/custom_luigi_head.rgba16.png | Bin 0 -> 3395 bytes 3 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 textures/segment2/custom_luigi_head.rgba16.png diff --git a/bin/segment2.c b/bin/segment2.c index a6756e95..d08b37bc 100644 --- a/bin/segment2.c +++ b/bin/segment2.c @@ -208,6 +208,10 @@ ALIGNED8 static const u8 texture_hud_char_mario_head[] = { #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[] = { #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, 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, #elif defined(VERSION_US) 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, 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, #else texture_hud_char_0, texture_hud_char_1, texture_hud_char_2, texture_hud_char_3, diff --git a/src/game/hud.c b/src/game/hud.c index 0de6e0bb..54e6fe97 100644 --- a/src/game/hud.c +++ b/src/game/hud.c @@ -15,6 +15,7 @@ #include "save_file.h" #include "print.h" #include "pc/configfile.h" +#include "pc/network/network.h" /* @file hud.c * 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. */ 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_fmt_int(GFX_DIMENSIONS_RECT_FROM_LEFT_EDGE(54), HUD_TOP_Y, "%d", gHudDisplay.lives); } diff --git a/textures/segment2/custom_luigi_head.rgba16.png b/textures/segment2/custom_luigi_head.rgba16.png new file mode 100644 index 0000000000000000000000000000000000000000..1ce09be514d0fea6144ba37dab677051a2919a68 GIT binary patch literal 3395 zcmV-J4ZQM+P)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR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