treballant en el overlay, el text i les notificacions

This commit is contained in:
2026-04-04 18:11:04 +02:00
parent abb23071b5
commit fe8e5d661e
38 changed files with 738 additions and 105 deletions

View File

@@ -0,0 +1,42 @@
#include "core/jail/jgame.hpp"
bool eixir = false;
Uint32 updateTicks = 0;
Uint32 updateTime = 0;
Uint32 cycle_counter = 0;
void JG_Init() {
SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO);
// SDL_WM_SetCaption( title, NULL );
updateTime = SDL_GetTicks();
}
void JG_Finalize() {
SDL_Quit();
}
void JG_QuitSignal() {
eixir = true;
}
bool JG_Quitting() {
return eixir;
}
void JG_SetUpdateTicks(Uint32 milliseconds) {
updateTicks = milliseconds;
}
bool JG_ShouldUpdate() {
if (SDL_GetTicks() - updateTime > updateTicks) {
updateTime = SDL_GetTicks();
cycle_counter++;
return true;
} else {
return false;
}
}
Uint32 JG_GetCycleCounter() {
return cycle_counter;
}