ja tenim algo de gamecontext. lo proxim va a ser fer algo per a la gestió del temps

This commit is contained in:
JailDesigner committed 2026-11-06 09:31:48 +01:00
1 parent 9b168f02eb
commit ffc2dee311
7 files changed
+52 -6

No files matched your search

+14 -1
View File
@@ -64,4 +64,17 @@ auto Video::initSDL() -> int {
SDL_Delay(1000);
return 0;
}
}
void Video::clean(int color) {
const Uint8 r = static_cast<Uint8>((color >> 16) & 0xFF);
const Uint8 g = static_cast<Uint8>((color >> 8) & 0xFF);
const Uint8 b = static_cast<Uint8>(color & 0xFF);
SDL_SetRenderDrawColor(renderer_, r, g, b, 255);
SDL_RenderClear(renderer_);
}
void Video::present() {
SDL_RenderPresent(renderer_);
}