X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FGameTick.cpp;h=0b83cedef7f4e3853d76b4f4bd27118ceb94e6c6;hb=aff8402e75951f0407020e7fa7c69f831c141ba1;hp=a0bb4b3928dddfc767f48ef7ed760dcdd9a4c267;hpb=58e2a577c2ea4cf639a07fc792122c288d4bc2a5;p=lugaru.git diff --git a/Source/GameTick.cpp b/Source/GameTick.cpp index a0bb4b3..0b83ced 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) @@ -1043,18 +1022,6 @@ void Game::ProcessInput() printf("Stereo separation increased to %f\n", stereoseparation); } - /* Devtools */ - if (devtools && !mainmenu) { - ProcessDevInput(); - } -} - -void Game::ProcessDevInput() -{ - if (!devtools || mainmenu) { - return; - } - /* Console */ if (Input::isKeyPressed(consolekey)) { console = !console; @@ -1066,6 +1033,18 @@ void Game::ProcessDevInput() } } + /* Devtools */ + if (devtools && !mainmenu && !console) { + ProcessDevInput(); + } +} + +void Game::ProcessDevInput() +{ + if (!devtools || mainmenu || console) { + return; + } + if (Input::isKeyDown(SDL_SCANCODE_LALT)) { /* Enable editor */ if (Input::isKeyPressed(SDL_SCANCODE_M) && !Input::isKeyDown(SDL_SCANCODE_LSHIFT)) { @@ -1213,7 +1192,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); }