DSC Engine
|
Helper class to deal with graphics size computations. More...
#include <measure.hpp>
Public Member Functions | |
Measure & | _4bpp () |
chain function to set color depth to 4 bpp More... | |
Measure & | _8bpp () |
chain function to set color depth to 8 bpp More... | |
Measure & | _16bpp () |
chain function to set color depth to 16 bpp More... | |
Measure & | bpp (int color_depth) |
alternative to _4bpp(), _8bpp() or _16bpp() with dynamic parameter More... | |
Measure & | metatile (int tw, int th) |
chain function to set meta tile size More... | |
Measure & | text () |
chain function to set map type as text (tiles) | |
Measure & | bitmap () |
chain function to set map type as bitmap | |
MeasureValue | tiles (int count) const |
computes the size of a number of tiles given the measure settings More... | |
MeasureValue | tiles (int rows_count, int cols_count) const |
computes the size of a matrix of tiles given the measure settings More... | |
MeasureValue | bitmap (int width, int height) const |
computes the size of a bitmap given the measure settings More... | |
int | tiles_count (int size) const |
finds how many tiles can fit in memory block of a certain size, given the measure settings More... | |
MeasureValue | map_size (int width, int height) const |
int | bytes_per_map_entry () const |
int | tile_id (void *address, void *base, int mapping_step) const |
Helper class to deal with graphics size computations.
Measure & DSC::Measure::_16bpp | ( | ) |
chain function to set color depth to 16 bpp
Measure & DSC::Measure::_4bpp | ( | ) |
chain function to set color depth to 4 bpp
Measure & DSC::Measure::_8bpp | ( | ) |
chain function to set color depth to 8 bpp
MeasureValue DSC::Measure::bitmap | ( | int | width, |
int | height | ||
) | const |
computes the size of a bitmap given the measure settings
width | bitmap's width in pixels |
height | bitmap's height in pixels |
Measure & DSC::Measure::bpp | ( | int | color_depth | ) |
Measure & DSC::Measure::metatile | ( | int | tw, |
int | th | ||
) |
chain function to set meta tile size
tw | meta tile width (e.g. for 32x16px tiles, tw equals 4) |
th | meta tile height (e.g. for 32x16px tiles, th equals 2) |
MeasureValue DSC::Measure::tiles | ( | int | count | ) | const |
computes the size of a number of tiles given the measure settings
count | the number of tiles |
In computing the tiles size, the color depth and metatile data are taken into account. By default, tiles are 8x8px with 4bpp color-depth
MeasureValue DSC::Measure::tiles | ( | int | rows_count, |
int | cols_count | ||
) | const |
computes the size of a matrix of tiles given the measure settings
rows_count | number of rows in the tiles matrix |
cols_count | number of columns in the tiles matrix |
In computing the tiles size, the color depth and metatile data are taken into account. By default, tiles are 8x8px with 4bpp color-depth
int DSC::Measure::tiles_count | ( | int | size | ) | const |
finds how many tiles can fit in memory block of a certain size, given the measure settings
size | the memory block size |