Data Structures | Typedefs | Enumerations
Types

Common data types. More...

Description

Data Structures

struct  TLN_Affine
 
struct  TLN_Tile
 
struct  TLN_SequenceFrame
 
struct  TLN_ColorStrip
 
struct  TLN_SequenceInfo
 
struct  TLN_SpriteData
 
struct  TLN_SpriteInfo
 
struct  TLN_TileInfo
 
struct  TLN_TileAttributes
 
struct  TLN_PixelMap
 
struct  TLN_SpriteState
 

Typedefs

typedef unsigned char bool
 
typedef struct Engine * TLN_Engine
 
typedef struct Tileset * TLN_Tileset
 
typedef struct Tilemap * TLN_Tilemap
 
typedef struct Palette * TLN_Palette
 
typedef struct Spriteset * TLN_Spriteset
 
typedef struct Sequence * TLN_Sequence
 
typedef struct SequencePack * TLN_SequencePack
 
typedef struct Bitmap * TLN_Bitmap
 

Enumerations

enum  TLN_TileFlags {
  FLAG_NONE = 0, FLAG_FLIPX = BITVAL(15), FLAG_FLIPY = BITVAL(14), FLAG_ROTATE = BITVAL(13),
  FLAG_PRIORITY = BITVAL(12)
}
 
enum  TLN_Blend {
  BLEND_NONE, BLEND_MIX25, BLEND_MIX50, BLEND_MIX75,
  BLEND_ADD, BLEND_SUB, BLEND_MOD, BLEND_CUSTOM
}
 
enum  TLN_Overlay {
  TLN_OVERLAY_NONE, TLN_OVERLAY_SHADOWMASK, TLN_OVERLAY_APERTURE, TLN_OVERLAY_SCANLINES,
  TLN_OVERLAY_CUSTOM
}
 
enum  TLN_Player { PLAYER1, PLAYER2, PLAYER3, PLAYER4 }
 
enum  TLN_Input {
  INPUT_NONE, INPUT_UP, INPUT_DOWN, INPUT_LEFT,
  INPUT_RIGHT, INPUT_BUTTON1, INPUT_BUTTON2, INPUT_BUTTON3,
  INPUT_BUTTON4, INPUT_BUTTON5, INPUT_BUTTON6, INPUT_START,
  INPUT_QUIT, INPUT_CRT, INPUT_P1 = (PLAYER1 << 5), INPUT_P2 = (PLAYER2 << 5),
  INPUT_P3 = (PLAYER3 << 5), INPUT_P4 = (PLAYER4 << 5)
}
 
enum  TLN_WindowFlags {
  CWF_FULLSCREEN = (1<<0), CWF_VSYNC = (1<<1), CWF_S1 = (1<<2), CWF_S2 = (2<<2),
  CWF_S3 = (3<<2), CWF_S4 = (4<<2), CWF_S5 = (5<<2)
}
 
enum  TLN_Error {
  TLN_ERR_OK, TLN_ERR_OUT_OF_MEMORY, TLN_ERR_IDX_LAYER, TLN_ERR_IDX_SPRITE,
  TLN_ERR_IDX_ANIMATION, TLN_ERR_IDX_PICTURE, TLN_ERR_REF_TILESET, TLN_ERR_REF_TILEMAP,
  TLN_ERR_REF_SPRITESET, TLN_ERR_REF_PALETTE, TLN_ERR_REF_SEQUENCE, TLN_ERR_REF_SEQPACK,
  TLN_ERR_REF_BITMAP, TLN_ERR_NULL_POINTER, TLN_ERR_FILE_NOT_FOUND, TLN_ERR_WRONG_FORMAT,
  TLN_ERR_WRONG_SIZE, TLN_ERR_UNSUPPORTED
}
 
enum  TLN_LogLevel { TLN_LOG_NONE, TLN_LOG_ERRORS, TLN_LOG_VERBOSE }
 

Typedef Documentation

typedef unsigned char bool

C++ bool type for C language

typedef struct Engine* TLN_Engine

Engine context

typedef struct Tileset* TLN_Tileset

Opaque tileset reference

typedef struct Tilemap* TLN_Tilemap

Opaque tilemap reference

typedef struct Palette* TLN_Palette

Opaque palette reference

typedef struct Spriteset* TLN_Spriteset

Opaque sspriteset reference

typedef struct Sequence* TLN_Sequence

Opaque sequence reference

typedef struct SequencePack* TLN_SequencePack

Opaque sequence pack reference

typedef struct Bitmap* TLN_Bitmap

Opaque bitmap reference

Enumeration Type Documentation

tile/sprite flags. Can be none or a combination of the following:

Enumerator
FLAG_NONE 

no flags

FLAG_FLIPX 

horizontal flip

FLAG_FLIPY 

vertical flip

FLAG_ROTATE 

row/column flip (unsupported, Tiled compatibility)

FLAG_PRIORITY 

tile goes in front of sprite layer

enum TLN_Blend

layer blend modes. Must be one of these and are mutually exclusive:

Enumerator
BLEND_NONE 

blending disabled

BLEND_MIX25 

color averaging 1

BLEND_MIX50 

color averaging 2

BLEND_MIX75 

color averaging 3

BLEND_ADD 

color is always brighter (simulate light effects)

BLEND_SUB 

color is always darker (simulate shadow effects)

BLEND_MOD 

color is always darker (simulate shadow effects)

BLEND_CUSTOM 

user provided blend function with TLN_SetCustomBlendFunction()

overlays for CRT effect

Enumerator
TLN_OVERLAY_NONE 

no overlay

TLN_OVERLAY_SHADOWMASK 

Shadow mask pattern

TLN_OVERLAY_APERTURE 

Aperture grille pattern

TLN_OVERLAY_SCANLINES 

Scanlines pattern

TLN_OVERLAY_CUSTOM 

User-provided when calling TLN_CreateWindow()

enum TLN_Player

Player index for input assignment functions

Enumerator
PLAYER1 

Player 1

PLAYER2 

Player 2

PLAYER3 

Player 3

PLAYER4 

Player 4

enum TLN_Input

Standard inputs query for TLN_GetInput()

Enumerator
INPUT_NONE 

no input

INPUT_UP 

up direction

INPUT_DOWN 

down direction

INPUT_LEFT 

left direction

INPUT_RIGHT 

right direction

INPUT_BUTTON1 

1st action button

INPUT_BUTTON2 

2nd action button

INPUT_BUTTON3 

3th action button

INPUT_BUTTON4 

4th action button

INPUT_BUTTON5 

5th action button

INPUT_BUTTON6 

6th action button

INPUT_START 

Start button

INPUT_QUIT 

Window close (only Player 1 keyboard)

INPUT_CRT 

CRT toggle (only Player 1 keyboard)

INPUT_P1 

request player 1 input (default)

INPUT_P2 

request player 2 input

INPUT_P3 

request player 3 input

INPUT_P4 

request player 4 input

CreateWindow flags. Can be none or a combination of the following:

Enumerator
CWF_FULLSCREEN 

create a fullscreen window

CWF_VSYNC 

sync frame updates with vertical retrace

CWF_S1 

create a window the same size as the framebuffer

CWF_S2 

create a window 2x the size the framebuffer

CWF_S3 

create a window 3x the size the framebuffer

CWF_S4 

create a window 4x the size the framebuffer

CWF_S5 

create a window 5x the size the framebuffer

enum TLN_Error

Error codes

Enumerator
TLN_ERR_OK 

No error

TLN_ERR_OUT_OF_MEMORY 

Not enough memory

TLN_ERR_IDX_LAYER 

Layer index out of range

TLN_ERR_IDX_SPRITE 

Sprite index out of range

TLN_ERR_IDX_ANIMATION 

Animation index out of range

TLN_ERR_IDX_PICTURE 

Picture or tile index out of range

TLN_ERR_REF_TILESET 

Invalid TLN_Tileset reference

TLN_ERR_REF_TILEMAP 

Invalid TLN_Tilemap reference

TLN_ERR_REF_SPRITESET 

Invalid TLN_Spriteset reference

TLN_ERR_REF_PALETTE 

Invalid TLN_Palette reference

TLN_ERR_REF_SEQUENCE 

Invalid TLN_Sequence reference

TLN_ERR_REF_SEQPACK 

Invalid TLN_SequencePack reference

TLN_ERR_REF_BITMAP 

Invalid TLN_Bitmap reference

TLN_ERR_NULL_POINTER 

Null pointer as argument

TLN_ERR_FILE_NOT_FOUND 

Resource file not found

TLN_ERR_WRONG_FORMAT 

Resource file has invalid format

TLN_ERR_WRONG_SIZE 

A width or height parameter is invalid

TLN_ERR_UNSUPPORTED 

Unsupported function

Debug level

Enumerator
TLN_LOG_NONE 

Don't print anything (default)

TLN_LOG_ERRORS 

Print only runtime errors

TLN_LOG_VERBOSE 

Print everything