diff options
Diffstat (limited to 'home')
-rw-r--r-- | home/joypad.asm | 8 | ||||
-rw-r--r-- | home/print_num.asm | 18 | ||||
-rw-r--r-- | home/text.asm | 34 | ||||
-rw-r--r-- | home/vcopy.asm | 12 |
4 files changed, 37 insertions, 35 deletions
diff --git a/home/joypad.asm b/home/joypad.asm index 2002bb29..9948b6e7 100644 --- a/home/joypad.asm +++ b/home/joypad.asm @@ -7,9 +7,9 @@ ReadJoypad:: ld c, 0 ld [rJOYP], a - rept 6 + REPT 6 ld a, [rJOYP] - endr + ENDR cpl and %1111 swap a @@ -17,9 +17,9 @@ ReadJoypad:: ld a, 1 << 4 ; select button keys ld [rJOYP], a - rept 10 + REPT 10 ld a, [rJOYP] - endr + ENDR cpl and %1111 or b diff --git a/home/print_num.asm b/home/print_num.asm index 5155977b..f7ea2174 100644 --- a/home/print_num.asm +++ b/home/print_num.asm @@ -59,18 +59,20 @@ PrintNumber:: cp 6 jr z, .hundred_thousands -print_digit: macro +print_digit: MACRO -if (\1) / $10000 +IF (\1) / $10000 ld a, \1 / $10000 % $100 -else xor a -endc +ELSE + xor a +ENDC ld [hPowerOf10 + 0], a -if (\1) / $100 +IF (\1) / $100 ld a, \1 / $100 % $100 -else xor a -endc +ELSE + xor a +ENDC ld [hPowerOf10 + 1], a ld a, \1 / $1 % $100 @@ -78,7 +80,7 @@ endc call .PrintDigit call .NextDigit -endm +ENDM .millions print_digit 1000000 .hundred_thousands print_digit 100000 diff --git a/home/text.asm b/home/text.asm index d0fc8042..2047eaaa 100644 --- a/home/text.asm +++ b/home/text.asm @@ -431,7 +431,7 @@ TextCommand_PROMPT_BUTTON:: ; wait for button press; show arrow ld a, [wLinkState] cp LINK_STATE_BATTLING - jp z, TextCommand_LINK_PROMPT_BUTTON + jp z, TextCommand_WAIT_BUTTON ld a, "▼" Coorda 18, 16 ; place down arrow in lower right corner of dialogue text box push bc @@ -579,8 +579,8 @@ TextCommand_DOTS:: pop hl jp NextTextCommand -TextCommand_LINK_PROMPT_BUTTON:: -; wait for button press; display arrow +TextCommand_WAIT_BUTTON:: +; wait for button press; don't show arrow push bc call ManualTextScroll pop bc @@ -615,18 +615,18 @@ TextCommand_FAR:: TextCommandJumpTable:: ; entries correspond to TX_* constants (see macros/scripts/text.asm) - dw TextCommand_START ; TX_START - dw TextCommand_RAM ; TX_RAM - dw TextCommand_BCD ; TX_BCD - dw TextCommand_MOVE ; TX_MOVE - dw TextCommand_BOX ; TX_BOX - dw TextCommand_LOW ; TX_LOW - dw TextCommand_PROMPT_BUTTON ; TX_PROMPT_BUTTON - dw TextCommand_SCROLL ; TX_SCROLL - dw TextCommand_START_ASM ; TX_START_ASM - dw TextCommand_NUM ; TX_NUM - dw TextCommand_PAUSE ; TX_PAUSE - dw TextCommand_SOUND ; TX_SOUND_GET_ITEM_1 (also handles other TX_SOUND_* commands) - dw TextCommand_DOTS ; TX_DOTS - dw TextCommand_LINK_PROMPT_BUTTON ; TX_LINK_PROMPT_BUTTON + dw TextCommand_START ; TX_START + dw TextCommand_RAM ; TX_RAM + dw TextCommand_BCD ; TX_BCD + dw TextCommand_MOVE ; TX_MOVE + dw TextCommand_BOX ; TX_BOX + dw TextCommand_LOW ; TX_LOW + dw TextCommand_PROMPT_BUTTON ; TX_PROMPT_BUTTON + dw TextCommand_SCROLL ; TX_SCROLL + dw TextCommand_START_ASM ; TX_START_ASM + dw TextCommand_NUM ; TX_NUM + dw TextCommand_PAUSE ; TX_PAUSE + dw TextCommand_SOUND ; TX_SOUND_GET_ITEM_1 (also handles other TX_SOUND_* commands) + dw TextCommand_DOTS ; TX_DOTS + dw TextCommand_WAIT_BUTTON ; TX_WAIT_BUTTON ; greater TX_* constants are handled directly by NextTextCommand diff --git a/home/vcopy.asm b/home/vcopy.asm index a6213b32..e2325d5c 100644 --- a/home/vcopy.asm +++ b/home/vcopy.asm @@ -170,13 +170,13 @@ AutoBgMapTransfer:: TransferBgRows:: ; unrolled loop and using pop for speed - rept 20 / 2 - 1 + REPT 20 / 2 - 1 pop de ld [hl], e inc l ld [hl], d inc l - endr + ENDR pop de ld [hl], e @@ -261,7 +261,7 @@ VBlankCopyDouble:: ld [hVBlankCopyDoubleSize], a .loop - rept 3 + REPT 3 pop de ld [hl], e inc l @@ -271,7 +271,7 @@ VBlankCopyDouble:: inc l ld [hl], d inc l - endr + ENDR pop de ld [hl], e @@ -339,13 +339,13 @@ VBlankCopy:: ld [hVBlankCopySize], a .loop - rept 7 + REPT 7 pop de ld [hl], e inc l ld [hl], d inc l - endr + ENDR pop de ld [hl], e |