diff options
| author | PikalaxALT <pikalaxalt@gmail.com> | 2018-06-06 15:42:57 -0400 |
|---|---|---|
| committer | PikalaxALT <pikalaxalt@gmail.com> | 2018-06-06 15:42:57 -0400 |
| commit | 28dff6de4aac4ef4c34479d70b28cefa9718c4ea (patch) | |
| tree | 3c03282b382c6a9effc21a4033d7923cc64e1f3d /home/print_text.asm | |
| parent | e00b497917f6403dfa4d3316771ecf667b010392 (diff) | |
Move files around to better reflect the structure of pokecrystal
Diffstat (limited to 'home/print_text.asm')
| -rw-r--r-- | home/print_text.asm | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/home/print_text.asm b/home/print_text.asm new file mode 100644 index 0000000..e8b4eeb --- /dev/null +++ b/home/print_text.asm @@ -0,0 +1,51 @@ +include "constants.asm" + +if DEBUG +SECTION "Print Letter Delay", ROM0[$33a3] +else +SECTION "Print Letter Delay", ROM0[$3367] +endc + +PrintLetterDelay:: ; 33a3 (0:33a3) + ld a, [wce5f] + bit 4, a + ret nz + ld a, [wTextBoxFlags] + bit 1, a + ret z + push hl + push de + push bc + ld a, [wTextBoxFlags] + bit 0, a + jr z, .waitOneFrame + ld a, [wce5f] + and $07 + jr .initFrameCnt +.waitOneFrame + ld a, $01 +.initFrameCnt + ld [wVBlankJoyFrameCounter], a +.checkButtons + call GetJoypad + ldh a, [hJoyState] +.checkAButton + bit 0, a ; is the A button pressed? + jr z, .checkBButton + jr .endWait +.checkBButton + bit 1, a ; is the B button pressed? + jr z, .buttonsNotPressed +.endWait + call DelayFrame + jr .done +.buttonsNotPressed ; if neither A nor B is pressed + ld a, [wVBlankJoyFrameCounter] + and a + jr nz, .checkButtons +.done + pop bc + pop de + pop hl + ret +; 0x33e3
\ No newline at end of file |
