[trigger-rally] 21/103: really fix up sdl<->physfs interaction (the seek wrapper was broken). Thus dropping the old workaround patch. The snowlevel is now playable again :).
Bertrand Marc
bbk-guest at moszumanska.debian.org
Sun May 22 12:21:20 UTC 2016
This is an automated email from the git hooks/post-receive script.
bbk-guest pushed a commit to branch master
in repository trigger-rally.
commit ce08264a6ce481fc56a40478649a935219d9cb19
Author: Stefan Potyra <sistpoty at ubuntu.com>
Date: Sun Jul 23 15:11:00 2006 +0000
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.
---
trigger/debian/changelog | 10 ++++++-
trigger/debian/patches/30_fix_physfs_texture.patch | 33 ----------------------
.../debian/patches/30_physfs_sdl_interaction.patch | 25 ++++++++++++++++
3 files changed, 34 insertions(+), 34 deletions(-)
diff --git a/trigger/debian/changelog b/trigger/debian/changelog
index 52ebcfe..a52ed3d 100644
--- a/trigger/debian/changelog
+++ b/trigger/debian/changelog
@@ -1,8 +1,16 @@
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
diff --git a/trigger/debian/patches/30_fix_physfs_texture.patch b/trigger/debian/patches/30_fix_physfs_texture.patch
deleted file mode 100644
index 07ab892..0000000
--- a/trigger/debian/patches/30_fix_physfs_texture.patch
+++ /dev/null
@@ -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) {
-
diff --git a/trigger/debian/patches/30_physfs_sdl_interaction.patch b/trigger/debian/patches/30_physfs_sdl_interaction.patch
new file mode 100644
index 0000000..3f719a1
--- /dev/null
+++ b/trigger/debian/patches/30_physfs_sdl_interaction.patch
@@ -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);
+ }
+
+
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/trigger-rally.git
More information about the Pkg-games-commits
mailing list