aboutsummaryrefslogtreecommitdiff
path: root/src/GameInitDispose.cpp
diff options
context:
space:
mode:
authorNguyễn Gia Phong <mcsinyx@disroot.org>2021-09-11 23:12:04 +0700
committerNguyễn Gia Phong <mcsinyx@disroot.org>2021-09-11 23:23:37 +0700
commite3614a94b984d12baa7f4f6010b6707805ce0928 (patch)
treecb46f6ec6cb500f24105e5f95ecead265b51fee3 /src/GameInitDispose.cpp
parent4c574fd772e6976752ee03dd489cb41bcd2de0d3 (diff)
downloadblackshades-e3614a94b984d12baa7f4f6010b6707805ce0928.tar.gz
Refactor configuration parser
* Split config file into multiple sections * Move settings.ini to config.ini * Change default resolution from 640x480 to 800x600 * Remove AZERTY support (to be replaced by custom bindings in the future)
Diffstat (limited to 'src/GameInitDispose.cpp')
-rw-r--r--src/GameInitDispose.cpp26
1 files changed, 7 insertions, 19 deletions
diff --git a/src/GameInitDispose.cpp b/src/GameInitDispose.cpp
index bbcd5b2..2d2a5c4 100644
--- a/src/GameInitDispose.cpp
+++ b/src/GameInitDispose.cpp
@@ -72,7 +72,13 @@ Game* makeGame(Config config)
game->mainmenuness = config.menu;
game->customlevels = config.custom_levels;
game->musictoggle = config.music;
- game->azertykeyboard = config.azerty;
+ forwardskey = GLFW_KEY_W;
+ backwardskey = GLFW_KEY_S;
+ leftkey = GLFW_KEY_A;
+ rightkey = GLFW_KEY_D;
+ aimkey = GLFW_KEY_Q;
+ psychicaimkey = GLFW_KEY_E;
+ psychickey = GLFW_KEY_Z;
if (!game->initialized) {
// TODO: Read high score
@@ -679,24 +685,6 @@ void initGame(Game* game)
game->enemystate = 2;
if (!game->initialized) {
- if (game->azertykeyboard) {
- forwardskey = GLFW_KEY_Z;
- backwardskey = GLFW_KEY_S;
- leftkey = GLFW_KEY_Q;
- rightkey = GLFW_KEY_D;
- aimkey = GLFW_KEY_A;
- psychicaimkey = GLFW_KEY_E;
- psychickey = GLFW_KEY_W;
- } else {
- forwardskey = GLFW_KEY_W;
- backwardskey = GLFW_KEY_S;
- leftkey = GLFW_KEY_A;
- rightkey = GLFW_KEY_D;
- aimkey = GLFW_KEY_Q;
- psychicaimkey = GLFW_KEY_E;
- psychickey = GLFW_KEY_Z;
- }
-
soundscalefactor=soundscalefactordefault; //Setup sound falloff
// Sounds