From 87b20762d539888b031aba92b574108f5f817815 Mon Sep 17 00:00:00 2001 From: pikalaxalt Date: Tue, 24 May 2016 18:54:06 -0400 Subject: Numerous changes (see below) * Fix build errors from previous commit * Fix predef text pointers * Disassemble hidden object data and additional accessory functions --- engine/overworld/hidden_items.asm | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'engine/overworld') diff --git a/engine/overworld/hidden_items.asm b/engine/overworld/hidden_items.asm index f7f81070..39bb385d 100755 --- a/engine/overworld/hidden_items.asm +++ b/engine/overworld/hidden_items.asm @@ -9,7 +9,7 @@ HiddenItems: ; 76688 (1d:6688) predef FlagActionPredef ld a, c and a - ret nz + jr nz, .asm_75fa5 call EnableAutoTextBoxDrawing ld a, 1 ld [wDoNotWaitForButtonPressAfterDisplayingText], a @@ -18,6 +18,11 @@ HiddenItems: ; 76688 (1d:6688) call GetItemName tx_pre_jump FoundHiddenItemText +.asm_75fa5 + ld a, $ff + ld [hItemAlreadyFound], a + ret + INCLUDE "data/hidden_item_coords.asm" FoundHiddenItemText: ; 7675b (1d:675b) @@ -54,7 +59,7 @@ HiddenCoins: ; 76799 (1d:6799) predef GetQuantityOfItemInBag ld a, b and a - ret z + jr z, .asm_760ce ld hl, HiddenCoinCoords call FindHiddenItemOrCoinsIndex ld [wHiddenItemOrCoinsIndex], a @@ -65,7 +70,7 @@ HiddenCoins: ; 76799 (1d:6799) predef FlagActionPredef ld a, c and a - ret nz + jr nz, .asm_760ce xor a ld [hUnusedCoinsByte], a ld [hCoins], a @@ -79,6 +84,12 @@ HiddenCoins: ; 76799 (1d:6799) cp 40 jr z, .bcd20 jr .bcd100 + +.asm_760ce + ld a, $ff + ld [hItemAlreadyFound], a + ret + .bcd10 ld a, $10 ld [hCoins + 1], a -- cgit v1.3.1-sl0p