From 5f7b444ae853d171cf9b223574f2dac5edbc03c5 Mon Sep 17 00:00:00 2001 From: Vortyne <104168801+Vortyne@users.noreply.github.com> Date: Sun, 5 May 2024 10:56:08 -0400 Subject: Use constant in wram for hidden item flags (#445) Prevents defining more hidden items than the flag array has room for --- data/events/hidden_coins.asm | 2 ++ data/events/hidden_item_coords.asm | 2 ++ 2 files changed, 4 insertions(+) (limited to 'data') diff --git a/data/events/hidden_coins.asm b/data/events/hidden_coins.asm index f2485f50..1fa5af23 100644 --- a/data/events/hidden_coins.asm +++ b/data/events/hidden_coins.asm @@ -3,6 +3,7 @@ MACRO hidden_coin ENDM HiddenCoinCoords: + table_width 3, HiddenCoinCoords ; map id, x, y hidden_coin GAME_CORNER, 0, 8 hidden_coin GAME_CORNER, 1, 16 @@ -16,4 +17,5 @@ HiddenCoinCoords: hidden_coin GAME_CORNER, 11, 7 hidden_coin GAME_CORNER, 15, 8 hidden_coin GAME_CORNER, 12, 15 + assert_max_table_length MAX_HIDDEN_COINS db -1 ; end diff --git a/data/events/hidden_item_coords.asm b/data/events/hidden_item_coords.asm index 30619d6b..04f0c2f4 100644 --- a/data/events/hidden_item_coords.asm +++ b/data/events/hidden_item_coords.asm @@ -3,6 +3,7 @@ MACRO hidden_item ENDM HiddenItemCoords: + table_width 3, HiddenItemCoords ; map id, x, y hidden_item VIRIDIAN_FOREST, 1, 18 hidden_item VIRIDIAN_FOREST, 16, 42 @@ -58,4 +59,5 @@ HiddenItemCoords: hidden_item VERMILION_CITY, 14, 11 hidden_item CERULEAN_CITY, 15, 8 hidden_item ROUTE_4, 40, 3 + assert_max_table_length MAX_HIDDEN_ITEMS db -1 ; end -- cgit v1.3.1-sl0p