Palette modification based on team
Jump to navigation
Jump to search
Palette modification based on team 00068534: 27bdffd8 addiu r29,r29,0xffd8 00068538: 00803021 addu r6,r4,r0 r6 = Unit's Misc Data Pointer 0006853c: 10c00039 beq r6,r0,0x 00068624 00068540: afbf0020 sw r31,0x0020(r29) 00068544: 8cc20134 lw r2,0x0134(r6) Load Unit Data Pointer 00068548: 00000000 nop 0006854c: 10400035 beq r2,r0,0x 00068624 Branch if Pointer doesn't exist 00068550: 00000000 nop 00068554: 90420005 lbu r2,0x0005(r2) Load Unit's ENTD Flags 00068558: 00000000 nop 0006855c: 30420030 andi r2,r2,0x0030 get Unit's Team 00068560: 00021902 srl r3,r2,0x04 Team / 16 00068564: 34020001 ori r2,r0,0x0001 r2 = 1 (Red) 00068568: 10620013 beq r3,r2,0x 000685b8 Branch if Unit is on Red Team 0006856c: 28620002 slti r2,r3,0x0002 00068570: 10400005 beq r2,r0,0x 00068588 Branch if Unit is on Green/Light Blue Team 00068574: 00000000 nop 00068578: 10600008 beq r3,r0,0x 0006859c Branch if Unit is on Blue Team 0006857c: 34040009 ori r4,r0,0x0009 r4 = 9 00068580: 0801a17f j 0x 000685fc 00068584: 00000000 nop 00068588: 34020002 ori r2,r0,0x0002 r2 = 2 0006858c: 10620013 beq r3,r2,0x 000685dc Branch if Unit is on Light Blue Team 00068590: 34040009 ori r4,r0,0x0009 r4 = 9 00068594: 0801a17f j 0x 000685fc 00068598: 00000000 nop *Blue Team* 0006859c: 90c70004 lbu r7,0x0004(r6) Load Unit ID? 000685a0: 34060003 ori r6,r0,0x0003 r6 = 3 000685a4: 34020018 ori r2,r0,0x0018 r2 = 0x18 000685a8: afa00010 sw r0,0x0010(r29) ? = 0 000685ac: afa00014 sw r0,0x0014(r29) Red Mod = 0 000685b0: 0801a186 j 0x 00068618 (Blue Mod = 0x18) 000685b4: afa00018 sw r0,0x0018(r29) Green Mod = 0 *Red Team* 000685b8: 34040009 ori r4,r0,0x0009 r4 = 9 000685bc: 90c70004 lbu r7,0x0004(r6) Load Unit ID? 000685c0: 34060003 ori r6,r0,0x0003 r6 = 3 000685c4: 34020010 ori r2,r0,0x0010 r2 = 0x10 000685c8: afa00010 sw r0,0x0010(r29) ? = 0 000685cc: afa20014 sw r2,0x0014(r29) Red Mod = 0x10 000685d0: afa00018 sw r0,0x0018(r29) Green Mod = 0 000685d4: 0801a187 j 0x 0006861c 000685d8: afa0001c sw r0,0x001c(r29) Blue Mod = 0 *Green Team* 000685dc: 90c70004 lbu r7,0x0004(r6) Load Unit ID? 000685e0: 34060003 ori r6,r0,0x0003 r6 = 3 000685e4: 34020010 ori r2,r0,0x0010 r2 = 0x10 000685e8: afa00010 sw r0,0x0010(r29) ? = 0 000685ec: afa00014 sw r0,0x0014(r29) Red Mod = 0 000685f0: afa20018 sw r2,0x0018(r29) Green Mod = 0x10 000685f4: 0801a187 j 0x 0006861c 000685f8: afa0001c sw r0,0x001c(r29) Blue Mod = 0 *Light Blue Team* 000685fc: 34040009 ori r4,r0,0x0009 r4 = 9 00068600: 90c70004 lbu r7,0x0004(r6) Load Unit ID? 00068604: 34060003 ori r6,r0,0x0003 r6 = 3 00068608: 34020010 ori r2,r0,0x0010 r2 = 0x10 0006860c: afa00010 sw r0,0x0010(r29) ? = 0 00068610: afa00014 sw r0,0x0014(r29) Red Mod = 0 00068614: afa20018 sw r2,0x0018(r29) Green Mod = 0x10 00068618: afa2001c sw r2,0x001c(r29) Blue Mod = 0x10/0x18 0006861c: 0c023dc4 jal 0x0008f710 Palette Modification 00068620: 00000000 nop 00068624: 8fbf0020 lw r31,0x0020(r29) 00068628: 27bd0028 addiu r29,r29,0x0028 0006862c: 03e00008 jr r31 00068630: 00000000 nop
Return locations
Battle.bin 00068650: 00068634 - 00068678 Highlight units based on Team 2 00071c0c: 00071b4c - 00071c88