From aa97752efeef1425a0e0a00059f4a44569c917fc Mon Sep 17 00:00:00 2001 From: Remy Oukaour Date: Sat, 23 Dec 2017 00:31:04 -0500 Subject: Move NUM_BUENA_PRIZES to event/buena.asm (still hard-coded) Buena_PrizeMenu has "rept NUM_BUENA_PRIZES", which needs NUM_BUENA_PRIZES to be already defined. BuenaPrizeItems and BuenaPrizeItemsEnd are needed to define NUM_BUENA_PRIZES; but BuenaPrizeItems is defined after Buena_PrizeMenu. I don't see a way to avoid hard-coding its value of 9. Contrast that with the NUM_MOM_ITEMS constants, which are not used as "rept" arguments and so can be defined within their code file. --- data/items/buena_prizes.asm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'data/items') diff --git a/data/items/buena_prizes.asm b/data/items/buena_prizes.asm index 34a3bd524..8aecf2bd0 100644 --- a/data/items/buena_prizes.asm +++ b/data/items/buena_prizes.asm @@ -1,5 +1,5 @@ BuenaPrizeItems: ; 8b15e -; there are NUM_BUENA_PRIZES entries +; there are NUM_BUENA_PRIZES items (see event/buena.asm) db ULTRA_BALL, 2 db FULL_RESTORE, 2 db NUGGET, 3 @@ -9,4 +9,5 @@ BuenaPrizeItems: ; 8b15e db CARBOS, 5 db CALCIUM, 5 db HP_UP, 5 +BuenaPrizeItemsEnd: ; 8b170 -- cgit v1.2.3