Remove More Magic Numbers
This commit is contained in:
parent
04e6f345e5
commit
05ec8f6059
@ -158,7 +158,9 @@ static uint32_t Gui_selected_item_text_timer_property_offset = 0x9fc; // float
|
||||
|
||||
// GameMode Constructors
|
||||
|
||||
#define CREATOR_MODE_SIZE 0x18
|
||||
static void *CreatorMode = (void *) 0x1a044;
|
||||
#define SURVIVAL_MODE_SIZE 0x24
|
||||
static void *SurvivalMode = (void *) 0x1b7d8;
|
||||
|
||||
// LevelData
|
||||
|
@ -17,7 +17,7 @@ static void set_is_survival(int new_is_survival) {
|
||||
patch((void *) 0x16efc, inventory_patch);
|
||||
|
||||
// Use Correct Size For GameMode Object
|
||||
unsigned char size_patch[4] = {new_is_survival ? 0x24 : 0x18, 0x00, 0xa0, 0xe3};
|
||||
unsigned char size_patch[4] = {new_is_survival ? SURVIVAL_MODE_SIZE : CREATOR_MODE_SIZE, 0x00, 0xa0, 0xe3};
|
||||
patch((void *) 0x16ee4, size_patch);
|
||||
|
||||
// Replace Default CreatorMode Constructor With CreatorMode Or SurvivalMode Constructor
|
||||
|
Loading…
Reference in New Issue
Block a user