Folded nops into hidemoneybox and updatemoneybox
The nops are essential to the hidemoneybox and updatemoneybox commands when using vanilla versions of those commands. Even though they're not actually used parameters in the command implementation, they are still consumed, which means if someone were to get rid of the nops (as I did in TriHard) it causes the commands to consume bytecode that are not theirs, resulting in undefined behavior usually leading to softlocks. Folding the extra bytes into the macros means there's no chance of the extra bytes getting losts in scripts.
This commit is contained in:
@@ -39,14 +39,11 @@ MauvilleCity_GameCorner_EventScript_20FC33:: @ 820FC33
|
||||
goto_if_eq MauvilleCity_GameCorner_EventScript_20FCC1
|
||||
givecoins 50
|
||||
takemoney 0x3e8, 0
|
||||
updatemoneybox 0, 0
|
||||
nop
|
||||
updatemoneybox 0,0
|
||||
updatecoinsbox 1, 6
|
||||
playse SE_REGI
|
||||
msgbox MauvilleCity_GameCorner_Text_210529, MSGBOX_DEFAULT
|
||||
hidemoneybox
|
||||
nop
|
||||
nop
|
||||
hidecoinsbox 0, 5
|
||||
release
|
||||
end
|
||||
@@ -60,14 +57,11 @@ MauvilleCity_GameCorner_EventScript_20FC75:: @ 820FC75
|
||||
goto_if_eq MauvilleCity_GameCorner_EventScript_20FCC1
|
||||
givecoins 500
|
||||
takemoney 0x2710, 0
|
||||
updatemoneybox 0, 0
|
||||
nop
|
||||
updatemoneybox 0,0
|
||||
updatecoinsbox 1, 6
|
||||
playse SE_REGI
|
||||
msgbox MauvilleCity_GameCorner_Text_210529, MSGBOX_DEFAULT
|
||||
hidemoneybox
|
||||
nop
|
||||
nop
|
||||
hidecoinsbox 0, 5
|
||||
release
|
||||
end
|
||||
@@ -80,8 +74,6 @@ MauvilleCity_GameCorner_EventScript_20FCB7:: @ 820FCB7
|
||||
MauvilleCity_GameCorner_EventScript_20FCC1:: @ 820FCC1
|
||||
msgbox MauvilleCity_GameCorner_Text_210553, MSGBOX_DEFAULT
|
||||
hidemoneybox
|
||||
nop
|
||||
nop
|
||||
hidecoinsbox 0, 5
|
||||
release
|
||||
end
|
||||
@@ -89,8 +81,6 @@ MauvilleCity_GameCorner_EventScript_20FCC1:: @ 820FCC1
|
||||
MauvilleCity_GameCorner_EventScript_20FCD1:: @ 820FCD1
|
||||
msgbox MauvilleCity_GameCorner_Text_21059A, MSGBOX_DEFAULT
|
||||
hidemoneybox
|
||||
nop
|
||||
nop
|
||||
hidecoinsbox 0, 5
|
||||
release
|
||||
end
|
||||
@@ -98,8 +88,6 @@ MauvilleCity_GameCorner_EventScript_20FCD1:: @ 820FCD1
|
||||
MauvilleCity_GameCorner_EventScript_20FCE1:: @ 820FCE1
|
||||
msgbox MauvilleCity_GameCorner_Text_21057E, MSGBOX_DEFAULT
|
||||
hidemoneybox
|
||||
nop
|
||||
nop
|
||||
hidecoinsbox 0, 5
|
||||
release
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user