r1170 - in packages/trunk/trigger/trigger/debian: . patches
Stefan Potyra
sistpoty-guest at costa.debian.org
Sun Jul 23 15:11:01 UTC 2006
Author: sistpoty-guest
Date: 2006-07-23 15:11:00 +0000 (Sun, 23 Jul 2006)
New Revision: 1170
Added:
packages/trunk/trigger/trigger/debian/patches/30_physfs_sdl_interaction.patch
Removed:
packages/trunk/trigger/trigger/debian/patches/30_fix_physfs_texture.patch
Modified:
packages/trunk/trigger/trigger/debian/changelog
Log:
really fix up sdl<->physfs interaction (the seek wrapper was broken).
Thus dropping the old workaround patch. The snowlevel is now
playable again :).
Note: sounds still cannot be loaded from zip plugins/data files,
since a similar hack is in 10_fix_build_with_openal.patch.
I'll try to fix this as well, however I'll need to do some
alut-digging first.
Modified: packages/trunk/trigger/trigger/debian/changelog
===================================================================
--- packages/trunk/trigger/trigger/debian/changelog 2006-07-23 00:33:12 UTC (rev 1169)
+++ packages/trunk/trigger/trigger/debian/changelog 2006-07-23 15:11:00 UTC (rev 1170)
@@ -1,9 +1,17 @@
trigger (0.5.2-2) UNRELEASED; urgency=low
+ [ Alexander Schmehl ]
* NOT RELEASED YET
- -- Alexander Schmehl <alex at schmehl.info> Thu, 20 Jul 2006 18:27:14 +0200
+ [ Stefan Potyra ]
+ * Removed the workaround patch for directly reading from files
+ instead of using the libphysfs-layer.
+ * Add a patch to src/pengine/physfs_rw.cpp to fix seeking.
+ Thus any data or plugin can be loaded from zip files again
+ (closes: #379372).
+ -- Stefan Potyra <sistpoty at ubuntu.com> Sun, 23 Jul 2006 17:03:55 +0200
+
trigger (0.5.2-1) unstable; urgency=low
[ Eddy Petrişor ]
Deleted: packages/trunk/trigger/trigger/debian/patches/30_fix_physfs_texture.patch
===================================================================
--- packages/trunk/trigger/trigger/debian/patches/30_fix_physfs_texture.patch 2006-07-23 00:33:12 UTC (rev 1169)
+++ packages/trunk/trigger/trigger/debian/patches/30_fix_physfs_texture.patch 2006-07-23 15:11:00 UTC (rev 1170)
@@ -1,33 +0,0 @@
---- 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) {
-
Added: packages/trunk/trigger/trigger/debian/patches/30_physfs_sdl_interaction.patch
===================================================================
--- packages/trunk/trigger/trigger/debian/patches/30_physfs_sdl_interaction.patch 2006-07-23 00:33:12 UTC (rev 1169)
+++ packages/trunk/trigger/trigger/debian/patches/30_physfs_sdl_interaction.patch 2006-07-23 15:11:00 UTC (rev 1170)
@@ -0,0 +1,25 @@
+--- trigger-0.5.2/src/pengine/physfs_rw.cpp 2006-01-14 11:09:19.000000000 +0100
++++ trigger-0.5.2.orig/src/pengine/physfs_rw.cpp 2006-07-23 17:00:53.000000000 +0200
+@@ -16,6 +16,7 @@
+ int target;
+
+ int curpos = PHYSFS_tell(pfile);
++ int result;
+
+ switch (whence) {
+ default:
+@@ -30,9 +31,12 @@
+ break;
+ }
+
+- PHYSFS_seek(pfile, target);
++ result = PHYSFS_seek(pfile, target);
++ if (! result) {
++ MakePException("Error seeking: " + PHYSFS_getLastError());
++ }
+
+- return curpos;
++ return PHYSFS_tell(pfile);
+ }
+
+
More information about the Pkg-games-commits
mailing list