diff --git a/content/font/comics-small.fnt b/content/font/comics-small.fnt new file mode 100644 index 0000000..f454ce2 Binary files /dev/null and b/content/font/comics-small.fnt differ diff --git a/content/font/comics.fnt b/content/font/comics.fnt new file mode 100644 index 0000000..6b71c7e Binary files /dev/null and b/content/font/comics.fnt differ diff --git a/content/font/terminal.fnt b/content/font/terminal.fnt new file mode 100644 index 0000000..08b0afc Binary files /dev/null and b/content/font/terminal.fnt differ diff --git a/content/images/Run2.png b/content/images/Run2.png new file mode 100644 index 0000000..2ac55a0 Binary files /dev/null and b/content/images/Run2.png differ diff --git a/content/images/rico16c.png b/content/images/rico16c.png new file mode 100644 index 0000000..03d6118 Binary files /dev/null and b/content/images/rico16c.png differ diff --git a/content/images/rico256c.png b/content/images/rico256c.png new file mode 100644 index 0000000..c4515a0 Binary files /dev/null and b/content/images/rico256c.png differ diff --git a/main.cpp b/main.cpp index d9005c8..ce9fb0c 100644 --- a/main.cpp +++ b/main.cpp @@ -258,6 +258,17 @@ void Demo::onSimulation(RealTime rdt, SimTime sdt, SimTime idt) { //} +double getOSVersion() { + OSVERSIONINFO osvi; + + ZeroMemory(&osvi, sizeof(OSVERSIONINFO)); + osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); + + GetVersionEx(&osvi); + std::string version = Convert(osvi.dwMajorVersion) + "." + Convert(osvi.dwMinorVersion); + return ::atof(version.c_str()); +} + void Demo::onUserInput(UserInput* ui) { if (ui->keyPressed(SDLK_ESCAPE)) { // Even when we aren't in debug mode, quit on escape. @@ -297,6 +308,14 @@ void Demo::onUserInput(UserInput* ui) { app->setDebugMode(!app->debugMode()); } } + if(ui->keyDown(SDLK_LCTRL)) + { + if(ui->keyPressed('v')) + { + messageTime = System::time(); + message = convert(getOSVersion()); + } + } if(ui->keyPressed(SDLK_F8)) { index++; @@ -581,7 +600,10 @@ int main(int argc, char** argv) { //settings.useNetwork = false; //settings.window.width = 1024; //settings.window.height = 768; - settings.window.defaultIconFilename = GetFileInPath("/content/images/rico.png"); + if(getOSVersion > 5.0) + settings.window.defaultIconFilename = GetFileInPath("/content/images/rico.png"); + else + settings.window.defaultIconFilename = GetFileInPath("/content/images/rico256c.png"); settings.window.resizable = true; App app = App(settings);