Fitting Room Related (0x136548)
Jump to navigation
Jump to search
80136548: 3c028019 lui r2,0x8019 8013654c: 804257a8 lb r2,0x57a8(r2) # *0x801957a8 80136550: 27bdff80 addiu r29,r29,-0x0080 80136554: afbf007c sw r31,0x007c(r29) 80136558: afb40078 sw r20,0x0078(r29) 8013655c: afb30074 sw r19,0x0074(r29) 80136560: afb20070 sw r18,0x0070(r29) 80136564: afb1006c sw r17,0x006c(r29) 80136568: 14400063 bne r2,r0,0x801366f8 # if (*0x801957a8 == 0) { 8013656c: afb00068 sw r16,0x0068(r29) 80136570: 27a50050 addiu r5,r29,0x0050 # localEquipData 80136574: 3c028019 lui r2,0x8019 80136578: 8442ba20 lh r2,-0x45e0(r2) # currentFormationUnitIndex = *0x8018ba20 8013657c: 34060008 ori r6,r0,0x0008 # 8 80136580: 3c018019 lui r1,0x8019 80136584: a42057a4 sh r0,0x57a4(r1) # *0x801957a4 = 0 80136588: 00021080 sll r2,r2,0x02 # currentFormationUnitIndex * 4 8013658c: 3c01801d lui r1,0x801d 80136590: 00220821 addu r1,r1,r2 80136594: 8c24d5ec lw r4,-0x2a14(r1) # formationUnits[currentFormationUnitIndex] 80136598: 00008821 addu r17,r0,r0 # count = 0 8013659c: 0c0088b7 jal 0x800222dc # bcopy (formationUnits[currentFormationUnitIndex] + 0x54, localEquipData, 8); // 0x54 starts equipment data - copies all but accessory 801365a0: 24840054 addiu r4,r4,0x0054 801365a4: 3c048019 lui r4,0x8019 801365a8: 8484ba20 lh r4,-0x45e0(r4) # currentFormationUnitIndex 801365ac: 3c03801d lui r3,0x801d 801365b0: 2463d5ec addiu r3,r3,-0x2a14 # formationUnitArray (0x801cd5ec) 801365b4: 00041080 sll r2,r4,0x02 # currentFormationUnitIndex * 4 801365b8: 00432821 addu r5,r2,r3 # formationUnitArray[currentFormationUnitIndex] 801365bc: 3c03801d lui r3,0x801d 801365c0: 2463d43c addiu r3,r3,-0x2bc4 # reserveItemsArray (0x801cd43c) 801365c4: 00441021 addu r2,r2,r4 # currentFormationUnitIndex * 5 801365c8: 00021040 sll r2,r2,0x01 # currentFormationUnitIndex * 10 801365cc: 00432021 addu r4,r2,r3 # reserveItemPtr = reserveItemsArray[currentFormationUnitIndex] # do { 801365d0: 8ca30000 lw r3,0x0000(r5) # formationUnit = *formationUnitArray[currentFormationUnitIndex] 801365d4: 00111040 sll r2,r17,0x01 # count * 2 801365d8: 00431821 addu r3,r2,r3 # (count * 2) + formationUnit 801365dc: 94620054 lhu r2,0x0054(r3) # equipSlot = *((count * 2) + formationUnit + 0x54) 801365e0: 00000000 nop 801365e4: 000213c2 srl r2,r2,0x0f # equipSlot >> 15 801365e8: 10400004 beq r2,r0,0x801365fc 801365ec: 26310001 addiu r17,r17,0x0001 # count = count + 1 # if ((equipSlot >> 15) != 0) { 801365f0: 94820000 lhu r2,0x0000(r4) # itemID = *reserveItemPtr 801365f4: 00000000 nop 801365f8: a4620054 sh r2,0x0054(r3) # *(&equipSlot) = itemID # } 801365fc: 2a220004 slti r2,r17,0x0004 80136600: 1440fff3 bne r2,r0,0x801365d0 80136604: 24840002 addiu r4,r4,0x0002 # reserveItemPtr = reserveItemPtr + 2 # } while (count < 4); 80136608: 3c108019 lui r16,0x8019 8013660c: 2610ab64 addiu r16,r16,-0x549c # bestFitItems = 0x8018ab64 80136610: 3c048019 lui r4,0x8019 80136614: 8484ba20 lh r4,-0x45e0(r4) # currentFormationUnitIndex 80136618: 3c05801d lui r5,0x801d 8013661c: 84a5d218 lh r5,-0x2de8(r5) # 0x801cd218 80136620: 0c048f76 jal 0x80123dd8 # ? 0x123dd8 (currentFormationUnitIndex, 0x801cd218, bestFitItems); 80136624: 02003021 addu r6,r16,r0 80136628: 3c038019 lui r3,0x8019 8013662c: 8463ba20 lh r3,-0x45e0(r3) # currentFormationUnitIndex 80136630: 3c11801d lui r17,0x801d 80136634: 2631d5ec addiu r17,r17,-0x2a14 # formationUnitArray 80136638: 00031880 sll r3,r3,0x02 # currentFormationUnitIndex * 4 8013663c: 00711821 addu r3,r3,r17 # formationUnitArray[currentFormationUnitIndex] 80136640: 8c620000 lw r2,0x0000(r3) # formationUnit = *formationUnitArray[currentFormationUnitIndex] 80136644: 00000000 nop 80136648: 9442005c lhu r2,0x005c(r2) # formationUnit.Accessory 8013664c: 27a40050 addiu r4,r29,0x0050 # localEquipData 80136650: 3c018019 lui r1,0x8019 80136654: a422ab6c sh r2,-0x5494(r1) # *0x8018ab6c 80136658: 8c650000 lw r5,0x0000(r3) # formationUnit 8013665c: 34060008 ori r6,r0,0x0008 # 8 80136660: 0c0088b7 jal 0x800222dc # bcopy (localEquipData, formationUnits[currentFormationUnitIndex] + 0x54, 8); 80136664: 24a50054 addiu r5,r5,0x0054 80136668: 2604ffdc addiu r4,r16,-0x0024 # 0x8018ab40 8013666c: 3c028019 lui r2,0x8019 80136670: 8442ba20 lh r2,-0x45e0(r2) # currentFormationUnitIndex 80136674: 3c058019 lui r5,0x8019 80136678: 24a5aa98 addiu r5,r5,-0x5568 # 0x8018aa98 8013667c: 00021080 sll r2,r2,0x02 # currentFormationUnitIndex * 4 80136680: 00511021 addu r2,r2,r17 # formationUnitArray[currentFormationUnitIndex] 80136684: 8c460000 lw r6,0x0000(r2) # formationUnit = *formationUnitArray[currentFormationUnitIndex] 80136688: 02003821 addu r7,r16,r0 # bestFitItems 8013668c: 0c048d0c jal 0x80123430 # ? 0x123430 (0x8018ab40, 0x8018aa98, formationUnit + 0x54, bestFitItems); 80136690: 24c60054 addiu r6,r6,0x0054 # formationUnit + 0x54 80136694: 3c048019 lui r4,0x8019 80136698: 8484ba20 lh r4,-0x45e0(r4) # currentFormationUnitIndex 8013669c: 0c048a2a jal 0x801228a8 # hasTwoHands = Check For Two Hands (currentFormationUnitIndex); 801366a0: 00000000 nop 801366a4: 02002021 addu r4,r16,r0 # bestFitItems 801366a8: 0c0482bf jal 0x80120afc # result_0x120afc = ? 0x120afc (bestFitItems, hasTwoHands); 801366ac: 00402821 addu r5,r2,r0 # hasTwoHands 801366b0: 3c018019 lui r1,0x8019 801366b4: a422ab50 sh r2,-0x54b0(r1) # *0x8018ab50 = result_0x120afc 801366b8: 0c04556f jal 0x801155bc # ? 0x1155bc (1); 801366bc: 34040001 ori r4,r0,0x0001 801366c0: 0c0455ad jal 0x801156b4 # ? 0x1156b4 (1); 801366c4: 34040001 ori r4,r0,0x0001 801366c8: 34030001 ori r3,r0,0x0001 801366cc: 34020001 ori r2,r0,0x0001 801366d0: 3c018019 lui r1,0x8019 801366d4: ac23ba38 sw r3,-0x45c8(r1) # *0x8018ba38 = 1 801366d8: 3c018019 lui r1,0x8019 801366dc: ac23bac4 sw r3,-0x453c(r1) # *0x8018bac4 = 1 801366e0: 3c018019 lui r1,0x8019 801366e4: a02257a8 sb r2,0x57a8(r1) # *0x801957a8 = 1 801366e8: 3c018019 lui r1,0x8019 801366ec: a022ba24 sb r2,-0x45dc(r1) # *0x8018ba24 = 1 801366f0: 3c018015 lui r1,0x8015 801366f4: ac2332a0 sw r3,0x32a0(r1) # *0x801532a0 = 1 # } 801366f8: 3c058019 lui r5,0x8019 801366fc: 24a5576c addiu r5,r5,0x576c # 0x8019576c 80136700: 0c04aade jal 0x8012ab78 # isMenuThreadRunning = Run Menu Thread (WORLD.BIN) (6, 0x8019576c); 80136704: 34040006 ori r4,r0,0x0006 80136708: 00408821 addu r17,r2,r0 # isMenuThreadRunning 8013670c: 16200063 bne r17,r0,0x8013689c # if (isMenuThreadRunning == 0) { 80136710: 00000000 nop # count = 0 80136714: 3c12801d lui r18,0x801d 80136718: 2652d732 addiu r18,r18,-0x28ce 8013671c: 86430000 lh r3,0x0000(r18) 80136720: 00000000 nop 80136724: 14600004 bne r3,r0,0x80136738 80136728: 34100001 ori r16,r0,0x0001 8013672c: 3402000a ori r2,r0,0x000a 80136730: 3c018019 lui r1,0x8019 80136734: a022bacc sb r2,-0x4534(r1) 80136738: 14700003 bne r3,r16,0x80136748 8013673c: 34020001 ori r2,r0,0x0001 80136740: 3c018019 lui r1,0x8019 80136744: a022bacc sb r2,-0x4534(r1) 80136748: 0c04556f jal 0x801155bc 8013674c: 00002021 addu r4,r0,r0 80136750: 0c0455ad jal 0x801156b4 80136754: 00002021 addu r4,r0,r0 80136758: 3c018019 lui r1,0x8019 8013675c: ac30ba38 sw r16,-0x45c8(r1) 80136760: 86430000 lh r3,0x0000(r18) 80136764: 34020002 ori r2,r0,0x0002 80136768: 3c018019 lui r1,0x8019 8013676c: a02057a8 sb r0,0x57a8(r1) 80136770: 3c018019 lui r1,0x8019 80136774: a022ba24 sb r2,-0x45dc(r1) 80136778: 1460003f bne r3,r0,0x80136878 8013677c: 34040002 ori r4,r0,0x0002 80136780: 3c13801d lui r19,0x801d 80136784: 2673d5ec addiu r19,r19,-0x2a14 # formationUnitPtr = baseFormationUnitPtr (0x801cd5ec) 80136788: 3c14801d lui r20,0x801d 8013678c: 2694d43c addiu r20,r20,-0x2bc4 # ptr = 0x801cd43c 80136790: 00008021 addu r16,r0,r0 # r16 = 0 # do { 80136794: 3c018019 lui r1,0x8019 80136798: 00300821 addu r1,r1,r16 8013679c: 9422ab64 lhu r2,-0x549c(r1) 801367a0: 3c058019 lui r5,0x8019 801367a4: 84a5ba20 lh r5,-0x45e0(r5) 801367a8: 00021c00 sll r3,r2,0x10 801367ac: 00051080 sll r2,r5,0x02 801367b0: 00531021 addu r2,r2,r19 801367b4: 8c420000 lw r2,0x0000(r2) 801367b8: 00039403 sra r18,r3,0x10 801367bc: 02021021 addu r2,r16,r2 801367c0: 94440054 lhu r4,0x0054(r2) 801367c4: 12400003 beq r18,r0,0x801367d4 801367c8: 00000000 nop 801367cc: 0461000b bgez r3,0x801367fc 801367d0: 000413c3 sra r2,r4,0x0f 801367d4: 00a02021 addu r4,r5,r0 801367d8: 00112c00 sll r5,r17,0x10 801367dc: 0c04db7d jal 0x80136df4 801367e0: 00052c03 sra r5,r5,0x10 801367e4: 0c048dc2 jal 0x80123708 801367e8: 02402021 addu r4,r18,r0 801367ec: 0c04d4d8 jal 0x80135360 801367f0: 00402021 addu r4,r2,r0 801367f4: 0804da0f j 0x8013683c 801367f8: 00000000 nop 801367fc: 1040000f beq r2,r0,0x8013683c # (Check if slot was empty...) 80136800: 00000000 nop 80136804: 00042400 sll r4,r4,0x10 80136808: 0c048dc2 jal 0x80123708 8013680c: 00042403 sra r4,r4,0x10 80136810: 0c04d4d8 jal 0x80135360 80136814: 00022023 subu r4,r0,r2 80136818: 3c038019 lui r3,0x8019 8013681c: 8463ba20 lh r3,-0x45e0(r3) 80136820: 00000000 nop 80136824: 00031080 sll r2,r3,0x02 80136828: 00431021 addu r2,r2,r3 8013682c: 00021040 sll r2,r2,0x01 80136830: 00541021 addu r2,r2,r20 80136834: 02021021 addu r2,r16,r2 80136838: a4400000 sh r0,0x0000(r2) 8013683c: 3c028019 lui r2,0x8019 80136840: 8442ba20 lh r2,-0x45e0(r2) 80136844: 00000000 nop 80136848: 00021080 sll r2,r2,0x02 8013684c: 00531021 addu r2,r2,r19 80136850: 8c420000 lw r2,0x0000(r2) 80136854: 26310001 addiu r17,r17,0x0001 # count = count + 1 80136858: 02021021 addu r2,r16,r2 8013685c: a4520054 sh r18,0x0054(r2) 80136860: 2a220004 slti r2,r17,0x0004 80136864: 1440ffcb bne r2,r0,0x80136794 80136868: 26100002 addiu r16,r16,0x0002 # } while (count < 4); 8013686c: 0c045466 jal 0x80115198 80136870: 00000000 nop 80136874: 34040002 ori r4,r0,0x0002 80136878: 34050019 ori r5,r0,0x0019 8013687c: 2406ffff addiu r6,r0,-0x0001 80136880: 34020006 ori r2,r0,0x0006 80136884: 3c01801d lui r1,0x801d 80136888: a422d784 sh r2,-0x287c(r1) 8013688c: 3c018015 lui r1,0x8015 80136890: ac2032a0 sw r0,0x32a0(r1) 80136894: 0c03ffc2 jal 0x800fff08 80136898: 00003821 addu r7,r0,r0 # } 8013689c: 3c02801d lui r2,0x801d 801368a0: 9042d71c lbu r2,-0x28e4(r2) 801368a4: 00000000 nop 801368a8: 10400003 beq r2,r0,0x801368b8 801368ac: 00000000 nop 801368b0: 0c04d74e jal 0x80135d38 801368b4: 00000000 nop 801368b8: 8fbf007c lw r31,0x007c(r29) 801368bc: 8fb40078 lw r20,0x0078(r29) 801368c0: 8fb30074 lw r19,0x0074(r29) 801368c4: 8fb20070 lw r18,0x0070(r29) 801368c8: 8fb1006c lw r17,0x006c(r29) 801368cc: 8fb00068 lw r16,0x0068(r29) 801368d0: 27bd0080 addiu r29,r29,0x0080 801368d4: 03e00008 jr r31 801368d8: 00000000 nop