C# Class Tilengine.Engine

Afficher le fichier Open project: megamarc/Tilengine Class Usage Examples

Méthodes publiques

Свойство Type Description
Animations Tilengine.Animation[]
Layers Tilengine.Layer[]
Sprites Tilengine.Sprite[]

Méthodes publiques

Méthode Description
BeginFrame ( int frame ) : void

Starts active rendering of the current frame

This method is used for active rendering combined with DrawNextScanline(), instead of using delegates for raster effects

Deinit ( ) : void

Deinits engine and frees associated resources

DrawNextScanline ( ) : bool

Draws the next scanline of the frame when doing active rendering (without delegates)

GetAvailableSprite ( ) : Sprite

Init ( int hres, int vres, int numLayers, int numSprites, int numAnimations ) : Engine

Initializes the graphic engine

This is a singleton object: calling Init multiple times will return the same reference

SetRenderTarget ( byte data, int pitch ) : void

Sets the output surface for rendering

The render target pixel format must be 32 bits RGBA

Private Methods

Méthode Description
Engine ( int hres, int vres, int numLayers, int numSprites, int numAnimations ) : System
TLN_BeginFrame ( int frame ) : void
TLN_Deinit ( ) : void
TLN_DrawNextScanline ( ) : bool
TLN_GetAvailableSprite ( ) : int
TLN_GetHeight ( ) : int
TLN_GetLastError ( ) : Error
TLN_GetNumLayers ( ) : int
TLN_GetNumObjects ( ) : uint
TLN_GetNumSprites ( ) : int
TLN_GetUsedMemory ( ) : uint
TLN_GetVersion ( ) : uint
TLN_GetWidth ( ) : int
TLN_Init ( int hres, int vres, int numlayers, int numsprites, int numanimations ) : bool
TLN_InitBPP ( int hres, int vres, int bpp, int numlayers, int numsprites, int numanimations ) : bool
TLN_SetBGBitmap ( IntPtr bitmap ) : bool
TLN_SetBGColor ( int r, int g, int b ) : void
TLN_SetBGPalette ( IntPtr palette ) : bool
TLN_SetLastError ( Error error ) : void
TLN_SetRasterCallback ( RasterCallback callback ) : void
TLN_SetRenderTarget ( byte data, int pitch ) : void
TLN_UpdateFrame ( int time ) : void

Method Details

BeginFrame() public méthode

Starts active rendering of the current frame
This method is used for active rendering combined with DrawNextScanline(), instead of using delegates for raster effects
public BeginFrame ( int frame ) : void
frame int Timestamp value
Résultat void

Deinit() public méthode

Deinits engine and frees associated resources
public Deinit ( ) : void
Résultat void

DrawNextScanline() public méthode

Draws the next scanline of the frame when doing active rendering (without delegates)
public DrawNextScanline ( ) : bool
Résultat bool

GetAvailableSprite() public méthode

public GetAvailableSprite ( ) : Sprite
Résultat Sprite

Init() public static méthode

Initializes the graphic engine
This is a singleton object: calling Init multiple times will return the same reference
public static Init ( int hres, int vres, int numLayers, int numSprites, int numAnimations ) : Engine
hres int horizontal resolution in pixels
vres int vertical resolution in pixels
numLayers int number of layers
numSprites int number of sprites
numAnimations int number of animations
Résultat Engine

SetRenderTarget() public méthode

Sets the output surface for rendering
The render target pixel format must be 32 bits RGBA
public SetRenderTarget ( byte data, int pitch ) : void
data byte Array of bytes that will hold the render target
pitch int Number of bytes per each scanline of the framebuffer
Résultat void

Property Details

Animations public_oe property

public Animation[],Tilengine Animations
Résultat Tilengine.Animation[]

Layers public_oe property

public Layer[],Tilengine Layers
Résultat Tilengine.Layer[]

Sprites public_oe property

public Sprite[],Tilengine Sprites
Résultat Tilengine.Sprite[]