Initialise Secondary Effect
Jump to navigation
Jump to search
# ROUTINE: (Effect related) ? 0x1add54 # Parameters: # r4 = Secondary Animation ID # r5 = element as integer # r6 = Stack pointer to effect's data # for all units 0 -> f: # - 0x0000: target counter # - 0x0002: non-targeted unit counter # - 0x0003: math skill flag # - 0x0004: animate on miss flag # - 0x0006: Unit misc ID // if no targets, X pos of effect (+ below) # - 0x0007: display type // if no targets, X pos of effect (+ above) # - 0x0008: ? // if no targets, elevation of effect # - 0x000a: ? // if no targets, Y pos of effect # appended: # - 0x00a4: 0? # - 0x00a6: caster misc ID 801add54: 27bdffe0 addiu r29,r29,-0x0020 801add58: afb10014 sw r17,0x0014(r29) 801add5c: 00808821 addu r17,r4,r0 # animationID 801add60: afb20018 sw r18,0x0018(r29) 801add64: 00a09021 addu r18,r5,r0 # elements 801add68: afb00010 sw r16,0x0010(r29) 801add6c: afbf001c sw r31,0x001c(r29) 801add70: 0c06b60a jal 0x801ad828 # Shift Current Effect Target ID // returns current effect target ID 801add74: 00c08021 addu r16,r6,r0 # p3 801add78: 304200ff andi r2,r2,0x00ff # 801add7c: 00021880 sll r3,r2,0x02 # 801add80: 00621821 addu r3,r3,r2 # 801add84: 00031880 sll r3,r3,0x02 # 801add88: 00621821 addu r3,r3,r2 # 801add8c: 00031880 sll r3,r3,0x02 # Current effect target ID * 0x54 801add90: 3c01801c lui r1,0x801c 801add94: 00230821 addu r1,r1,r3 801add98: a4318ba0 sh r17,-0x7460(r1) # Store current secondary effect animation ID 801add9c: 3c01801c lui r1,0x801c 801adda0: 00230821 addu r1,r1,r3 801adda4: 94248ba0 lhu r4,-0x7460(r1) # load secondary animation 801adda8: 3c01801c lui r1,0x801c 801addac: 00230821 addu r1,r1,r3 801addb0: a4208ba8 sh r0,-0x7458(r1) # reset effect progression counter 801addb4: 3c01801c lui r1,0x801c 801addb8: 00230821 addu r1,r1,r3 801addbc: a4328ba2 sh r18,-0x745e(r1) # store ability element 801addc0: 00042080 sll r4,r4,0x02 # secondary anim ID * 4 801addc4: 3c01801c lui r1,0x801c 801addc8: 00240821 addu r1,r1,r4 801addcc: 902484dc lbu r4,-0x7b24(r1) # load secondary effect's function ID 801addd0: 3c01801c lui r1,0x801c 801addd4: 00230821 addu r1,r1,r3 801addd8: a0248b9f sb r4,-0x7461(r1) # store seconday anims effect function 801adddc: 3c04801c lui r4,0x801c 801adde0: 24848bac addiu r4,r4,-0x7454 # effect target data table + 0x10 801adde4: 00642821 addu r5,r3,r4 # effect target's data table + 0x10 801adde8: 8a0600a7 lwl r6,0x00a7(r16) 801addec: 9a0600a4 lwr r6,0x00a4(r16) # *(p3 + 0xa4) 801addf0: 8a0700ab lwl r7,0x00ab(r16) 801addf4: 9a0700a8 lwr r7,0x00a8(r16) # *(p3 + 0xa8) 801addf8: 860800ac lh r8,0x00ac(r16) # *(p3 + 0xac) 801addfc: a8a60003 swl r6,0x0003(r5) 801ade00: b8a60000 swr r6,0x0000(r5) # store misc. unit ID of target & caster to effect target data? 801ade04: a8a70007 swl r7,0x0007(r5) 801ade08: b8a70004 swr r7,0x0004(r5) # ? 801ade0c: a4a80008 sh r8,0x0008(r5) # ? 801ade10: 2484000a addiu r4,r4,0x000a # 801ade14: 00642021 addu r4,r3,r4 # effect target's data table + 0x1a 801ade18: 8a050007 lwl r5,0x0007(r16) 801ade1c: 9a050004 lwr r5,0x0004(r16) # 801ade20: 8a06000b lwl r6,0x000b(r16) 801ade24: 9a060008 lwr r6,0x0008(r16) # *(p3 + 8) 801ade28: 8607000c lh r7,0x000c(r16) # *(p3 + 12) 801ade2c: a8850003 swl r5,0x0003(r4) 801ade30: b8850000 swr r5,0x0000(r4) # store hit# & x coordinate of target? 801ade34: a8860007 swl r6,0x0007(r4) 801ade38: b8860004 swr r6,0x0004(r4) # store map level & y coordinate of target? 801ade3c: a4870008 sh r7,0x0008(r4) # ? 801ade40: 960500c6 lhu r5,0x00c6(r16) # load used weapon ID 801ade44: 34040001 ori r4,r0,0x0001 # 1 801ade48: 3c01801c lui r1,0x801c 801ade4c: 00230821 addu r1,r1,r3 801ade50: ac248ba4 sw r4,-0x745c(r1) # set current secondary effect phase to initialised 801ade54: 3c01801c lui r1,0x801c 801ade58: 00230821 addu r1,r1,r3 801ade5c: ac258bc0 sw r5,-0x7440(r1) # store used weapon ID 801ade60: 8fbf001c lw r31,0x001c(r29) 801ade64: 8fb20018 lw r18,0x0018(r29) 801ade68: 8fb10014 lw r17,0x0014(r29) 801ade6c: 8fb00010 lw r16,0x0010(r29) 801ade70: 27bd0020 addiu r29,r29,0x0020 801ade74: 03e00008 jr r31 801ade78: 00000000 nop