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

The frame (I.E sprite) of a SPR2 chunk.
Inheritance: ITextureProvider, IWorldTextureProvider
Afficher le fichier Open project: RHY3756547/FreeSO Class Usage Examples

Méthodes publiques

Свойство Type Description
PalData byte[]
PixelData Color[]
ZBufferData byte[]

Méthodes publiques

Méthode 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

Méthode Description
Decode ( IoBuffer io ) : void

Decodes this SPR2Frame.

Method Details

DecodeIfRequired() public méthode

public DecodeIfRequired ( ) : void
Résultat void

GetPixel() public méthode

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.
Résultat Color

GetTexture() public méthode

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

GetWorldTexture() public méthode

public GetWorldTexture ( GraphicsDevice device ) : WorldTexture
device GraphicsDevice
Résultat FSO.Files.Utils.WorldTexture

GetZTexture() public méthode

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

Read() public méthode

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
Résultat void

ReadDeferred() public méthode

public ReadDeferred ( uint version, IoBuffer io ) : void
version uint
io FSO.Files.Utils.IoBuffer
Résultat void

SPR2Frame() public méthode

public SPR2Frame ( SPR2 parent ) : System
parent SPR2
Résultat System

SetData() public méthode

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

SetPalt() public méthode

public SetPalt ( PALT p ) : void
p PALT
Résultat void

SetPixel() public méthode

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
Résultat void

Write() public méthode

public Write ( IoWriter io ) : void
io FSO.Files.Utils.IoWriter
Résultat void

Property Details

PalData public_oe property

public byte[] PalData
Résultat byte[]

PixelData public_oe property

public Color[] PixelData
Résultat Color[]

ZBufferData public_oe property

public byte[] ZBufferData
Résultat byte[]