1
0
mirror of https://github.com/rwengine/openrw.git synced 2024-10-06 09:07:19 +02:00

Fix style errors

This commit is contained in:
Petar Kukolj 2018-10-29 16:54:13 +01:00 committed by Filip Gawin
parent 262523c211
commit 45ea1df74c
4 changed files with 5 additions and 6 deletions

View File

@ -306,8 +306,8 @@ void HUDDrawer::drawOnScreenText(GameWorld* world, GameRenderer* renderer) {
}
}
void HUDDrawer::applyHUDScale(const float scale) {
hudParameters.hudScale = scale;
void HUDDrawer::applyHUDScale(float scale) {
hudParameters.hudScale = scale;
hudParameters.uiTextSize *= scale;
hudParameters.uiTextHeight *= scale;
hudParameters.uiElementMargin *= scale;
@ -323,5 +323,5 @@ void HUDDrawer::applyHUDScale(const float scale) {
}
HUDDrawer::HUDParameters HUDDrawer::getHUDParameters() {
return hudParameters;
return hudParameters;
}

View File

@ -38,7 +38,7 @@ public:
HUDDrawer() = default;
~HUDDrawer() = default;
void applyHUDScale(const float scale);
void applyHUDScale(float scale);
HUDParameters getHUDParameters();
void drawHUD(ViewCamera& currentView, PlayerController* player,
GameWorld* world, GameRenderer* render);

View File

@ -74,7 +74,6 @@ RWGame::RWGame(Logger& log, int argc, char* argv[])
renderer.text.setFontTexture(FONT_PRICEDOWN, "font1");
renderer.text.setFontTexture(FONT_ARIAL, "font2");
hudDrawer = HUDDrawer();
hudDrawer.applyHUDScale(config.getHUDScale());
renderer.map.scaleHUD(config.getHUDScale());

View File

@ -32,7 +32,7 @@ class RWGame final : public GameBase {
GameRenderer renderer;
DebugDraw debug;
GameState state;
HUDDrawer hudDrawer;
HUDDrawer hudDrawer{};
std::unique_ptr<GameWorld> world;