Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .thumb
- .thumb_func
- .org 0x006874
- getCharIndex:
- .org 0x006cb8
- drawHUD:
- .org 0x03bd9a
- @bl drawHUD
- bl drawSpiritHUD
- .org 0x05bb5e
- @restore maxmana / 5 while sitting
- mov r1,#0x5
- .org 0x3cc040
- .align 2
- drawSpiritHUD:
- push {r14}
- bl drawHUD
- mov r6,r0
- bl check_SpiritIcon
- pop {r15}
- .align 2
- check_SpiritIcon:
- push {r14}
- bl checkCurrentSpirit
- cmp r0,#0x0
- beq check_SpiritIcon_done
- bl draw_SpiritIcon
- check_SpiritIcon_done:
- mov r0,r6
- pop {r15}
- .align 2
- draw_SpiritIcon:
- push {r4,r14}
- sub r0,#0x1
- mov r4,r0
- ldr r3,draw_SpiritIcon_Spiritpalette_Pointer
- add r3,r0
- ldr r0,draw_SpiritIcon_Vram
- ldr r1,draw_SpiritIcon_BackgroundAddr
- mov r2,#0x20
- bl copySpriteVram
- mov r2,r0
- mov r0,r4
- mov r1,#0xa0
- lsl r1,#0x2
- mul r0,r1
- ldr r1,draw_SpiritIcon_SpriteAddr
- add r1,r0
- mov r0,r2
- mov r2,#0x20
- bl copySpriteVram
- @frame ---
- ldr r1,draw_SpiritIcon_FrameAddr
- mov r2,#0x20
- bl copySpriteVram
- mov r0,#0x0
- lsl r0,#0xc
- mov r1,#0xa2
- lsl r1,#0x2
- add r0,r1
- str r0,[r6,#0x4]
- ldr r0,draw_SpiritIcon_OAM_0
- str r0,[r6]
- add r6,#0x8
- @sprite ---
- ldrb r0,[r3]
- lsl r0,#0xc
- mov r1,#0xa1
- lsl r1,#0x2
- add r0,r1
- str r0,[r6,#0x4]
- ldr r0,draw_SpiritIcon_OAM_0
- str r0,[r6]
- add r6,#0x8
- @background ---
- mov r0,#0x0
- lsl r0,#0xc
- mov r1,#0xa0
- lsl r1,#0x2
- add r0,r1
- str r0,[r6,#0x4]
- ldr r0,draw_SpiritIcon_OAM_0
- str r0,[r6]
- add r6,#0x8
- pop {r4}
- pop {r15}
- .align 2
- draw_SpiritIcon_OAM_0: .word 0x40b20080
- draw_SpiritIcon_SpriteAddr: .word 0x0881e690
- draw_SpiritIcon_FrameAddr: .word 0x083cc440
- draw_SpiritIcon_BackgroundAddr: .word 0x083cc4c0
- draw_SpiritIcon_Vram: .word 0x06015000
- draw_SpiritIcon_Spiritpalette_Pointer: .word (draw_SpiritIcon_Spiritpalette + 0x8000000)
- draw_SpiritIcon_Spiritpalette:
- @wisp
- .byte 0x03
- @shade
- .byte 0x03
- @luna
- .byte 0x03
- @salamder
- .byte 0x03
- @undine
- .byte 0x02
- @dryad
- .byte 0x01
- @jinn
- .byte 0x03
- @gnome
- .byte 0x01
- .align 2
- copySpriteVram:
- push {r3-r4}
- mov r4,#0x0
- copySpriteVram_loop:
- ldr r3,[r1]
- str r3,[r0]
- add r0,#0x4
- add r1,#0x4
- add r4,#0x1
- cmp r4,r2
- blt copySpriteVram_loop
- pop {r3-r4}
- bx r14
- .align 2
- checkCurrentSpirit:
- ldr r0,checkCurrentSpirit_currentChar
- ldrb r1,[r0]
- lsl r0,r1,#0x1
- add r0,r1
- lsl r0,#0x2
- sub r0,r1
- lsl r0,#0x5
- ldr r1,checkCurrentSpirit_RamAddr0
- add r0,r1
- mov r1,#0x91
- lsl r1,#0x1
- add r1,#0x1
- add r0,r1
- ldrb r0,[r0]
- mov r1,#0x58
- mul r0,r1
- ldr r1,checkCurrentSpirit_RamAddr1
- add r0,r1
- ldrb r0,[r0,#0x17]
- lsl r0,#0x1b
- lsr r0,#0x1c
- bx r14
- .align 2
- checkCurrentSpirit_currentChar: .word 0x2002f44@0x2000604
- checkCurrentSpirit_RamAddr0: .word 0x2001650
- checkCurrentSpirit_RamAddr1: .word 0x20203f0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement