diff --git a/Engine/Graphics/3DRenderer.cpp b/Engine/Graphics/3DRenderer.cpp index c483d3e..315a871 100644 --- a/Engine/Graphics/3DRenderer.cpp +++ b/Engine/Graphics/3DRenderer.cpp @@ -56,7 +56,7 @@ Graphic3DRenderer::Graphic3DRenderer() { mMainCamera = std::make_unique(); mMainCamera->SetPosition(0.0f, 1.5f, -8.0f); } - SetRTSize(1280.f, 324.f); + SetRTSize(1280.f, 400.f); mMainCamera->UpdateCamView(); // Fill world object list to render diff --git a/Engine/Graphics/UI.cpp b/Engine/Graphics/UI.cpp index ab01c9c..e6e04c9 100644 --- a/Engine/Graphics/UI.cpp +++ b/Engine/Graphics/UI.cpp @@ -49,7 +49,7 @@ CockpitUI::CockpitUI(unsigned int w, unsigned int h) : UI(w, h) { CreateDefaultRenderWindow(); mStaticCockpitTexture.setSrgb(true); - if (!mStaticCockpitTexture.loadFromFile("cockpit_ui_empty_rescaled.png", sf::IntRect(0, 0, 1280, 780))) + if (!mStaticCockpitTexture.loadFromFile("cockpit_ui.png", sf::IntRect(0, 0, 1280, 780))) throw std::runtime_error("Unable to load texture datas"); } @@ -65,9 +65,9 @@ void CockpitUI::Draw(std::shared_ptr& context) { mUIRender.clear(sf::Color::Transparent); // Draw the radar display - sf::CircleShape radar(95, 8); + sf::CircleShape radar(98, 8); radar.setRotation(22.5f); - radar.setPosition(sf::Vector2f(838,378)); + radar.setPosition(sf::Vector2f(836,416)); radar.setFillColor(SF_COLOR_4CHEX(0x666666FF)); mUIRender.draw(radar, sRS); diff --git a/Game.cpp b/Game.cpp index dd31725..6289aa6 100644 --- a/Game.cpp +++ b/Game.cpp @@ -8,6 +8,8 @@ #include "Engine/Misc/Logger.hpp" #include "Engine/Utils/Perfs.hpp" +#define COCKPIT_VIEW_RATIO (400.f / WNDSIZE_DEFAULT_H) + using std::make_shared; using std::make_unique; @@ -41,7 +43,7 @@ Game::Game(std::shared_ptr& mainWnd, bool dbgFlag) : mbDbgMode mWorld3D = make_shared(); mCockpitUI = make_unique(wndWidth, (wndWidth * H_RATIO)); - mWorldUI = make_unique(wndWidth, std::floor((wndWidth * H_RATIO) * 0.45f), mWorld3D); + mWorldUI = make_unique(wndWidth, std::floor((wndWidth * H_RATIO) * COCKPIT_VIEW_RATIO), mWorld3D); if (mbDbgModeEnabled) { mDbgUI = make_unique(); @@ -120,8 +122,8 @@ void Game::EventMouseMoved(int _x, int _y) { void Game::EventWindowSizeChanged(unsigned int w, unsigned int h) { mCockpitUI->SetRTSize(static_cast(w), (w * H_RATIO)); - mWorldUI->SetRTSize(static_cast(w), std::floor((w * H_RATIO) * 0.45f), true); - mWorld3D->SetRTSize(static_cast(w), std::floor((w * H_RATIO) * 0.45f)); + mWorldUI->SetRTSize(static_cast(w), std::floor((w * H_RATIO) * COCKPIT_VIEW_RATIO), true); + mWorld3D->SetRTSize(static_cast(w), std::floor((w * H_RATIO) * COCKPIT_VIEW_RATIO)); } void Game::Update() {