public Characterdata(byte[] data, int width, int height, Graphic.GXTexFmt fmt) { this.Header = new DataBlockHeader("RAHC", 0U); this.W = (ushort)(width / 8); this.H = (ushort)(height / 8); this.pixelFmt = fmt; this.mapingType = Graphic.GXOBJVRamModeChar.GX_OBJVRAMMODE_CHAR_2D; this.characterFmt = Graphic.NNSG2dCharacterFmt.NNS_G2D_CHARACTER_FMT_CHAR; this.szByte = (uint)data.Length; this.pRawData = 24U; this.Data = data; }
public Characterdata(EndianBinaryReader er, out bool OK) { bool OK1; this.Header = new DataBlockHeader(er, "RAHC", out OK1); if (!OK1) { OK = false; } else { this.H = er.ReadUInt16(); this.W = er.ReadUInt16(); this.pixelFmt = (Graphic.GXTexFmt)er.ReadUInt32(); this.mapingType = (Graphic.GXOBJVRamModeChar)er.ReadUInt32(); this.characterFmt = (Graphic.NNSG2dCharacterFmt)er.ReadUInt32(); this.szByte = er.ReadUInt32(); this.pRawData = er.ReadUInt32(); this.Data = er.ReadBytes((int)this.szByte); OK = true; } }