summaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
authorRemy Oukaour <remy.oukaour@gmail.com>2017-12-28 21:22:35 -0500
committeryenatch <yenatch@gmail.com>2017-12-28 22:13:39 -0500
commitb9a68fec2589eb6969be63e6ed1eb3fca312c307 (patch)
tree59b5db70690a9f9041e4964adae1722b4d178a1b /engine
parent4c35f3ac8506e5f326658bbab91c257584f7b716 (diff)
Consistent if/else/endc (matches rept/endr) and DEF (matches BANK/HIGH/LOW)
Diffstat (limited to 'engine')
-rwxr-xr-xengine/billspc.asm4
-rw-r--r--engine/events/battle_tower.asm6
-rwxr-xr-xengine/intro_menu.asm10
-rw-r--r--engine/pic_animation.asm2
-rw-r--r--engine/scripting.asm8
5 files changed, 15 insertions, 15 deletions
diff --git a/engine/billspc.asm b/engine/billspc.asm
index 554fb6bf1..8fe578a07 100755
--- a/engine/billspc.asm
+++ b/engine/billspc.asm
@@ -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]
diff --git a/engine/events/battle_tower.asm b/engine/events/battle_tower.asm
index b880a099b..a0de6ee84 100644
--- a/engine/events/battle_tower.asm
+++ b/engine/events/battle_tower.asm
@@ -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
diff --git a/engine/intro_menu.asm b/engine/intro_menu.asm
index 5e38589aa..faa5748dd 100755
--- a/engine/intro_menu.asm
+++ b/engine/intro_menu.asm
@@ -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
diff --git a/engine/pic_animation.asm b/engine/pic_animation.asm
index 3c826b8b7..33b770b14 100644
--- a/engine/pic_animation.asm
+++ b/engine/pic_animation.asm
@@ -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
diff --git a/engine/scripting.asm b/engine/scripting.asm
index 7512bdc06..9a89c375a 100644
--- a/engine/scripting.asm
+++ b/engine/scripting.asm
@@ -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: