Added a little bit of input validation.
This commit is contained in:
parent
b55a5e1906
commit
56ca9d694b
@ -21,9 +21,24 @@ Graphics::Graphics(glm::uvec2 windowSize, float nearPlane,
|
|||||||
std::string screenContinuePath) {
|
std::string screenContinuePath) {
|
||||||
this->windowSize = windowSize;
|
this->windowSize = windowSize;
|
||||||
this->nearPlane = nearPlane;
|
this->nearPlane = nearPlane;
|
||||||
this->farPlane = farPlane;
|
if (farPlane > 0) {
|
||||||
this->cube_size = cube_size;
|
this->farPlane = farPlane;
|
||||||
this->maxShadowRenderCount = maxShadowRenderCount;
|
}
|
||||||
|
else {
|
||||||
|
this->farPlane = 0;
|
||||||
|
}
|
||||||
|
if (cube_size > 0) {
|
||||||
|
this->cube_size = cube_size;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this->cube_size = 0;
|
||||||
|
}
|
||||||
|
if (maxShadowRenderCount < 15) {
|
||||||
|
this->maxShadowRenderCount = maxShadowRenderCount;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this->maxShadowRenderCount = 0;
|
||||||
|
}
|
||||||
this->loadingScreenPath = screenPath;
|
this->loadingScreenPath = screenPath;
|
||||||
this->loadingScreenContinuePath = screenContinuePath;
|
this->loadingScreenContinuePath = screenContinuePath;
|
||||||
gameStart = false;
|
gameStart = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user