summaryrefslogtreecommitdiff
path: root/macros
diff options
context:
space:
mode:
Diffstat (limited to 'macros')
-rwxr-xr-xmacros/scripts/events.asm12
-rw-r--r--macros/wram.asm92
2 files changed, 98 insertions, 6 deletions
diff --git a/macros/scripts/events.asm b/macros/scripts/events.asm
index 9be354e3..c5f90107 100755
--- a/macros/scripts/events.asm
+++ b/macros/scripts/events.asm
@@ -183,7 +183,7 @@ ENDM
;\3, \4, ... = additional (optional) event indices
SetEvents: MACRO
SetEvent \1
- rept (_NARG + -1)
+ rept _NARG - 1
SetEventReuseHL \2
shift
endr
@@ -235,7 +235,7 @@ ENDM
;\3 = event index (optional)
ResetEvents: MACRO
ResetEvent \1
- rept (_NARG + -1)
+ rept _NARG - 1
ResetEventReuseHL \2
shift
endr
@@ -283,7 +283,7 @@ event_fill_start = event_start_byte + 1
event_fill_count = event_end_byte - event_start_byte - 1
IF ((\1) % 8) == 0
-event_fill_start = event_fill_start + -1
+event_fill_start = event_fill_start - 1
event_fill_count = event_fill_count + 1
ELSE
ld a, [wEventFlags + event_start_byte]
@@ -304,7 +304,7 @@ event_fill_count = event_fill_count + 1
ld a, $ff
ld hl, wEventFlags + event_fill_start
- REPT event_fill_count + -1
+ REPT event_fill_count - 1
ld [hli], a
ENDR
@@ -345,7 +345,7 @@ event_fill_start = event_start_byte + 1
event_fill_count = event_end_byte - event_start_byte - 1
IF ((\1) % 8) == 0
-event_fill_start = event_fill_start + -1
+event_fill_start = event_fill_start - 1
event_fill_count = event_fill_count + 1
ELSE
ld a, [wEventFlags + event_start_byte]
@@ -370,7 +370,7 @@ event_fill_count = event_fill_count + 1
xor a
ENDC
- REPT event_fill_count + -1
+ REPT event_fill_count - 1
ld [hli], a
ENDR
diff --git a/macros/wram.asm b/macros/wram.asm
new file mode 100644
index 00000000..7a9b4a6a
--- /dev/null
+++ b/macros/wram.asm
@@ -0,0 +1,92 @@
+; Used in wram.asm
+
+flag_array: MACRO
+ ds ((\1) + 7) / 8
+ENDM
+
+BOX_STRUCT_LENGTH EQU 25 + NUM_MOVES * 2
+
+box_struct: MACRO
+\1Species:: db
+\1HP:: dw
+\1BoxLevel:: db
+\1Status:: db
+\1Type::
+\1Type1:: db
+\1Type2:: db
+\1CatchRate:: db
+\1Moves:: ds NUM_MOVES
+\1OTID:: dw
+\1Exp:: ds 3
+\1HPExp:: dw
+\1AttackExp:: dw
+\1DefenseExp:: dw
+\1SpeedExp:: dw
+\1SpecialExp:: dw
+\1DVs:: ds 2
+\1PP:: ds NUM_MOVES
+ENDM
+
+party_struct: MACRO
+ box_struct \1
+\1Level:: db
+\1Stats::
+\1MaxHP:: dw
+\1Attack:: dw
+\1Defense:: dw
+\1Speed:: dw
+\1Special:: dw
+ENDM
+
+battle_struct: MACRO
+\1Species:: db
+\1HP:: dw
+\1PartyPos::
+\1BoxLevel:: db
+\1Status:: db
+\1Type::
+\1Type1:: db
+\1Type2:: db
+\1CatchRate:: db
+\1Moves:: ds NUM_MOVES
+\1DVs:: ds 2
+\1Level:: db
+\1Stats::
+\1MaxHP:: dw
+\1Attack:: dw
+\1Defense:: dw
+\1Speed:: dw
+\1Special:: dw
+\1PP:: ds NUM_MOVES
+ENDM
+
+spritestatedata1: MACRO
+\1PictureID:: db
+\1MovementStatus:: db
+\1ImageIndex:: db
+\1YStepVector:: db
+\1YPixels:: db
+\1XStepVector:: db
+\1XPixels:: db
+\1IntraAnimFrameCounter:: db
+\1AnimFrameCounter:: db
+\1FacingDirection:: db
+ ds 6
+\1End::
+ENDM
+
+spritestatedata2: MACRO
+\1WalkAnimationCounter:: db
+ ds 1
+\1YDisplacement:: db
+\1XDisplacement:: db
+\1MapY:: db
+\1MapX:: db
+\1MovementByte1:: db
+\1GrassPriority:: db
+\1MovementDelay:: db
+ ds 5
+\1ImageBaseOffset:: db
+ ds 1
+\1End::
+ENDM