mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-11-16 11:27:33 -08:00
Define appropriate constants as EQU
These constants are defined only once and shouldn't be redefined anyway.
This commit is contained in:
parent
649c8d38da
commit
476f9ba40d
@ -62,8 +62,8 @@ ENDM
|
|||||||
; decorations:
|
; decorations:
|
||||||
; - DecorationAttributes (see data/decorations/attributes.asm)
|
; - DecorationAttributes (see data/decorations/attributes.asm)
|
||||||
; - DecorationIDs (see data/decorations/decorations.asm)
|
; - DecorationIDs (see data/decorations/decorations.asm)
|
||||||
const_value = 1
|
const_def 1
|
||||||
__enum__ = 0
|
enum_start
|
||||||
; FindOwnedBeds.beds values (see engine/overworld/decorations.asm)
|
; FindOwnedBeds.beds values (see engine/overworld/decorations.asm)
|
||||||
const BEDS
|
const BEDS
|
||||||
deco FEATHERY_BED
|
deco FEATHERY_BED
|
||||||
@ -121,7 +121,7 @@ __enum__ = 0
|
|||||||
deco GEODUDE_DOLL
|
deco GEODUDE_DOLL
|
||||||
deco MACHOP_DOLL
|
deco MACHOP_DOLL
|
||||||
deco TENTACOOL_DOLL
|
deco TENTACOOL_DOLL
|
||||||
NUM_NON_TROPHY_DECOS = __enum__
|
NUM_NON_TROPHY_DECOS EQU __enum__
|
||||||
deco GOLD_TROPHY_DOLL
|
deco GOLD_TROPHY_DOLL
|
||||||
deco SILVER_TROPHY_DOLL
|
deco SILVER_TROPHY_DOLL
|
||||||
NUM_DECOS = __enum__
|
NUM_DECOS EQU __enum__
|
||||||
|
@ -199,7 +199,7 @@
|
|||||||
|
|
||||||
add_tm: MACRO
|
add_tm: MACRO
|
||||||
if !DEF(TM01)
|
if !DEF(TM01)
|
||||||
TM01 = const_value
|
TM01 EQU const_value
|
||||||
enum_start 1
|
enum_start 1
|
||||||
endc
|
endc
|
||||||
define _\@_1, "TM_\1"
|
define _\@_1, "TM_\1"
|
||||||
@ -260,11 +260,11 @@ ENDM
|
|||||||
add_tm FIRE_PUNCH ; f0
|
add_tm FIRE_PUNCH ; f0
|
||||||
add_tm FURY_CUTTER ; f1
|
add_tm FURY_CUTTER ; f1
|
||||||
add_tm NIGHTMARE ; f2
|
add_tm NIGHTMARE ; f2
|
||||||
NUM_TMS = const_value - TM01 - 2 ; discount ITEM_C3 and ITEM_DC
|
NUM_TMS EQU const_value - TM01 - 2 ; discount ITEM_C3 and ITEM_DC
|
||||||
|
|
||||||
add_hm: MACRO
|
add_hm: MACRO
|
||||||
if !DEF(HM01)
|
if !DEF(HM01)
|
||||||
HM01 = const_value
|
HM01 EQU const_value
|
||||||
endc
|
endc
|
||||||
define _\@_1, "HM_\1"
|
define _\@_1, "HM_\1"
|
||||||
const _\@_1
|
const _\@_1
|
||||||
@ -278,7 +278,7 @@ ENDM
|
|||||||
add_hm FLASH ; f7
|
add_hm FLASH ; f7
|
||||||
add_hm WHIRLPOOL ; f8
|
add_hm WHIRLPOOL ; f8
|
||||||
add_hm WATERFALL ; f9
|
add_hm WATERFALL ; f9
|
||||||
NUM_HMS = const_value - HM01
|
NUM_HMS EQU const_value - HM01
|
||||||
|
|
||||||
add_mt: MACRO
|
add_mt: MACRO
|
||||||
enum \1_TMNUM
|
enum \1_TMNUM
|
||||||
@ -287,7 +287,7 @@ ENDM
|
|||||||
add_mt FLAMETHROWER
|
add_mt FLAMETHROWER
|
||||||
add_mt THUNDERBOLT
|
add_mt THUNDERBOLT
|
||||||
add_mt ICE_BEAM
|
add_mt ICE_BEAM
|
||||||
NUM_TM_HM_TUTOR = __enum__ + -1
|
NUM_TM_HM_TUTOR EQU __enum__ + -1
|
||||||
|
|
||||||
const ITEM_FA ; fa
|
const ITEM_FA ; fa
|
||||||
|
|
||||||
|
@ -332,7 +332,7 @@ Edit `GetMapMusic`:
|
|||||||
add_tm PSYCHIC_M ; dd
|
add_tm PSYCHIC_M ; dd
|
||||||
...
|
...
|
||||||
add_tm NIGHTMARE ; f2
|
add_tm NIGHTMARE ; f2
|
||||||
NUM_TMS = const_value - TM01 - 2 ; discount ITEM_C3 and ITEM_DC
|
NUM_TMS EQU const_value - TM01 - 2 ; discount ITEM_C3 and ITEM_DC
|
||||||
```
|
```
|
||||||
|
|
||||||
`GetTMHMNumber` and `GetNumberedTMHM` in [engine/items/items.asm](https://github.com/pret/pokecrystal/blob/master/engine/items/items.asm) have to compensate for this.
|
`GetTMHMNumber` and `GetNumberedTMHM` in [engine/items/items.asm](https://github.com/pret/pokecrystal/blob/master/engine/items/items.asm) have to compensate for this.
|
||||||
|
@ -14,7 +14,7 @@ endc
|
|||||||
ENDM
|
ENDM
|
||||||
|
|
||||||
enum: MACRO
|
enum: MACRO
|
||||||
\1 = __enum__
|
\1 EQU __enum__
|
||||||
__enum__ = __enum__ + __enumdir__
|
__enum__ = __enum__ + __enumdir__
|
||||||
ENDM
|
ENDM
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user