Author: jave27
Date: 2005-11-10 21:38:25 +0100 (Thu, 10 Nov 2005)
New Revision: 2494

Added:
   trunk/data/sounds/letsgo.wav
Modified:
   trunk/src/pingus_main.cxx
   trunk/src/world.cxx
   trunk/src/worldobjs/entrance.cxx
Log:
Fixed some sound stuff, put letsgo.wav back in the sound folder  (found online).
Also, applied BigZaphod's MacOSX patch for finding the correct path.  
Pingus now compiles and runs on MacOSX until it hits the actual level, then 
everything in the Playfield is black.

Added: trunk/data/sounds/letsgo.wav
===================================================================
(Binary files differ)


Property changes on: trunk/data/sounds/letsgo.wav
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Modified: trunk/src/pingus_main.cxx
===================================================================
--- trunk/src/pingus_main.cxx   2005-11-10 17:09:02 UTC (rev 2493)
+++ trunk/src/pingus_main.cxx   2005-11-10 20:38:25 UTC (rev 2494)
@@ -543,9 +543,21 @@
     std::cout << "Directory name of " << executable_name << " - " << 
System::dirname(executable_name)
               << std::endl;
 
+#ifdef __APPLE__
+  char resource_path[PATH_MAX];
+  CFURLRef ref = CFBundleCopyResourcesDirectoryURL(CFBundleGetMainBundle());
+  if (!ref || !CFURLGetFileSystemRepresentation(ref, true, 
(UInt8*)resource_path, PATH_MAX))
+  {
+    std::cout << "Error: Couldn't get Resources path.\n" << std::endl;
+    exit(EXIT_FAILURE);
+  }
+  CFRelease(ref);
+  path_manager.add_path(CL_String::get_path(std::string(resource_path) + 
"/data/"));
+#else
   path_manager.add_path(CL_String::get_path(CL_System::get_exe_path() + 
"/data/"));
   path_manager.add_path(CL_String::get_path(CL_System::get_exe_path() + 
"/../data/"));
   path_manager.add_path(CL_String::get_path(CL_System::get_exe_path() + 
"/../share/games/pingus/"));
+#endif
 
   std::list<std::string> file_list;
   file_list.push_back ("data/core.xml");

Modified: trunk/src/world.cxx
===================================================================
--- trunk/src/world.cxx 2005-11-10 17:09:02 UTC (rev 2493)
+++ trunk/src/world.cxx 2005-11-10 20:38:25 UTC (rev 2494)
@@ -205,7 +205,7 @@
 void
 World::armageddon(void)
 {
-  Sound::PingusSound::play_sound ("goodidea");
+       Sound::PingusSound::play_sound (Sound::GOODIDEA);
   do_armageddon = true;
   armageddon_count = 0;
 }

Modified: trunk/src/worldobjs/entrance.cxx
===================================================================
--- trunk/src/worldobjs/entrance.cxx    2005-11-10 17:09:02 UTC (rev 2493)
+++ trunk/src/worldobjs/entrance.cxx    2005-11-10 20:38:25 UTC (rev 2494)
@@ -121,7 +121,8 @@
           break;
         }
 
-      world->play_sound("oing", pos);
+                       // FIXME: Find the "oing" sound
+      //world->play_sound("oing", pos);
     }
   else
     {



_______________________________________________
pingus-cvs mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/pingus-cvs

Reply via email to