Skip to content

Commit

Permalink
Compilation support: Conductor + Controllable
Browse files Browse the repository at this point in the history
  • Loading branch information
amtoine authored and aTxr committed Jan 19, 2022
1 parent 7744a88 commit f416cbb
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 16 deletions.
13 changes: 2 additions & 11 deletions include/conductor/Conductor.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,16 @@
#define DEF_CONDUCTOR

#include <SFML/Graphics.hpp>
#include "conductor/ControllerHandler.h"
#include "conductor/ScheduleHandler.h"
#include "conductor/PhysicsHandler.h"
#include "conductor/DrawHandler.h"
#include "conductor/AudioHandler.h"
#include "Controllable.h"

class Conductor {
public:
Conductor();
void flush();
Controlable[] getEntities();
Controllable* getEntities();
~Conductor();

private:
ControllerHandler controllerHandler;
ScheduleHandler scheduleHandler;
PhysicsHandler physicsHandler;
DrawHandler drawHandler;
AudioHandler audioHandler;
};

#endif
9 changes: 5 additions & 4 deletions include/conductor/Controllable.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@
#define DEF_CONTROLLABLE

#include <SFML/Graphics.hpp>
#include <SFML/Window/Keyboard.hpp>

class Controllable {
public:
Controllable();
void keyHeldEvent(Key key, int timePressed)
void keyNotHeldEvent(Key key, int timePressed)
void keyPressedEvent(Key key, int timePressed)
void keyReleasedEvent(Key key, int timePressed)
void keyHeldEvent(sf::Keyboard::Key key, int timePressed);
void keyNotHeldEvent(sf::Keyboard::Key key, int timePressed);
void keyPressedEvent(sf::Keyboard::Key key, int timePressed);
void keyReleasedEvent(sf::Keyboard::Key key, int timePressed);
~Controllable();

private:
Expand Down
15 changes: 15 additions & 0 deletions src/conductor/Conductor.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#include "Conductor.h"

Conductor::Conductor(){
}

void Conductor::flush(){
}

Controllable* Conductor::getEntities(){
return NULL;
}

Conductor::~Conductor(){
}

15 changes: 15 additions & 0 deletions src/conductor/Controllable.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#include "Controllable.h"

Controllable::Controllable(){
}
void Controllable::keyHeldEvent(sf::Keyboard::Key key, int timePressed){
}
void Controllable::keyNotHeldEvent(sf::Keyboard::Key key, int timePressed){
}
void Controllable::keyPressedEvent(sf::Keyboard::Key key, int timePressed){
}
void Controllable::keyReleasedEvent(sf::Keyboard::Key key, int timePressed){
}
Controllable::~Controllable(){
}

2 changes: 1 addition & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ int main(){
}

// objects update.
conductor.flush()
conductor.flush();
window.clear(sf::Color::Black);
// TODO
window.display();
Expand Down

0 comments on commit f416cbb

Please sign in to comment.