summaryrefslogtreecommitdiff
path: root/data/maps/Route109_SeashoreHouse
diff options
context:
space:
mode:
authorTustin2121 <tustin2121@gmail.com>2019-08-17 13:25:36 -0400
committerTustin2121 <tustin2121@gmail.com>2019-08-17 13:25:36 -0400
commitf4d4424618b8b357af23978ef543fd033dece7e9 (patch)
treefada7fdbf7ffa004acc0bbb0def5b663e5f1e22a /data/maps/Route109_SeashoreHouse
parent9bcd39d86c06882c1c17909ee72ebc2b2819254b (diff)
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.
Diffstat (limited to 'data/maps/Route109_SeashoreHouse')
-rw-r--r--data/maps/Route109_SeashoreHouse/scripts.inc11
1 files changed, 1 insertions, 10 deletions
diff --git a/data/maps/Route109_SeashoreHouse/scripts.inc b/data/maps/Route109_SeashoreHouse/scripts.inc
index e52ab08f9..594b17f84 100644
--- a/data/maps/Route109_SeashoreHouse/scripts.inc
+++ b/data/maps/Route109_SeashoreHouse/scripts.inc
@@ -43,8 +43,6 @@ Route109_SeashoreHouse_EventScript_269460:: @ 8269460
goto_if_eq Route109_SeashoreHouse_EventScript_269484
msgbox Route109_SeashoreHouse_Text_2697EF, MSGBOX_DEFAULT
hidemoneybox
- nop
- nop
release
end
@@ -57,28 +55,21 @@ Route109_SeashoreHouse_EventScript_269484:: @ 8269484
goto_if_eq Route109_SeashoreHouse_EventScript_2694D5
msgbox Route109_SeashoreHouse_Text_2697C8, MSGBOX_DEFAULT
takemoney 0x12c, 0
- updatemoneybox 0, 0
- nop
+ updatemoneybox 0,0
giveitem_std ITEM_SODA_POP
hidemoneybox
- nop
- nop
release
end
Route109_SeashoreHouse_EventScript_2694C8:: @ 82694C8
msgbox Route109_SeashoreHouse_Text_2697D5, MSGBOX_DEFAULT
hidemoneybox
- nop
- nop
release
end
Route109_SeashoreHouse_EventScript_2694D5:: @ 82694D5
msgbox gText_TooBadBagIsFull, MSGBOX_DEFAULT
hidemoneybox
- nop
- nop
release
end