C# Class FSO.Files.Formats.IFF.Chunks.SPR2Frame

The frame (I.E sprite) of a SPR2 chunk.
Inheritance: ITextureProvider, IWorldTextureProvider
显示文件 Open project: RHY3756547/FreeSO Class Usage Examples

Public Properties

Property Type Description
PalData byte[]
PixelData Color[]
ZBufferData byte[]

Public Methods

Method Description
DecodeIfRequired ( ) : void
GetPixel ( int x, int y ) : Color

Gets a pixel from this SPR2Frame.

GetTexture ( GraphicsDevice device ) : Microsoft.Xna.Framework.Graphics.Texture2D

Gets a texture representing this SPR2Frame.

GetWorldTexture ( GraphicsDevice device ) : WorldTexture
GetZTexture ( GraphicsDevice device ) : Microsoft.Xna.Framework.Graphics.Texture2D

Gets a z-texture representing this SPR2Frame.

Read ( uint version, IoBuffer io, uint guessedSize ) : void

Reads a SPR2 chunk from a stream.

ReadDeferred ( uint version, IoBuffer io ) : void
SPR2Frame ( SPR2 parent ) : System
SetData ( Color px, byte zpx, Rectangle rect ) : Color[]
SetPalt ( PALT p ) : void
SetPixel ( int x, int y, Color color ) : void

Gets a pixel from this SPR2Frame.

Write ( IoWriter io ) : void

Private Methods

Method Description
Decode ( IoBuffer io ) : void

Decodes this SPR2Frame.

Method Details

DecodeIfRequired() public method

public DecodeIfRequired ( ) : void
return void

GetPixel() public method

Gets a pixel from this SPR2Frame.
public GetPixel ( int x, int y ) : Color
x int X position of pixel.
y int Y position of pixel.
return Color

GetTexture() public method

Gets a texture representing this SPR2Frame.
public GetTexture ( GraphicsDevice device ) : Microsoft.Xna.Framework.Graphics.Texture2D
device GraphicsDevice GraphicsDevice instance used for drawing.
return Microsoft.Xna.Framework.Graphics.Texture2D

GetWorldTexture() public method

public GetWorldTexture ( GraphicsDevice device ) : WorldTexture
device GraphicsDevice
return FSO.Files.Utils.WorldTexture

GetZTexture() public method

Gets a z-texture representing this SPR2Frame.
public GetZTexture ( GraphicsDevice device ) : Microsoft.Xna.Framework.Graphics.Texture2D
device GraphicsDevice GraphicsDevice instance used for drawing.
return Microsoft.Xna.Framework.Graphics.Texture2D

Read() public method

Reads a SPR2 chunk from a stream.
public Read ( uint version, IoBuffer io, uint guessedSize ) : void
version uint Version of the SPR2 that this frame belongs to.
io FSO.Files.Utils.IoBuffer
guessedSize uint
return void

ReadDeferred() public method

public ReadDeferred ( uint version, IoBuffer io ) : void
version uint
io FSO.Files.Utils.IoBuffer
return void

SPR2Frame() public method

public SPR2Frame ( SPR2 parent ) : System
parent SPR2
return System

SetData() public method

public SetData ( Color px, byte zpx, Rectangle rect ) : Color[]
px Color
zpx byte
rect Microsoft.Xna.Framework.Rectangle
return Color[]

SetPalt() public method

public SetPalt ( PALT p ) : void
p PALT
return void

SetPixel() public method

Gets a pixel from this SPR2Frame.
public SetPixel ( int x, int y, Color color ) : void
x int X position of pixel.
y int Y position of pixel.
color Color
return void

Write() public method

public Write ( IoWriter io ) : void
io FSO.Files.Utils.IoWriter
return void

Property Details

PalData public_oe property

public byte[] PalData
return byte[]

PixelData public_oe property

public Color[] PixelData
return Color[]

ZBufferData public_oe property

public byte[] ZBufferData
return byte[]