Consistent if/else/endc (matches rept/endr) and DEF (matches BANK/HIGH/LOW)

This commit is contained in:
Remy Oukaour
2017-12-28 21:22:35 -05:00
committed by yenatch
parent 4c35f3ac85
commit b9a68fec25
12 changed files with 40 additions and 40 deletions

View File

@@ -1442,9 +1442,9 @@ copy_box_data: MACRO
jr .loop\@
.done\@
IF \1
if \1
call CloseSRAM
ENDC
endc
ld a, -1
ld [de], a
ld a, [wd004]

View File

@@ -26,13 +26,13 @@ Function_LoadOpponentTrainerAndPokemons: ; 1f8000
ld a, [hRandomAdd]
add b
ld b, a ; b contains the nr of the trainer
IF DEF(CRYSTAL11)
if DEF(CRYSTAL11)
and (1 << 7) - 1
cp 70
ELSE
else
and (1 << 5) - 1
cp 21
ENDC
endc
jr nc, .resample
ld b, a

View File

@@ -199,9 +199,9 @@ _ResetWRAM: ; 5bae
ld [Coins], a
ld [Coins + 1], a
IF START_MONEY >= $10000
if START_MONEY >= $10000
ld a, HIGH(START_MONEY >> 8)
ENDC
endc
ld [Money], a
ld a, HIGH(START_MONEY) ; mid
ld [Money + 1], a
@@ -646,11 +646,11 @@ Continue_DisplayPokedexNumCaught: ; 5f6b
ret z
push hl
ld hl, PokedexCaught
IF NUM_POKEMON % 8
if NUM_POKEMON % 8
ld b, NUM_POKEMON / 8 + 1
ELSE
else
ld b, NUM_POKEMON / 8
ENDC
endc
call CountSetBits
pop hl
ld de, wd265

View File

@@ -55,7 +55,7 @@ AnimateMon_Unused: ; d003a
pokeanim: MACRO
rept _NARG
; Workaround for a bug where macro args can't come after the start of a symbol
if !def(\1_POKEANIM)
if !DEF(\1_POKEANIM)
\1_POKEANIM EQUS "PokeAnim_\1_"
endc
db (\1_POKEANIM - PokeAnim_SetupCommands) / 2

View File

@@ -147,9 +147,9 @@ ScriptCommandTable:
dw Script_loadmenudata ; 4f
dw Script_closewindow ; 50
dw Script_jumptextfaceplayer ; 51
IF _CRYSTAL
if _CRYSTAL
dw Script_farjumptext ; 52
ENDC
endc
dw Script_jumptext ; 53
dw Script_waitbutton ; 54
dw Script_buttonsound ; 55
@@ -338,7 +338,7 @@ JumpTextScript:
end
IF _CRYSTAL
if _CRYSTAL
Script_farjumptext:
; script command 0x52
@@ -355,7 +355,7 @@ Script_farjumptext:
ld hl, JumpTextScript
jp ScriptJump
ENDC
endc
Script_writetext: