Difference between revisions of "Store used weapon"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
(Created page with "<font face='Courier New'> 0018b274: 3c028019 lui r2,0x8019 0018b278: 904238c3 lbu r2,0x38c3(r2) load strike counter 0018b27c: 00000000 nop 0018b280: 14400005 bne r2,r0,...")
 
m (return link)
Line 76: Line 76:
 
  0018b348: 00000000 nop
 
  0018b348: 00000000 nop
 
</font>
 
</font>
 +
 +
==Return location==
 +
0018b414: [[Pre_Formula_Setup_(FDC)]]

Revision as of 21:03, 7 June 2021

0018b274: 3c028019 lui r2,0x8019
0018b278: 904238c3 lbu r2,0x38c3(r2)		load strike counter
0018b27c: 00000000 nop
0018b280: 14400005 bne r2,r0,0x0018b298		branch if not 1st strike
0018b284: 00000000 nop
0018b288: 3c058019 lui r5,0x8019
0018b28c: 90a538c4 lbu r5,0x38c4(r5)		load right hand weapon
0018b290: 08062ca8 j 0x0018b2a0
0018b294: 00000000 nop
0018b298: 3c058019 lui r5,0x8019
0018b29c: 90a538c5 lbu r5,0x38c5(r5)		load Left hand weapon
0018b2a0: 90820001 lbu r2,0x0001(r4)		load skillset used
0018b2a4: 3c018006 lui r1,0x8006
0018b2a8: 00220821 addu r1,r1,r2
0018b2ac: 90235cb4 lbu r3,0x5cb4(r1)		load action menu byte
0018b2b0: 00000000 nop
0018b2b4: 2c620010 sltiu r2,r3,0x0010
0018b2b8: 1040001b beq r2,r0,0x0018b328		validity check
0018b2bc: 00031080 sll r2,r3,0x02
0018b2c0: 3c018017 lui r1,0x8017
0018b2c4: 00220821 addu r1,r1,r2
0018b2c8: 8c224304 lw r2,0x4304(r1)			load return address
0018b2cc: 00000000 nop
0018b2d0: 00400008 jr r2
0018b2d4: 00000000 nop
				00174304: 8018b2d8 lb r24,-0x4d28(r0)		default
				00174308: 8018b318 lb r24,-0x4ce8(r0)		Item
				0017430c: 8018b328 lb r24,-0x4cd8(r0)		throw
				00174310: 8018b2d8 lb r24,-0x4d28(r0)		math skill
				00174314: 8018b2d8 lb r24,-0x4d28(r0)		elemental
				00174318: 8018b328 lb r24,-0x4cd8(r0)		blank
				0017431c: 8018b2d8 lb r24,-0x4d28(r0)		monster
				00174320: 8018b318 lb r24,-0x4ce8(r0)		katana
				00174324: 8018b328 lb r24,-0x4cd8(r0)		attack
				00174328: 8018b324 lb r24,-0x4cdc(r0)		jump
				0017432c: 8018b328 lb r24,-0x4cd8(r0)		charge
				00174330: 8018b328 lb r24,-0x4cd8(r0)		defend
				00174334: 8018b328 lb r24,-0x4cd8(r0)		equip change
				00174338: 8018b328 lb r24,-0x4cd8(r0)		unknown
				0017433c: 8018b328 lb r24,-0x4cd8(r0)		blank
				00174340: 8018b324 lb r24,-0x4cdc(r0)		unknown
Default/math skill/elemental/monster
0018b2d8: 84840002 lh r4,0x0002(r4)			load ability
0018b2dc: 00000000 nop
0018b2e0: 28820170 slti r2,r4,0x0170
0018b2e4: 10400010 beq r2,r0,0x0018b328		branch if not regular ability
0018b2e8: 000410c0 sll r2,r4,0x03
0018b2ec: 00441023 subu r2,r2,r4
0018b2f0: 00021040 sll r2,r2,0x01
0018b2f4: 3c018006 lui r1,0x8006
0018b2f8: 00220821 addu r1,r1,r2
0018b2fc: 9022fbf3 lbu r2,-0x040d(r1)		load ability flags 3
0018b300: 00000000 nop
0018b304: 30420024 andi r2,r2,0x0024
0018b308: 14400008 bne r2,r0,0x0018b32c		branch if weapon strike/ranged weapon flagged
0018b30c: 30a300ff andi r3,r5,0x00ff		r3 = weapon ID
0018b310: 08062cca j 0x0018b328
0018b314: 00002821 addu r5,r0,r0
item/katana inventory
0018b318: 90850008 lbu r5,0x0008(r4)		load used item
0018b31c: 08062ccb j 0x0018b32c
0018b320: 30a300ff andi r3,r5,0x00ff		r3 = used item
jump/unknown
0018b324: 00002821 addu r5,r0,r0
weapon inventory/attack/blank/charge/defend/equip change/unknown/blank
0018b328: 30a300ff andi r3,r5,0x00ff
0018b32c: 340200ff ori r2,r0,0x00ff
0018b330: 14620002 bne r3,r2,0x0018b33c		branch if weapon exists
0018b334: 00000000 nop
0018b338: 00002821 addu r5,r0,r0			store unarmed
0018b33c: 3c018019 lui r1,0x8019
0018b340: a02538d8 sb r5,0x38d8(r1)			store used weapon ID
0018b344: 03e00008 jr r31
0018b348: 00000000 nop

Return location

0018b414: Pre_Formula_Setup_(FDC)