From fc5913688e9e1baeb2239fc6c0eff0770a06b0dd Mon Sep 17 00:00:00 2001 From: voloved <36523934+voloved@users.noreply.github.com> Date: Thu, 31 Aug 2023 08:35:52 -0400 Subject: [PATCH] changed select hold image and added bike edge case --- ...elect-Allows-For-A-Second-Register-Item.md | 29 +++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/Holding-Select-Allows-For-A-Second-Register-Item.md b/Holding-Select-Allows-For-A-Second-Register-Item.md index 33c04c5..c6d3a02 100644 --- a/Holding-Select-Allows-For-A-Second-Register-Item.md +++ b/Holding-Select-Allows-For-A-Second-Register-Item.md @@ -5,7 +5,7 @@ By devolov ## Add this recolored SEL image into `graphics/bag/` as `select_button_hold.png`. --------------------- graphics/bag/select_button_hold.png --------------------- -![select_button_hold](https://github.com/pret/pokeemerald/assets/36523934/2a23840f-d2f3-4842-9874-2c492039566a) +![select_button_hold](https://github.com/pret/pokeemerald/assets/36523934/36cef18c-c344-4a28-9f5b-9fa749e2882d) ## Add the new item to register into the save data. Saving it in a way where it takes space from `unused_3598` allows save compatibility older sav files. @@ -429,4 +429,29 @@ index a64b8ffc4..953f78fc7 100644 // overworld extern const u8 EventScript_WhiteOut[]; extern const u8 EventScript_ResetMrBriney[]; -``` \ No newline at end of file +``` + +## Modify SwapRegisteredBike for the new register option. +```diff +--------------------------------- src/item.c --------------------------------- +void SwapRegisteredBike(void) +{ + switch (gSaveBlock1Ptr->registeredItem) + { + case ITEM_MACH_BIKE: + gSaveBlock1Ptr->registeredItem = ITEM_ACRO_BIKE; + break; + case ITEM_ACRO_BIKE: + gSaveBlock1Ptr->registeredItem = ITEM_MACH_BIKE; + break; + } ++ switch (gSaveBlock1Ptr->registeredLongItem) ++ { ++ case ITEM_MACH_BIKE: ++ gSaveBlock1Ptr->registeredLongItem = ITEM_ACRO_BIKE; ++ break; ++ case ITEM_ACRO_BIKE: ++ gSaveBlock1Ptr->registeredLongItem = ITEM_MACH_BIKE; ++ break; ++ } +} \ No newline at end of file