Esquelet inicial: finestra negra i primera escena

This commit is contained in:
JailDesigner committed 2026-04-18 19:56:59 +02:00
1 parent 959a3871db
commit 7bb1edd08a
20 files changed
+818

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
#include "game/scenes/black_scene.hpp"
#include <SDL3/SDL.h>
#include "core/rendering/screen.hpp"
#include "core/system/event_buffer.hpp"
BlackScene::BlackScene() = default;
void BlackScene::update(int delta_ms) {
elapsed_ms_ += delta_ms;
for (const auto& event : EventBuffer::events) {
if (event.type == SDL_EVENT_KEY_DOWN && event.key.scancode == SDL_SCANCODE_ESCAPE) {
wants_quit_ = true;
}
}
}
void BlackScene::render() {
Screen::get()->clear(0x00, 0x00, 0x00);
Screen::get()->present();
}