From fe1e76466b293c83e6cd3a7d4639fb3c49da26ad Mon Sep 17 00:00:00 2001 From: Rangi <35663410+Rangi42@users.noreply.github.com> Date: Wed, 7 Jan 2026 22:05:20 -0500 Subject: Use macros to enforce "missable/hide/show object" constraints, and rename them to "toggleable objects" (#557) --- scripts/Route25.asm | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'scripts/Route25.asm') diff --git a/scripts/Route25.asm b/scripts/Route25.asm index a85144a8..a4210cc5 100644 --- a/scripts/Route25.asm +++ b/scripts/Route25.asm @@ -1,5 +1,5 @@ Route25_Script: - call Route25ShowHideBillScript + call Route25ToggleBillsScript call EnableAutoTextBoxDrawing ld hl, Route25TrainerHeaders ld de, Route25_ScriptPointers @@ -8,7 +8,7 @@ Route25_Script: ld [wRoute25CurScript], a ret -Route25ShowHideBillScript: +Route25ToggleBillsScript: ld hl, wCurrentMapScriptFlags bit BIT_CUR_MAP_LOADED_2, [hl] res BIT_CUR_MAP_LOADED_2, [hl] @@ -18,21 +18,21 @@ Route25ShowHideBillScript: CheckEventReuseHL EVENT_MET_BILL_2 jr nz, .met_bill ResetEventReuseHL EVENT_BILL_SAID_USE_CELL_SEPARATOR - ld a, HS_BILL_POKEMON - ld [wMissableObjectIndex], a + ld a, TOGGLE_BILL_POKEMON + ld [wToggleableObjectIndex], a predef_jump ShowObject .met_bill CheckEventAfterBranchReuseHL EVENT_GOT_SS_TICKET, EVENT_MET_BILL_2 ret z SetEventReuseHL EVENT_LEFT_BILLS_HOUSE_AFTER_HELPING - ld a, HS_NUGGET_BRIDGE_GUY - ld [wMissableObjectIndex], a + ld a, TOGGLE_NUGGET_BRIDGE_GUY + ld [wToggleableObjectIndex], a predef HideObject - ld a, HS_BILL_1 - ld [wMissableObjectIndex], a + ld a, TOGGLE_BILL_1 + ld [wToggleableObjectIndex], a predef HideObject - ld a, HS_BILL_2 - ld [wMissableObjectIndex], a + ld a, TOGGLE_BILL_2 + ld [wToggleableObjectIndex], a predef_jump ShowObject Route25_ScriptPointers: -- cgit v1.3.1-sl0p