feat: In developer mode F1-F4 toggle graphical features
This commit is contained in:
parent
52930c8539
commit
56ec59b93a
2 changed files with 29 additions and 2 deletions
|
@ -46,6 +46,7 @@ Developer mode controls:
|
|||
|
||||
- Press V to switch the camera type
|
||||
- Use "+" and "-" keys to adjust the game speed
|
||||
- Press F1-F4 to toggle graphical features
|
||||
|
||||
## Configuration
|
||||
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#include "../common/log.h"
|
||||
#include "../common/pathutil.h"
|
||||
#include "../experimental/tor/gr2file.h"
|
||||
#include "../render/featureutil.h"
|
||||
#include "../render/lip/lips.h"
|
||||
#include "../render/materials.h"
|
||||
#include "../render/meshes.h"
|
||||
|
@ -782,9 +783,34 @@ bool Game::handleKeyDown(const SDL_KeyboardEvent &event) {
|
|||
toggleInGameCameraType();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
case SDLK_F1:
|
||||
if (_options.developer) {
|
||||
setFeatureEnabled(Feature::PBR, !isFeatureEnabled(Feature::PBR));
|
||||
}
|
||||
return true;
|
||||
|
||||
case SDLK_F2:
|
||||
if (_options.developer) {
|
||||
setFeatureEnabled(Feature::HDR, !isFeatureEnabled(Feature::HDR));
|
||||
}
|
||||
return true;
|
||||
|
||||
case SDLK_F3:
|
||||
if (_options.developer) {
|
||||
setFeatureEnabled(Feature::SelfIllumAsLights, !isFeatureEnabled(Feature::SelfIllumAsLights));
|
||||
}
|
||||
return true;
|
||||
|
||||
case SDLK_F4:
|
||||
if (_options.developer) {
|
||||
setFeatureEnabled(Feature::DynamicRoomLighting, !isFeatureEnabled(Feature::DynamicRoomLighting));
|
||||
}
|
||||
return true;
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
bool Game::getGlobalBoolean(const string &name) const {
|
||||
|
|
Loading…
Reference in a new issue