2012-05-07 06:56:00 +00:00
|
|
|
/**
|
|
|
|
* \addtogroup bitmap
|
|
|
|
* @{
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @file bitmapscroller.h
|
|
|
|
* @brief Public interface for the Borg's bitmap scroller.
|
|
|
|
* @author Christian Kroll
|
|
|
|
*/
|
|
|
|
|
2010-08-22 03:12:56 +00:00
|
|
|
#ifndef BITMAP_SCROLLER_H_
|
|
|
|
#define BITMAP_SCROLLER_H_
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* This type definition describes a function which is supposed to provide an
|
|
|
|
* eight-by-one pixel chunk of a bitmap for a given bit plane. The x-coordinates
|
|
|
|
* are based on chunks, not on pixels (i.e. nChunkX=2 has to be interpreted as
|
|
|
|
* a pixel based x-coordinate of 16). This way it is easy to provide the bitmap
|
|
|
|
* via a simple lookup in an uint8_t typed array. (0,0) is considered as the top
|
|
|
|
* left coordinate.
|
|
|
|
* @param nBitPlane Number of the desired bit plane.
|
|
|
|
* @param nChunkX x-coordinate of the chunk.
|
|
|
|
* @param nChunkY y-coordinate of the chunk.
|
|
|
|
* @param nFrame The current frame number (in case you want to animate sth.).
|
|
|
|
* @return an eight-by-one chunk of the bitmap packed into an uint8_t typed
|
|
|
|
*/
|
2011-01-25 22:59:55 +00:00
|
|
|
typedef uint8_t (*bitmap_getChunk_t)(unsigned char const nBitPlane,
|
|
|
|
unsigned char const nChunkX,
|
|
|
|
unsigned char const nChunkY,
|
2010-08-22 03:12:56 +00:00
|
|
|
unsigned int const nFrame);
|
|
|
|
|
|
|
|
|
2011-01-25 22:59:55 +00:00
|
|
|
void bitmap_scroll(unsigned char const nWidth,
|
|
|
|
unsigned char const nHeight,
|
2010-08-22 03:12:56 +00:00
|
|
|
unsigned char const nBitPlanes,
|
2012-01-30 20:30:04 +00:00
|
|
|
unsigned int const nTickCount,
|
|
|
|
unsigned int const nTick,
|
|
|
|
unsigned char const nFrameTickDivider,
|
|
|
|
unsigned char const nMovementTickDivider,
|
2010-08-22 03:12:56 +00:00
|
|
|
bitmap_getChunk_t fpGetChunk);
|
|
|
|
|
|
|
|
#endif /* BITMAP_SCROLLER_H_ */
|
2012-05-07 06:56:00 +00:00
|
|
|
|
|
|
|
/*@}*/
|