tbx  0.7.5
Public Member Functions | List of all members
tbx::TranslationTable Class Reference

Class for a sprite colour translation table. More...

#include <sprite.h>

Public Member Functions

 TranslationTable ()
 Construct an empty translation table.
 
bool create (int mode, const ColourPalette *pal=0)
 Create a colour translation table for the given screen mode and optional palette. More...
 
bool create (const UserSprite *s)
 Create a colour translation table for mapping a user sprite to the current screen mode. More...
 
bool create (UserSprite *source, UserSprite *target)
 Create a colour translation table to map from one sprite to another. More...
 
bool create (const WimpSprite *s)
 Create a colour translation table for mapping a wimp sprite to the current screen mode. More...
 
unsigned char * data () const
 Return a pointer to the translation table data.
 

Detailed Description

Class for a sprite colour translation table.

The table is used to convert the colours from a sprite to the screen or from one sprite to another

Member Function Documentation

◆ create() [1/4]

bool TranslationTable::create ( int  mode,
const ColourPalette pal = 0 
)

Create a colour translation table for the given screen mode and optional palette.

Parameters
modescreen mode for palette
palcolour palette to translate or 0 (the default) for the default palette for the mode

◆ create() [2/4]

bool TranslationTable::create ( const UserSprite s)

Create a colour translation table for mapping a user sprite to the current screen mode.

Parameters
sUserSprite to create the table for
Returns
true if table created successfully

◆ create() [3/4]

bool TranslationTable::create ( UserSprite source,
UserSprite target 
)

Create a colour translation table to map from one sprite to another.

Parameters
sourcesource user sprite that will be plotted
targettarget user sprite
Returns
true if table created successfully

◆ create() [4/4]

bool TranslationTable::create ( const WimpSprite s)

Create a colour translation table for mapping a wimp sprite to the current screen mode.

Parameters
sWimpSprite to create the table for
Returns
true if table created successfully

The documentation for this class was generated from the following files: