Add Food Overlay #86
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "bigjango13/minecraft-pi-reborn:apple-skin"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This adds a food overlay, like that of the AppleSkin mod. It works with both classic and non-classic GUI.
Overall, looks good!
@ -22,0 +42,4 @@
Gui_renderHearts(gui);
}
Gui_blit_t Gui_blit_renderHearts_injection = NULL;
Maybe call this
Gui_blit_renderHearts_original
?_injection
is a bit unclear IMO. Also, does it not let you do= Gui_blit
in this line?Great minds think alike it seems 😉
I tried to do
Gui_blit_t Gui_blit_renderHearts_injection = Gui_blit;
, however C does not allow this, it requires global initializers to be constant, and the symbol split makes it no longer constant. As for the rename, it's been done.@ -22,0 +53,4 @@
heal_amount_drawing = 0;
} else if (heal_amount_drawing > 0) {
// Full heart
Gui_blit_renderHearts_injection(gui, x1, y1, 70, 0, w1, h1, w2, h2);
Should these constants (79, 70) be put in a macro so they're not repeated?
@ -576,3 +638,3 @@
overwrite_call((void *) 0x267c8, (void *) Gui_renderHearts_GuiComponent_blit_hearts_injection);
overwrite_call((void *) 0x2656c, (void *) Gui_renderHearts_GuiComponent_blit_armor_injection);
overwrite_call((void *) 0x268c4, (void *) Gui_renderBubbles_GuiComponent_blit_injection);
if (!food_overlay) {
I'd suggest re-ordering this so that
Classic HUD
is setup first, thenFood Overlay
. That way,Food Overlay
's overwrites can just replaceClassic HUD
's rather thanClassic HUD
's having to explicitly check.