Henchman800 wrote: ↑Fri Mar 20, 2020 6:42 pm
TRUE! ^^
would still be great to have one to batch convert the textures.
yeah, batch me
Sometimes it's a matter of thinking, sometimes it's a matter of trying..
.
what_wms.jpg
(palette is always annoying for me

)
well, simple enough, just a little swap:
(didn't seek/read image width and high, too lazy, sorry)
Code: Select all
from inc_noesis import *
def registerNoesisTypes():
handle = noesis.register("whatever", ".wms")
noesis.setHandlerTypeCheck(handle, noepyCheckType)
noesis.setHandlerLoadRGBA(handle, noepyLoadRGBA)
#noesis.logPopup();
return 1
def noepyCheckType(data):
bs = NoeBitStream(data)
if bs.readBytes(2) != b'\x05\x80':
print("wrong sig!")
return 0
return 1
def noepyLoadRGBA(data, texList):
bs = NoeBitStream(data)
dataOffset = 40
imgWidth = 128
imgHeight = 64
bs.seek(dataOffset)
data = bs.readBytes(bs.getSize() - bs.tell())
data = rapi.imageDecodeRaw(data, imgWidth, imgHeight, "b5 g6 r5")
texList.append(NoeTexture(rapi.getInputName(), imgWidth, imgHeight, data, noesis.NOESISTEX_RGBA32))
return 1
(dunno whether the sig applies to all .wms files!)
You do not have the required permissions to view the files attached to this post.