Arrow, Throw stone, Reflect Model Loading

From Final Fantasy Hacktics Wiki
Revision as of 05:15, 22 March 2023 by Talcall (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Inputs:
  • r4 = p1
- pre-effect rotation matrix
  • r5 = p2
- pre-effect translation matrix
  • r6 = p3
- post-effect rotation matrix
  • r7 = p4
- scalar vector matrix (scales model size)
the preliminary calculation is done as follows:
{Rotation matrix(r4) x Vector matrix(Effect) + Translation matrix(r5)} x {1/4096 * [Rotation matrix(r6) x Vector Matrix(r7)]} x Rotation matrix(camera) + Translation matrix(camera)
{R4 x VE + T5} x {1/4096 * [R6 x V7]} x RC + TC
Produces a table of x y z vectors per model point.
Then assigns an RGB palette to every point and constructs the polygons for the model.

001ae340: 27bdfef0 addiu r29,r29,0xfef0		stack - 0x110
001ae344: afb400f8 sw r20,0x00f8(r29)
001ae348: 00a0a021 addu r20,r5,r0			#stack pointer
001ae34c: afb60100 sw r22,0x0100(r29)
001ae350: 00c0b021 addu r22,r6,r0			#stack pointer
001ae354: afb70104 sw r23,0x0104(r29)
001ae358: 00e0b821 addu r23,r7,r0			#stack pointer
001ae35c: afb000e8 sw r16,0x00e8(r29)
001ae360: 27b00088 addiu r16,r29,0x0088
001ae364: afbe0108 sw r30,0x0108(r29)
001ae368: 8fbe0120 lw r30,0x0120(r29)			#load parsed argument (Particle byte BB)
001ae36c: 02002821 addu r5,r16,r0			#stack + 0x88
001ae370: afbf010c sw r31,0x010c(r29)
001ae374: afb500fc sw r21,0x00fc(r29)
001ae378: afb300f4 sw r19,0x00f4(r29)
001ae37c: afb200f0 sw r18,0x00f0(r29)
001ae380: 0c007596 jal 0x0001d658			#Set Rotation matrix elements - r4 is input for angles. stores rotation matrix R in stack + 0x88
001ae384: afb100ec sw r17,0x00ec(r29)
001ae388: 02002021 addu r4,r16,r0			#stack + 0x88
001ae38c: afa000a4 sw r0,0x00a4(r29)
001ae390: afa000a0 sw r0,0x00a0(r29)
001ae394: 0c00742a jal 0x0001d0a8			#Store Rotation matrix elements to GTE
001ae398: afa0009c sw r0,0x009c(r29)			#sets no translation vectors (ok.)
001ae39c: 0c00744e jal 0x0001d138			#Store Translation Vectors to GTE
001ae3a0: 02002021 addu r4,r16,r0
001ae3a4: 00008821 addu r17,r0,r0
001ae3a8: 33c200ff andi r2,r30,0x00ff			move Model ID to r2
001ae3ac: 00021080 sll r2,r2,0x02			ID * 4
001ae3b0: 3c01801c lui r1,0x801c
001ae3b4: 00220821 addu r1,r1,r2
001ae3b8: 8c358534 lw r21,-0x7acc(r1)			0x801b8534 + ID * 4 (pointers to model data, 0x801b69dc - arrow, 0x801b6d00 - stone, 0x801b6f00 - reflect)
001ae3bc: 3c121f80 lui r18,0x1f80
001ae3c0: 8ea2000c lw r2,0x000c(r21)			pointer to table of points
001ae3c4: 8eb30010 lw r19,0x0010(r21)			No. points
001ae3c8: 2442000c addiu r2,r2,0x000c
001ae3cc: 1a600017 blez r19,0x001ae42c			branch if 0 points
001ae3d0: 02a21021 addu r2,r21,r2			move model pointer up by point pointer
001ae3d4: 3c031f80 lui r3,0x1f80
001ae3d8: 00402021 addu r4,r2,r0			r4 = model point pointer
001ae3dc: 00806021 addu r12,r4,r0			r12 = model point pointer
001ae3e0: c9800000 lwc2 gtedr00_vxy0,0x0000(r12)	xy vector
001ae3e4: c9810004 lwc2 gtedr01_vz0,0x0004(r12)	z0 vector
001ae3e8: 00000000 nop
001ae3ec: 00000000 nop
001ae3f0: 4a480012 mvmva				multiply loaded vectors by GTE
001ae3f4: 00606021 addu r12,r3,r0			vector storage 0x1f800000
001ae3f8: e9990000 swc2 gtedr25_mac1,0x0000(r12)	X,
001ae3fc: e99a0004 swc2 gtedr26_mac2,0x0004(r12)	Y,
001ae400: e99b0008 swc2 gtedr27_mac3,0x0008(r12)	Z, vectors store into RAM
001ae404: 2462000c addiu r2,r3,0x000c
001ae408: 00406021 addu r12,r2,r0			0x1f800000 + 0xc
001ae40c: 484df800 cfc2 r13,gtecr31_flag		"copy from coprocessor" undoubtedly someone will need that. moves gtecr31_flag into r31. 
001ae410: 00000000 nop
001ae414: ad8d0000 sw r13,0x0000(r12)			stores GTE CR flag to 0xc.
001ae418: 24630010 addiu r3,r3,0x0010			0x1f800000 + 0x10 * loop
001ae41c: 26310001 addiu r17,r17,0x0001
001ae420: 0233102a slt r2,r17,r19
001ae424: 1440ffed bne r2,r0,0x001ae3dc		loop as many times as there are vectors
001ae428: 24840008 addiu r4,r4,0x0008			vector pointer + 0x8 * loop
001ae42c: 02c02021 addu r4,r22,r0			
001ae430: 27b00088 addiu r16,r29,0x0088		
001ae434: 0c007596 jal 0x0001d658			Set Rotation matrix elements
001ae438: 02002821 addu r5,r16,r0			stack + 0x88 - destination for matrix, input r6 for angles
001ae43c: 02002021 addu r4,r16,r0			parse matrix stack address
001ae440: 0c007278 jal 0x0001c9e0			Multiply Rotation Matrix r4 by Input Vector r5 - obtain new rotation matrix, with input r5 as the maximum per cell instead of 4096.
001ae444: 02e02821 addu r5,r23,r0			
001ae448: 8e820000 lw r2,0x0000(r20)			load translation x (inputs from mother routine.)
001ae44c: 00000000 nop
001ae450: afa2009c sw r2,0x009c(r29)			store translation x
001ae454: 8e820004 lw r2,0x0004(r20)			load translation y
001ae458: 02002021 addu r4,r16,r0			stack + 0x88 (rotation + translation matrix from input)
001ae45c: afa200a0 sw r2,0x00a0(r29)			store translation y
001ae460: 8e820008 lw r2,0x0008(r20)			load translation z
001ae464: 00008821 addu r17,r0,r0
001ae468: 0c00742a jal 0x0001d0a8			Store Rotation matrix elements to GTE 
001ae46c: afa200a4 sw r2,0x00a4(r29)			store translation z
001ae470: 0c00744e jal 0x0001d138			Store Translation Vectors to GTE
001ae474: 02002021 addu r4,r16,r0
001ae478: 1a60001e blez r19,0x001ae4f4			branch if no polygons
001ae47c: 27a400a8 addiu r4,r29,0x00a8			stack + 0xa8
001ae480: 02401821 addu r3,r18,r0			was lui r3 0x1f80 too hard?
001ae484: 94620000 lhu r2,0x0000(r3)			load polygon x vector
001ae488: 00000000 nop
001ae48c: a7a200a8 sh r2,0x00a8(r29)			move to stack
001ae490: 94620004 lhu r2,0x0004(r3)			load polygon y vector
001ae494: 00000000 nop
001ae498: a7a200aa sh r2,0x00aa(r29)			move to stack
001ae49c: 94620008 lhu r2,0x0008(r3)			load polygon z vector
001ae4a0: 00000000 nop
001ae4a4: a7a200ac sh r2,0x00ac(r29)			move to stack
001ae4a8: 00806021 addu r12,r4,r0			r12 = pointer to stack
001ae4ac: c9800000 lwc2 gtedr00_vxy0,0x0000(r12)	load vector xy from stack
001ae4b0: c9810004 lwc2 gtedr01_vz0,0x0004(r12)	load vector z0 from stack
001ae4b4: 00000000 nop
001ae4b8: 00000000 nop
001ae4bc: 4a480012 mvmva				multiply vectors by GTE
001ae4c0: 00606021 addu r12,r3,r0
001ae4c4: e9990000 swc2 gtedr25_mac1,0x0000(r12)
001ae4c8: e99a0004 swc2 gtedr26_mac2,0x0004(r12)
001ae4cc: e99b0008 swc2 gtedr27_mac3,0x0008(r12)	store vectors after multiplication
001ae4d0: 2462000c addiu r2,r3,0x000c
001ae4d4: 00406021 addu r12,r2,r0
001ae4d8: 484df800 cfc2 r13,gtecr31_flag		GTE CR flag?
001ae4dc: 00000000 nop
001ae4e0: ad8d0000 sw r13,0x0000(r12)			store
001ae4e4: 26310001 addiu r17,r17,0x0001		
001ae4e8: 0233102a slt r2,r17,r19
001ae4ec: 1440ffe5 bne r2,r0,0x001ae484		loop for all vectors
001ae4f0: 24630010 addiu r3,r3,0x0010			vector pointer + 0x10
001ae4f4: 3c10800a lui r16,0x800a
001ae4f8: 26108a24 addiu r16,r16,0x8a24
001ae4fc: 0c00742a jal 0x0001d0a8			Store Rotation matrix elements to GTE - camera matrix
001ae500: 02002021 addu r4,r16,r0			camera matrix
001ae504: 0c00744e jal 0x0001d138			Store Translation Vectors to GTE - camera matrix
001ae508: 02002021 addu r4,r16,r0
001ae50c: 1a60001f blez r19,0x001ae58c			branch if no points
001ae510: 00008821 addu r17,r0,r0			
001ae514: 27a400a8 addiu r4,r29,0x00a8
001ae518: 02401821 addu r3,r18,r0
001ae51c: 94620000 lhu r2,0x0000(r3)			load x vector
001ae520: 00000000 nop
001ae524: a7a200a8 sh r2,0x00a8(r29)			store in stack
001ae528: 94620004 lhu r2,0x0004(r3)			load y vector
001ae52c: 00000000 nop
001ae530: a7a200aa sh r2,0x00aa(r29)			store in stack
001ae534: 94620008 lhu r2,0x0008(r3)			load z vector
001ae538: 00000000 nop
001ae53c: a7a200ac sh r2,0x00ac(r29)			store in stack
001ae540: 00806021 addu r12,r4,r0			vector matrix pointer
001ae544: c9800000 lwc2 gtedr00_vxy0,0x0000(r12)
001ae548: c9810004 lwc2 gtedr01_vz0,0x0004(r12)
001ae54c: 00000000 nop
001ae550: 00000000 nop
001ae554: 4a480012 mvmva
001ae558: 00606021 addu r12,r3,r0
001ae55c: e9990000 swc2 gtedr25_mac1,0x0000(r12)
001ae560: e99a0004 swc2 gtedr26_mac2,0x0004(r12)
001ae564: e99b0008 swc2 gtedr27_mac3,0x0008(r12)	load and store vectors precisely where they were loaded from.
001ae568: 2462000c addiu r2,r3,0x000c
001ae56c: 00406021 addu r12,r2,r0
001ae570: 484df800 cfc2 r13,gtecr31_flag
001ae574: 00000000 nop
001ae578: ad8d0000 sw r13,0x0000(r12)
001ae57c: 26310001 addiu r17,r17,0x0001
001ae580: 0233102a slt r2,r17,r19
001ae584: 1440ffe5 bne r2,r0,0x001ae51c		repeat for all polygons
001ae588: 24630010 addiu r3,r3,0x0010
001ae58c: 02a02021 addu r4,r21,r0			parse BB associated data pointer
001ae590: 0c06a39f jal 0x001a8e7c			001a8e74 - 001a8f10 don't mind the incorrect address, there's a jr r31 at the start. ignore it. moves data pointers to ram regarding effect data. returns No. polygons of model.
001ae594: 00002821 addu r5,r0,r0			r5 = 0 (not important.)
001ae598: 00008021 addu r16,r0,r0
001ae59c: 0000a021 addu r20,r0,r0
001ae5a0: 0040a821 addu r21,r2,r0			No. Polygons in model
001ae5a4: 33c300ff andi r3,r30,0x00ff			move model ID to r3
001ae5a8: 34020001 ori r2,r0,0x0001
001ae5ac: 10620127 beq r3,r2,0x001aea4c		branch if model is stone
001ae5b0: 00009821 addu r19,r0,r0			r19 = 0
001ae5b4: 28620002 slti r2,r3,0x0002
001ae5b8: 10400005 beq r2,r0,0x001ae5d0		branch if model is reflect
001ae5bc: 00000000 nop
001ae5c0: 1060000a beq r3,r0,0x001ae5ec		branch if model is arrow
001ae5c4: 00000000 nop
001ae5c8: 0806bc35 j 0x001af0d4			if no model.
001ae5cc: 00000000 nop
001ae5d0: 34020002 ori r2,r0,0x0002
001ae5d4: 106201a4 beq r3,r2,0x001aec68		branch if reflect model
001ae5d8: 34020003 ori r2,r0,0x0003
001ae5dc: 1062023a beq r3,r2,0x001aeec8		Branch if shuriken model
001ae5e0: 00000000 nop
001ae5e4: 0806bc35 j 0x001af0d4			error
001ae5e8: 00000000 nop
Model = arrow
001ae5ec: 3c02801c lui r2,0x801c
001ae5f0: 8c42c098 lw r2,-0x3f68(r2)			loads effect target data
001ae5f4: 00000000 nop
001ae5f8: 8c570050 lw r23,0x0050(r2)			loads effect data RAM pointer
001ae5fc: 1aa002b5 blez r21,0x001af0d4			end if No. polygons <= 0 (error)
001ae600: 00008821 addu r17,r0,r0			
001ae604: 3c1000ff lui r16,0x00ff
001ae608: 3610ffff ori r16,r16,0xffff			0x00ffffff
001ae60c: 3c16ff00 lui r22,0xff00			0xff000000
001ae610: 0c06a3c5 jal 0x001a8f14			001a8f14 - 001a90cc moves Polygon data to stack
001ae614: 27a40010 addiu r4,r29,0x0010			stack + 0x10
001ae618: 93a30013 lbu r3,0x0013(r29)
001ae61c: 34020039 ori r2,r0,0x0039
001ae620: 14620090 bne r3,r2,0x001ae864		branch if polygon only has 3 points
001ae624: 00000000 nop
Arrow quad Polygon
001ae628: 3c03801c lui r3,0x801c
001ae62c: 8c63c090 lw r3,-0x3f70(r3)			counter?
001ae630: 93a40014 lbu r4,0x0014(r29)			Palette byte
001ae634: 000310c0 sll r2,r3,0x03
001ae638: 00431023 subu r2,r2,r3
001ae63c: 00021080 sll r2,r2,0x02
001ae640: 00431021 addu r2,r2,r3
001ae644: 00021080 sll r2,r2,0x02
001ae648: 00431021 addu r2,r2,r3
001ae64c: 00021080 sll r2,r2,0x02
001ae650: 244200e0 addiu r2,r2,0x00e0			counter? * 0x1d4 + 0xe0
001ae654: 02e21021 addu r2,r23,r2			effect data pointer
001ae658: 001418c0 sll r3,r20,0x03			r20 counter * 8
001ae65c: 00741821 addu r3,r3,r20
001ae660: 00031880 sll r3,r3,0x02			r20 counter * 0x24
001ae664: 00433021 addu r6,r2,r3			Model data (table 0x1d4 and sub table 0x24; (decimal) 2 table entries, 13 sub table entries)
001ae668: a0c40004 sb r4,0x0004(r6)			store palette byte in Model
001ae66c: 93a20015 lbu r2,0x0015(r29)
001ae670: 00000000 nop
001ae674: a0c20005 sb r2,0x0005(r6)
001ae678: 93a20016 lbu r2,0x0016(r29)
001ae67c: 00000000 nop
001ae680: a0c20006 sb r2,0x0006(r6)
001ae684: 93a20018 lbu r2,0x0018(r29)
001ae688: 00000000 nop
001ae68c: a0c2000c sb r2,0x000c(r6)
001ae690: 93a20019 lbu r2,0x0019(r29)
001ae694: 00000000 nop
001ae698: a0c2000d sb r2,0x000d(r6)
001ae69c: 93a2001a lbu r2,0x001a(r29)
001ae6a0: 00000000 nop
001ae6a4: a0c2000e sb r2,0x000e(r6)
001ae6a8: 93a2001c lbu r2,0x001c(r29)
001ae6ac: 00000000 nop
001ae6b0: a0c20014 sb r2,0x0014(r6)
001ae6b4: 93a2001d lbu r2,0x001d(r29)
001ae6b8: 00000000 nop
001ae6bc: a0c20015 sb r2,0x0015(r6)
001ae6c0: 93a2001e lbu r2,0x001e(r29)
001ae6c4: 00000000 nop
001ae6c8: a0c20016 sb r2,0x0016(r6)
001ae6cc: 93a20020 lbu r2,0x0020(r29)
001ae6d0: 00000000 nop
001ae6d4: a0c2001c sb r2,0x001c(r6)
001ae6d8: 93a20021 lbu r2,0x0021(r29)
001ae6dc: 00000000 nop
001ae6e0: a0c2001d sb r2,0x001d(r6)
001ae6e4: 93a20022 lbu r2,0x0022(r29)
001ae6e8: 00000000 nop
001ae6ec: a0c2001e sb r2,0x001e(r6)			moves palette data 1 byte at a time.
001ae6f0: 97a20078 lhu r2,0x0078(r29)			first Point ID
001ae6f4: 00000000 nop
001ae6f8: 00021100 sll r2,r2,0x04			
001ae6fc: 02421021 addu r2,r18,r2			0x1f800000 + ptr*16
001ae700: 94420000 lhu r2,0x0000(r2)			load Point x
001ae704: 00000000 nop
001ae708: a4c20008 sh r2,0x0008(r6)			store vector X
001ae70c: 97a20078 lhu r2,0x0078(r29)			First point ID
001ae710: 00000000 nop
001ae714: 00021100 sll r2,r2,0x04
001ae718: 02421021 addu r2,r18,r2
001ae71c: 94420004 lhu r2,0x0004(r2)			Point y
001ae720: 00000000 nop
001ae724: a4c2000a sh r2,0x000a(r6)			store more Point data
001ae728: 97a20078 lhu r2,0x0078(r29)			First point
001ae72c: 97a3007a lhu r3,0x007a(r29)			Second point
001ae730: 00021100 sll r2,r2,0x04
001ae734: 02421021 addu r2,r18,r2
001ae738: 00031900 sll r3,r3,0x04
001ae73c: 02431821 addu r3,r18,r3
001ae740: 8c450008 lw r5,0x0008(r2)			first point Z0
001ae744: 94620000 lhu r2,0x0000(r3)			second point x
001ae748: 00000000 nop
001ae74c: a4c20010 sh r2,0x0010(r6)
001ae750: 97a2007a lhu r2,0x007a(r29)			the other halfword from above (second to last word of table?)
001ae754: 00000000 nop
001ae758: 00021100 sll r2,r2,0x04
001ae75c: 02421021 addu r2,r18,r2
001ae760: 94420004 lhu r2,0x0004(r2)			2nd point y
001ae764: 00000000 nop
001ae768: a4c20012 sh r2,0x0012(r6)			store
001ae76c: 97a3007a lhu r3,0x007a(r29)			Second point ID
001ae770: 97a2007c lhu r2,0x007c(r29)			Third point ID
001ae774: 00031900 sll r3,r3,0x04
001ae778: 02431821 addu r3,r18,r3
001ae77c: 00021100 sll r2,r2,0x04
001ae780: 02421021 addu r2,r18,r2
001ae784: 94420000 lhu r2,0x0000(r2)			3rd Point x
001ae788: 8c640008 lw r4,0x0008(r3)			2nd Point z0
001ae78c: a4c20018 sh r2,0x0018(r6)			store
001ae790: 97a2007c lhu r2,0x007c(r29)			
001ae794: 00000000 nop
001ae798: 00021100 sll r2,r2,0x04
001ae79c: 02421021 addu r2,r18,r2
001ae7a0: 94420004 lhu r2,0x0004(r2)			3rd point y
001ae7a4: 00000000 nop
001ae7a8: a4c2 001a sh r2,0x001a(r6)
001ae7ac: 97a3007c lhu r3,0x007c(r29)
001ae7b0: 97a2007e lhu r2,0x007e(r29)			4th point ID
001ae7b4: 00031900 sll r3,r3,0x04
001ae7b8: 02431821 addu r3,r18,r3
001ae7bc: 00021100 sll r2,r2,0x04
001ae7c0: 02421021 addu r2,r18,r2
001ae7c4: 94420000 lhu r2,0x0000(r2)			4th point x
001ae7c8: 8c630008 lw r3,0x0008(r3)			3rd point z0
001ae7cc: a4c20020 sh r2,0x0020(r6)
001ae7d0: 97a2007e lhu r2,0x007e(r29)
001ae7d4: 00000000 nop
001ae7d8: 00021100 sll r2,r2,0x04
001ae7dc: 02421021 addu r2,r18,r2
001ae7e0: 94420004 lhu r2,0x0004(r2)			4th point y
001ae7e4: 26940001 addiu r20,r20,0x0001		sub table counter ++
001ae7e8: a4c20022 sh r2,0x0022(r6)
001ae7ec: 97a2007e lhu r2,0x007e(r29)			4th point z0
001ae7f0: 00a42821 addu r5,r5,r4			first z0 + second z0
001ae7f4: 00021100 sll r2,r2,0x04
001ae7f8: 02421021 addu r2,r18,r2
001ae7fc: 8c420008 lw r2,0x0008(r2)			4th point Z0
001ae800: 00a32821 addu r5,r5,r3			1st Z0 + 2nd Z0 + 3rd Z0
001ae804: 00a22821 addu r5,r5,r2			sum of all z0 vectors
001ae808: 04a10002 bgez r5,0x001ae814			branch if not negative
001ae80c: 00a01021 addu r2,r5,r0			
001ae810: 24a2000f addiu r2,r5,0x000f			
001ae814: 00022903 sra r5,r2,0x04			find average of z0 vectors / 4
001ae818: 24a2ffff addiu r2,r5,0xffff
001ae81c: 2c42017e sltiu r2,r2,0x017e			that seems, oddly specific?
001ae820: 1040000f beq r2,r0,0x001ae860		branch if not the case
001ae824: 00052080 sll r4,r5,0x02			depth pointer
001ae828: 3c02801c lui r2,0x801c
001ae82c: 8c42c0cc lw r2,-0x3f34(r2)			VRAM Model depth table
001ae830: 8cc30000 lw r3,0x0000(r6)			address to r6 pointer
001ae834: 00822021 addu r4,r4,r2			depth data
001ae838: 8c820000 lw r2,0x0000(r4)			pointer to polygon at that current depth?
001ae83c: 00761824 and r3,r3,r22			0x00*(r6) AND address marker type? (0x80 implies SRAM?)
001ae840: 00501024 and r2,r2,r16			0x00*(r4) AND Address?
001ae844: 00621825 or r3,r3,r2				Bit combine
001ae848: acc30000 sw r3,0x0000(r6)			store previous model address in r6 as SRAM pointer
001ae84c: 8c820000 lw r2,0x0000(r4)
001ae850: 00d01824 and r3,r6,r16			old 0x00*(r6) AND Address
001ae854: 00561024 and r2,r2,r22			0x00*(r4) AND Address marker type?
001ae858: 00431025 or r2,r2,r3				bit combine
001ae85c: ac820000 sw r2,0x0000(r4)			Store new model address into depth table as VRAM pointer?
001ae860: 93a30013 lbu r3,0x0013(r29)			load 4th byte of 1st table word entry
001ae864: 34020031 ori r2,r0,0x0031
Arrow Tri polygon
001ae868: 14620073 bne r3,r2,0x001aea38		branch if polygon has 4 points
001ae86c: 26310001 addiu r17,r17,0x0001		r17 counter ++
001ae870: 3c02801c lui r2,0x801c
001ae874: 8c42c090 lw r2,-0x3f70(r2)			counter?
001ae878: 93a40014 lbu r4,0x0014(r29)			1st byte of second word, again
001ae87c: 000218c0 sll r3,r2,0x03
001ae880: 00621823 subu r3,r3,r2
001ae884: 00031900 sll r3,r3,0x04			counter? * 0x70
001ae888: 02e31821 addu r3,r23,r3			effect data pointer?
001ae88c: 001310c0 sll r2,r19,0x03
001ae890: 00531023 subu r2,r2,r19
001ae894: 00021080 sll r2,r2,0x02			r19 counter * 0x1c
001ae898: 00623021 addu r6,r3,r2			r6 = 2 0x70 table entries with 4 0x1c sub-table entries per
001ae89c: a0c40004 sb r4,0x0004(r6)
001ae8a0: 93a20015 lbu r2,0x0015(r29)
001ae8a4: 00000000 nop
001ae8a8: a0c20005 sb r2,0x0005(r6)
001ae8ac: 93a20016 lbu r2,0x0016(r29)
001ae8b0: 00000000 nop
001ae8b4: a0c20006 sb r2,0x0006(r6)
001ae8b8: 93a20018 lbu r2,0x0018(r29)
001ae8bc: 00000000 nop
001ae8c0: a0c2000c sb r2,0x000c(r6)
001ae8c4: 93a20019 lbu r2,0x0019(r29)
001ae8c8: 00000000 nop
001ae8cc: a0c2000d sb r2,0x000d(r6)
001ae8d0: 93a2001a lbu r2,0x001a(r29)
001ae8d4: 00000000 nop
001ae8d8: a0c2000e sb r2,0x000e(r6)
001ae8dc: 93a2001c lbu r2,0x001c(r29)
001ae8e0: 00000000 nop
001ae8e4: a0c20014 sb r2,0x0014(r6)
001ae8e8: 93a2001d lbu r2,0x001d(r29)
001ae8ec: 00000000 nop
001ae8f0: a0c20015 sb r2,0x0015(r6)
001ae8f4: 93a2001e lbu r2,0x001e(r29)
001ae8f8: 00000000 nop
001ae8fc: a0c20016 sb r2,0x0016(r6)			load and move bytes 1 at a time
001ae900: 97a20078 lhu r2,0x0078(r29)
001ae904: 00000000 nop
001ae908: 00021100 sll r2,r2,0x04
001ae90c: 02421021 addu r2,r18,r2
001ae910: 94420000 lhu r2,0x0000(r2)			1st point X
001ae914: 00000000 nop
001ae918: a4c20008 sh r2,0x0008(r6)
001ae91c: 97a20078 lhu r2,0x0078(r29)
001ae920: 00000000 nop
001ae924: 00021100 sll r2,r2,0x04
001ae928: 02421021 addu r2,r18,r2
001ae92c: 94420004 lhu r2,0x0004(r2)			1st point Y
001ae930: 00000000 nop
001ae934: a4c2000a sh r2,0x000a(r6)
001ae938: 97a20078 lhu r2,0x0078(r29)
001ae93c: 97a3007a lhu r3,0x007a(r29)
001ae940: 00021100 sll r2,r2,0x04
001ae944: 02421021 addu r2,r18,r2
001ae948: 00031900 sll r3,r3,0x04
001ae94c: 02431821 addu r3,r18,r3
001ae950: 8c450008 lw r5,0x0008(r2)			1st point Z0
001ae954: 94620000 lhu r2,0x0000(r3)			2nd point X
001ae958: 00000000 nop
001ae95c: a4c20010 sh r2,0x0010(r6)
001ae960: 97a2007a lhu r2,0x007a(r29)
001ae964: 00000000 nop
001ae968: 00021100 sll r2,r2,0x04
001ae96c: 02421021 addu r2,r18,r2
001ae970: 94420004 lhu r2,0x0004(r2)			2nd point Y
001ae974: 00000000 nop
001ae978: a4c20012 sh r2,0x0012(r6)
001ae97c: 97a3007a lhu r3,0x007a(r29)
001ae980: 97a2007c lhu r2,0x007c(r29)
001ae984: 00031900 sll r3,r3,0x04
001ae988: 02431821 addu r3,r18,r3
001ae98c: 00021100 sll r2,r2,0x04
001ae990: 02421021 addu r2,r18,r2
001ae994: 94420000 lhu r2,0x0000(r2)			3rd point X
001ae998: 8c640008 lw r4,0x0008(r3)			2nd point Z0
001ae99c: a4c20018 sh r2,0x0018(r6)
001ae9a0: 97a2007c lhu r2,0x007c(r29)
001ae9a4: 00000000 nop
001ae9a8: 00021100 sll r2,r2,0x04
001ae9ac: 02421021 addu r2,r18,r2
001ae9b0: 94420004 lhu r2,0x0004(r2)			3rd point Y
001ae9b4: 3c032aaa lui r3,0x2aaa
001ae9b8: a4c2001a sh r2,0x001a(r6)
001ae9bc: 97a2007c lhu r2,0x007c(r29)
001ae9c0: 3463aaab ori r3,r3,0xaaab			r3 = 1/6th
001ae9c4: 00021100 sll r2,r2,0x04
001ae9c8: 02421021 addu r2,r18,r2
001ae9cc: 8c420008 lw r2,0x0008(r2)			z0 vector?
001ae9d0: 00a42821 addu r5,r5,r4			
001ae9d4: 00a22821 addu r5,r5,r2			add all 3 z0? vectors?
001ae9d8: 00a30018 mult r5,r3				find average of all z0 vectors / 2
001ae9dc: 00051fc3 sra r3,r5,0x1f
001ae9e0: 00001010 mfhi r2
001ae9e4: 00021043 sra r2,r2,0x01			average of all z0 vectors / 4
001ae9e8: 00432823 subu r5,r2,r3			rounding for negatives
001ae9ec: 24a2ffff addiu r2,r5,0xffff
001ae9f0: 2c42017e sltiu r2,r2,0x017e			
001ae9f4: 10400010 beq r2,r0,0x001aea38		branch if further than render distance (?)
001ae9f8: 26730001 addiu r19,r19,0x0001		r19 counter ++
001ae9fc: 00052080 sll r4,r5,0x02			depth table index
001aea00: 3c02801c lui r2,0x801c
001aea04: 8c42c0cc lw r2,-0x3f34(r2)			Model Depth table pointer
001aea08: 8cc30000 lw r3,0x0000(r6)			
001aea0c: 00822021 addu r4,r4,r2			pointer to polygon pointer occupied by current z0 depth
001aea10: 8c820000 lw r2,0x0000(r4)			pointer to polygon occupied by new polygon's depth
001aea14: 00761824 and r3,r3,r22			new polygon address type?
001aea18: 00501024 and r2,r2,r16			old polygon address?
001aea1c: 00621825 or r3,r3,r2				
001aea20: acc30000 sw r3,0x0000(r6)			store old pointer into r6 as SRAM pointer?
001aea24: 8c820000 lw r2,0x0000(r4)			pointer to polygon occupied by new polygon's depth
001aea28: 00d01824 and r3,r6,r16			pointer to new model's polygon data
001aea2c: 00561024 and r2,r2,r22			Address type of old polygon?
001aea30: 00431025 or r2,r2,r3				
001aea34: ac820000 sw r2,0x0000(r4)			store new polygon's data pointer as VRAM pointer?
001aea38: 0235102a slt r2,r17,r21
001aea3c: 104001a5 beq r2,r0,0x001af0d4		
001aea40: 00000000 nop
001aea44: 0806b984 j 0x001ae610			do for all polygons in model
001aea48: 00000000 nop
Model = stone
001aea4c: 3c02801c lui r2,0x801c
001aea50: 8c42c098 lw r2,-0x3f68(r2)			load effect target data
001aea54: 00000000 nop
001aea58: 8c560050 lw r22,0x0050(r2)			effect LBA ram pointer
001aea5c: 1aa0019d blez r21,0x001af0d4			branch if no table sections here.
001aea60: 00008821 addu r17,r0,r0
001aea64: 3c1300ff lui r19,0x00ff
001aea68: 3673ffff ori r19,r19,0xffff
001aea6c: 3c14ff00 lui r20,0xff00			0xff00000000 and 0x00ffffffff
001aea70: 00008021 addu r16,r0,r0
001aea74: 0c06a3c5 jal 0x001a8f14			001a8f14 - 001a90cc - moves some data into the stack from secondary effect data table
001aea78: 27a40010 addiu r4,r29,0x0010
001aea7c: 93a30013 lbu r3,0x0013(r29)			4th byte first word
001aea80: 34020031 ori r2,r0,0x0031
001aea84: 14620073 bne r3,r2,0x001aec54		branch if not 0x31
001aea88: 26310001 addiu r17,r17,0x0001
001aea8c: 3c03801c lui r3,0x801c
001aea90: 8c63c090 lw r3,-0x3f70(r3)			counter?
001aea94: 00000000 nop
001aea98: 00031080 sll r2,r3,0x02
001aea9c: 00431021 addu r2,r2,r3
001aeaa0: 00021080 sll r2,r2,0x02
001aeaa4: 00431021 addu r2,r2,r3
001aeaa8: 00021100 sll r2,r2,0x04			
001aeaac: 02c21021 addu r2,r22,r2			counter * 0x150 (?) + effect data pointer
001aeab0: 93a30014 lbu r3,0x0014(r29)
001aeab4: 00503021 addu r6,r2,r16			effect data + r16 pointer (0x1c; 0xc sub table entries)
001aeab8: a0c30004 sb r3,0x0004(r6)
001aeabc: 93a20015 lbu r2,0x0015(r29)
001aeac0: 00000000 nop
001aeac4: a0c20005 sb r2,0x0005(r6)
001aeac8: 93a20016 lbu r2,0x0016(r29)
001aeacc: 00000000 nop
001aead0: a0c20006 sb r2,0x0006(r6)
001aead4: 93a20018 lbu r2,0x0018(r29)
001aead8: 00000000 nop
001aeadc: a0c2000c sb r2,0x000c(r6)
001aeae0: 93a20019 lbu r2,0x0019(r29)
001aeae4: 00000000 nop
001aeae8: a0c2000d sb r2,0x000d(r6)
001aeaec: 93a2001a lbu r2,0x001a(r29)
001aeaf0: 00000000 nop
001aeaf4: a0c2000e sb r2,0x000e(r6)
001aeaf8: 93a2001c lbu r2,0x001c(r29)
001aeafc: 00000000 nop
001aeb00: a0c20014 sb r2,0x0014(r6)
001aeb04: 93a2001d lbu r2,0x001d(r29)
001aeb08: 00000000 nop
001aeb0c: a0c20015 sb r2,0x0015(r6)
001aeb10: 93a2001e lbu r2,0x001e(r29)
001aeb14: 00000000 nop
001aeb18: a0c20016 sb r2,0x0016(r6)			move data here to there 1 byte at a time
001aeb1c: 97a20078 lhu r2,0x0078(r29)
001aeb20: 00000000 nop
001aeb24: 00021100 sll r2,r2,0x04
001aeb28: 02421021 addu r2,r18,r2
001aeb2c: 94420000 lhu r2,0x0000(r2)			x vector?
001aeb30: 00000000 nop
001aeb34: a4c20008 sh r2,0x0008(r6)
001aeb38: 97a20078 lhu r2,0x0078(r29)
001aeb3c: 00000000 nop
001aeb40: 00021100 sll r2,r2,0x04
001aeb44: 02421021 addu r2,r18,r2
001aeb48: 94420004 lhu r2,0x0004(r2)			y vector?
001aeb4c: 00000000 nop
001aeb50: a4c2000a sh r2,0x000a(r6)
001aeb54: 97a20078 lhu r2,0x0078(r29)
001aeb58: 97a3007a lhu r3,0x007a(r29)
001aeb5c: 00021100 sll r2,r2,0x04
001aeb60: 02421021 addu r2,r18,r2
001aeb64: 00031900 sll r3,r3,0x04
001aeb68: 02431821 addu r3,r18,r3
001aeb6c: 8c450008 lw r5,0x0008(r2)			Z0 vector?
001aeb70: 94620000 lhu r2,0x0000(r3)			x vector?
001aeb74: 00000000 nop
001aeb78: a4c20010 sh r2,0x0010(r6)
001aeb7c: 97a2007a lhu r2,0x007a(r29)
001aeb80: 00000000 nop
001aeb84: 00021100 sll r2,r2,0x04
001aeb88: 02421021 addu r2,r18,r2
001aeb8c: 94420004 lhu r2,0x0004(r2)			y vector?
001aeb90: 00000000 nop
001aeb94: a4c20012 sh r2,0x0012(r6)
001aeb98: 97a3007a lhu r3,0x007a(r29)
001aeb9c: 97a2007c lhu r2,0x007c(r29)
001aeba0: 00031900 sll r3,r3,0x04
001aeba4: 02431821 addu r3,r18,r3
001aeba8: 00021100 sll r2,r2,0x04
001aebac: 02421021 addu r2,r18,r2
001aebb0: 94420000 lhu r2,0x0000(r2)			x vector?
001aebb4: 8c640008 lw r4,0x0008(r3)			Z0 vector?
001aebb8: a4c20018 sh r2,0x0018(r6)
001aebbc: 97a2007c lhu r2,0x007c(r29)
001aebc0: 00000000 nop
001aebc4: 00021100 sll r2,r2,0x04
001aebc8: 02421021 addu r2,r18,r2
001aebcc: 94420004 lhu r2,0x0004(r2)			y vector?
001aebd0: 3c032aaa lui r3,0x2aaa
001aebd4: a4c2001a sh r2,0x001a(r6)
001aebd8: 97a2007c lhu r2,0x007c(r29)
001aebdc: 3463aaab ori r3,r3,0xaaab			r3 = 1/6
001aebe0: 00021100 sll r2,r2,0x04
001aebe4: 02421021 addu r2,r18,r2
001aebe8: 8c420008 lw r2,0x0008(r2)			Z0 vector
001aebec: 00a42821 addu r5,r5,r4
001aebf0: 00a22821 addu r5,r5,r2			sum all z0 vectors
001aebf4: 00a30018 mult r5,r3
001aebf8: 00051fc3 sra r3,r5,0x1f
001aebfc: 00001010 mfhi r2
001aec00: 00021043 sra r2,r2,0x01
001aec04: 00432823 subu r5,r2,r3			round Sum of Z0 vectors / 0xc
001aec08: 24a2ffff addiu r2,r5,0xffff
001aec0c: 2c42017e sltiu r2,r2,0x017e
001aec10: 10400010 beq r2,r0,0x001aec54
001aec14: 2610001c addiu r16,r16,0x001c		r16 effect counter + 0x1c
001aec18: 00052080 sll r4,r5,0x02
001aec1c: 3c02801c lui r2,0x801c
001aec20: 8c42c0cc lw r2,-0x3f34(r2)			Just read the same shit for triangle polygons on arrows, it's easier to find and completely identical.
001aec24: 8cc30000 lw r3,0x0000(r6)			
001aec28: 00822021 addu r4,r4,r2			
001aec2c: 8c820000 lw r2,0x0000(r4)			
001aec30: 00741824 and r3,r3,r20			
001aec34: 00531024 and r2,r2,r19
001aec38: 00621825 or r3,r3,r2
001aec3c: acc30000 sw r3,0x0000(r6)			
001aec40: 8c820000 lw r2,0x0000(r4)
001aec44: 00d31824 and r3,r6,r19
001aec48: 00541024 and r2,r2,r20			
001aec4c: 00431025 or r2,r2,r3
001aec50: ac820000 sw r2,0x0000(r4)			
001aec54: 0235102a slt r2,r17,r21
001aec58: 1040011e beq r2,r0,0x001af0d4
001aec5c: 00000000 nop
001aec60: 0806ba9d j 0x001aea74			loop for all polygons
001aec64: 00000000 nop
Model = reflect
001aec68: 3c04801c lui r4,0x801c
001aec6c: 8c84c098 lw r4,-0x3f68(r4)			loads effect target data
001aec70: 00000000 nop
001aec74: 8483000c lh r3,0x000c(r4)			interesting. but unsure
001aec78: 8c960050 lw r22,0x0050(r4)			load LBA ram effect data pointer
001aec7c: 00031040 sll r2,r3,0x01			0xc * 2
001aec80: 0043a021 addu r20,r2,r3			0xc* * 3
001aec84: 02b4102a slt r2,r21,r20			set if 0x20*(BB) < 0xc* * 3
001aec88: 10400002 beq r2,r0,0x001aec94		branch if 0xc* * 3 is greater
001aec8c: 00008821 addu r17,r0,r0
001aec90: 02a0a021 addu r20,r21,r0			r20 = min(0x20*(BB), 0xc* * 3)
001aec94: 1a80010f blez r20,0x001af0d4			branch if less than 0
001aec98: 3c1300ff lui r19,0x00ff
001aec9c: 3673ffff ori r19,r19,0xffff
001aeca0: 3c15ff00 lui r21,0xff00
001aeca4: 0c06a3c5 jal 0x001a8f14			001a8f14 - 001a90cc 
001aeca8: 27a40010 addiu r4,r29,0x0010
001aecac: 93a30013 lbu r3,0x0013(r29)
001aecb0: 34020037 ori r2,r0,0x0037
001aecb4: 1462007f bne r3,r2,0x001aeeb4		branch if 4th byte 1st word isn't 0x37
001aecb8: 26310001 addiu r17,r17,0x0001		r17 counter ++
001aecbc: 3c02801c lui r2,0x801c
001aecc0: 8c42c090 lw r2,-0x3f70(r2)			counter?
001aecc4: 00000000 nop
001aecc8: 00021900 sll r3,r2,0x04
001aeccc: 00621823 subu r3,r3,r2
001aecd0: 00031980 sll r3,r3,0x06
001aecd4: 24630018 addiu r3,r3,0x0018			counter * 0x3c0 + 0x18
001aecd8: 02c31821 addu r3,r22,r3			effect data table, 0x3c0 bytes long per entry
001aecdc: 00101080 sll r2,r16,0x02
001aece0: 00501021 addu r2,r2,r16
001aece4: 000210c0 sll r2,r2,0x03			sub table, 0x28 bytes pr entry
001aece8: 00623021 addu r6,r3,r2			effect data table, 0x3c0 long table entries + 0x28 long table sub-entries (0x18 subtables per.)
001aecec: 3c03801c lui r3,0x801c
001aecf0: 8c63c098 lw r3,-0x3f68(r3)			effect target data
001aecf4: 3402003f ori r2,r0,0x003f
001aecf8: a4c2001a sh r2,0x001a(r6)			store 0x3f in 0x1a*(r6)
001aecfc: 90620002 lbu r2,0x0002(r3)			load current effect target ID
001aed00: 00000000 nop
001aed04: 24427eff addiu r2,r2,0x7eff			current effect target ID + 0x7eff?
001aed08: a4c2000e sh r2,0x000e(r6)			each unit has a slightly different palette for reflect?
001aed0c: 93a20014 lbu r2,0x0014(r29)
001aed10: 00000000 nop
001aed14: a0c20004 sb r2,0x0004(r6)
001aed18: 93a20015 lbu r2,0x0015(r29)
001aed1c: 00000000 nop
001aed20: a0c20005 sb r2,0x0005(r6)
001aed24: 93a20016 lbu r2,0x0016(r29)
001aed28: 00000000 nop
001aed2c: a0c20006 sb r2,0x0006(r6)
001aed30: 93a20018 lbu r2,0x0018(r29)
001aed34: 00000000 nop
001aed38: a0c20010 sb r2,0x0010(r6)
001aed3c: 93a20019 lbu r2,0x0019(r29)
001aed40: 00000000 nop
001aed44: a0c20011 sb r2,0x0011(r6)
001aed48: 93a2 001a lbu r2,0x001a(r29)
001aed4c: 00000000 nop
001aed50: a0c20012 sb r2,0x0012(r6)
001aed54: 93a2001c lbu r2,0x001c(r29)
001aed58: 00000000 nop
001aed5c: a0c2001c sb r2,0x001c(r6)
001aed60: 93a2001d lbu r2,0x001d(r29)
001aed64: 00000000 nop
001aed68: a0c2001d sb r2,0x001d(r6)
001aed6c: 93a2001e lbu r2,0x001e(r29)
001aed70: 00000000 nop
001aed74: a0c2001e sb r2,0x001e(r6)
001aed78: 97a20028 lhu r2,0x0028(r29)
001aed7c: 00000000 nop
001aed80: a4c2000c sh r2,0x000c(r6)
001aed84: 97a2002a lhu r2,0x002a(r29)
001aed88: 00000000 nop
001aed8c: a4c20018 sh r2,0x0018(r6)
001aed90: 97a2002c lhu r2,0x002c(r29)			move palette data into r6
001aed94: 00000000 nop
001aed98: a4c20024 sh r2,0x0024(r6)
001aed9c: 97a20078 lhu r2,0x0078(r29)			Load first point
001aeda0: 00000000 nop
001aeda4: 00021100 sll r2,r2,0x04
001aeda8: 02421021 addu r2,r18,r2
001aedac: 94420000 lhu r2,0x0000(r2)			1st point X
001aedb0: 00000000 nop
001aedb4: a4c20008 sh r2,0x0008(r6)
001aedb8: 97a20078 lhu r2,0x0078(r29)			1st point
001aedbc: 00000000 nop
001aedc0: 00021100 sll r2,r2,0x04
001aedc4: 02421021 addu r2,r18,r2
001aedc8: 94420004 lhu r2,0x0004(r2)			1st point Y
001aedcc: 00000000 nop
001aedd0: a4c2000a sh r2,0x000a(r6)
001aedd4: 97a2007a lhu r2,0x007a(r29)			2nd point
001aedd8: 00000000 nop
001aeddc: 00021100 sll r2,r2,0x04
001aede0: 02421021 addu r2,r18,r2
001aede4: 94420000 lhu r2,0x0000(r2)			2nd point X
001aede8: 00000000 nop
001aedec: a4c20014 sh r2,0x0014(r6)
001aedf0: 97a2007a lhu r2,0x007a(r29)			2nd point
001aedf4: 00000000 nop
001aedf8: 00021100 sll r2,r2,0x04
001aedfc: 02421021 addu r2,r18,r2
001aee00: 94420004 lhu r2,0x0004(r2)			2nd point Y
001aee04: 00000000 nop
001aee08: a4c20016 sh r2,0x0016(r6)
001aee0c: 97a2007c lhu r2,0x007c(r29)			3rd point
001aee10: 00000000 nop
001aee14: 00021100 sll r2,r2,0x04
001aee18: 02421021 addu r2,r18,r2
001aee1c: 94420000 lhu r2,0x0000(r2)			3rd point X
001aee20: 00000000 nop
001aee24: a4c20020 sh r2,0x0020(r6)
001aee28: 97a2007c lhu r2,0x007c(r29)
001aee2c: 00000000 nop
001aee30: 00021100 sll r2,r2,0x04
001aee34: 02421021 addu r2,r18,r2
001aee38: 94420004 lhu r2,0x0004(r2)			3rd point Y
001aee3c: 00000000 nop
001aee40: a4c20022 sh r2,0x0022(r6)
001aee44: 97a2007c lhu r2,0x007c(r29)			3rd point
001aee48: 3c032aaa lui r3,0x2aaa
001aee4c: 00021100 sll r2,r2,0x04
001aee50: 02421021 addu r2,r18,r2
001aee54: 8c450008 lw r5,0x0008(r2)			3rd point's Z0
001aee58: 3463aaab ori r3,r3,0xaaab
001aee5c: 00a30018 mult r5,r3				Z0 point / 6
001aee60: 00051fc3 sra r3,r5,0x1f
001aee64: 00001010 mfhi r2
001aee68: 00021043 sra r2,r2,0x01			Z0 point / c
001aee6c: 00432823 subu r5,r2,r3
001aee70: 24a2ffff addiu r2,r5,0xffff			rounding
001aee74: 2c42017e sltiu r2,r2,0x017e
001aee78: 1040000e beq r2,r0,0x001aeeb4		branch if greater than render distance (literally how could this ever happen.)
001aee7c: 26100001 addiu r16,r16,0x0001		r16 counter ++
001aee80: 3c04801c lui r4,0x801c
001aee84: 8c84c0cc lw r4,-0x3f34(r4)			polygon pointers by depth table pointer
001aee88: 8cc30000 lw r3,0x0000(r6)
001aee8c: 8c820000 lw r2,0x0000(r4)
001aee90: 00751824 and r3,r3,r21
001aee94: 00531024 and r2,r2,r19
001aee98: 00621825 or r3,r3,r2
001aee9c: acc30000 sw r3,0x0000(r6)
001aeea0: 8c820000 lw r2,0x0000(r4)
001aeea4: 00d31824 and r3,r6,r19
001aeea8: 00551024 and r2,r2,r21
001aeeac: 00431025 or r2,r2,r3
001aeeb0: ac820000 sw r2,0x0000(r4)			swap SRAM and VRAM address types of new and old polygons at depth table; store one another's polygon addresses.
001aeeb4: 0234102a slt r2,r17,r20
001aeeb8: 10400086 beq r2,r0,0x001af0d4
001aeebc: 00000000 nop
001aeec0: 0806bb29 j 0x001aeca4			loop for every polygon entry or every 0xc*(effect target data) * 3, whichever is smaller
001aeec4: 00000000 nop
Shuriken. basically same notes as throw stone.
001aeec8: 3c02801c lui r2,0x801c
001aeecc: 8c42c098 lw r2,-0x3f68(r2)
001aeed0: 00000000 nop
001aeed4: 8c560050 lw r22,0x0050(r2)
001aeed8: 1aa0007e blez r21,0x001af0d4
001aeedc: 00008821 addu r17,r0,r0
001aeee0: 3c1300ff lui r19,0x00ff
001aeee4: 3673ffff ori r19,r19,0xffff
001aeee8: 3c14ff00 lui r20,0xff00
001aeeec: 00008021 addu r16,r0,r0
001aeef0: 0c06a3c5 jal 0x001a8f14
001aeef4: 27a40010 addiu r4,r29,0x0010
001aeef8: 93a30013 lbu r3,0x0013(r29)
001aeefc: 34020031 ori r2,r0,0x0031
001aef00: 14620071 bne r3,r2,0x001af0c8
001aef04: 26310001 addiu r17,r17,0x0001
001aef08: 3c03801c lui r3,0x801c
001aef0c: 8c63c090 lw r3,-0x3f70(r3)
001aef10: 00000000 nop
001aef14: 000310c0 sll r2,r3,0x03
001aef18: 00431023 subu r2,r2,r3
001aef1c: 00021180 sll r2,r2,0x06
001aef20: 02c21021 addu r2,r22,r2
001aef24: 93a30014 lbu r3,0x0014(r29)
001aef28: 00503021 addu r6,r2,r16
001aef2c: a0c30004 sb r3,0x0004(r6)
001aef30: 93a20015 lbu r2,0x0015(r29)
001aef34: 00000000 nop
001aef38: a0c20005 sb r2,0x0005(r6)
001aef3c: 93a20016 lbu r2,0x0016(r29)
001aef40: 00000000 nop
001aef44: a0c20006 sb r2,0x0006(r6)
001aef48: 93a20018 lbu r2,0x0018(r29)
001aef4c: 00000000 nop
001aef50: a0c2000c sb r2,0x000c(r6)
001aef54: 93a20019 lbu r2,0x0019(r29)
001aef58: 00000000 nop
001aef5c: a0c2000d sb r2,0x000d(r6)
001aef60: 93a2001a lbu r2,0x001a(r29)
001aef64: 00000000 nop
001aef68: a0c2000e sb r2,0x000e(r6)
001aef6c: 93a2001c lbu r2,0x001c(r29)
001aef70: 00000000 nop
001aef74: a0c20014 sb r2,0x0014(r6)
001aef78: 93a2001d lbu r2,0x001d(r29)
001aef7c: 00000000 nop
001aef80: a0c20015 sb r2,0x0015(r6)
001aef84: 93a2001e lbu r2,0x001e(r29)
001aef88: 00000000 nop
001aef8c: a0c20016 sb r2,0x0016(r6)
001aef90: 97a20078 lhu r2,0x0078(r29)
001aef94: 00000000 nop
001aef98: 00021100 sll r2,r2,0x04
001aef9c: 02421021 addu r2,r18,r2
001aefa0: 94420000 lhu r2,0x0000(r2)
001aefa4: 00000000 nop
001aefa8: a4c20008 sh r2,0x0008(r6)
001aefac: 97a20078 lhu r2,0x0078(r29)
001aefb0: 00000000 nop
001aefb4: 00021100 sll r2,r2,0x04
001aefb8: 02421021 addu r2,r18,r2
001aefbc: 94420004 lhu r2,0x0004(r2)
001aefc0: 00000000 nop
001aefc4: a4c2000a sh r2,0x000a(r6)
001aefc8: 97a20078 lhu r2,0x0078(r29)
001aefcc: 97a3007a lhu r3,0x007a(r29)
001aefd0: 00021100 sll r2,r2,0x04
001aefd4: 02421021 addu r2,r18,r2
001aefd8: 00031900 sll r3,r3,0x04
001aefdc: 02431821 addu r3,r18,r3
001aefe0: 8c450008 lw r5,0x0008(r2)
001aefe4: 94620000 lhu r2,0x0000(r3)
001aefe8: 00000000 nop
001aefec: a4c20010 sh r2,0x0010(r6)
001aeff0: 97a2007a lhu r2,0x007a(r29)
001aeff4: 00000000 nop
001aeff8: 00021100 sll r2,r2,0x04
001aeffc: 02421021 addu r2,r18,r2
001af000: 94420004 lhu r2,0x0004(r2)
001af004: 00000000 nop
001af008: a4c20012 sh r2,0x0012(r6)
001af00c: 97a3007a lhu r3,0x007a(r29)
001af010: 97a2007c lhu r2,0x007c(r29)
001af014: 00031900 sll r3,r3,0x04
001af018: 02431821 addu r3,r18,r3
001af01c: 00021100 sll r2,r2,0x04
001af020: 02421021 addu r2,r18,r2
001af024: 94420000 lhu r2,0x0000(r2)
001af028: 8c640008 lw r4,0x0008(r3)
001af02c: a4c20018 sh r2,0x0018(r6)
001af030: 97a2007c lhu r2,0x007c(r29)
001af034: 00000000 nop
001af038: 00021100 sll r2,r2,0x04
001af03c: 02421021 addu r2,r18,r2
001af040: 94420004 lhu r2,0x0004(r2)
001af044: 3c032aaa lui r3,0x2aaa
001af048: a4c2 001a sh r2,0x001a(r6)
001af04c: 97a2007c lhu r2,0x007c(r29)
001af050: 3463aaab ori r3,r3,0xaaab
001af054: 00021100 sll r2,r2,0x04
001af058: 02421021 addu r2,r18,r2
001af05c: 8c420008 lw r2,0x0008(r2)
001af060: 00a42821 addu r5,r5,r4
001af064: 00a22821 addu r5,r5,r2
001af068: 00a30018 mult r5,r3
001af06c: 00051fc3 sra r3,r5,0x1f
001af070: 00001010 mfhi r2
001af074: 00021043 sra r2,r2,0x01
001af078: 00432823 subu r5,r2,r3
001af07c: 24a2ffff addiu r2,r5,0xffff
001af080: 2c42017e sltiu r2,r2,0x017e
001af084: 10400010 beq r2,r0,0x001af0c8
001af088: 2610001c addiu r16,r16,0x001c
001af08c: 00052080 sll r4,r5,0x02
001af090: 3c02801c lui r2,0x801c
001af094: 8c42c0cc lw r2,-0x3f34(r2)
001af098: 8cc30000 lw r3,0x0000(r6)
001af09c: 00822021 addu r4,r4,r2
001af0a0: 8c820000 lw r2,0x0000(r4)
001af0a4: 00741824 and r3,r3,r20
001af0a8: 00531024 and r2,r2,r19
001af0ac: 00621825 or r3,r3,r2
001af0b0: acc30000 sw r3,0x0000(r6)
001af0b4: 8c820000 lw r2,0x0000(r4)
001af0b8: 00d31824 and r3,r6,r19
001af0bc: 00541024 and r2,r2,r20
001af0c0: 00431025 or r2,r2,r3
001af0c4: ac820000 sw r2,0x0000(r4)
001af0c8: 0235102a slt r2,r17,r21
001af0cc: 1440ff88 bne r2,r0,0x001aeef0
001af0d0: 00000000 nop
All Return:
001af0d4: 8fbf010c lw r31,0x010c(r29)
001af0d8: 8fbe0108 lw r30,0x0108(r29)
001af0dc: 8fb70104 lw r23,0x0104(r29)
001af0e0: 8fb60100 lw r22,0x0100(r29)
001af0e4: 8fb500fc lw r21,0x00fc(r29)
001af0e8: 8fb400f8 lw r20,0x00f8(r29)
001af0ec: 8fb300f4 lw r19,0x00f4(r29)
001af0f0: 8fb200f0 lw r18,0x00f0(r29)
001af0f4: 8fb100ec lw r17,0x00ec(r29)
001af0f8: 8fb000e8 lw r16,0x00e8(r29)
001af0fc: 27bd0110 addiu r29,r29,0x0110
001af100: 03e00008 jr r31
001af104: 00000000 nop