diff options
author | yenatch <yenatch@gmail.com> | 2014-09-20 00:57:27 -0400 |
---|---|---|
committer | yenatch <yenatch@gmail.com> | 2014-09-20 00:57:27 -0400 |
commit | dff0cdeb5a2f901dc8d1a05847d09d7faf1654ad (patch) | |
tree | 3618582f76f4183b6bc22c5d4743b6d171d11128 /engine/hidden_object_functions3.asm | |
parent | 1185d69819af3493fe8ace9f576fee4b420db55e (diff) | |
parent | 2ed65d9c3e3ba60939ebe2928ffddc06a90b1876 (diff) |
Merge remote-tracking branch 'YamaArashi/master'
Conflicts:
constants/misc_constants.asm
engine/battle/core.asm
engine/menu/pokedex.asm
engine/town_map.asm
home.asm
hram.asm
Diffstat (limited to 'engine/hidden_object_functions3.asm')
-rwxr-xr-x | engine/hidden_object_functions3.asm | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/engine/hidden_object_functions3.asm b/engine/hidden_object_functions3.asm index e613df2e..d3d83f08 100755 --- a/engine/hidden_object_functions3.asm +++ b/engine/hidden_object_functions3.asm @@ -1,22 +1,23 @@ ; prints text for bookshelves in buildings without sign events PrintBookshelfText: ; fb50 (3:7b50) - ld a, [wSpriteStateData1 + 9] - cp $4 - jr nz, .asm_fb7f - ld a, [W_CURMAPTILESET] ; W_CURMAPTILESET + ld a, [wSpriteStateData1 + 9] ; player's sprite facing direction + cp SPRITE_FACING_UP + jr nz, .noMatch +; facing up + ld a, [W_CURMAPTILESET] ld b, a aCoord 8, 7 ld c, a - ld hl, BookshelfTileIDs ; $7b8b -.asm_fb62 + ld hl, BookshelfTileIDs +.loop ld a, [hli] cp $ff - jr z, .asm_fb7f + jr z, .noMatch cp b - jr nz, .asm_fb7b + jr nz, .nextBookshelfEntry1 ld a, [hli] cp c - jr nz, .asm_fb7c + jr nz, .nextBookshelfEntry2 ld a, [hl] push af call EnableAutoTextBoxDrawing @@ -25,12 +26,12 @@ PrintBookshelfText: ; fb50 (3:7b50) xor a ld [$ffdb], a ret -.asm_fb7b +.nextBookshelfEntry1 inc hl -.asm_fb7c +.nextBookshelfEntry2 inc hl - jr .asm_fb62 -.asm_fb7f + jr .loop +.noMatch ld a, $ff ld [$ffdb], a ld b, BANK(PrintCardKeyText) @@ -114,12 +115,12 @@ TownMapText: ; fc12 (3:7c12) db $06 db $08 ; asm ld a, $1 - ld [wcc3c], a + ld [wDoNotWaitForButtonPressAfterDisplayingText], a ld hl, wd730 set 6, [hl] call GBPalWhiteOutWithDelay3 xor a - ld [$ffb0], a + ld [hVBlankWY], a inc a ld [H_AUTOBGTRANSFERENABLED], a call LoadFontTilePatterns |