Linear Projectile secondary effect

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search

< BATTLE.BIN

001b3938: 3c02801c lui r2,0x801c
001b393c: 8c42c098 lw r2,-0x3f68(r2)			#load effect target data
001b3940: 27bdff60 addiu r29,r29,0xff60
001b3944: afbf009c sw r31,0x009c(r29)
001b3948: afb60098 sw r22,0x0098(r29)
001b394c: afb50094 sw r21,0x0094(r29)
001b3950: afb40090 sw r20,0x0090(r29)
001b3954: afb3008c sw r19,0x008c(r29)
001b3958: afb20088 sw r18,0x0088(r29)
001b395c: afb10084 sw r17,0x0084(r29)
001b3960: afb00080 sw r16,0x0080(r29)
001b3964: 8c430008 lw r3,0x0008(r2)			#load effect phase
001b3968: 34100002 ori r16,r0,0x0002
001b396c: 107000f2 beq r3,r16,0x001b3d38		#branch if current phase is executing
001b3970: 2c620003 sltiu r2,r3,0x0003
001b3974: 10400005 beq r2,r0,0x001b398c		#branch if current phase is finishing or erroneous
001b3978: 34020001 ori r2,r0,0x0001
001b397c: 10620008 beq r3,r2,0x001b39a0		#branch if current phase is initializing
001b3980: 00801021 addu r2,r4,r0
001b3984: 0806d033 j 0x001b40cc			#error otherwise
001b3988: 00000000 nop
001b398c: 34020003 ori r2,r0,0x0003
001b3990: 106201cc beq r3,r2,0x001b40c4		#branch if finishing
001b3994: 00801021 addu r2,r4,r0
001b3998: 0806d033 j 0x001b40cc			#error otherwise
001b399c: 00000000 nop
If initializing projectile:
001b39a0: 3c06801c lui r6,0x801c
001b39a4: 84c69264 lh r6,-0x6d9c(r6)			#load target's X mod
001b39a8: 3c02801c lui r2,0x801c
001b39ac: 8442925c lh r2,-0x6da4(r2)			#acting unit's X mod
001b39b0: 00000000 nop
001b39b4: 00c23023 subu r6,r6,r2
001b39b8: 00c60018 mult r6,r6				#find difference and square
001b39bc: 3c03801c lui r3,0x801c
001b39c0: 84639266 lh r3,-0x6d9a(r3)
001b39c4: 3c02801c lui r2,0x801c
001b39c8: 8442925e lh r2,-0x6da2(r2)			#target/caster height
001b39cc: 00002012 mflo r4
001b39d0: 00621823 subu r3,r3,r2
001b39d4: 00000000 nop
001b39d8: 00630018 mult r3,r3				#find height difference and square
001b39dc: 3c05801c lui r5,0x801c
001b39e0: 84a59260 lh r5,-0x6da0(r5)
001b39e4: 3c02801c lui r2,0x801c
001b39e8: 84429268 lh r2,-0x6d98(r2)			#target/caster Y
001b39ec: 00003812 mflo r7
001b39f0: 00451023 subu r2,r2,r5
001b39f4: 00000000 nop
001b39f8: 00420018 mult r2,r2				#find difference and square
001b39fc: afa60020 sw r6,0x0020(r29)			#store x difference into vector
001b3a00: afa30024 sw r3,0x0024(r29)			#store height difference into vector
001b3a04: afa20028 sw r2,0x0028(r29)			#store y difference into vector
001b3a08: 00872021 addu r4,r4,r7			
001b3a0c: 00001012 mflo r2
001b3a10: 00822021 addu r4,r4,r2
001b3a14: 0c00709a jal 0x0001c268			#Get Square root of r4 dealing with 4096 - sqrt(x^2 + y^2 + z^2) = distance between caster and target
001b3a18: 00042300 sll r4,r4,0x0c
001b3a1c: 3c06801c lui r6,0x801c
001b3a20: 24c68b50 addiu r6,r6,0x8b50			#don't believe I've seen this before.
001b3a24: 8fa30020 lw r3,0x0020(r29)
001b3a28: 8fa40024 lw r4,0x0024(r29)
001b3a2c: 8fa50028 lw r5,0x0028(r29)			#load our vectors again
001b3a30: acc30000 sw r3,0x0000(r6)
001b3a34: acc40004 sw r4,0x0004(r6)
001b3a38: acc50008 sw r5,0x0008(r6)			#store vectors to 0x801b8b50
001b3a3c: 8fa3002c lw r3,0x002c(r29)			#0 vector
001b3a40: 00000000 nop
001b3a44: acc3000c sw r3,0x000c(r6)			#0 vector
001b3a48: 3c03801c lui r3,0x801c
001b3a4c: 8c63c098 lw r3,-0x3f68(r3)			#load effect target data
001b3a50: 3c04801c lui r4,0x801c
001b3a54: 9484bf3c lhu r4,-0x40c4(r4)			#load 3d step counter
001b3a58: 3c01801c lui r1,0x801c
001b3a5c: ac228b40 sw r2,-0x74c0(r1)			#store total distance between target and caster
001b3a60: 8c650050 lw r5,0x0050(r3)			#load effect data pointer
001b3a64: 34028000 ori r2,r0,0x8000			#0x8000
001b3a68: 3c01801c lui r1,0x801c
001b3a6c: ac208b44 sw r0,-0x74bc(r1)			#start pos = 0
001b3a70: 3c01801c lui r1,0x801c
001b3a74: ac228b48 sw r2,-0x74b8(r1)			#store 0x8000 coordinates per frame
001b3a78: 3c01801c lui r1,0x801c
001b3a7c: a4248b4c sh r4,-0x74b4(r1)			#store 3d step counter
001b3a80: 10a00003 beq r5,r0,0x001b3a90		#branch if no effect data
001b3a84: ac700008 sw r16,0x0008(r3)
001b3a88: 0c011180 jal 0x00044600			#LBA
001b3a8c: 00a02021 addu r4,r5,r0			#r4 = effect data pointer
001b3a90: 3c02801c lui r2,0x801c
001b3a94: 8c42c098 lw r2,-0x3f68(r2)			#load effect target data
001b3a98: 00000000 nop
001b3a9c: 94420004 lhu r2,0x0004(r2)			#load animation's effect
001b3aa0: 00000000 nop
001b3aa4: 00021080 sll r2,r2,0x02
001b3aa8: 3c01801c lui r1,0x801c
001b3aac: 00220821 addu r1,r1,r2
001b3ab0: 843684de lh r22,-0x7b22(r1)			#load effect's model ID
001b3ab4: 00000000 nop
001b3ab8: 32c200ff andi r2,r22,0x00ff
001b3abc: 14400020 bne r2,r0,0x001b3b40		#branch if model ID is not arrow
001b3ac0: 32c300ff andi r3,r22,0x00ff
Arrow Model:
001b3ac4: 0c011105 jal 0x00044414			#if model ID is arrow, 00044414 - 000444d8
001b3ac8: 34040c88 ori r4,r0,0x0c88			#arrow?
001b3acc: 00009821 addu r19,r0,r0
001b3ad0: 341400e0 ori r20,r0,0x00e0
001b3ad4: 0040a821 addu r21,r2,r0			#first empty space available for more model data?
001b3ad8: 3c02801c lui r2,0x801c
001b3adc: 8c42c098 lw r2,-0x3f68(r2)			#load effect target data
001b3ae0: 02a09021 addu r18,r21,r0			#effect data pointer
001b3ae4: ac550050 sw r21,0x0050(r2)			#store effect data pointer
001b3ae8: 00008021 addu r16,r0,r0
001b3aec: 02408821 addu r17,r18,r0			#effect data pointer
001b3af0: 0c008f38 jal 0x00023ce0			#P14 SetPolyG3
001b3af4: 02202021 addu r4,r17,r0			#effect data pointer
001b3af8: 26100001 addiu r16,r16,0x0001
001b3afc: 2a020004 slti r2,r16,0x0004
001b3b00: 1440fffb bne r2,r0,0x001b3af0		#loop 4 times here
001b3b04: 2631001c addiu r17,r17,0x001c		#shift pointer up
001b3b08: 00008021 addu r16,r0,r0
001b3b0c: 02b48821 addu r17,r21,r20			#effect data pointer + r20 pointer
001b3b10: 0c008f4c jal 0x00023d30			#P18 SetPolyG4
001b3b14: 02202021 addu r4,r17,r0
001b3b18: 26100001 addiu r16,r16,0x0001
001b3b1c: 2a02000d slti r2,r16,0x000d
001b3b20: 1440fffb bne r2,r0,0x001b3b10		#loop 0cd times here
001b3b24: 26310024 addiu r17,r17,0x0024		#shift pointer up
001b3b28: 269401d4 addiu r20,r20,0x01d4		#shift r20 pointer up 0x01d4
001b3b2c: 26730001 addiu r19,r19,0x0001
001b3b30: 2a620002 slti r2,r19,0x0002
001b3b34: 1440ffec bne r2,r0,0x001b3ae8		#loop both initialisation loops twice
001b3b38: 26520070 addiu r18,r18,0x0070		#shift r18 pointer up - above prepares model data for arrow model?
001b3b3c: 32c300ff andi r3,r22,0x00ff
001b3b40: 34020001 ori r2,r0,0x0001
001b3b44: 14620015 bne r3,r2,0x001b3b9c		#branch if model is not stone
001b3b48: 2402ffff addiu r2,r0,0xffff
Stone Model:
001b3b4c: 0c011105 jal 0x00044414			#finds first free space for model data
001b3b50: 340402a0 ori r4,r0,0x02a0			#stone?
001b3b54: 00009821 addu r19,r0,r0
001b3b58: 3c03801c lui r3,0x801c
001b3b5c: 8c63c098 lw r3,-0x3f68(r3)			#load effect data pointer
001b3b60: 00409021 addu r18,r2,r0			#model data pointer
001b3b64: ac720050 sw r18,0x0050(r3)			#store
001b3b68: 00008021 addu r16,r0,r0
001b3b6c: 02408821 addu r17,r18,r0			#model data pointer
001b3b70: 0c008f38 jal 0x00023ce0			#P14 SetPolyG3
001b3b74: 02202021 addu r4,r17,r0			#model data pointer
001b3b78: 26100001 addiu r16,r16,0x0001
001b3b7c: 2a02000c slti r2,r16,0x000c
001b3b80: 1440fffb bne r2,r0,0x001b3b70		#loop 0xc times
001b3b84: 2631001c addiu r17,r17,0x001c		#increment pointer by 0xc
001b3b88: 26730001 addiu r19,r19,0x0001
001b3b8c: 2a620002 slti r2,r19,0x0002
001b3b90: 1440fff5 bne r2,r0,0x001b3b68		#prepare another slot for polygon data? 0x150 - fills all 0x02a0 bytes prepared. that's, interesting.
001b3b94: 26520150 addiu r18,r18,0x0150
001b3b98: 2402ffff addiu r2,r0,0xffff
001b3b9c: 16c20062 bne r22,r2,0x001b3d28		#branch if model isn't -1
001b3ba0: 00000000 nop
001b3ba4: 3c02801c lui r2,0x801c
001b3ba8: 8c42c098 lw r2,-0x3f68(r2)			#load effect target data
001b3bac: 00000000 nop
001b3bb0: 8c450024 lw r5,0x0024(r2)			#load used weapon ID
001b3bb4: 00000000 nop
001b3bb8: 24a2ff86 addiu r2,r5,0xff86			#-0x7A
001b3bbc: 2c420003 sltiu r2,r2,0x0003
001b3bc0: 10400016 beq r2,r0,0x001b3c1c		#branch if used weapon is not a shuriken
001b3bc4: 00000000 nop
Shuriken Model
001b3bc8: 0c011105 jal 0x00044414			#find first available space for model data
001b3bcc: 34040380 ori r4,r0,0x0380			#shuriken? how much space to request/prepare for?
001b3bd0: 00009821 addu r19,r0,r0
001b3bd4: 3c03801c lui r3,0x801c
001b3bd8: 8c63c098 lw r3,-0x3f68(r3)			#load effect target data
001b3bdc: 00409021 addu r18,r2,r0
001b3be0: ac720050 sw r18,0x0050(r3)			#store model data pointer
001b3be4: 00008021 addu r16,r0,r0
001b3be8: 02408821 addu r17,r18,r0
001b3bec: 0c008f38 jal 0x00023ce0			#P14 SetPolyG3
001b3bf0: 02202021 addu r4,r17,r0
001b3bf4: 26100001 addiu r16,r16,0x0001
001b3bf8: 2a020010 slti r2,r16,0x0010
001b3bfc: 1440fffb bne r2,r0,0x001b3bec		#loop 0x10 times
001b3c00: 2631001c addiu r17,r17,0x001c
001b3c04: 26730001 addiu r19,r19,0x0001
001b3c08: 2a620002 slti r2,r19,0x0002
001b3c0c: 1440fff5 bne r2,r0,0x001b3be4		#prepare another set of model data
001b3c10: 265201c0 addiu r18,r18,0x01c0		#increment 0x01c0
001b3c14: 0806cf4a j 0x001b3d28			#jump ahead
001b3c18: 00000000 nop
Item.bin graphic:
001b3c1c: 0c04dac4 jal 0x00136b10			#Get Item Graphic Data
001b3c20: 27a40060 addiu r4,r29,0x0060			#store graphic data in stack
001b3c24: 0c06b6cf jal 0x001adb3c			#
001b3c28: 00000000 nop
001b3c2c: 3c03801c lui r3,0x801c
001b3c30: 8c63c098 lw r3,-0x3f68(r3)
001b3c34: 00000000 nop
001b3c38: a0620030 sb r2,0x0030(r3)			#store result in 0x30 effect target data (item graphic ID?)
001b3c3c: 3c02801c lui r2,0x801c
001b3c40: 8c42c098 lw r2,-0x3f68(r2)
001b3c44: 00000000 nop
001b3c48: 90420030 lbu r2,0x0030(r2)			#load again
001b3c4c: 00000000 nop
001b3c50: 00028040 sll r16,r2,0x01
001b3c54: 02028021 addu r16,r16,r2			#? * 3
001b3c58: 00101100 sll r2,r16,0x04
001b3c5c: 02028021 addu r16,r16,r2			#? * 33
001b3c60: 00108080 sll r16,r16,0x02			#? * 0xCC
001b3c64: 3c02801c lui r2,0x801c
001b3c68: 24429278 addiu r2,r2,0x9278
001b3c6c: 02028021 addu r16,r16,r2			#pointer to ? data (item.bin graphic data?)
001b3c70: 26110034 addiu r17,r16,0x0034		#graphic data + 0x34 
001b3c74: 0c008f47 jal 0x00023d1c			#P17 SetPolyFT4
001b3c78: 02202021 addu r4,r17,r0
001b3c7c: 3402001e ori r2,r0,0x001e
001b3c80: a602004a sh r2,0x004a(r16)			#store 0x1e in 0x4a*(graphic data)
001b3c84: 34020080 ori r2,r0,0x0080
001b3c88: a202003a sb r2,0x003a(r16)
001b3c8c: a2020039 sb r2,0x0039(r16)
001b3c90: a2020038 sb r2,0x0038(r16)			#store RGB as 0x80?
001b3c94: 93a2006c lbu r2,0x006c(r29)
001b3c98: 00000000 nop
001b3c9c: a2020050 sb r2,0x0050(r16)			#store item graphic top left corner X load location
001b3ca0: a2020040 sb r2,0x0040(r16)			#once more (bottom left?)
001b3ca4: 93a30070 lbu r3,0x0070(r29)			#load graphic width
001b3ca8: 00000000 nop
001b3cac: 00431021 addu r2,r2,r3			#X + width
001b3cb0: 2603005c addiu r3,r16,0x005c			#graphic data + 0x5c
001b3cb4: a2020058 sb r2,0x0058(r16)			#store X item graphic top right corner X location
001b3cb8: a2020048 sb r2,0x0048(r16)			#once more (bottom right?)
001b3cbc: 93a2006d lbu r2,0x006d(r29)			#load Y load location
001b3cc0: 00603021 addu r6,r3,r0			#r6 = graphic data + 0x5c
001b3cc4: a2020049 sb r2,0x0049(r16)			#store Y item graphic top left corner Y location
001b3cc8: a2020041 sb r2,0x0041(r16)			#again? (top right?)
001b3ccc: 93a30072 lbu r3,0x0072(r29)			#load graphic height
001b3cd0: 00000000 nop
001b3cd4: 00431021 addu r2,r2,r3			#Y + height
001b3cd8: a2020059 sb r2,0x0059(r16)			#store Y item graphic bottom left corner Y location
001b3cdc: a2020051 sb r2,0x0051(r16)			#again? (bottom right?)
001b3ce0: 97a2006e lhu r2,0x006e(r29)			#load VRAM palette?
001b3ce4: 26070054 addiu r7,r16,0x0054			#r7 = graphic data + 0x54
001b3ce8: a6020042 sh r2,0x0042(r16)			#store VRAM Palette?
001b3cec: 8e220000 lw r2,0x0000(r17)
001b3cf0: 8e230004 lw r3,0x0004(r17)
001b3cf4: 8e240008 lw r4,0x0008(r17)
001b3cf8: 8e25000c lw r5,0x000c(r17)
001b3cfc: acc20000 sw r2,0x0000(r6)
001b3d00: acc30004 sw r3,0x0004(r6)
001b3d04: acc40008 sw r4,0x0008(r6)
001b3d08: acc5000c sw r5,0x000c(r6)			#copy graphic data from 0x34-0x43 to 0x5c-6b, and 0x44-0x5b to 0x6c-0x7b
001b3d0c: 26310010 addiu r17,r17,0x0010
001b3d10: 1627fff6 bne r17,r7,0x001b3cec		#
001b3d14: 24c60010 addiu r6,r6,0x0010			#
001b3d18: 8e220000 lw r2,0x0000(r17)
001b3d1c: 8e230004 lw r3,0x0004(r17)
001b3d20: acc20000 sw r2,0x0000(r6)
001b3d24: acc30004 sw r3,0x0004(r6)			#copy data from 0x54-0x5b to 0x7c-0x83 
001b3d28: 0c0237ba jal 0x0008dee8			#Set Event Speed Inner
001b3d2c: 34040001 ori r4,r0,0x0001			#normal speed
001b3d30: 0806d032 j 0x001b40c8			#end
001b3d34: 34040001 ori r4,r0,0x0001			#r4 = 1?
Executing phase:
001b3d38: 3c04801c lui r4,0x801c
001b3d3c: 24848b50 addiu r4,r4,0x8b50			#address for previously stored motion(?) vectors
001b3d40: 27b00030 addiu r16,r29,0x0030		#stack + 0x30
001b3d44: 3c06801c lui r6,0x801c
001b3d48: 8cc68b44 lw r6,-0x74bc(r6)			#load current position along vector?
001b3d4c: 3c02801c lui r2,0x801c
001b3d50: 8c428b48 lw r2,-0x74b8(r2)			#load 0x8000? coordinates per step?
001b3d54: 3c05801c lui r5,0x801c
001b3d58: 8ca58b40 lw r5,-0x74c0(r5)			#load 3d steps counter
001b3d5c: 00c23021 addu r6,r6,r2			#add steps
001b3d60: 3c01801c lui r1,0x801c
001b3d64: ac268b44 sw r6,-0x74bc(r1)			#store new current position
001b3d68: 0c06bdb6 jal 0x001af6d8			#Find XYZ Position of Projectile Along Trajectory
001b3d6c: 02003821 addu r7,r16,r0			#return vectors go to stack + 0x30
001b3d70: 3c07801c lui r7,0x801c
001b3d74: 84e79260 lh r7,-0x6da0(r7)			#load acting unit's y mod
001b3d78: 3c08801c lui r8,0x801c
001b3d7c: 85089268 lh r8,-0x6d98(r8)			#load target unit's y mod
001b3d80: 3c03801c lui r3,0x801c
001b3d84: 8463925c lh r3,-0x6da4(r3)			#load acting unit's x mod
001b3d88: 3c05801c lui r5,0x801c
001b3d8c: 84a59264 lh r5,-0x6d9c(r5)			#load target unit's x mod
001b3d90: 8fa60030 lw r6,0x0030(r29)			#load X position vector
001b3d94: 3c09801c lui r9,0x801c
001b3d98: 8529925e lh r9,-0x6da2(r9)			#load acting unit's height mod
001b3d9c: 8fa20034 lw r2,0x0034(r29)			load z position vector
001b3da0: 01074023 subu r8,r8,r7			#find y difference
001b3da4: 00a32823 subu r5,r5,r3			#find x difference
001b3da8: 00661821 addu r3,r3,r6			#acting unit's x mod + X position vector
001b3dac: afa30030 sw r3,0x0030(r29)			#store new x position vector
001b3db0: 8fa30038 lw r3,0x0038(r29)			#load y position vector
001b3db4: 01221021 addu r2,r9,r2			#acting unit's height + z vector
001b3db8: afa20034 sw r2,0x0034(r29)			#store new z position vector
001b3dbc: 3c02801c lui r2,0x801c
001b3dc0: 84429266 lh r2,-0x6d9a(r2)			#load target unit's height mod
001b3dc4: 00082023 subu r4,r0,r8			#obtain negative of y difference
001b3dc8: afa50020 sw r5,0x0020(r29)			#store x difference
001b3dcc: afa80028 sw r8,0x0028(r29)			#store y difference
001b3dd0: 00e33821 addu r7,r7,r3			#acting unit's Y mod + y position vector
001b3dd4: 00491023 subu r2,r2,r9			#difference of height mod
001b3dd8: afa70038 sw r7,0x0038(r29)			#store new y position vector
001b3ddc: 0c00763a jal 0x0001d8e8			#Get Angle Value via ArcTan Table - find angle between x difference and -y difference
001b3de0: afa20024 sw r2,0x0024(r29)			#store height difference
001b3de4: 8fa30020 lw r3,0x0020(r29)			#load x difference
001b3de8: 00000000 nop
001b3dec: 00630018 mult r3,r3				#square
001b3df0: 00002812 mflo r5
001b3df4: 8fa30028 lw r3,0x0028(r29)			#load y difference
001b3df8: 00000000 nop
001b3dfc: 00630018 mult r3,r3				#square
001b3e00: a7a20042 sh r2,0x0042(r29)			#store xy angle
001b3e04: 00002012 mflo r4
001b3e08: 0c006fce jal 0x0001bf38			#Frame Timing Related? (0x1bf38) - sqrt(x^2 + y^2)
001b3e0c: 00a42021 addu r4,r5,r4			#xdiff^2 + ydiff^2
001b3e10: 8fa40024 lw r4,0x0024(r29)			#load height difference
001b3e14: 0c00763a jal 0x0001d8e8			#Get Angle Value via ArcTan Table - gets angle between xy length and z length
001b3e18: 00402821 addu r5,r2,r0			#xy length
001b3e1c: 3c05801c lui r5,0x801c
001b3e20: 8ca5c098 lw r5,-0x3f68(r5)			#load effect target data
001b3e24: 24420400 addiu r2,r2,0x0400			#angle + 0x400
001b3e28: a7a20044 sh r2,0x0044(r29)			#store z angle
001b3e2c: a7a00040 sh r0,0x0040(r29)			#store 0
001b3e30: 94a20004 lhu r2,0x0004(r5)			#load secondary animation effect
001b3e34: 00000000 nop
001b3e38: 00021080 sll r2,r2,0x02
001b3e3c: 3c01801c lui r1,0x801c
001b3e40: 00220821 addu r1,r1,r2
001b3e44: 843684de lh r22,-0x7b22(r1)			#load effect model ID
001b3e48: 2402ffff addiu r2,r0,0xffff
001b3e4c: 12c2001f beq r22,r2,0x001b3ecc		#branch if model ID = item.bin graphic
001b3e50: 32d300ff andi r19,r22,0x00ff
Arrow Model
001b3e54: 16600009 bne r19,r0,0x001b3e7c		#branch if model ID is not arrow
001b3e58: 34020001 ori r2,r0,0x0001
001b3e5c: 34020040 ori r2,r0,0x0040
001b3e60: afa20050 sw r2,0x0050(r29)
001b3e64: afa2004c sw r2,0x004c(r29)
001b3e68: afa20048 sw r2,0x0048(r29)			#scale arrow model to 0x40
001b3e6c: a7a0005c sh r0,0x005c(r29)
001b3e70: a7a0005a sh r0,0x005a(r29)
001b3e74: 0806cfab j 0x001b3eac			#jump ahead
001b3e78: a7a00058 sh r0,0x0058(r29)			#no Innate Yaw, Pitch, or roll angles.
Stone Model
001b3e7c: 1662000b bne r19,r2,0x001b3eac		#branch if model is not stone
001b3e80: 340300c0 ori r3,r0,0x00c0
001b3e84: 3c02801c lui r2,0x801c
001b3e88: 84428b4c lh r2,-0x74b4(r2)			#load 3d step counter
001b3e8c: afa30050 sw r3,0x0050(r29)
001b3e90: afa3004c sw r3,0x004c(r29)
001b3e94: afa30048 sw r3,0x0048(r29)			#scale stone model to 0xc0
001b3e98: a7a00058 sh r0,0x0058(r29)			#store no x rotation
001b3e9c: 00021a00 sll r3,r2,0x08			#step counter * 0x0100
001b3ea0: 000211c0 sll r2,r2,0x07			#step counter * 0x0080
001b3ea4: a7a3005a sh r3,0x005a(r29)			#store slight rotation in Pitch and Roll
001b3ea8: a7a2005c sh r2,0x005c(r29)			#
Arrow & Stone Models
001b3eac: afb60010 sw r22,0x0010(r29)
001b3eb0: 27a40058 addiu r4,r29,0x0058			#ptr. to initial model rotation matrix (Yaw Pitch Roll angles)
001b3eb4: 27a50030 addiu r5,r29,0x0030			#ptr. to model translation matrix (XYZ)
001b3eb8: 27a60040 addiu r6,r29,0x0040			#ptr. to model rotation due to movement (xy, z, and 0 angles.)
001b3ebc: 0c06b8d0 jal 0x001ae340			#Arrow, Throw stone, Reflect Model Loading
001b3ec0: 27a70048 addiu r7,r29,0x0048			#ptr. to model movement scalar matrix (XYZ scale)
001b3ec4: 0806cfcf j 0x001b3f3c
001b3ec8: 00000000 nop
Shuriken model
001b3ecc: 8ca50024 lw r5,0x0024(r5)			#load used weapon
001b3ed0: 00000000 nop
001b3ed4: 24a2ff86 addiu r2,r5,0xff86
001b3ed8: 2c420003 sltiu r2,r2,0x0003
001b3edc: 10400014 beq r2,r0,0x001b3f30		#branch if not shuriken
001b3ee0: 27a40058 addiu r4,r29,0x0058			#ptr. to yaw/pitch/roll for model
001b3ee4: 02002821 addu r5,r16,r0			#ptr. to model XYZ translation
001b3ee8: 27a60040 addiu r6,r29,0x0040			#ptr. to xy,z,0 rotation due to movement
001b3eec: 27a70048 addiu r7,r29,0x0048			#ptr. to model movement scalar matrix (XYZ scale)
001b3ef0: 3c02801c lui r2,0x801c
001b3ef4: 84428b4c lh r2,-0x74b4(r2)			#load 3d step counter
001b3ef8: 340300c0 ori r3,r0,0x00c0
001b3efc: afa30050 sw r3,0x0050(r29)
001b3f00: afa3004c sw r3,0x004c(r29)
001b3f04: afa30048 sw r3,0x0048(r29)			#scale model to 0xc0
001b3f08: a7a0005a sh r0,0x005a(r29)
001b3f0c: a7a00058 sh r0,0x0058(r29)			#store no x or y rotation
001b3f10: 00021200 sll r2,r2,0x08			#step counter * 0x0100
001b3f14: 00021023 subu r2,r0,r2			#negative
001b3f18: a7a2005c sh r2,0x005c(r29)			#store roll
001b3f1c: 34020003 ori r2,r0,0x0003
001b3f20: 0c06b8d0 jal 0x001ae340			#Arrow, Throw stone, Reflect Model Loading
001b3f24: afa20010 sw r2,0x0010(r29)			#store model ID as shuriken
001b3f28: 0806cfcf j 0x001b3f3c
001b3f2c: 00000000 nop
Item.Bin graphic
001b3f30: 02002021 addu r4,r16,r0			#points to XYZ translation matrix
001b3f34: 0c06bc42 jal 0x001af108			#001af108 - 001af3a0 - graphic equivalent of "Arrow, Throw stone, Reflect Model Loading" ?
001b3f38: 00003021 addu r6,r0,r0			#r6 = 0 graphic rotation

All return:
001b3f3c: 3c03801c lui r3,0x801c
001b3f40: 84638b4c lh r3,-0x74b4(r3)			#load 3d step counter
001b3f44: 34020002 ori r2,r0,0x0002
001b3f48: 1462001a bne r3,r2,0x001b3fb4		#branch if not 2 steps remaining
001b3f4c: 2402ffff addiu r2,r0,0xffff
001b3f50: 3c03801c lui r3,0x801c
001b3f54: 8c638b64 lw r3,-0x749c(r3)			#load target's ID
001b3f58: 00000000 nop
001b3f5c: 10620015 beq r3,r2,0x001b3fb4		#branch if invalid target ID
001b3f60: 00000000 nop
001b3f64: 3c03801c lui r3,0x801c
001b3f68: 8c63c098 lw r3,-0x3f68(r3)			#load effect target data
001b3f6c: 00000000 nop
001b3f70: 8c640024 lw r4,0x0024(r3)			#load used weapon ID
001b3f74: 00000000 nop
001b3f78: 2482ff83 addiu r2,r4,0xff83
001b3f7c: 2c420003 sltiu r2,r2,0x0003
001b3f80: 1440000c bne r2,r0,0x001b3fb4		#branch if a bomb
001b3f84: 2482ff10 addiu r2,r4,0xff10
001b3f88: 2c42000e sltiu r2,r2,0x000e
001b3f8c: 14400009 bne r2,r0,0x001b3fb4		#branch if a chemist item
001b3f90: 00000000 nop
Arrow, Shuriken, Throw stone:
001b3f94: 8c620028 lw r2,0x0028(r3)			#load hit counter
001b3f98: 00000000 nop
001b3f9c: 10400005 beq r2,r0,0x001b3fb4		#branch if none
001b3fa0: 00000000 nop
001b3fa4: 90640012 lbu r4,0x0012(r3)			#load target misc ID
001b3fa8: 9065001c lbu r5,0x001c(r3)			#load attacker misc ID
001b3fac: 0c01a331 jal 0x00068cc4			#Call Bow Hardcoding routine Copy
001b3fb0: 00000000 nop
Effect Accompanied Items Return:
001b3fb4: 3c02801c lui r2,0x801c
001b3fb8: 84428b4c lh r2,-0x74b4(r2)			#load 3d steps counter
001b3fbc: 00000000 nop
001b3fc0: 18400006 blez r2,0x001b3fdc			#branch if 0 steps remaining
001b3fc4: 00401821 addu r3,r2,r0
001b3fc8: 2462ffff addiu r2,r3,0xffff			#3d step counter - 1
001b3fcc: 3c01801c lui r1,0x801c
001b3fd0: a4228b4c sh r2,-0x74b4(r1)			#store new 3d step counter
001b3fd4: 3c02801c lui r2,0x801c
001b3fd8: 84428b4c lh r2,-0x74b4(r2)			#load 3d step counter
001b3fdc: 00000000 nop
001b3fe0: 14400039 bne r2,r0,0x001b40c8		#branch if not 0
001b3fe4: 34040001 ori r4,r0,0x0001
001b3fe8: 3c02801c lui r2,0x801c
001b3fec: 8c42c098 lw r2,-0x3f68(r2)			#load effect target data
001b3ff0: 00000000 nop
001b3ff4: 90440030 lbu r4,0x0030(r2)			#
001b3ff8: 00000000 nop
001b3ffc: 10800007 beq r4,r0,0x001b401c		#branch if 0x30? is 0
001b4000: 00000000 nop
001b4004: 0c06b709 jal 0x001adc24			#001adc24 - 001add50
001b4008: 00000000 nop
001b400c: 3c02801c lui r2,0x801c
001b4010: 8c42c098 lw r2,-0x3f68(r2)			#load effect target data
001b4014: 00000000 nop
001b4018: a0400030 sb r0,0x0030(r2)			#store 0 0x30?
001b401c: 3c03801c lui r3,0x801c
001b4020: 8c63c098 lw r3,-0x3f68(r3)
001b4024: 00000000 nop
001b4028: 9462001a lhu r2,0x001a(r3)			#?				// may instead be secondary effect ID?
001b402c: 00000000 nop
001b4030: 1440000d bne r2,r0,0x001b4068		#branch if valid?
001b4034: 00000000 nop
001b4038: 9062001d lbu r2,0x001d(r3)			#load secondary effect type?	// may instead be effect executing phase?
001b403c: 00000000 nop
001b4040: 2442fffd addiu r2,r2,0xfffd
001b4044: 2c420002 sltiu r2,r2,0x0002			#
001b4048: 14400007 bne r2,r0,0x001b4068		#branch if secondary effect is golem?	//may instead branch if effect has loaded its palette and is currently executing
001b404c: 00000000 nop
001b4050: 0c068620 jal 0x001a1880			#Increment effect section address loading directive
001b4054: 00000000 nop
001b4058: 0c0237ba jal 0x0008dee8			#Set Event Speed Inner		// this code may be in place so that throwing a bomb doesn't speed up effect animations. interesting
001b405c: 34040002 ori r4,r0,0x0002			#set event speed to slow
001b4060: 0806d02c j 0x001b40b0
001b4064: 00000000 nop
No additional effects to play?
001b4068: 0c068632 jal 0x001a18c8			#load current effect playing phase
001b406c: 00000000 nop
001b4070: 34030001 ori r3,r0,0x0001
001b4074: 1443000e bne r2,r3,0x001b40b0		#branch if not in starting phase
001b4078: 00000000 nop
001b407c: 3c03801c lui r3,0x801c
001b4080: 8c63c098 lw r3,-0x3f68(r3)			#load effect target data
001b4084: 00000000 nop
001b4088: 8c620028 lw r2,0x0028(r3)			#load hit counter
001b408c: 00000000 nop
001b4090: 10400005 beq r2,r0,0x001b40a8		#branch if 0 hits
001b4094: 00000000 nop
001b4098: 90640012 lbu r4,0x0012(r3)			#load target misc ID
001b409c: 9065001c lbu r5,0x001c(r3)			#load caster misc ID
001b40a0: 0c01a331 jal 0x00068cc4			#Call Bow Hardcoding routine Copy
001b40a4: 00000000 nop
001b40a8: 0c068629 jal 0x001a18a4			#Set Effect phase to No Effect
001b40ac: 00000000 nop
001b40b0: 3c03801c lui r3,0x801c
001b40b4: 8c63c098 lw r3,-0x3f68(r3)			#load effect target data
001b40b8: 34020003 ori r2,r0,0x0003
001b40bc: 0806cf4c j 0x001b3d30			#return r2 = 1 and end.
001b40c0: ac620008 sw r2,0x0008(r3)			#store secondary effect phase to finalising
Finalising
001b40c4: 00002021 addu r4,r0,r0			#return projectile finalised
All Return:
001b40c8: 00801021 addu r2,r4,r0			#r2 = 1 if effect is still playing. 0 if it has finished.
001b40cc: 8fbf009c lw r31,0x009c(r29)
001b40d0: 8fb60098 lw r22,0x0098(r29)
001b40d4: 8fb50094 lw r21,0x0094(r29)
001b40d8: 8fb40090 lw r20,0x0090(r29)
001b40dc: 8fb3008c lw r19,0x008c(r29)
001b40e0: 8fb20088 lw r18,0x0088(r29)
001b40e4: 8fb10084 lw r17,0x0084(r29)
001b40e8: 8fb00080 lw r16,0x0080(r29)
001b40ec: 27bd00a0 addiu r29,r29,0x00a0
001b40f0: 03e00008 jr r31
001b40f4: 00000000 nop