Extract RGB+Alpha from Palette
Jump to navigation
Jump to search
00092620: 00c07021 addu r14,r6,r0 r14 = Unit's ID 00092624: 00004821 addu r9,r0,r0 Counter = 0 00092628: 00051080 sll r2,r5,0x02 Section ID * 4 0009262c: 00451021 addu r2,r2,r5 ID * 5 00092630: 00021080 sll r2,r2,0x02 ID * 20 00092634: 00451023 subu r2,r2,r5 ID * 19 00092638: 00021180 sll r2,r2,0x06 ID * 1216 0009263c: 00451021 addu r2,r2,r5 ID * 1217 00092640: 00021040 sll r2,r2,0x01 ID * 2434 00092644: 3c03800a lui r3,0x800a 00092648: 24639676 addiu r3,r3,0x9676 0009264c: 00436821 addu r13,r2,r3 r13 = Pointer to Palette Color Data 00092650: 3c06800e lui r6,0x800e 00092654: 24c64ea4 addiu r6,r6,0x4ea4 r6 = Pointer to ? palettes 00092658: 00052a40 sll r5,r5,0x09 Section ID * 512 (palette chunk to use) 0009265c: 00a66021 addu r12,r5,r6 r12 = Pointer to ? Palette chunk 00092660: 24630700 addiu r3,r3,0x0700 00092664: 00435821 addu r11,r2,r3 r11 = Pointer to ? (99d76 data) 00092668: 00805021 addu r10,r4,r0 r10 = Palette Pointer 0009266c: 95440000 lhu r4,0x0000(r10) Load Color 00092670: 000e2900 sll r5,r14,0x04 Unit's ID * 8 00092674: 00a92821 addu r5,r5,r9 Unit's ID * 8 + Counter 00092678: 25290001 addiu r9,r9,0x0001 Counter ++ 0009267c: 00051840 sll r3,r5,0x01 Unit's ID * 16 + Counter * 2 00092680: 006c1021 addu r2,r3,r12 r2 = Pointer to ? Palette 00092684: 006b1821 addu r3,r3,r11 r3 = Pointer to Unit's? Palette 00092688: 308703e0 andi r7,r4,0x03e0 r7 = Green Value 0009268c: 00073942 srl r7,r7,0x05 Green Value / 32 (5 bit value) 00092690: 30867c00 andi r6,r4,0x7c00 r7 = Blue Value 00092694: 00063282 srl r6,r6,0x0a Blue Value / 1024 (5 bit value) 00092698: 000443c2 srl r8,r4,0x0f r8 = Alpha Flag 0009269c: a4440000 sh r4,0x0000(r2) Store Color 000926a0: 000510c0 sll r2,r5,0x03 Unit's ID * 64 + Counter * 8 000926a4: 00451023 subu r2,r2,r5 Unit's ID * 56 + Counter * 7 000926a8: 01a21021 addu r2,r13,r2 r2 = PCD + Unit's ID * 56 + Counter * 7 000926ac: a4640000 sh r4,0x0000(r3) Store Color 000926b0: 3084001f andi r4,r4,0x001f r4 = Red Value (5 bit value) 000926b4: a0440000 sb r4,0x0000(r2) Store Red Value 000926b8: a0470001 sb r7,0x0001(r2) Store Green Value 000926bc: a0460002 sb r6,0x0002(r2) Store Blue Value 000926c0: a0480003 sb r8,0x0003(r2) Store Alpha Flag 000926c4: 29220010 slti r2,r9,0x0010 000926c8: 1440ffe8 bne r2,r0,0x0009266c Branch if Counter < 16 000926cc: 254a0002 addiu r10,r10,0x0002 Palette Pointer += 2 000926d0: 03e00008 jr r31 000926d4: 00000000 nop