From 1ce7399776452042fe6d82826db458cd9a0487a6 Mon Sep 17 00:00:00 2001 From: mathnerd314 Date: Mon, 25 Jan 2010 23:35:02 +0000 Subject: [PATCH] Use supertux2 on Windows, zeekling squish animation fix. git-svn-id: http://supertux.lethargik.org/svn/supertux/trunk/supertux@6273 837edb03-e0f3-0310-88ca-d4d4e8b29345 --- data/images/creatures/zeekling/zeekling.sprite | 4 ++-- src/badguy/zeekling.cpp | 1 - src/supertux/main.cpp | 31 ++++++++++++++++++++++---- 3 files changed, 29 insertions(+), 7 deletions(-) diff --git a/data/images/creatures/zeekling/zeekling.sprite b/data/images/creatures/zeekling/zeekling.sprite index 2b5303a4e..908b4dcfd 100644 --- a/data/images/creatures/zeekling/zeekling.sprite +++ b/data/images/creatures/zeekling/zeekling.sprite @@ -13,11 +13,11 @@ (mirror-action "left")) (action (name "squished-left") - (hitbox 8 -19 31 30) + (hitbox 8 19 31 30) (images "squished.png")) (action (name "squished-right") - (hitbox 25 -19 31 30) + (hitbox 25 19 31 30) (mirror-action "squished-left")) (action (name "diving-left") diff --git a/src/badguy/zeekling.cpp b/src/badguy/zeekling.cpp index 90b30bbce..8c64887bb 100644 --- a/src/badguy/zeekling.cpp +++ b/src/badguy/zeekling.cpp @@ -64,7 +64,6 @@ Zeekling::collision_squished(GameObject& object) { sprite->set_action(dir == LEFT ? "squished-left" : "squished-right"); kill_squished(object); - kill_fall(); return true; } diff --git a/src/supertux/main.cpp b/src/supertux/main.cpp index 048ebab73..98a6cc3d6 100644 --- a/src/supertux/main.cpp +++ b/src/supertux/main.cpp @@ -96,14 +96,37 @@ Main::init_physfs(const char* argv0) // PHYSFS_setSaneConfig) const char* application = PACKAGE_NAME; const char* userdir = PHYSFS_getUserDir(); - char* writedir = new char[strlen(userdir) + strlen(application) + 2]; + + char* writedir = new char[strlen(userdir) + strlen(application) + +#ifndef _WIN32 + 2]; +#else + 1]; +#endif // Set configuration directory - sprintf(writedir, "%s.%s", userdir, application); + sprintf(writedir, +#ifndef _WIN32 + "%s.%s", +#else + "%s%s", +#endif + userdir, application); if(!PHYSFS_setWriteDir(writedir)) { // try to create the directory - char* mkdir = new char[strlen(application) + 2]; - sprintf(mkdir, ".%s", application); + char* mkdir = new char[strlen(application) + +#ifndef _WIN32 + 2]; +#else + 1]; +#endif + sprintf(mkdir, +#ifndef _WIN32 + ".%s", +#else + "%s", +#endif + application); if(!PHYSFS_setWriteDir(userdir) || !PHYSFS_mkdir(mkdir)) { std::ostringstream msg; msg << "Failed creating configuration directory '" -- 2.11.0