--- /dev/null
+/*
+ * Copyright (C) 2008 Patrik Gornicz, Gornicz_P (at) hotmail (dot) com.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "reader.h"
+#include "../debug.h"
+
+#include <iostream>
+#include <fstream>
+#include <string>
+
+using std::ifstream;
+using std::string;
+
+char* configDir = "../configs/";
+
+/// ***** Private Method Headers *****
+
+void processLine(const string& str, keyMap* map);
+
+/// ***** Private Variables *****
+
+/// ***** Public Methods *****
+
+void readConfigs(keyMap* map)
+{
+ char fileName[64];
+
+ strcpy(fileName, configDir);
+ strcat(fileName, "test.cfg");
+
+ ifstream file(fileName);
+
+ if( !file.is_open() )
+ {
+ cerr << "Unable to open file " << fileName << "." << endl;
+ exit(1);
+ }
+
+ while(true)
+ {
+ string line;
+ getline(file, line);
+
+ if(file.eof())
+ break;
+
+ processLine(line, map);
+ }
+
+ file.close();
+}
+
+/// ***** Private Methods *****
+
+void processLine(const string& str, keyMap* map)
+{
+ cout << str << endl;
+}
--- /dev/null
+/*
+ * Copyright (C) 2008 Patrik Gornicz, Gornicz_P (at) hotmail (dot) com.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+
+#ifndef READER_H
+#define READER_H
+
+#include <SDL/SDL.h>
+#include <map>
+
+typedef std::map<int,Uint8> keyMap;
+
+/// ***** Header Methods *****
+
+void readConfigs(keyMap*);
+
+#endif // READER_H