mirror of
https://git.shylie.info/shylie/glerminal.git
synced 2026-01-29 06:30:08 +00:00
proof-of-concept graphics implementation
This commit is contained in:
@@ -6,12 +6,47 @@ extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
enum
|
||||
{
|
||||
GLERMINAL_CELL_SIZE = 8,
|
||||
GLERMINAL_CELL_AREA = GLERMINAL_CELL_SIZE * GLERMINAL_CELL_SIZE
|
||||
};
|
||||
|
||||
typedef void (*glerminal_main_cb)();
|
||||
|
||||
typedef struct glerminal_sprite
|
||||
{
|
||||
unsigned char data[GLERMINAL_CELL_AREA];
|
||||
} glerminal_sprite;
|
||||
|
||||
/**
|
||||
* @brief Run the application's mainloop
|
||||
* @param main main calllback
|
||||
*/
|
||||
void glerminal_run(glerminal_main_cb main);
|
||||
|
||||
/**
|
||||
* @brief Update the displayed screen contents to the current state of the library
|
||||
*/
|
||||
void glerminal_flush();
|
||||
|
||||
/**
|
||||
* @brief Set a cell's sprite
|
||||
* @param x position of the cell in the range [0, 32)
|
||||
* @param y position of the cell in the range [0, 20)
|
||||
* @param layer layer of the cell in the range [0, 16)
|
||||
* @param sprite sprite's index in the range [0, 256)
|
||||
*/
|
||||
void glerminal_set(unsigned char x, unsigned char y, unsigned char layer, unsigned char sprite);
|
||||
/**
|
||||
* @brief Get a cell's sprite
|
||||
* @param x position of the cell in the range [0, 32)
|
||||
* @param y position of the cell in the range [0, 20)
|
||||
* @param layer layer of the cell in the range [0, 16)
|
||||
* @return sprite index currently assigned to the cell
|
||||
*/
|
||||
unsigned char glerminal_get(unsigned char x, unsigned char y, unsigned char layer);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user