[SCM] asciiportal - a puzzle jump'n'run adventure game branch, master, updated. upstream/1.2c-6-ga301912

Peter Pentchev roam at ringlet.net
Sun Sep 12 00:33:30 UTC 2010


The following commit has been merged in the master branch:
commit a3019125adc5981a42abb5ab229fdb8fdbc5cf3c
Author: Peter Pentchev <roam at ringlet.net>
Date:   Sun Sep 12 03:32:28 2010 +0300

    Halfway there: look for maps in /usr/share/asciiportal.

diff --git a/debian/changelog b/debian/changelog
index 476a82d..a0aa467 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,7 +2,7 @@ asciiportal (1.2c-1) UNRELEASED; urgency=low
 
   WAITSFOR: libxcurses (ITP #548070)
 
-  TODO: teach the binary about /usr/share/asciiportal
+  TODO: teach the binary to look for sounds in /usr/share/asciiportal
   TODO: write a manpage
   TODO: remove the unneeded dh_make template files
   TODO: policy 3.9.1
diff --git a/debian/patches/02-data-in-usr-share.patch b/debian/patches/02-data-in-usr-share.patch
new file mode 100644
index 0000000..ad84570
--- /dev/null
+++ b/debian/patches/02-data-in-usr-share.patch
@@ -0,0 +1,37 @@
+Description: Look for the maps and sounds in /usr/share/asciiportal
+ TODO: do the sounds, too
+Forwarded: no
+Author: Peter Pentchev <roam at ringlet.net>
+Last-Update: 2010-09-12
+
+--- a/main.cpp
++++ b/main.cpp
+@@ -44,6 +44,8 @@
+ vector<unsigned int> rawmaps_maxwidth;
+ extern int maxlevel;
+ 
++string mapbase = "/usr/share/asciiportal/";
++
+ int loadmaps (string mappack) {    // Looks for the mappack directory and loads
+           // the files mappack001.txt, mappack002.txt etc and stores it in maps.
+   string line, name;
+@@ -57,6 +59,19 @@
+   }
+   rawmaps.clear();
+ 
++  name = mappack + "/001.txt";
++  ifstream testfile(name.c_str());
++  if (!testfile.is_open()) {
++	  name = mapbase + name;
++	  testfile.open(name.c_str());
++	  if (testfile.is_open()) {
++		  mappack = mapbase + mappack;
++		  testfile.close();
++	  }
++  } else {
++	  testfile.close();
++  }
++
+   maxlevel = 0;
+   // load maxlevel
+   string maxlevelfilename;
diff --git a/debian/patches/series b/debian/patches/series
index 3997568..d9dc362 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 01-Makefile.patch
+02-data-in-usr-share.patch

-- 
asciiportal - a puzzle jump'n'run adventure game



More information about the Pkg-games-commits mailing list