Package: transcend / 0.3.dfsg2-3

02_levels_dir.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
Description: Add LEVELS_DIR to specify which directory the level data is installed in.
Author: Miriam Ruiz <miriam@debian.org>
--- a/Transcend/game/LevelDirectoryManager.cpp
+++ b/Transcend/game/LevelDirectoryManager.cpp
@@ -42,7 +42,7 @@
         }
     else {
         // return default location... level 1
-        File *levelDirectory = new File( NULL, "levels" );
+        File *levelDirectory = new File( NULL, LEVELS_DIR );
         File *level1Directory = levelDirectory->getChildFile( "001" );
 
         delete levelDirectory;
--- a/Transcend/game/LevelDirectoryManager.h
+++ b/Transcend/game/LevelDirectoryManager.h
@@ -16,6 +16,9 @@
 #ifndef LEVEL_DIRECTORY_MANAGER_INCLUDED
 #define LEVEL_DIRECTORY_MANAGER_INCLUDED
 
+#ifndef LEVELS_DIR
+#define LEVELS_DIR "levels"
+#endif
 
 
 #include "minorGems/io/file/File.h"
--- a/Transcend/game/game.cpp
+++ b/Transcend/game/game.cpp
@@ -495,7 +495,7 @@
 
     
     
-    File *levelsDirectory = new File( NULL, "levels" );
+    File *levelsDirectory = new File( NULL, LEVELS_DIR );
     File *currentLevelDirectory = levelsDirectory->getChildFile( levelString );
 
     if( !( currentLevelDirectory->exists() ) ) {