It should look like this:

Code: Select all
if rwTexPixelFormat == 11:
untwid = bytearray()
for x in range(rwTexWidth):
for y in range(rwTexHeight):
idx = noesis.morton2D(x, y)
untwid += data[idx * 1:idx * 1 + 1]
data = rapi.imageDecodeRawPal(untwid, bs.palette, rwTexWidth, rwTexHeight, 8, "b8 g8 r8 a8")
texFmt = noesis.NOESISTEX_RGBA32
Code: Select all
idx = noesis.morton2D(y, x)
rwUntwid += data[idx * 2:idx * 2 + 2]