internal void ReadTdw(byte[] Tdw) { int widthPointer = BitConverter.ToInt32(Tdw, 0); int dataPointer = BitConverter.ToInt32(Tdw, 4); TIM2 tim = new TIM2(Tdw, (uint)dataPointer); menuFont = new Texture2D(Memory.graphics.GraphicsDevice, tim.GetWidth, tim.GetHeight); menuFont.SetData(tim.CreateImageBuffer(tim.GetClutColors(7))); }
public void ReadTdw(byte[] Tdw) { uint widthPointer = BitConverter.ToUInt32(Tdw, 0); uint dataPointer = BitConverter.ToUInt32(Tdw, 4); getWidths(Tdw, widthPointer, dataPointer - widthPointer); TIM2 tim = new TIM2(Tdw, dataPointer); menuFont = new Texture2D(Memory.graphics.GraphicsDevice, tim.GetWidth, tim.GetHeight); menuFont.SetData(tim.CreateImageBuffer(tim.GetClutColors(ColorID.White))); }
private static void ReadTexture(uint texturePointer) { textureInterface = new TIM2(stageBuffer, texturePointer); textures = new Texture2D[textureInterface.GetClutCount]; for (int i = 0; i < textureInterface.GetClutCount; i++) { byte[] b = textureInterface.CreateImageBuffer(textureInterface.GetClutColors(i)); Texture2D tex = new Texture2D(Memory.spriteBatch.GraphicsDevice, textureInterface.GetWidth, textureInterface.GetHeight, false, SurfaceFormat.Color); tex.SetData(b); textures[i] = tex; } }