Initial public api version

This commit is contained in:
Shylie
2024-05-14 16:46:30 -05:00
parent 06c7aa9eb5
commit a32897d5d4
4 changed files with 99 additions and 10 deletions

View File

@@ -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