public override void load(Stream stream) { aBinaryReader reader = new aBinaryReader(stream, Endianness.Big); mFormat = (gxTextureFormat)reader.Read8(); // 0000 mTransparency = reader.Read8(); // 0001 mWidth = reader.Read16(); // 0002 mHeight = reader.Read16(); // 0004 mWrapS = (gxWrapMode)reader.Read8(); // 0006 mWrapT = (gxWrapMode)reader.Read8(); // 0007 reader.Step(1); // 0008 (0001) mTlutFormat = (gxTlutFormat)reader.Read8(); // 0009 int tlutentrycount = reader.Read16(); // 000A long tlutoffset = reader.Read32(); // 000C mMipMap = (reader.Read8() != 0); // 0010 mEdgeLOD = (reader.Read8() != 0); // 0011 mBiasClamp = (reader.Read8() != 0); // 0012 mMaxAniso = (gxAnisotropy)reader.Read8(); // 0013 mMinFilter = (gxTextureFilter)reader.Read8(); // 0014 mMagFilter = (gxTextureFilter)reader.Read8(); // 0015 mMinLod = reader.ReadS8(); // 0016 mMaxLod = reader.ReadS8(); // 0017 mImageCount = reader.Read8(); // 0018 (0001) mLodBias = reader.ReadS16(); // 001A long texoffset = reader.Read32(); // 001C loadImageData(reader, texoffset); if (tlutentrycount > 0) { loadPaletteData(reader, tlutentrycount, tlutoffset); } }
public bloPalette(gxTlutFormat format, int transparency, aRGBA[] data) { mFormat = format; mTransparency = transparency; mEntryCount = data.Length; mData = data; }
public bloPalette() { mFormat = gxTlutFormat.IA8; mTransparency = 0; mEntryCount = 0; mData = new aRGBA[0]; }
public bloPalette(gxTlutFormat format, int transparency, int entrycount, aBinaryReader reader) { mFormat = format; mTransparency = transparency; mEntryCount = entrycount; mData = new aRGBA[mEntryCount]; loadPaletteData(reader); }
public override void load(Stream stream) { var reader = new aBinaryReader(stream, Endianness.Big); reader.PushAnchor(); mFormat = (gxTlutFormat)reader.Read8(); mTransparency = reader.Read8(); mEntryCount = reader.Read16(); reader.Goto(0x20); loadPaletteData(reader); }