mirror of
https://git.shylie.info/shylie/glerminal.git
synced 2025-10-03 05:20:17 +00:00
Initial public api version
This commit is contained in:
@@ -12,7 +12,8 @@ enum
|
||||
GLERMINAL_CELL_AREA = GLERMINAL_CELL_SIZE * GLERMINAL_CELL_SIZE
|
||||
};
|
||||
|
||||
typedef void (*glerminal_main_cb)();
|
||||
typedef void (*glerminal_init_cb)();
|
||||
typedef void (*glerminal_main_cb)(float dt);
|
||||
|
||||
typedef struct glerminal_sprite
|
||||
{
|
||||
@@ -20,10 +21,10 @@ typedef struct glerminal_sprite
|
||||
} glerminal_sprite;
|
||||
|
||||
/**
|
||||
* @brief Run the application's mainloop
|
||||
* @brief Call init once, then run the application's mainloop
|
||||
* @param main main calllback
|
||||
*/
|
||||
void glerminal_run(glerminal_main_cb main);
|
||||
void glerminal_run(glerminal_init_cb init, glerminal_main_cb main);
|
||||
|
||||
/**
|
||||
* @brief Update the displayed screen contents to the current state of the library
|
||||
@@ -47,6 +48,20 @@ void glerminal_set(unsigned char x, unsigned char y, unsigned char layer, unsign
|
||||
*/
|
||||
unsigned char glerminal_get(unsigned char x, unsigned char y, unsigned char layer);
|
||||
|
||||
/**
|
||||
* @brief Upload sprite to the given sprite ID
|
||||
* @param id The ID of the sprite to change
|
||||
* @param sprite The new sprite
|
||||
*/
|
||||
void glerminal_update_sprite(unsigned char id, glerminal_sprite sprite);
|
||||
|
||||
/**
|
||||
* @brief Update palette color at index ID
|
||||
* @param id Palette index to update
|
||||
* @param color New color
|
||||
*/
|
||||
void glerminal_update_palette(unsigned char id, unsigned int color);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user