mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-11-16 11:27:33 -08:00
Consistent if/else/endc (matches rept/endr) and DEF (matches BANK/HIGH/LOW)
This commit is contained in:
parent
4c35f3ac85
commit
b9a68fec25
@ -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]
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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:
|
||||
|
@ -1,7 +1,7 @@
|
||||
; Used in data/pokemon/base_stats/*.asm
|
||||
|
||||
define: MACRO
|
||||
if !def(\1)
|
||||
if !DEF(\1)
|
||||
\1 EQUS \2
|
||||
endc
|
||||
ENDM
|
||||
@ -9,7 +9,7 @@ ENDM
|
||||
const_value = 0
|
||||
|
||||
add_tm: MACRO
|
||||
if !def(TM01)
|
||||
if !DEF(TM01)
|
||||
TM01 = const_value
|
||||
enum_start 1
|
||||
endc
|
||||
@ -19,7 +19,7 @@ endc
|
||||
ENDM
|
||||
|
||||
add_hm: MACRO
|
||||
if !def(HM01)
|
||||
if !DEF(HM01)
|
||||
HM01 = const_value
|
||||
endc
|
||||
define _\@_1, "HM_\1"
|
||||
@ -38,7 +38,7 @@ tms1 = 0
|
||||
tms2 = 0
|
||||
tms3 = 0
|
||||
rept _NARG
|
||||
if def(\1_TMNUM)
|
||||
if DEF(\1_TMNUM)
|
||||
if \1_TMNUM < 24 + 1
|
||||
tms1 = tms1 | (1 << ((\1_TMNUM) - 1))
|
||||
elif \1_TMNUM < 48 + 1
|
||||
|
@ -43,9 +43,9 @@ debgcoord EQUS "bgcoord de,"
|
||||
bcbgcoord EQUS "bgcoord bc,"
|
||||
|
||||
bgcoord: MACRO
|
||||
IF _NARG >= 4
|
||||
if _NARG >= 4
|
||||
ld \1, \3 bgrows + \2 + \4
|
||||
ELSE
|
||||
else
|
||||
ld \1, \3 bgrows + \2 + vBGMap0
|
||||
ENDC
|
||||
endc
|
||||
ENDM
|
||||
|
@ -538,13 +538,13 @@ jumptextfaceplayer: MACRO
|
||||
dw \1 ; text_pointer
|
||||
ENDM
|
||||
|
||||
; IF _CRYSTAL
|
||||
; if _CRYSTAL
|
||||
enum farjumptext_command ; $52
|
||||
farjumptext: MACRO
|
||||
db farjumptext_command
|
||||
dba \1
|
||||
ENDM
|
||||
; ENDC
|
||||
; endc
|
||||
|
||||
enum jumptext_command ; $53
|
||||
jumptext: MACRO
|
||||
|
6
main.asm
6
main.asm
@ -645,8 +645,8 @@ INCLUDE "engine/events/odd_egg.asm"
|
||||
|
||||
SECTION "Mobile Stadium 2", ROMX
|
||||
|
||||
IF DEF(CRYSTAL11)
|
||||
if DEF(CRYSTAL11)
|
||||
INCBIN "mobile/stadium/stadium2_2.bin"
|
||||
ELSE
|
||||
else
|
||||
INCBIN "mobile/stadium/stadium2_1.bin"
|
||||
ENDC
|
||||
endc
|
||||
|
@ -5,19 +5,19 @@ BattleTowerText:: ; 11c000
|
||||
; 3: Player won
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, 3 ; BANK(BT_OTTrainerClass)
|
||||
ld a, BANK(BT_OTTrainerClass)
|
||||
ld [rSVBK], a
|
||||
IF DEF(CRYSTAL11)
|
||||
if DEF(CRYSTAL11)
|
||||
ld hl, BT_OTTrainerClass
|
||||
ELSE
|
||||
ld hl, BT_OTName + 5
|
||||
else
|
||||
; BUG ALERT
|
||||
; Instead of loading the Trainer Class, this routine
|
||||
; loads the 6th character in the Trainer's name, then
|
||||
; uses it to get the gender of the trainer.
|
||||
; As a consequence, the enemy trainer's dialog will
|
||||
; always be sampled from the female array.
|
||||
ENDC
|
||||
ld hl, BT_OTName + 5
|
||||
endc
|
||||
ld a, [hl]
|
||||
dec a
|
||||
ld e, a
|
||||
|
@ -936,11 +936,11 @@ GameBoyN64GFX:
|
||||
INCBIN "gfx/trade/game_boy_n64.2bpp"
|
||||
|
||||
Tilemap_1733af:
|
||||
IF DEF(CRYSTAL11)
|
||||
if DEF(CRYSTAL11)
|
||||
INCBIN "gfx/unknown/1733af_corrupt.tilemap"
|
||||
ELSE
|
||||
else
|
||||
INCBIN "gfx/unknown/1733af.tilemap"
|
||||
ENDC
|
||||
endc
|
||||
|
||||
Attrmap_173517:
|
||||
INCBIN "gfx/unknown/173517.attrmap"
|
||||
|
10
wram.asm
10
wram.asm
@ -827,12 +827,12 @@ wDexListingCursorBackup:: db
|
||||
wBackupDexListingCursor:: db
|
||||
wBackupDexListingPage:: db
|
||||
wDexCurrentLocation:: db
|
||||
IF DEF(CRYSTAL11)
|
||||
if DEF(CRYSTAL11)
|
||||
wPokedexStatus:: db
|
||||
wPokedexDataEnd::
|
||||
ELSE
|
||||
else
|
||||
wPokedexDataEnd:: ds 1
|
||||
ENDC
|
||||
endc
|
||||
ds 2
|
||||
|
||||
NEXTU ; c6d0
|
||||
@ -1312,9 +1312,9 @@ wCardFlipWhichCard:: db
|
||||
NEXTU ; cf64
|
||||
; pokedex
|
||||
wDexEntryPrevJumptableIndex:: db
|
||||
IF !DEF(CRYSTAL11)
|
||||
if !DEF(CRYSTAL11)
|
||||
wPokedexStatus:: db
|
||||
ENDC
|
||||
endc
|
||||
|
||||
NEXTU ; cf64
|
||||
; miscellaneous
|
||||
|
Loading…
Reference in New Issue
Block a user