Skip to content

Commit

Permalink
Merge pull request #87 from kevinsadi/cross-platform
Browse files Browse the repository at this point in the history
Cross platform
  • Loading branch information
kevinsadi authored Jan 3, 2024
2 parents 50748e5 + a909bb0 commit d74aa0d
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/engine/core/AppSettings.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

#include <string>
#include <vector>
#include <cstdint>

namespace lei3d
{

class AppSettings
{
public:

static AppSettings& GetInstance();
~AppSettings() = default;

Expand Down
16 changes: 7 additions & 9 deletions src/engine/rendering/gui/screens/PauseMenuScreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@
#include "SplashScreen.hpp"
#include "core/Application.hpp"
#include "rendering/gui/components/GuiTextBox.hpp"
#include "Logging/Log.hpp"
#include "logging/Log.hpp"
#include "rendering/gui/GuiManager.hpp"

namespace lei3d
{
PauseMenuScreen::PauseMenuScreen()
{

}

PauseMenuScreen::~PauseMenuScreen()
Expand All @@ -22,11 +21,10 @@ namespace lei3d
GuiScreen::Init();

AddComponent(new GuiRect(
GuiComponent::Anchor::TOP_LEFT,
{ GuiComponent::Space::NORMALIZED, { 0, 0 } },
{ GuiComponent::Space::NORMALIZED, { 1, 1 } },
{ 0, 0, 0, 0.5 }
));
GuiComponent::Anchor::TOP_LEFT,
{ GuiComponent::Space::NORMALIZED, { 0, 0 } },
{ GuiComponent::Space::NORMALIZED, { 1, 1 } },
{ 0, 0, 0, 0.5 }));

GuiTextBox* resumeButton = new GuiTextBox(
"Resume",
Expand Down Expand Up @@ -91,6 +89,6 @@ namespace lei3d

AddComponent(resumeButton);
AddComponent(restartButton);
AddComponent(exitButton);
AddComponent(exitButton);
}
}
} // namespace lei3d
2 changes: 1 addition & 1 deletion src/engine/scenes/SceneIntro.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ namespace lei3d
const std::string signPath = "data/models/leveldesignobj/sign/sign.gltf";
m_EnviromentModels.insert(std::make_pair("sign", std::make_unique<Model>(signPath)));

const std::string fishPath = "data/models/leveldesignobj/fish2/fish.obj";
const std::string fishPath = "data/models/leveldesignobj/fish2/Fish.obj";
m_EnviromentModels.insert(std::make_pair("fish", std::make_unique<Model>(fishPath)));

const std::string treePath = "data/models/environment/palm_tree.gltf";
Expand Down
2 changes: 1 addition & 1 deletion src/engine/scenes/SceneTitle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ namespace lei3d
const std::string signPath = "data/models/leveldesignobj/sign/sign.gltf";
m_EnviromentModels.insert(std::make_pair("sign", std::make_unique<Model>(signPath)));

const std::string fishPath = "data/models/leveldesignobj/fish2/fish.obj";
const std::string fishPath = "data/models/leveldesignobj/fish2/Fish.obj";
m_EnviromentModels["fish"] = (std::make_unique<Model>(fishPath));
m_EnviromentModels.insert(std::make_pair("fish", std::make_unique<Model>(fishPath)));

Expand Down
6 changes: 4 additions & 2 deletions src/engine/scenes/TestSceneKevin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ namespace lei3d
backpackModel = std::make_unique<Model>(backpackPath);

const std::string physicsPlaygroundPath = "data/models/environment/level_disassociate_2.gltf";
// const std::string physicsPlaygroundPath = "data/models/environment/level_7_colors.gltf";

if (playgroundModel)
{
playgroundModel.reset();
Expand All @@ -66,7 +68,7 @@ namespace lei3d
const std::string housePath = "data/models/leveldesignobj/house/house_texture.obj";
m_EnviromentModels.insert(std::make_pair("house", std::make_unique<Model>(housePath)));

const std::string fishPath = "data/models/leveldesignobj/fish2/fish.obj";
const std::string fishPath = "data/models/leveldesignobj/fish2/Fish.obj";
m_EnviromentModels.insert(std::make_pair("fish", std::make_unique<Model>(fishPath)));

const std::string treePath = "data/models/environment/palm_tree.gltf";
Expand Down Expand Up @@ -434,7 +436,7 @@ namespace lei3d
ModelInstance* flowerRender2 = flowerObj2.AddComponent<ModelInstance>();
flowerRender2->Init(m_EnviromentModels["flower"].get());
flowerObj2.SetScale(glm::vec3(2.4f, 2.4f, 2.4f));
flowerObj2.SetPosition(glm::vec3(0.0f, 0.0f, 0.0f));
flowerObj2.SetPosition(glm::vec3(-91.5f, -233.6f, -467.0f));
ColorSource* startSrc2 = flowerObj2.AddComponent<ColorSource>();
startSrc2->Init(5, 10, true);
StaticCollider* flowerCollider2 = flowerObj2.AddComponent<StaticCollider>();
Expand Down

0 comments on commit d74aa0d

Please sign in to comment.