Difference between revisions of "Transfer Job's Data to Unit's Data"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
(Created page with " Transfer Job's Data to Unit's Data 0005b5dc: 27bdffe0 addiu r29,r29,0xffe0 0005b5e0: afb00010 sw r16,0x0010(r29) 0005b5e4: 00808021 addu r16,r4,r0 r16 = Unit's Data Point...")
 
 
Line 113: Line 113:
 
  0005b798: 03e00008 jr r31
 
  0005b798: 03e00008 jr r31
 
  0005b79c: 00000000 nop
 
  0005b79c: 00000000 nop
 +
 +
 +
== Return Locations ==
 +
 +
0005a95c:  [[Initialize Unit's Job Data]]
 +
0005b2e0:  [[Calculate ENTD Unit Jobs]]
 +
0005b430: ^^

Latest revision as of 14:00, 29 February 2012

Transfer Job's Data to Unit's Data
0005b5dc: 27bdffe0 addiu r29,r29,0xffe0
0005b5e0: afb00010 sw r16,0x0010(r29)
0005b5e4: 00808021 addu r16,r4,r0		r16 = Unit's Data Pointer
0005b5e8: afbf0018 sw r31,0x0018(r29)
0005b5ec: afb10014 sw r17,0x0014(r29)
0005b5f0: 92030000 lbu r3,0x0000(r16)		Load Unit's Sprite Set
0005b5f4: 00000000 nop
0005b5f8: 2c62004a sltiu r2,r3,0x004a
0005b5fc: 10400009 beq r2,r0,0x 0005b624		Branch if Sprite Set isn't a Special Job
0005b600: 00031040 sll r2,r3,0x01		ID * 2
0005b604: 00431021 addu r2,r2,r3		ID * 3
0005b608: 3c038006 lui r3,0x8006
0005b60c: 8c636194 lw r3,0x6194(r3)		Load Job Data Pointer
0005b610: 00021100 sll r2,r2,0x04		ID * 48
0005b614: 00431021 addu r2,r2,r3
0005b618: 90420000 lbu r2,0x0000(r2)		Load Job's Skillset
0005b61c: 08016d8a j 0x 0005b628
0005b620: a2020162 sb r2,0x0162(r16)		Store Unit's Special Skillset ID
0005b624: a2000162 sb r0,0x0162(r16)		Store Unit's Special Skillset ID = 0
0005b628: 2605000a addiu r5,r16,0x000a		r5 = Unit's Innate Ability Pointer
0005b62c: 92030003 lbu r3,0x0003(r16)		Load Unit's Job ID
0005b630: 34060008 ori r6,r0,0x0008		Limit = 8
0005b634: 00031040 sll r2,r3,0x01		ID * 2
0005b638: 00431021 addu r2,r2,r3		ID * 3
0005b63c: 3c038006 lui r3,0x8006
0005b640: 8c636194 lw r3,0x6194(r3)		Load Job Data Pointer
0005b644: 00021100 sll r2,r2,0x04		ID * 48
0005b648: 00438821 addu r17,r2,r3		r17 = Unit's Job Data Pointer
0005b64c: 92220000 lbu r2,0x0000(r17)		Load Job's Skillset ID
0005b650: 26240001 addiu r4,r17,0x0001		r4 = Job's Innate Ability Pointer
0005b654: 0c017895 jal 0x 0005e254		Store X Byte into Y (Innate Abilities)
0005b658: a2020012 sb r2,0x0012(r16)		Store Unit's Primary Skillset ID
0005b65c: 26240009 addiu r4,r17,0x0009		r4 = Job's Equippable Items
0005b660: 2605004a addiu r5,r16,0x004a		r5 = Unit's Equippable Items
0005b664: 0c017895 jal 0x 0005e254		Store X Byte into Y (Equippable Items
0005b668: 34060004 ori r6,r0,0x0004		Limit = 4
0005b66c: 2624000d addiu r4,r17,0x000d		r4 = Job's HP Growth
0005b670: 26050081 addiu r5,r16,0x0081		r5 = Unit's HP Growth
0005b674: 0c017895 jal 0x 0005e254		Store X Byte into Y (Stat Growths/Multipliers)
0005b678: 3406000a ori r6,r0,0x000a		Limit = 10
0005b67c: 92220017 lbu r2,0x0017(r17)		Load Job's Move
0005b680: 00000000 nop
0005b684: a202003a sb r2,0x003a(r16)		Store Unit's Move
0005b688: 92220018 lbu r2,0x0018(r17)		Load Job's Jump
0005b68c: 00000000 nop
0005b690: 3042007f andi r2,r2,0x007f		Cap Jump at 127 (0x80 flags stepping stone)
0005b694: a202003b sb r2,0x003b(r16)		Store Unit's Jump
0005b698: 92220018 lbu r2,0x0018(r17)		Load Job's Jump
0005b69c: 00000000 nop
0005b6a0: 30420080 andi r2,r2,0x0080		Get Stepping stone Flag
0005b6a4: 10400004 beq r2,r0,0x 0005b6b8		Branch if Unit isn't a stepping stone
0005b6a8: 00000000 nop
0005b6ac: 96020048 lhu r2,0x0048(r16)		Load Unit's Y Coordinate + Flags
0005b6b0: 08016db1 j 0x 0005b6c4
0005b6b4: 34424000 ori r2,r2,0x4000		Enable Stepping Stone
0005b6b8: 96020048 lhu r2,0x0048(r16)		Load Unit's Y Coordinate + Flags
0005b6bc: 00000000 nop
0005b6c0: 3042bfff andi r2,r2,0xbfff		Disable Stepping Stone
0005b6c4: a6020048 sh r2,0x0048(r16)		Store Unit's Y Coordinate + Flags
0005b6c8: 2624001a addiu r4,r17,0x001a		r4 = Job's Innate Statuses
0005b6cc: 2605004e addiu r5,r16,0x004e		r5 = Unit's Innate Statuses
0005b6d0: 0c017895 jal 0x 0005e254		Store X Byte into Y (Statuses)
0005b6d4: 3406000f ori r6,r0,0x000f		Limit = 15
0005b6d8: 9202 0005 lbu r2,0x 0005(r16)		Load Unit's ENTD Flags
0005b6dc: 92030006 lbu r3,0x0006(r16)		Load Unit's Gender Byte
0005b6e0: 30470004 andi r7,r2,0x0004
0005b6e4: 10e0001a beq r7,r0,0x 0005b750		Branch if Unit isn't Immortal
0005b6e8: 30660009 andi r6,r3,0x0009
0005b6ec: 10c00018 beq r6,r0,0x 0005b750		Branch if Unit doesn't Load/Save Formation
0005b6f0: 00002821 addu r5,r0,r0		Counter = 0
0005b6f4: 26040053 addiu r4,r16,0x0053		r4 = Unit's Status Immunities
0005b6f8: 10e00008 beq r7,r0,0x 0005b71c		Branch if Unit isn't Immortal
0005b6fc: 00000000 nop
0005b700: 90820000 lbu r2,0x0000(r4)		Load Unit's Status Immunities
0005b704: 3c018006 lui r1,0x8006
0005b708: 00250821 addu r1,r1,r5
0005b70c: 902362e9 lbu r3,0x62e9(r1)		Load Immortal Immunities
0005b710: 00000000 nop
0005b714: 00431025 or r2,r2,r3			Enable Immortal Immunities
0005b718: a0820000 sb r2,0x0000(r4)		Store Unit's new Status Immunities
0005b71c: 10c00008 beq r6,r0,0x 0005b740		Branch if Unit doesn't Load/Save Formation
0005b720: 00000000 nop
0005b724: 90820000 lbu r2,0x0000(r4)		Load Unit's Status Immunities
0005b728: 3c018006 lui r1,0x8006
0005b72c: 00250821 addu r1,r1,r5
0005b730: 902362ee lbu r3,0x62ee(r1)		Load Load/Save Formation Immunities
0005b734: 00000000 nop
0005b738: 00431025 or r2,r2,r3			Enable Load/Save Formation Immunities
0005b73c: a0820000 sb r2,0x0000(r4)		Store Unit's New Status Immunities
0005b740: 24a50001 addiu r5,r5,0x0001		Counter ++
0005b744: 28a2 0005 slti r2,r5,0x 0005
0005b748: 1440ffeb bne r2,r0,0x 0005b6f8		Branch if Counter < 5
0005b74c: 24840001 addiu r4,r4,0x0001		Pointer ++
0005b750: 26240029 addiu r4,r17,0x0029		r4 = Job's Absorbed Elements
0005b754: 2605006d addiu r5,r16,0x006d		r5 = Unit's Absorbed Elements
0005b758: 0c017895 jal 0x 0005e254		Store X Byte into Y (Elemental Resistances)
0005b75c: 34060004 ori r6,r0,0x0004		Limit = 4
0005b760: a2000071 sb r0,0x0071(r16)		Store Unit's Strengthened Elements = 0
0005b764: 9222002d lbu r2,0x002d(r17)		Load Job's Monster Portrait
0005b768: 00000000 nop
0005b76c: a202015f sb r2,0x015f(r16)		Store Unit's Portrait
0005b770: 9222002e lbu r2,0x002e(r17)		Load Job's Monster Palette
0005b774: 00000000 nop
0005b778: a2020160 sb r2,0x0160(r16)		Store Unit's Palette
0005b77c: 9222002f lbu r2,0x002f(r17)		Load Job's Monster Graphic
0005b780: 00000000 nop
0005b784: a202015e sb r2,0x015e(r16)		Store Unit's Graphic
0005b788: 8fbf0018 lw r31,0x0018(r29)
0005b78c: 8fb10014 lw r17,0x0014(r29)
0005b790: 8fb00010 lw r16,0x0010(r29)
0005b794: 27bd0020 addiu r29,r29,0x0020
0005b798: 03e00008 jr r31
0005b79c: 00000000 nop


Return Locations

0005a95c:  Initialize Unit's Job Data
0005b2e0:  Calculate ENTD Unit Jobs
0005b430: ^^