#include <measure-framerate-stubs.hh>
◆ done()
| void Source4Bpp::done |
( |
| ) |
|
|
inlineoverridevirtual |
◆ fillTiles()
| void Source4Bpp::fillTiles |
( |
int |
startLine, |
|
|
int |
lineCount, |
|
|
int |
tileWidth, |
|
|
int |
firstTile, |
|
|
std::vector< Tile::Ptr > & |
tiles |
|
) |
| |
|
overridevirtual |
Provide bitmap data
While the TiledBitmap is loaded, this function will be called several times. Each time, this function has to fill the provided tiles with bitmap data.
The given tiles are horizontally adjacent.
- Parameters
-
| startLine | y coordinate of the first line in the set of tiles |
| lineCount | The number of lines that are to be filled. This equals the height of the tiles |
| tileWidth | The width of one tile |
| firstTile | Index of the first tile provided. This means that the first x coordinate is firsttile * tileWidth |
| tiles | The tiles that are to be filled. |
Implements SourcePresentation.
69{
71 {
72 byte*
data = tile->data.get();
73 for(int y = 0; y < lineCount; y++)
74 {
75 for(int x = 0; x < tileWidth / 2; x++)
76 {
77 byte const v = 2 * x + y;
78
79 *
data = ((v & 0xF) << 4) | ((v + 1) & 0xF);
81 }
82 }
83 }
84}
uint8_t data
Definition blob-tests.cc:36
std::shared_ptr< Tile > Ptr
Definition tile.hh:19
◆ getName()
| std::string Source4Bpp::getName |
( |
| ) |
|
|
inlineoverridevirtual |
The documentation for this class was generated from the following files: