migrant a SDL3
This commit is contained in:
33
source/sdl_manager.hpp
Normal file
33
source/sdl_manager.hpp
Normal file
@@ -0,0 +1,33 @@
|
||||
// sdl_manager.hpp - Gestor d'inicialització de SDL3
|
||||
// © 2025 Port a C++20 amb SDL3
|
||||
|
||||
#ifndef SDL_MANAGER_HPP
|
||||
#define SDL_MANAGER_HPP
|
||||
|
||||
#include <SDL3/SDL.h>
|
||||
#include <cstdint>
|
||||
|
||||
class SDLManager {
|
||||
public:
|
||||
SDLManager(int amplada, int alcada, const char* titol);
|
||||
~SDLManager();
|
||||
|
||||
// No permetre còpia ni assignació
|
||||
SDLManager(const SDLManager&) = delete;
|
||||
SDLManager& operator=(const SDLManager&) = delete;
|
||||
|
||||
// Funcions principals
|
||||
void neteja(uint8_t r = 0, uint8_t g = 0, uint8_t b = 0);
|
||||
void presenta();
|
||||
bool processar_events();
|
||||
|
||||
// Getters
|
||||
SDL_Renderer* obte_renderer() { return renderer_; }
|
||||
|
||||
private:
|
||||
SDL_Window* finestra_;
|
||||
SDL_Renderer* renderer_;
|
||||
bool inicialitzat_;
|
||||
};
|
||||
|
||||
#endif // SDL_MANAGER_HPP
|
||||
Reference in New Issue
Block a user