Level Unit to Specific Level
Jump to navigation
Jump to search
Level Unit to Specific Level 0005d8fc: 27bdfff8 addiu r29,r29,0xfff8 0005d900: 00804021 addu r8,r4,r0 r8 = Party Data Pointer 0005d904: 91040016 lbu r4,0x0016(r8) Load Party Level 0005d908: 91030002 lbu r3,0x0002(r8) Load Party Job ID 0005d90c: 00853021 addu r6,r4,r5 Level = Party Level + Chosen Level 0005d910: 00031040 sll r2,r3,0x01 ID * 2 0005d914: 00431021 addu r2,r2,r3 ID * 3 0005d918: 3c038006 lui r3,0x8006 0005d91c: 8c636194 lw r3,0x6194(r3) Load Job Data Pointer 0005d920: 00021100 sll r2,r2,0x04 ID * 48 0005d924: 00431021 addu r2,r2,r3 0005d928: 244d000d addiu r13,r2,0x000d r13 = Pointer to Job's HP Growth 0005d92c: 2cc20064 sltiu r2,r6,0x0064 0005d930: 14400002 bne r2,r0,0x 0005d93c Branch if Level < 100 0005d934: 250e0019 addiu r14,r8,0x0019 r14 = Pointer to Party Raw HP 0005d938: 34060063 ori r6,r0,0x0063 Level = 99 0005d93c: 00c45823 subu r11,r6,r4 Level - Party Level (Chosen Level essentially) 0005d940: 19600030 blez r11,0x 0005da04 Branch if Level <= 0 (will happen at chosen level 99) 0005d944: 00c01021 addu r2,r6,r0 r2 = Level 0005d948: 1960002d blez r11,0x 0005da00 Branch if Level <= 0 0005d94c: 00004821 addu r9,r0,r0 Counter = 0 0005d950: 3c0c00ff lui r12,0x00ff 0005d954: 358cffff ori r12,r12,0xffff Raw Cap = 0xFFFFFF 0005d958: 01c02821 addu r5,r14,r0 r5 = Pointer to Party Raw HP 0005d95c: 01a03821 addu r7,r13,r0 r7 = Pointer to Job's HP Growth 0005d960: 24aa000f addiu r10,r5,0x000f r10 = Pointer to Party's Unlocked Jobs (Limit) 0005d964: 90a20001 lbu r2,0x0001(r5) Load Raw Stat Byte 2 0005d968: 91060016 lbu r6,0x0016(r8) Load Party Level 0005d96c: 90a40000 lbu r4,0x0000(r5) Load Raw Stat Byte 1 0005d970: 90a30002 lbu r3,0x0002(r5) Load Raw Stat Byte 3 0005d974: 00021200 sll r2,r2,0x08 0005d978: 00822021 addu r4,r4,r2 0005d97c: 00031c00 sll r3,r3,0x10 0005d980: 90e20000 lbu r2,0x0000(r7) Load Stat Growth 0005d984: 00000000 nop 0005d988: 14400003 bne r2,r0,0x 0005d998 Branch if Growth != 0 0005d98c: 00832021 addu r4,r4,r3 r4 = Full Raw Stat 0005d990: 08017667 j 0x 0005d99c 0005d994: 24c20001 addiu r2,r6,0x0001 r2 = Level + 1 (min of 1 growth) 0005d998: 00c21021 addu r2,r6,r2 r2 = Level + Stat Growth 0005d99c: 0082001b divu r4,r2 Raw Stat / (Level + Growth) 0005d9a0: 00001812 mflo r3 r3 = Raw Bonus 0005d9a4: 00000000 nop 0005d9a8: 00832021 addu r4,r4,r3 Raw Stat += Raw Bonus 0005d9ac: 0184102b sltu r2,r12,r4 0005d9b0: 10400003 beq r2,r0,0x 0005d9c0 Branch if Raw Stat > Raw Cap 0005d9b4: 24e70002 addiu r7,r7,0x0002 Growth Pointer += 2 0005d9b8: 3c0400ff lui r4,0x00ff 0005d9bc: 3484ffff ori r4,r4,0xffff Raw Stat = FFFFFF 0005d9c0: 00041202 srl r2,r4,0x08 0005d9c4: a0a20001 sb r2,0x0001(r5) Store Raw Stat Byte 2 0005d9c8: 00041402 srl r2,r4,0x10 0005d9cc: a0a40000 sb r4,0x0000(r5) Store Raw Stat Byte 1 0005d9d0: a0a20002 sb r2,0x0002(r5) Store Raw Stat Byte 3 0005d9d4: 24a50003 addiu r5,r5,0x0003 Raw Pointer += 3 0005d9d8: 00aa102a slt r2,r5,r10 0005d9dc: 1440ffe1 bne r2,r0,0x 0005d964 Branch if all Raws haven't been Increased 0005d9e0: 00000000 nop 0005d9e4: 91020016 lbu r2,0x0016(r8) Load Party Level 0005d9e8: 25290001 addiu r9,r9,0x0001 Counter ++ 0005d9ec: 24420001 addiu r2,r2,0x0001 Level ++ 0005d9f0: a1020016 sb r2,0x0016(r8) Store new Party Level 0005d9f4: 012b102a slt r2,r9,r11 0005d9f8: 1440ffd7 bne r2,r0,0x 0005d958 Branch if Current Level < End Level 0005d9fc: 00000000 nop 0005da00: 91020016 lbu r2,0x0016(r8) Load Unit's Party Level 0005da04: 27bd0008 addiu r29,r29,0x0008 0005da08: 03e00008 jr r31 0005da0c: 00000000 nop
Return Locations
WORLD.BIN 80125cc8 - Store New Seed and Lay Eggs