Clarify Variable Names

This commit is contained in:
TheBrokenRail 2021-07-04 22:32:19 -04:00
parent 665fe30a5f
commit 4652efcd65
3 changed files with 9 additions and 7 deletions

View File

@ -110,7 +110,7 @@ static Minecraft_grabMouse_t Minecraft_grabMouse = (Minecraft_grabMouse_t) 0x15d
typedef void (*Minecraft_leaveGame_t)(unsigned char *minecraft, bool save_remote_level);
static Minecraft_leaveGame_t Minecraft_leaveGame = (Minecraft_leaveGame_t) 0x15ea0;
typedef int (*Minecraft_handleBack_t)(unsigned char *minecraft, bool param_1);
typedef int (*Minecraft_handleBack_t)(unsigned char *minecraft, bool do_nothing);
static uint32_t Minecraft_handleBack_vtable_offset = 0x34;
static uint32_t Minecraft_screen_width_property_offset = 0x20; // int32_t
@ -206,8 +206,8 @@ static ItemInstance_constructor_extra_t ItemInstance_constructor_item_extra = (I
typedef int (*Player_isUsingItem_t)(unsigned char *player);
static Player_isUsingItem_t Player_isUsingItem = (Player_isUsingItem_t) 0x8f15c;
typedef void (*Player_drop_t)(unsigned char *player, ItemInstance *item_instance);
static uint32_t Player_drop_vtable_offset = 0x204;
typedef void (*Player_drop_t)(unsigned char *player, ItemInstance *item_instance, bool is_death);
static uint32_t Player_drop_vtable_offset = 0x208;
static uint32_t Player_username_property_offset = 0xbf4; // char *
static uint32_t Player_inventory_property_offset = 0xbe0; // Inventory *

View File

@ -73,7 +73,7 @@ void _handle_drop(unsigned char *minecraft) {
}
// Drop
(*Player_drop)(player, dropped_item);
(*Player_drop)(player, dropped_item, false);
}
}
}

View File

@ -29,9 +29,11 @@ void _handle_back(unsigned char *minecraft) {
}
// Fix OptionsScreen Ignoring The Back Button
static int32_t OptionsScreen_handleBackEvent_injection(unsigned char *screen, __attribute__((unused)) bool param_1) {
static int32_t OptionsScreen_handleBackEvent_injection(unsigned char *screen, bool do_nothing) {
if (!do_nothing) {
unsigned char *minecraft = *(unsigned char **) (screen + Screen_minecraft_property_offset);
(*Minecraft_setScreen)(minecraft, NULL);
}
return 1;
}