Fix Method Signature
This commit is contained in:
parent
e0423c5de3
commit
37a0121f73
@ -16,8 +16,7 @@ static void SelectWorldScreen_tick_injection(unsigned char *screen) {
|
|||||||
bool create_world = *(bool *) (screen + 0xfc);
|
bool create_world = *(bool *) (screen + 0xfc);
|
||||||
if (create_world) {
|
if (create_world) {
|
||||||
// Get New World Name
|
// Get New World Name
|
||||||
std::string new_name;
|
std::string new_name = (*SelectWorldScreen_getUniqueLevelName)(screen, WORLD_NAME);
|
||||||
(*SelectWorldScreen_getUniqueLevelName)(new_name, screen, WORLD_NAME);
|
|
||||||
// Create SimpleLevelChooseScreen
|
// Create SimpleLevelChooseScreen
|
||||||
unsigned char *new_screen = (unsigned char *) ::operator new(SIMPLE_LEVEL_CHOOSE_SCREEN_SIZE);
|
unsigned char *new_screen = (unsigned char *) ::operator new(SIMPLE_LEVEL_CHOOSE_SCREEN_SIZE);
|
||||||
(*SimpleChooseLevelScreen)(new_screen, new_name);
|
(*SimpleChooseLevelScreen)(new_screen, new_name);
|
||||||
@ -34,8 +33,7 @@ static void Touch_SelectWorldScreen_tick_injection(unsigned char *screen) {
|
|||||||
bool create_world = *(bool *) (screen + 0x154);
|
bool create_world = *(bool *) (screen + 0x154);
|
||||||
if (create_world) {
|
if (create_world) {
|
||||||
// Get New World Name
|
// Get New World Name
|
||||||
std::string new_name;
|
std::string new_name = (*Touch_SelectWorldScreen_getUniqueLevelName)(screen, WORLD_NAME);
|
||||||
(*Touch_SelectWorldScreen_getUniqueLevelName)(new_name, screen, WORLD_NAME);
|
|
||||||
// Create SimpleLevelChooseScreen
|
// Create SimpleLevelChooseScreen
|
||||||
unsigned char *new_screen = (unsigned char *) ::operator new(SIMPLE_LEVEL_CHOOSE_SCREEN_SIZE);
|
unsigned char *new_screen = (unsigned char *) ::operator new(SIMPLE_LEVEL_CHOOSE_SCREEN_SIZE);
|
||||||
(*SimpleChooseLevelScreen)(new_screen, new_name);
|
(*SimpleChooseLevelScreen)(new_screen, new_name);
|
||||||
|
@ -356,7 +356,7 @@ static SimpleChooseLevelScreen_t SimpleChooseLevelScreen = (SimpleChooseLevelScr
|
|||||||
|
|
||||||
// SelectWorldScreen
|
// SelectWorldScreen
|
||||||
|
|
||||||
typedef std::string &(*SelectWorldScreen_getUniqueLevelName_t)(std::string &new_name, unsigned char *screen, std::string const& name);
|
typedef std::string (*SelectWorldScreen_getUniqueLevelName_t)(unsigned char *screen, std::string const& name);
|
||||||
static SelectWorldScreen_getUniqueLevelName_t SelectWorldScreen_getUniqueLevelName = (SelectWorldScreen_getUniqueLevelName_t) 0x388ec;
|
static SelectWorldScreen_getUniqueLevelName_t SelectWorldScreen_getUniqueLevelName = (SelectWorldScreen_getUniqueLevelName_t) 0x388ec;
|
||||||
|
|
||||||
// Touch::SelectWorldScreen
|
// Touch::SelectWorldScreen
|
||||||
|
Loading…
Reference in New Issue
Block a user