-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
template_item.asm
46 lines (35 loc) · 1.21 KB
/
template_item.asm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
;
; ------------------------------------------------------------------------------
; A template to code your own item effects
; ------------------------------------------------------------------------------
.relativeinclude on
.nds
.arm
.definelabel MaxSize, 0xCC4
; Uncomment the correct version
; For US
;.include "lib/stdlib_us.asm"
;.include "lib/dunlib_us.asm"
;.definelabel ItemStartAddress, 0x0231BE50
;.definelabel ItemJumpAddress, 0x0231CB14
; For EU
;.include "lib/stdlib_eu.asm"
;.include "lib/dunlib_eu.asm"
;.definelabel ItemStartAddress, 0x0231C8B0
;.definelabel ItemJumpAddress, 0x0231D574
; File creation
.create "./code_out.bin", ItemStartAddress ; Change to the actual offset as this directive doesn't accept labels
.org ItemStartAddress
.area MaxSize ; Define the size of the area
; Usable Variables:
; r9 (bool) = Thrown Item
; r8 = User Monster Structure Pointer
; r7 = Target Monster Structure Pointer
; r6 = Item Data Structure Pointer (??? bytes: Unknown [4 bytes], item_id [2 bytes], ??? [??? bytes])
; Registers r6 to r9, r11 and r13 must remain unchanged after the execution of that code
; Code here
; Always branch at the end
b ItemJumpAddress
.pool
.endarea
.close