mirror of
https://gitlab.com/dosowisko.net/libsuperderpy.git
synced 2025-02-01 02:56:43 +01:00
internal: Add RedrawScreen function
This commit is contained in:
parent
d25d7ee5b9
commit
c94acb7fc3
2 changed files with 19 additions and 0 deletions
|
@ -706,6 +706,24 @@ static bool RefCountIdentity(struct List* elem, void* data) {
|
||||||
return strcmp(data, item->id) == 0;
|
return strcmp(data, item->id) == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SYMBOL_INTERNAL void RedrawScreen(struct Game* game) {
|
||||||
|
#ifdef LIBSUPERDERPY_IMGUI
|
||||||
|
ImGui_ImplAllegro5_NewFrame();
|
||||||
|
igNewFrame();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
DrawGamestates(game);
|
||||||
|
|
||||||
|
#ifdef LIBSUPERDERPY_IMGUI
|
||||||
|
igRender();
|
||||||
|
ImGui_ImplAllegro5_RenderDrawData(igGetDrawData());
|
||||||
|
#endif
|
||||||
|
|
||||||
|
DrawConsole(game);
|
||||||
|
|
||||||
|
al_flip_display();
|
||||||
|
}
|
||||||
|
|
||||||
SYMBOL_INTERNAL ALLEGRO_BITMAP* AddBitmap(struct Game* game, char* filename) {
|
SYMBOL_INTERNAL ALLEGRO_BITMAP* AddBitmap(struct Game* game, char* filename) {
|
||||||
int bucket = HashString(game, filename);
|
int bucket = HashString(game, filename);
|
||||||
struct List* item = FindInList(game->_priv.bitmaps[bucket], filename, RefCountIdentity);
|
struct List* item = FindInList(game->_priv.bitmaps[bucket], filename, RefCountIdentity);
|
||||||
|
|
|
@ -138,5 +138,6 @@ __attribute__((__format__(__printf__, 2, 0))) char* GetGameName(struct Game* gam
|
||||||
ALLEGRO_BITMAP* AddBitmap(struct Game* game, char* filename);
|
ALLEGRO_BITMAP* AddBitmap(struct Game* game, char* filename);
|
||||||
void RemoveBitmap(struct Game* game, char* filename);
|
void RemoveBitmap(struct Game* game, char* filename);
|
||||||
void SetupViewport(struct Game* game);
|
void SetupViewport(struct Game* game);
|
||||||
|
void RedrawScreen(struct Game* game);
|
||||||
|
|
||||||
#endif /* LIBSUPERDERPY_INTERNAL_H */
|
#endif /* LIBSUPERDERPY_INTERNAL_H */
|
||||||
|
|
Loading…
Reference in a new issue