summaryrefslogtreecommitdiffstats
path: root/src/Render.cpp
diff options
context:
space:
mode:
authorLaG1924 <12997935+LaG1924@users.noreply.github.com>2023-07-08 21:41:27 +0200
committerGitHub <noreply@github.com>2023-07-08 21:41:27 +0200
commita68f48ad526d0843eb451af0be7f119db5ff794e (patch)
tree3c539c9e7de841c6616f532dadb7c8c1ef552d95 /src/Render.cpp
parentMerge pull request #80 from LaG1924/ftr/better-water (diff)
parentFixed some errors detected by static analysis (diff)
downloadAltCraft-a68f48ad526d0843eb451af0be7f119db5ff794e.tar
AltCraft-a68f48ad526d0843eb451af0be7f119db5ff794e.tar.gz
AltCraft-a68f48ad526d0843eb451af0be7f119db5ff794e.tar.bz2
AltCraft-a68f48ad526d0843eb451af0be7f119db5ff794e.tar.lz
AltCraft-a68f48ad526d0843eb451af0be7f119db5ff794e.tar.xz
AltCraft-a68f48ad526d0843eb451af0be7f119db5ff794e.tar.zst
AltCraft-a68f48ad526d0843eb451af0be7f119db5ff794e.zip
Diffstat (limited to '')
-rw-r--r--src/Render.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/Render.cpp b/src/Render.cpp
index fe9dc04..ce5fdca 100644
--- a/src/Render.cpp
+++ b/src/Render.cpp
@@ -52,13 +52,13 @@ inline int ConvertKeymodsSdlToRml(unsigned short keyMods) {
return ret;
}
-Render::Render(unsigned int windowWidth, unsigned int windowHeight,
- std::string windowTitle) {
+Render::Render(unsigned int width, unsigned int height,
+ std::string title) {
InitEvents();
Settings::Load();
- InitSdl(windowWidth, windowHeight, windowTitle);
+ InitSdl(width, height, title);
glCheckError();
InitGlew();
glCheckError();
@@ -615,17 +615,14 @@ void Render::InitEvents() {
}
- float mouseSensetivity = Settings::ReadDouble("mouseSensetivity", 0.1f);
- if (mouseSensetivity != sensetivity)
- sensetivity = mouseSensetivity;
+ sensetivity = Settings::ReadDouble("mouseSensetivity", 0.1f);
if (GetGameState()) {
bool flight = Settings::ReadBool("flight", false);
GetGameState()->GetPlayer()->isFlying = flight;
}
- bool wireframe = Settings::ReadBool("wireframe", false);
- isWireframe = wireframe;
+ isWireframe = Settings::ReadBool("wireframe", false);
float targetFps = Settings::ReadDouble("targetFps", 60.0f);
GetTime()->SetDelayLength(std::chrono::duration<double, std::milli>(1.0 / targetFps * 1000.0));