mirror of
https://git.shylie.info/shylie/glerminal.git
synced 2025-11-30 20:50:07 +00:00
Rework sprite API
This commit is contained in:
@@ -6,20 +6,9 @@ extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
enum
|
||||
{
|
||||
GLERMINAL_CELL_SIZE = 8,
|
||||
GLERMINAL_CELL_AREA = GLERMINAL_CELL_SIZE * GLERMINAL_CELL_SIZE
|
||||
};
|
||||
|
||||
typedef void (*glerminal_init_cb)();
|
||||
typedef void (*glerminal_main_cb)(float dt);
|
||||
|
||||
typedef struct glerminal_sprite
|
||||
{
|
||||
unsigned int data[GLERMINAL_CELL_AREA];
|
||||
} glerminal_sprite;
|
||||
|
||||
/**
|
||||
* @brief Call init once, then run the application's mainloop
|
||||
* @param init initialization callback
|
||||
@@ -71,12 +60,9 @@ void glerminal_layer_color(unsigned char layer, unsigned int color);
|
||||
*/
|
||||
void glerminal_layer_scale(unsigned char layer, float scale);
|
||||
|
||||
/**
|
||||
* @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);
|
||||
void glerminal_load_sprites_file(const char* filename);
|
||||
|
||||
void glerminal_load_sprites_buffer(unsigned char width, unsigned char height, const unsigned int* buffer);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user