Rename the object_struct field labels and constants (#1005)

Fixes #990
This commit is contained in:
Rangi
2022-09-12 09:15:44 -04:00
committed by GitHub
parent 4c239a6f65
commit 41d5ea0482
30 changed files with 442 additions and 431 deletions

View File

@@ -1,3 +1,5 @@
; Coordinate macros
DEF hlcoord EQUS "coord hl,"
DEF bccoord EQUS "coord bc,"
DEF decoord EQUS "coord de,"

View File

@@ -1,3 +1,5 @@
; Far calls to another bank
MACRO farcall ; bank, address
ld a, BANK(\1)
ld hl, \1

View File

@@ -1,3 +1,5 @@
; Graphics macros
MACRO assert_valid_rgb
rept _NARG
assert 0 <= (\1) && (\1) <= 31, "RGB channel must be 0-31"

View File

@@ -2,7 +2,7 @@
; 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/farcall.asm
DEF callba EQUS "farcall"
DEF callab EQUS "callfar"

View File

@@ -1,3 +1,5 @@
; Predef function calls
MACRO lda_predef
; Some functions load the predef id
; without immediately calling Predef.

View File

@@ -1,4 +1,4 @@
; Used in wram.asm
; Structures in RAM
MACRO flag_array
ds ((\1) + 7) / 8
@@ -283,38 +283,38 @@ MACRO slot_reel
ENDM
MACRO object_struct
\1Sprite:: db
\1MapObjectIndex:: db
\1SpriteTile:: db
\1MovementType:: db
\1Flags:: dw
\1Palette:: db
\1Walking:: db
\1Direction:: db
\1StepType:: db
\1StepDuration:: db
\1Action:: db
\1ObjectStepFrame:: db
\1Facing:: db
\1StandingTile:: db ; collision
\1LastTile:: db ; collision
\1StandingMapX:: db
\1StandingMapY:: db
\1LastMapX:: db
\1LastMapY:: db
\1ObjectInitX:: db
\1ObjectInitY:: db
\1Radius:: db
\1SpriteX:: db
\1SpriteY:: db
\1SpriteXOffset:: db
\1SpriteYOffset:: db
\1MovementByteIndex:: db
\1Field1c:: ds 1
\1Field1d:: ds 1
\1Field1e:: ds 1
\1Field1f:: ds 1
\1Range:: db
\1Sprite:: db
\1MapObjectIndex:: db
\1SpriteTile:: db
\1MovementType:: db
\1Flags:: dw
\1Palette:: db
\1Walking:: db
\1Direction:: db
\1StepType:: db
\1StepDuration:: db
\1Action:: db
\1StepFrame:: db
\1Facing:: db
\1Tile:: db
\1LastTile:: db
\1MapX:: db
\1MapY:: db
\1LastMapX:: db
\1LastMapY:: db
\1InitX:: db
\1InitY:: db
\1Radius:: db
\1SpriteX:: db
\1SpriteY:: db
\1SpriteXOffset:: db
\1SpriteYOffset:: db
\1MovementIndex:: db
\1StepIndex:: db
\1Field1d:: ds 1
\1Field1e:: ds 1
\1JumpHeight:: db
\1Range:: db
ds 7
\1StructEnd::
ENDM

View File

@@ -1,3 +1,5 @@
; Virtual Console macros
MACRO vc_hook
if DEF(_CRYSTAL11_VC)
.VC_\1::