JOBSTTS.OUT Create Menu Job list
Revision as of 10:57, 25 May 2024 by Talcall (talk | contribs) (Talcall moved page JOBSTTS.OUT 001e01b4 - 001e0310 to JOBSTTS.OUT Create Menu Job list)
001e01b4: 27bdffd0 addiu r29,r29,0xffd0 001e01b8: afb00010 sw r16,0x0010(r29) 001e01bc: 00808021 addu r16,r4,r0 001e01c0: 320200ff andi r2,r16,0x00ff 001e01c4: 3c038020 lui r3,0x8020 001e01c8: 2463a7f8 addiu r3,r3,0xa7f8 jobstts unit data pointer 001e01cc: 00021080 sll r2,r2,0x02 jobstts unit ID * 4 001e01d0: afb20018 sw r18,0x0018(r29) 001e01d4: 00439021 addu r18,r2,r3 jobstts unit data pointer 001e01d8: afbf0028 sw r31,0x0028(r29) 001e01dc: afb50024 sw r21,0x0024(r29) 001e01e0: afb40020 sw r20,0x0020(r29) 001e01e4: afb3001c sw r19,0x001c(r29) 001e01e8: afb10014 sw r17,0x0014(r29) 001e01ec: 8e440000 lw r4,0x0000(r18) jobstts unit data 001e01f0: 00a0a821 addu r21,r5,r0 001e01f4: 0c0793a6 jal 0x001e4e98 JOBSTTS.OUT Store Unit's unlocked jobs 001e01f8: 24840008 addiu r4,r4,0x0008 current unit's unlocked jobs 001e01fc: 0c07805a jal 0x001e0168 JOBSTTS.OUT Calculate Base Job 001e0200: 320400ff andi r4,r16,0x00ff jobstts unit ID 001e0204: a6a20000 sh r2,0x0000(r21) store unit's base job to r21 (index data?) 001e0208: 8e420000 lw r2,0x0000(r18) 001e020c: 00000000 nop 001e0210: 84440000 lh r4,0x0000(r2) 001e0214: 0c077fe8 jal 0x001dffa0 JOBSTTS.OUT Special Monster check 001e0218: 00000000 nop 001e021c: 14400007 bne r2,r0,0x001e023c branch if special monster 001e0220: 2402ffff addiu r2,r0,0xffff -0x1 001e0224: 8e420000 lw r2,0x0000(r18) 001e0228: 00000000 nop 001e022c: 90430007 lbu r3,0x0007(r2) load unit's base job/generic status 001e0230: 34020082 ori r2,r0,0x0082 001e0234: 14620004 bne r3,r2,0x001e0248 branch if not a monster 001e0238: 2402ffff addiu r2,r0,0xffff 001e023c: a6a20002 sh r2,0x0002(r21) store the end of the list if monster 001e0240: 080780bb j 0x001e02ec 001e0244: 34020001 ori r2,r0,0x0001
unit is not a monster
001e0248: 0c0793b4 jal 0x001e4ed0 JOBSTTS.OUT 001e4ed0 - 001e4f78 open menu by r4 frames? 001e024c: 34040001 ori r4,r0,0x0001 1 001e0250: 34130001 ori r19,r0,0x0001 001e0254: 34110001 ori r17,r0,0x0001 001e0258: 0240a021 addu r20,r18,r0 jobstts unit data pointer 001e025c: 26b20002 addiu r18,r21,0x0002 next index? 001e0260: 34040001 ori r4,r0,0x0001 001e0264: 0c0793b4 jal 0x001e4ed0 JOBSTTS.OUT 001e4ed0 - 001e4f78 do it again 001e0268: 2630004a addiu r16,r17,0x004a job index + squire 001e026c: 10400016 beq r2,r0,0x001e02c8 branch if 0 turns remaining to menu opening animation? 001e0270: 3402005b ori r2,r0,0x005b 001e0274: 16020008 bne r16,r2,0x001e0298 branch if not bard 001e0278: 3402005c ori r2,r0,0x005c 001e027c: 8e820000 lw r2,0x0000(r20) 001e0280: 00000000 nop 001e0284: 90420006 lbu r2,0x0006(r2) unit gender 001e0288: 00000000 nop 001e028c: 30420040 andi r2,r2,0x0040 001e0290: 1440000d bne r2,r0,0x001e02c8 branch if not female 001e0294: 3402005c ori r2,r0,0x005c 001e0298: 16020008 bne r16,r2,0x001e02bc branch if not dancer 001e029c: 00000000 nop 001e02a0: 8e820000 lw r2,0x0000(r20) 001e02a4: 00000000 nop 001e02a8: 90420006 lbu r2,0x0006(r2) 001e02ac: 00000000 nop 001e02b0: 30420080 andi r2,r2,0x0080 001e02b4: 14400004 bne r2,r0,0x001e02c8 branch if not male 001e02b8: 00000000 nop 001e02bc: a6500000 sh r16,0x0000(r18) store job in job list 001e02c0: 26520002 addiu r18,r18,0x0002 increment pointer 001e02c4: 26730001 addiu r19,r19,0x0001 r19 ++ 001e02c8: 26310001 addiu r17,r17,0x0001 r17 ++ 001e02cc: 2a220014 slti r2,r17,0x0014 001e02d0: 1440ffe4 bne r2,r0,0x001e0264 loop if still to do all 20 jobs 001e02d4: 34040001 ori r4,r0,0x0001 001e02d8: 00131040 sll r2,r19,0x01 001e02dc: 00551021 addu r2,r2,r21 001e02e0: 2403ffff addiu r3,r0,0xffff 001e02e4: a4430000 sh r3,0x0000(r2) store the end of the list 001e02e8: 02601021 addu r2,r19,r0 001e02ec: 8fbf0028 lw r31,0x0028(r29) 001e02f0: 8fb50024 lw r21,0x0024(r29) 001e02f4: 8fb40020 lw r20,0x0020(r29) 001e02f8: 8fb3001c lw r19,0x001c(r29) 001e02fc: 8fb20018 lw r18,0x0018(r29) 001e0300: 8fb10014 lw r17,0x0014(r29) 001e0304: 8fb00010 lw r16,0x0010(r29) 001e0308: 27bd0030 addiu r29,r29,0x0030 001e030c: 03e00008 jr r31 return number of jobs in list 001e0310: 00000000 nop