Capitalize rgbds control structures (EQU/EQUS, IF/ELIF/ELSE/ENDC, REPT/ENDR, MACRO/ENDM, etc)

This commit is contained in:
Rangi 2020-07-06 12:28:31 -04:00
parent d08eb86233
commit 8a79315635
13 changed files with 76 additions and 74 deletions

View file

@ -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

View file

@ -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

View file

@ -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