From e3614a94b984d12baa7f4f6010b6707805ce0928 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nguy=E1=BB=85n=20Gia=20Phong?= Date: Sat, 11 Sep 2021 23:12:04 +0700 Subject: 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) --- src/GameInitDispose.cpp | 26 +++++++------------------- 1 file changed, 7 insertions(+), 19 deletions(-) (limited to 'src/GameInitDispose.cpp') 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 -- cgit v1.2.3