summaryrefslogtreecommitdiff
path: root/src/macros
diff options
context:
space:
mode:
Diffstat (limited to 'src/macros')
-rw-r--r--src/macros/audio.asm8
-rw-r--r--src/macros/code.asm13
-rw-r--r--src/macros/data.asm2
-rw-r--r--src/macros/wram.asm88
4 files changed, 65 insertions, 46 deletions
diff --git a/src/macros/audio.asm b/src/macros/audio.asm
index f79ee8f..0c13596 100644
--- a/src/macros/audio.asm
+++ b/src/macros/audio.asm
@@ -35,15 +35,15 @@ G#: MACRO
ENDM
A_: MACRO
- db $A0 | (\1 - 1)
+ db $a0 | (\1 - 1)
ENDM
A#: MACRO
- db $B0 | (\1 - 1)
+ db $b0 | (\1 - 1)
ENDM
B_: MACRO
- db $C0 | (\1 - 1)
+ db $c0 | (\1 - 1)
ENDM
bass: MACRO
@@ -67,7 +67,7 @@ snare4: MACRO ; long
ENDM
snare5: MACRO ; long
- db $C0 | (\1 - 1)
+ db $c0 | (\1 - 1)
ENDM
rest: MACRO
diff --git a/src/macros/code.asm b/src/macros/code.asm
index 47b698f..276bd6a 100644
--- a/src/macros/code.asm
+++ b/src/macros/code.asm
@@ -30,18 +30,19 @@ ENDM
farcall: MACRO
rst $28
+if _NARG == 1
db BANK(\1)
dw \1
-ENDM
-
-; used when the specified bank does not match the bank of the specified function
-; otherwise, farcall is preferred
-farcallx: MACRO
- rst $28
+else
db \1
dw \2
+endc
ENDM
+; the rst $38 handler is a single ret
+; probably used for testing purposes during development
+debug_ret EQUS "rst $38"
+
emptybank: MACRO
rept $4000
db $ff
diff --git a/src/macros/data.asm b/src/macros/data.asm
index 4f66742..2fd4b7d 100644
--- a/src/macros/data.asm
+++ b/src/macros/data.asm
@@ -33,7 +33,7 @@ bigdw: MACRO ; big-endian word
ENDM
sgb: MACRO
- db \1 * 8 + \2 ; sgb_command * 8 + length
+ db \1 << 3 + \2 ; sgb_command * 8 + length
ENDM
rgb: MACRO
diff --git a/src/macros/wram.asm b/src/macros/wram.asm
index cea20fa..a984255 100644
--- a/src/macros/wram.asm
+++ b/src/macros/wram.asm
@@ -1,42 +1,60 @@
card_data_struct: MACRO
-\1Type:: db
-\1Gfx:: dw
-\1Name:: dw
-\1Rarity:: db
-\1Set:: db
-\1ID:: db
-\1EnergyCardEffectCommands:: ; dw
-\1TrainerCardEffectCommands:: ; dw
-\1HP:: db
-\1Stage:: db
-\1EnergyCardDescription:: ; dw
-\1TrainerCardDescription:: ; dw
-\1PreEvoName:: dw
+\1Type:: ds 1
+\1Gfx:: ds 2
+\1Name:: ds 2
+\1Rarity:: ds 1
+\1Set:: ds 1
+\1ID:: ds 1
+\1EffectCommands:: ; ds 2
+\1HP:: ds 1
+\1Stage:: ds 1
+\1NonPokemonDescription:: ; ds 2
+\1PreEvoName:: ds 2
\1Move1:: move_data_struct \1Move1
\1Move2:: move_data_struct \1Move2
-\1RetreatCost:: db
-\1Weakness:: db
-\1Resistance:: db
-\1Kind:: dw
-\1PokedexNumber:: db
-\1Unknown1:: db
-\1Level:: db
-\1Length:: dw
-\1Weight:: dw
-\1Description:: dw
-\1Unknown2:: db
+\1RetreatCost:: ds 1
+\1Weakness:: ds 1
+\1Resistance:: ds 1
+\1Kind:: ds 2
+\1PokedexNumber:: ds 1
+\1Unknown1:: ds 1
+\1Level:: ds 1
+\1Length:: ds 2
+\1Weight:: ds 2
+\1Description:: ds 2
+\1Unknown2:: ds 1
ENDM
move_data_struct: MACRO
-\1Energy:: ds $4
-\1Name:: dw
-\1Description:: ds $4
-\1Damage:: db
-\1Category:: db
-\1EffectCommands:: dw
-\1Flag1:: db
-\1Flag2:: db
-\1Flag3:: db
-\1Unknown1:: db
-\1Animation:: db
+\1Energy:: ds NUM_TYPES / 2
+\1Name:: ds 2
+\1Description:: ds 4
+\1Damage:: ds 1
+\1Category:: ds 1
+\1EffectCommands:: ds 2
+\1Flag1:: ds 1
+\1Flag2:: ds 1
+\1Flag3:: ds 1
+\1Unknown1:: ds 1
+\1Animation:: ds 1
ENDM
+
+; TODO: Figure out what the rest are for
+sprite_anim_struct: MACRO
+\1Field0x00:: ds 1
+\1Field0x01:: ds 1 ; movement handling / palette
+\1CoordX:: ds 1
+\1CoordY:: ds 1
+\1TileID:: ds 1
+\1Field0x05:: ds 1
+\1Field0x06:: ds 1
+\1Field0x07:: ds 1
+\1Field0x08:: ds 1
+\1Field0x09:: ds 1
+\1Field0x0a:: ds 1
+\1Field0x0b:: ds 1
+\1Field0x0c:: ds 1
+\1Field0x0d:: ds 1
+\1MovementCounter:: ds 1
+\1Field0x0f:: ds 1
+ENDM \ No newline at end of file