-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
54 changed files
with
1,582 additions
and
169 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,4 +7,7 @@ build/* | |
docs/* | ||
emsdk/ | ||
build_web/* | ||
wasm-python.py | ||
wasm-python.py | ||
lua54* | ||
include/* | ||
save/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,4 +31,4 @@ RAY::Vector3::operator ::Vector3() const | |
v.y = this->y; | ||
v.z = this->z; | ||
return v; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// | ||
// Created by hbenjamin on 6/18/21. | ||
// | ||
|
||
#include "ResumeLobbyComponent.hpp" | ||
|
||
namespace BBM | ||
{ | ||
ResumeLobbyComponent::ResumeLobbyComponent(WAL::Entity &entity, int playerNumber, WAL::Entity &button, WAL::Entity &tile, int pColor) | ||
: WAL::Component(entity), | ||
playerID(playerNumber), | ||
playerColor(pColor), | ||
readyButton(button), | ||
coloredTile(tile) | ||
{} | ||
|
||
WAL::Component *ResumeLobbyComponent::clone(WAL::Entity &entity) const | ||
{ | ||
return new ResumeLobbyComponent(entity, this->playerID, this->readyButton, this->coloredTile, this->playerColor); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// | ||
// Created by hbenjamin on 6/18/21. | ||
// | ||
|
||
#pragma once | ||
|
||
#include <Component/Component.hpp> | ||
#include <Entity/Entity.hpp> | ||
#include <Color.hpp> | ||
#include <Component/Controllable/ControllableComponent.hpp> | ||
#include <chrono> | ||
|
||
namespace BBM | ||
{ | ||
class ResumeLobbyComponent : public WAL::Component | ||
{ | ||
public: | ||
//! @brief The layout used for this player. | ||
ControllableComponent::Layout layout = ControllableComponent::NONE; | ||
//! @brief The ID of the lobby player (from 0 to 3) | ||
int playerID; | ||
//! @brief The color of the player (as an index) | ||
int playerColor; | ||
//! @brief Is this player ready | ||
bool ready = false; | ||
//! @brief The entity containing the ready display. | ||
WAL::Entity &readyButton; | ||
//! @brief The colored rectangle behind the player. | ||
WAL::Entity &coloredTile; | ||
//! @brief The time of last input that this lobby player has made. | ||
std::chrono::time_point<std::chrono::steady_clock> lastInput; | ||
|
||
Component *clone(WAL::Entity &entity) const override; | ||
|
||
//! @brief Create a new lobby component. | ||
explicit ResumeLobbyComponent(WAL::Entity &entity, int playerNumber, WAL::Entity &button, WAL::Entity &tile, int pColor); | ||
//! @brief A lobby component is copyable. | ||
ResumeLobbyComponent(const ResumeLobbyComponent &) = default; | ||
//! @brief A default destructor | ||
~ResumeLobbyComponent() override = default; | ||
//! @brief A lobby component is not assignable. | ||
ResumeLobbyComponent &operator=(const ResumeLobbyComponent &) = delete; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// | ||
// Created by cbihan on 18/06/2021. | ||
// | ||
|
||
#include "SpeedComponent.hpp" | ||
|
||
namespace BBM | ||
{ | ||
SpeedComponent::SpeedComponent(WAL::Entity &entity) : | ||
WAL::Component(entity) | ||
{ | ||
} | ||
|
||
WAL::Component *SpeedComponent::clone(WAL::Entity &entity) const | ||
{ | ||
return new SpeedComponent(this->_entity, this->speed); | ||
} | ||
|
||
SpeedComponent::SpeedComponent(WAL::Entity &entity, float entitySpeed) : | ||
WAL::Component(entity), | ||
speed(entitySpeed) | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// | ||
// Created by cbihan on 18/06/2021. | ||
// | ||
|
||
#pragma once | ||
|
||
#include <Component/Component.hpp> | ||
|
||
namespace BBM | ||
{ | ||
class SpeedComponent : public WAL::Component | ||
{ | ||
public: | ||
//! @brief entity speed | ||
float speed = .15f; | ||
|
||
//! @inherit | ||
WAL::Component *clone(WAL::Entity &entity) const override; | ||
|
||
//! @brief Initialize a new controllable component. | ||
explicit SpeedComponent(WAL::Entity &entity); | ||
|
||
//! @brief Initialize a new controllable component. | ||
explicit SpeedComponent(WAL::Entity &entity, float entitySpeed); | ||
//! @brief A Controllable component is copy constructable. | ||
SpeedComponent(const SpeedComponent &) = default; | ||
//! @brief default destructor | ||
~SpeedComponent() override = default; | ||
//! @brief A Controllable component can't be assigned | ||
SpeedComponent &operator=(const SpeedComponent &) = delete; | ||
}; | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// | ||
// Created by hbenjamin on 11/06/2021. | ||
// | ||
|
||
#include "Error.hpp" | ||
|
||
namespace BBM | ||
{ | ||
Error::Error(const std::string &what) | ||
: std::runtime_error(what) | ||
{} | ||
|
||
ParserError::ParserError(const std::string &what) | ||
: Error(what) | ||
{} | ||
} // namespace BBM |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// | ||
// Created by hbenjamin on 11/06/2021. | ||
// | ||
|
||
#pragma once | ||
|
||
#include <exception> | ||
#include <stdexcept> | ||
#include <string> | ||
|
||
namespace BBM { | ||
class Error : public std::runtime_error | ||
{ | ||
public: | ||
//! @brief Create a new exception | ||
explicit Error(const std::string &what); | ||
//! @brief An exception is copy constructable | ||
Error(const Error &) = default; | ||
//! @brief A default destructor | ||
~Error() override = default; | ||
//! @brief A default assignment operator | ||
Error &operator=(const Error &) = default; | ||
}; | ||
|
||
class ParserError : public Error | ||
{ | ||
public: | ||
//! @brief Create a new parser exception | ||
explicit ParserError(const std::string &what); | ||
//! @brief A parser exception is copy constructable | ||
ParserError(const ParserError &) = default; | ||
//! @brief A default destructor | ||
~ParserError() override = default; | ||
//! @brief A default assignment operator | ||
ParserError &operator=(const ParserError &) = default; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.