29 #ifndef _NANO_ENGINE_TILER_H_ 30 #define _NANO_ENGINE_TILER_H_ 49 #define TILE_128x64_MONO NanoCanvas1, 128, 64, 7 50 #define TILE_8x8_MONO NanoCanvas1, 8, 8, 3 51 #define TILE_16x16_MONO NanoCanvas1, 16, 16, 4 52 #define TILE_32x32_MONO NanoCanvas1, 32, 32, 4 53 // Tiles for 8-bit displays 54 #define TILE_8x8_RGB8 NanoCanvas8, 8, 8, 3 55 #define TILE_16x16_RGB8 NanoCanvas8, 16, 16, 4 56 #define TILE_32x32_RGB8 NanoCanvas8, 32, 32, 5 57 #define TILE_8x8_MONO_8 NanoCanvas1_8,8, 8, 3 58 // Tiles for 16-bit displays 59 #define TILE_8x8_RGB16 NanoCanvas16, 8, 8, 3 61 #define ADATILE_8x8_MONO AdafruitCanvas1, 8, 8, 3 62 #define ADATILE_8x8_RGB8 AdafruitCanvas8, 8, 8, 3 63 #define ADATILE_8x8_RGB16 AdafruitCanvas16, 8, 8, 3 79 template<
class C, lcdu
int_t W, lcdu
int_t H, u
int8_t B>
126 if ((point.
y<0) || ((point.
y>>B)>=NE_MAX_TILES_NUM))
return;
134 static void refresh(lcdint_t x1, lcdint_t y1, lcdint_t x2, lcdint_t y2)
140 y2 =
min((y2>>B), NE_MAX_TILES_NUM - 1);
141 for (uint8_t y=y1; y<=y2; y++)
143 for(uint8_t x=x1>>B; x<=(x2>>B); x++)
165 static void refreshWorld(lcdint_t x1, lcdint_t y1, lcdint_t x2, lcdint_t y2)
167 refresh(x1 - offset.
x, y1 - offset.
y, x2 - offset.
x, y2 - offset.
y);
186 canvas.offset -= offset;
196 canvas.offset += offset;
280 static uint8_t m_buffer[W * H * C::BITS_PER_PIXEL / 8];
285 template<
class C, lcdu
int_t W, lcdu
int_t H, u
int8_t B>
288 template<
class C, lcdu
int_t W, lcdu
int_t H, u
int8_t B>
291 template<
class C, lcdu
int_t W, lcdu
int_t H, u
int8_t B>
294 template<
class C, lcdu
int_t W, lcdu
int_t H, u
int8_t B>
297 template<
class C, lcdu
int_t W, lcdu
int_t H, u
int8_t B>
300 template<
class C, lcdu
int_t W, lcdu
int_t H, u
int8_t B>
328 template<
class C, lcdu
int_t W, lcdu
int_t H, u
int8_t B>
350 canvas.printFixed( textPos.
x, textPos.
y, msg);
static const uint8_t NE_TILE_SIZE_BITS
static void moveToAndRefresh(const NanoPoint &position)
static const lcduint_t NE_TILE_WIDTH
const NanoPoint & getPosition() const
static void refresh(const NanoPoint &point)
static void refreshWorld(const NanoPoint &point)
static const lcduint_t NE_TILE_HEIGHT
#define RGB_COLOR8(r, g, b)
static bool collision(NanoPoint &p, NanoRect &rect)
Returns true if point is inside the rectangle area. Returns true if point is inside the rectangle are...
bool collision(const NanoPoint &p) const
ssd1306_lcd_t ssd1306_lcd
static void refresh(const NanoRect &rect)
static void worldCoordinates()
static void drawCallback(TNanoEngineOnDraw callback)
static void localCoordinates()
static void displayBuffer()
refreshes content on oled display. Refreshes content on oled display. Call it, if you want to update ...
SFixedFontInfo s_fixedFont
SFontHeaderRecord h
record, containing information on font
static void refreshWorld(lcdint_t x1, lcdint_t y1, lcdint_t x2, lcdint_t y2)
static void displayPopup(const char *msg)
prints popup message over display content prints popup message over display content ...
static void refreshWorld(const NanoRect &rect)
static TNanoEngineOnDraw m_onDraw
static void refresh(lcdint_t x1, lcdint_t y1, lcdint_t x2, lcdint_t y2)
static void moveTo(const NanoPoint &position)
bool(* TNanoEngineOnDraw)(void)
static const uint8_t NE_MAX_TILES_NUM
static uint16_t m_refreshFlags[NE_MAX_TILES_NUM]