X-Git-Url: http://gitweb.pgornicz.com/gitweb.cgi?a=blobdiff_plain;f=src%2Fconfig%2Freader.cpp;h=edba875f0db87bb3bdb322cb7646292e476f4d6a;hb=b85b89ba9a2cb0373209e8117046fd308faf0202;hp=e8757ddb5acac495efcdb97cdecd1c34f5bfa66d;hpb=dca497db1c716132a88dc430a86caa5b281162dc;p=physics.git diff --git a/src/config/reader.cpp b/src/config/reader.cpp index e8757dd..edba875 100644 --- a/src/config/reader.cpp +++ b/src/config/reader.cpp @@ -16,7 +16,9 @@ */ #include "reader.h" -#include "../debug.h" + +#include +using namespace pg; #include using std::cerr; @@ -97,9 +99,6 @@ void processLine(const string& str) { *(key::sdlMap[name]) = key; } - cout << name << endl; - cout << value << endl; - cout << key << endl; } } @@ -121,11 +120,11 @@ bool extractLine(const string& str, string* name, string* value) int char_pos = 0; - int name_start; - int name_end; + int name_start = 0; + int name_end = 0; - int value_start; - int value_end; + int value_start = 0; + int value_end = 0; const char* c_str = str.c_str(); @@ -211,7 +210,7 @@ void createKeyMap() for (int i = 'A'; i <= 'Z'; i++) // uppercase { buf[0] = (char)i; - keyMap[buf] = (SDLKey)i; + keyMap[buf] = (SDLKey)(i + 'a' - 'A'); } for (int i = 'a'; i <= 'z'; i++) // lowercase {