i've added so much and idek anymore

This commit is contained in:
Sebastian Cabrera 2025-08-10 16:50:33 -04:00
parent c120871293
commit 51ff181659
Signed by: okseby
GPG key ID: 2DDBFDEE356CF3DE
19 changed files with 1573 additions and 10 deletions

View file

@ -4,6 +4,8 @@
#include <functional>
#include <unordered_map>
class ParticleManager;
enum class EventType {
Quit,
KeyDown,
@ -33,6 +35,9 @@ public:
using EventCallback = std::function<void(const EventData&)>;
void registerCallback(EventType type, EventCallback callback);
void unregisterCallback(EventType type);
// Particle management
void setParticleManager(ParticleManager* manager);
// Event processing
void processEvent(const SDL_Event& event);
@ -40,9 +45,12 @@ public:
private:
bool running_;
std::unordered_map<EventType, EventCallback> callbacks_;
ParticleManager* particleManager_;
void handleQuitEvent();
void handleKeyEvent(const SDL_Event& event);
void handleMouseEvent(const SDL_Event& event);
void handleWindowEvent(const SDL_Event& event);
void onMouseButtonDown(const EventData& event);
void onMouseButtonUp(const EventData& event);
void onMouseMove(const EventData& event);
};