r1149 - in packages/trunk/trigger/trigger/debian: . patches
Stefan Potyra
sistpoty-guest at costa.debian.org
Thu Jul 20 14:17:50 UTC 2006
Author: sistpoty-guest
Date: 2006-07-20 14:17:47 +0000 (Thu, 20 Jul 2006)
New Revision: 1149
Added:
packages/trunk/trigger/trigger/debian/patches/30_fix_physfs_texture.patch
Modified:
packages/trunk/trigger/trigger/debian/changelog
Log:
add a patch that removes part of the physfs file handling routines
and uses sdl ones instead. Now only the filename is taken from
physfs; opening and reading files is handled by sdl.
Modified: packages/trunk/trigger/trigger/debian/changelog
===================================================================
--- packages/trunk/trigger/trigger/debian/changelog 2006-07-20 10:20:09 UTC (rev 1148)
+++ packages/trunk/trigger/trigger/debian/changelog 2006-07-20 14:17:47 UTC (rev 1149)
@@ -10,6 +10,9 @@
for libalut-dev. Reran autotools to make it work.
* Ported src/pengine/audio.{cpp|h} to new freealut semantics, as the
compatibility functions won't work any longer.
+ * Patched src/pengine/texture.cpp to not use physfs's file structure
+ any longer, but rather only the filename from it, since it breaks
+ when loading images otherwise.
[ Goneri Le Bouder ]
* create the patches directory
@@ -24,4 +27,4 @@
* adding myself to uploaders (to avoid this being an NMU)
* fixing homepage semi-header in package description
- -- Alexander Schmehl <tolimar at debian.org> Thu, 20 Jul 2006 11:10:26 +0200
+ -- Stefan Potyra <sistpoty at ubuntu.com> Thu, 20 Jul 2006 16:10:00 +0200
Added: packages/trunk/trigger/trigger/debian/patches/30_fix_physfs_texture.patch
===================================================================
--- packages/trunk/trigger/trigger/debian/patches/30_fix_physfs_texture.patch 2006-07-20 10:20:09 UTC (rev 1148)
+++ packages/trunk/trigger/trigger/debian/patches/30_fix_physfs_texture.patch 2006-07-20 14:17:47 UTC (rev 1149)
@@ -0,0 +1,33 @@
+--- trigger-0.5.2.orig/src/pengine/texture.cpp
++++ trigger-0.5.2/src/pengine/texture.cpp
+@@ -66,16 +66,21 @@
+ if (PUtil::isDebugLevel(DEBUGLEVEL_TEST))
+ PUtil::outLog() << "Loading image \"" << filename << "\"" << std::endl;
+
+- // PhysFS / SDL integration with SDL_rwops
+
+- PHYSFS_file *pfile = PHYSFS_openRead(filename.c_str());
+-
+- if (pfile == null) {
+- throw MakePException (filename + ", PhysFS: " + PHYSFS_getLastError ());
++ // find out the directory prefix of the file
++ const char *prefix = PHYSFS_getRealDir(filename.c_str());
++ if (! prefix) {
++ throw MakePException(filename + ", PhysFS: " + PHYSFS_getLastError ());
++ }
++
++ // append the filename to it
++ std::string realname = std::string(prefix) + "/" + filename;
++
++ SDL_RWops *rwops = SDL_RWFromFile(realname.c_str(), "r");
++ if (! rwops) {
++ throw MakePException("Error with " + filename + ": "
++ + SDL_GetError());
+ }
+-
+- SDL_RWops *rwops = PUtil::allocPhysFSops(pfile);
+-
+ SDL_Surface *img = IMG_Load_RW(rwops, 1); // this closes file and frees rwops
+
+ if (!img) {
+
More information about the Pkg-games-commits
mailing list