X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FGameTick.cpp;h=e737a4e95f3799cf42c9b3f33cdddbeb3c91bf72;hb=93632bba29498fb64efa4a68c890f0fd162117ba;hp=a0bb4b3928dddfc767f48ef7ed760dcdd9a4c267;hpb=58e2a577c2ea4cf639a07fc792122c288d4bc2a5;p=lugaru.git diff --git a/Source/GameTick.cpp b/Source/GameTick.cpp index a0bb4b3..e737a4e 100644 --- a/Source/GameTick.cpp +++ b/Source/GameTick.cpp @@ -148,27 +148,6 @@ float musicvolume[4] = {}; float oldmusicvolume[4] = {}; int musicselected = 0; -const char* rabbitskin[] = { - "Textures/Fur3.jpg", - "Textures/Fur.jpg", - "Textures/Fur2.jpg", - "Textures/Lynx.jpg", - "Textures/Otter.jpg", - "Textures/Opal.jpg", - "Textures/Sable.jpg", - "Textures/Chocolate.jpg", - "Textures/BW2.jpg", - "Textures/WB2.jpg" -}; - -const char* wolfskin[] = { - "Textures/Wolf.jpg", - "Textures/DarkWolf.jpg", - "Textures/SnowWolf.jpg" -}; - -const char** creatureskin[] = { rabbitskin, wolfskin }; - #define STATIC_ASSERT(x) extern int s_a_dummy[2 * (!!(x)) - 1]; STATIC_ASSERT(rabbittype == 0 && wolftype == 1) @@ -1045,27 +1024,30 @@ void Game::ProcessInput() /* Devtools */ if (devtools && !mainmenu) { - ProcessDevInput(); + /* Console */ + if (Input::isKeyPressed(consolekey)) { + console = !console; + if (console) { + OPENAL_SetFrequency(OPENAL_ALL); + } else { + freeze = 0; + waiting = false; + } + } + + /* Other devtools, disabled when the console is shown */ + if (!console) { + ProcessDevInput(); + } } } void Game::ProcessDevInput() { - if (!devtools || mainmenu) { + if (!devtools || mainmenu || console) { return; } - /* Console */ - if (Input::isKeyPressed(consolekey)) { - console = !console; - if (console) { - OPENAL_SetFrequency(OPENAL_ALL); - } else { - freeze = 0; - waiting = false; - } - } - if (Input::isKeyDown(SDL_SCANCODE_LALT)) { /* Enable editor */ if (Input::isKeyPressed(SDL_SCANCODE_M) && !Input::isKeyDown(SDL_SCANCODE_LSHIFT)) { @@ -1213,7 +1195,7 @@ void Game::ProcessDevInput() } Person::players[closest]->skeleton.drawmodel.textureptr.load( - creatureskin[Person::players[closest]->creature][Person::players[closest]->whichskin], 1, + PersonType::types[Person::players[closest]->creature].skins[Person::players[closest]->whichskin], 1, &Person::players[closest]->skeleton.skinText[0], &Person::players[closest]->skeleton.skinsize); }