You've already forked pokecrystal-board
mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-09-08 08:13:02 -07:00
Merge pull request #574 from mid-kid/connections
Make the `connection` macro simpler to use
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -1,16 +1,16 @@
|
|||||||
tmhm: MACRO
|
tmhm: MACRO
|
||||||
; used in data/pokemon/base_stats/*.asm
|
; used in data/pokemon/base_stats/*.asm
|
||||||
tms1 = 0 ; TM01-TM24 (24)
|
_tms1 = 0 ; TM01-TM24 (24)
|
||||||
tms2 = 0 ; TM25-TM48 (24)
|
_tms2 = 0 ; TM25-TM48 (24)
|
||||||
tms3 = 0 ; TM49-TM50 + HM01-HM07 + MT01-MT03 (12/24)
|
_tms3 = 0 ; TM49-TM50 + HM01-HM07 + MT01-MT03 (12/24)
|
||||||
rept _NARG
|
rept _NARG
|
||||||
if DEF(\1_TMNUM)
|
if DEF(\1_TMNUM)
|
||||||
if \1_TMNUM < 24 + 1
|
if \1_TMNUM < 24 + 1
|
||||||
tms1 = tms1 | (1 << ((\1_TMNUM) - 1))
|
_tms1 = _tms1 | (1 << ((\1_TMNUM) - 1))
|
||||||
elif \1_TMNUM < 48 + 1
|
elif \1_TMNUM < 48 + 1
|
||||||
tms2 = tms2 | (1 << ((\1_TMNUM) - 1 - 24))
|
_tms2 = _tms2 | (1 << ((\1_TMNUM) - 1 - 24))
|
||||||
else
|
else
|
||||||
tms3 = tms3 | (1 << ((\1_TMNUM) - 1 - 48))
|
_tms3 = _tms3 | (1 << ((\1_TMNUM) - 1 - 48))
|
||||||
endc
|
endc
|
||||||
else
|
else
|
||||||
fail "\1 is not a TM, HM, or move tutor move"
|
fail "\1 is not a TM, HM, or move tutor move"
|
||||||
@@ -18,16 +18,16 @@ tms3 = tms3 | (1 << ((\1_TMNUM) - 1 - 48))
|
|||||||
shift
|
shift
|
||||||
endr
|
endr
|
||||||
rept 3 ; TM01-TM24 (24/24)
|
rept 3 ; TM01-TM24 (24/24)
|
||||||
db tms1 & $ff
|
db _tms1 & $ff
|
||||||
tms1 = tms1 >> 8
|
_tms1 = _tms1 >> 8
|
||||||
endr
|
endr
|
||||||
rept 3 ; TM25-TM48 (24/24)
|
rept 3 ; TM25-TM48 (24/24)
|
||||||
db tms2 & $ff
|
db _tms2 & $ff
|
||||||
tms2 = tms2 >> 8
|
_tms2 = _tms2 >> 8
|
||||||
endr
|
endr
|
||||||
rept 2 ; TM49-TM50 + HM01-HM07 + MT01-MT03 (12/16)
|
rept 2 ; TM49-TM50 + HM01-HM07 + MT01-MT03 (12/16)
|
||||||
db tms3 & $ff
|
db _tms3 & $ff
|
||||||
tms3 = tms3 >> 8
|
_tms3 = _tms3 >> 8
|
||||||
endr
|
endr
|
||||||
ENDM
|
ENDM
|
||||||
|
|
||||||
|
@@ -18,7 +18,7 @@ InitCommandQueue:
|
|||||||
EnterMapConnection:
|
EnterMapConnection:
|
||||||
; Return carry if a connection has been entered.
|
; Return carry if a connection has been entered.
|
||||||
ld a, [wPlayerStepDirection]
|
ld a, [wPlayerStepDirection]
|
||||||
and a
|
and a ; DOWN
|
||||||
jp z, .south
|
jp z, .south
|
||||||
cp UP
|
cp UP
|
||||||
jp z, .north
|
jp z, .north
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
; Legacy support for pre-2018 pokecrystal.
|
; Legacy support for old pokecrystal.
|
||||||
; Allows porting scripts with as few edits as possible.
|
; Allows porting scripts with as few edits as possible.
|
||||||
|
; Legacy support not in this file can be found by looking for the keyword: "LEGACY"
|
||||||
|
|
||||||
; macros/rst.asm
|
; macros/rst.asm
|
||||||
callba EQUS "farcall"
|
callba EQUS "farcall"
|
||||||
|
@@ -71,7 +71,7 @@ sound_duty: MACRO
|
|||||||
if _NARG == 4
|
if _NARG == 4
|
||||||
db \1 | (\2 << 2) | (\3 << 4) | (\4 << 6) ; duty sequence
|
db \1 | (\2 << 2) | (\3 << 4) | (\4 << 6) ; duty sequence
|
||||||
else
|
else
|
||||||
db \1 ; one-byte duty value for legacy support
|
db \1 ; LEGACY: Support for one-byte duty value
|
||||||
endc
|
endc
|
||||||
ENDM
|
ENDM
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user