diff --git a/lib/Ray/sources/Model/Model.cpp b/lib/Ray/sources/Model/Model.cpp index bf1cce46..62046b15 100644 --- a/lib/Ray/sources/Model/Model.cpp +++ b/lib/Ray/sources/Model/Model.cpp @@ -10,21 +10,23 @@ #include -namespace RAY::Drawables::Drawables3D { +namespace RAY::Drawables::Drawables3D +{ RAY::Cache<::Model> Model::_modelsCache(LoadModel, UnloadModel); - Model::Model(const std::string &filename, bool lonely, - std::optional> texture, - const RAY::Vector3 &scale, - const RAY::Vector3 &position, - const RAY::Vector3 &rotationAxis, - float rotationAngle) + Model::Model(const std::string &filename, + bool lonely, + std::optional> texture, + const RAY::Vector3 &scale, + const RAY::Vector3 &position, + const RAY::Vector3 &rotationAxis, + float rotationAngle) : ADrawable3D(position, WHITE), - _model(_modelsCache.fetch(filename, lonely)), - _rotationAxis(rotationAxis), - _rotationAngle(rotationAngle), - _scale(scale) + _model(_modelsCache.fetch(filename, lonely)), + _rotationAxis(rotationAxis), + _rotationAngle(rotationAngle), + _scale(scale) { if (texture.has_value()) this->setTextureToMaterial(texture->first, texture->second); @@ -32,7 +34,7 @@ namespace RAY::Drawables::Drawables3D { Model::Model(const Mesh &mesh) : ADrawable3D({0, 0, 0}, WHITE), - _model(std::make_shared<::Model>(LoadModelFromMesh(mesh))) + _model(std::make_shared<::Model>(LoadModelFromMesh(mesh))) { } @@ -54,8 +56,8 @@ namespace RAY::Drawables::Drawables3D { { this->_textureList.emplace(materialType, texturePath); SetMaterialTexture(&this->_model->materials[materialType], - materialType, - this->_textureList.at(materialType)); + materialType, + this->_textureList.at(materialType)); return true; } @@ -104,7 +106,12 @@ namespace RAY::Drawables::Drawables3D { void Model::drawOn(RAY::Window &) { - DrawModelEx(*this->_model, this->_position, this->_rotationAxis, this->_rotationAngle, this->_scale, this->_color); + DrawModelEx(*this->_model, + this->_position, + this->_rotationAxis, + this->_rotationAngle, + this->_scale, + this->_color); } void Model::setShader(const RAY::Shader &shader) diff --git a/sources/Component/Keyboard/KeyboardComponent.cpp b/sources/Component/Keyboard/KeyboardComponent.cpp index 7da5489b..b23ac18e 100644 --- a/sources/Component/Keyboard/KeyboardComponent.cpp +++ b/sources/Component/Keyboard/KeyboardComponent.cpp @@ -8,15 +8,15 @@ namespace BBM { KeyboardComponent::KeyboardComponent(WAL::Entity &entity, - Key up, - Key down, - Key left, - Key right, - Key jump, - Key bomb, - Key pause) + Key up, + Key down, + Key left, + Key right, + Key jump, + Key bomb, + Key pause) : WAL::Component(entity), keyJump(jump), keyBomb(bomb), keyPause(pause), - keyRight(right), keyLeft(left), keyUp(up), keyDown(down) + keyRight(right), keyLeft(left), keyUp(up), keyDown(down) {} WAL::Component *KeyboardComponent::clone(WAL::Entity &entity) const