Sync further with pokecrystal

This commit is contained in:
Rangi42 2025-03-15 01:03:21 -04:00
parent bd94c01a44
commit a7fb4e069e
8 changed files with 17 additions and 7 deletions

View File

@ -715,6 +715,9 @@ DEF NUM_BATTLE_ANIM_FRAMESETS EQU const_value
const BATTLE_ANIM_OAMSET_D7
DEF NUM_BATTLE_ANIM_OAMSETS EQU const_value
assert NUM_BATTLE_ANIM_OAMSETS <= FIRST_OAM_CMD, \
"BATTLE_ANIM_OAMSET_* constants overlap oam*_command constants"
; BattleBGEffects indexes (see engine/battle_anims/bg_effects.asm)
const_def 1
const BATTLE_BG_EFFECT_FLASH_INVERTED ; 01

View File

@ -166,10 +166,9 @@ DEF NUM_ROAMMON_MAPS EQU 16 ; RoamMaps table size (see data/wild/roammon_maps.as
const TREEMON_SET_FOREST
const TREEMON_SET_CANYON
const TREEMON_SET_ROCK
DEF NUM_TREEMON_SETS EQU const_value
; last two are unused/ignored
const TREEMON_SET_UNUSED
const TREEMON_SET_CITY
DEF NUM_TREEMON_SETS EQU const_value
; treemon scores
const_def

View File

@ -287,3 +287,6 @@ DEF NUM_SPRITE_ANIM_FRAMESETS EQU const_value
const SPRITE_ANIM_OAMSET_GS_INTRO_HO_OH_LUGIA_5 ; 5a
const SPRITE_ANIM_OAMSET_HEADBUTT_TREE_2 ; 5b
DEF NUM_SPRITE_ANIM_OAMSETS EQU const_value
assert NUM_SPRITE_ANIM_OAMSETS <= FIRST_OAM_CMD, \
"SPRITE_ANIM_OAMSET_* constants overlap oam*_command constants"

View File

@ -5,10 +5,9 @@ TreeMons:
dw TreeMonSet_Forest
dw TreeMonSet_Canyon
dw TreeMonSet_Rock
assert_table_length NUM_TREEMON_SETS
; last two are unused/ignored
dw TreeMonSet_Unused
dw TreeMonSet_City
assert_table_length NUM_TREEMON_SETS
; Two tables each (common, rare).
; Structure:

View File

@ -95,9 +95,13 @@ GetTreeMons:
; Return the address of TreeMon table a in hl.
; Return nc if table a doesn't exist.
cp NUM_TREEMON_SETS
; last two sets are unused/ignored
assert TREEMON_SET_UNUSED == NUM_TREEMON_SETS - 2
assert TREEMON_SET_CITY == NUM_TREEMON_SETS - 1
cp NUM_TREEMON_SETS - 2
jr nc, .quit
assert TREEMON_SET_NONE == 0
and a
jr z, .quit

View File

@ -19,7 +19,7 @@ MACRO const
ENDM
MACRO shift_const
DEF \1 EQU (1 << const_value)
DEF \1 EQU 1 << const_value
const \1_F
ENDM

View File

@ -46,7 +46,7 @@ ENDM
; MusicCommands indexes (see audio/engine.asm)
const_def $d0
DEF FIRST_MUSIC_CMD EQU const_value
DEF FIRST_MUSIC_CMD EQU const_value
const octave_cmd ; $d0
MACRO octave

View File

@ -36,3 +36,5 @@ ENDM
MACRO oamdelete
db oamdelete_command
ENDM
DEF FIRST_OAM_CMD EQU LOW(const_value + 1)