73 lines
1.8 KiB
C
73 lines
1.8 KiB
C
#ifndef GFX_H__
|
|
#define GFX_H__
|
|
|
|
/* *************************************
|
|
* Includes
|
|
* *************************************/
|
|
|
|
/* *************************************
|
|
* Defines
|
|
* *************************************/
|
|
|
|
/* *************************************
|
|
* Structs and enums
|
|
* *************************************/
|
|
|
|
enum tScreenResolution
|
|
{
|
|
X_SCREEN_RESOLUTION = 84,
|
|
Y_SCREEN_RESOLUTION = 48
|
|
};
|
|
|
|
enum tColour
|
|
{
|
|
GFX_WHITE,
|
|
GFX_BLACK,
|
|
GFX_INVERT,
|
|
GFX_GRAY
|
|
};
|
|
|
|
enum tMirror
|
|
{
|
|
GFX_NOFLIP,
|
|
GFX_FLIPH,
|
|
GFX_FLIPV,
|
|
GFX_FLIPHV = (GFX_FLIPH | GFX_FLIPV)
|
|
};
|
|
|
|
enum tRotation
|
|
{
|
|
GFX_NOROT,
|
|
GFX_ROTCCW,
|
|
GFX_ROTCW
|
|
};
|
|
|
|
/* *************************************
|
|
* Global prototypes
|
|
* *************************************/
|
|
|
|
void GfxDrawSprite(TYPE_SPRITE* ptrSprite);
|
|
void GfxDrawCircle(uint16_t x, uint16_t y, uint8_t radius, int8_t color);
|
|
void GfxDrawFillCircle(uint16_t x, uint16_t y, uint8_t radius, int8_t color);
|
|
void GfxDrawRectangle(uint8_t x, uint8_t y, uint8_t w, uint8_t h, int8_t color);
|
|
void GfxFillRectangle(uint8_t x, uint8_t y, uint8_t w, uint8_t h, int8_t color);
|
|
void GfxDrawLine(uint8_t x0, uint8_t x1, uint8_t y0, uint8_t y1, uint8_t color);
|
|
bool GfxRefreshNeeded(void);
|
|
void GfxShowKeyboard(char* str, uint8_t length);
|
|
uint8_t GfxGetWidthFromSpriteData(const uint8_t* sprData);
|
|
uint8_t GfxGetHeightFromSpriteData(const uint8_t* sprData);
|
|
bool GfxIsSpriteInsideScreenArea(TYPE_SPRITE* spr);
|
|
void GfxClearScreen(void);
|
|
#ifdef __cplusplus
|
|
void GfxPrintText_Flash(const __FlashStringHelper * str);
|
|
#endif /* cplusplus. */
|
|
void GfxPrintText(const char* str, uint8_t x, uint8_t y);
|
|
void GfxPrintTextFont(const char* str, const uint8_t* font, uint8_t x, uint8_t y);
|
|
void GfxInit(void);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif /* cplusplus. */
|
|
|
|
#endif /* GFX_H__. */
|