r12440 - packages/trunk/sleepisdeath/debian/patches
Paul Wise
pabs at alioth.debian.org
Mon May 30 09:50:52 UTC 2011
Author: pabs
Date: 2011-05-30 09:50:52 +0000 (Mon, 30 May 2011)
New Revision: 12440
Modified:
packages/trunk/sleepisdeath/debian/patches/abs_path.patch
packages/trunk/sleepisdeath/debian/patches/series
Log:
Fix and enable the abs_path patch
Modified: packages/trunk/sleepisdeath/debian/patches/abs_path.patch
===================================================================
--- packages/trunk/sleepisdeath/debian/patches/abs_path.patch 2011-05-30 09:49:45 UTC (rev 12439)
+++ packages/trunk/sleepisdeath/debian/patches/abs_path.patch 2011-05-30 09:50:52 UTC (rev 12440)
@@ -2,7 +2,7 @@
Author: Paul Wise <pabs at debian.org>
--- a/SleepIsDeath/gameSource/common.cpp
+++ b/SleepIsDeath/gameSource/common.cpp
-@@ -12,7 +12,7 @@
+@@ -15,7 +15,7 @@
Image *readTGA( const char *inFileName ) {
@@ -11,17 +11,6 @@
}
---- a/SleepIsDeath/gameSource/musicPlayer.cpp
-+++ b/SleepIsDeath/gameSource/musicPlayer.cpp
-@@ -425,7 +425,7 @@
-
- void loadMusicImage( const char *inTGAFileName ) {
-
-- musicImage = readTGA( "music", inTGAFileName );
-+ musicImage = readTGA( DATADIR"music", inTGAFileName );
-
- w = musicImage->getWidth();
- h = musicImage->getHeight();
--- a/minorGems/util/SettingsManager.cpp
+++ b/minorGems/util/SettingsManager.cpp
@@ -379,7 +379,7 @@
@@ -33,40 +22,6 @@
mHashSalt( stringDuplicate( "default_salt" ) ) {
}
---- a/SleepIsDeath/gameSource/Client.cpp
-+++ b/SleepIsDeath/gameSource/Client.cpp
-@@ -6,6 +6,8 @@
- #include "minorGems/util/SettingsManager.h"
-
- #include <time.h>
-+#include <sys/stat.h>
-+#include <sys/types.h>
-
-
- char *Client::sServerURL = NULL;
-@@ -254,7 +256,21 @@
-
- mPlayerID = stringDuplicate( returnedID );
-
-- SettingsManager::setSetting( "playerID", mPlayerID );
-+ #define SETTINGS "/.between"
-+ char* home = getenv( "HOME" );
-+ size_t len = strlen( home );
-+ size_t len2 = sizeof( SETTINGS );
-+ char* dir = (char*)malloc( len + len2 );
-+ if( dir ){
-+ strcpy( dir, home );
-+ if( dir[len-1] == '/') strcpy( dir + len - 1, SETTINGS );
-+ else strcpy( dir + len, SETTINGS );
-+ mkdir( dir, 0777 );
-+ char* dirName = SettingsManager::getDirectoryName();
-+ SettingsManager::setDirectoryName( dir );
-+ SettingsManager::setSetting( "playerID", mPlayerID );
-+ SettingsManager::setDirectoryName( dirName );
-+ } else SettingsManager::setSetting( "playerID", mPlayerID );
- }
- else {
- resultWellFormatted = false;
--- a/minorGems/util/TranslationManager.cpp
+++ b/minorGems/util/TranslationManager.cpp
@@ -162,7 +162,7 @@
@@ -80,7 +35,7 @@
--- a/SleepIsDeath/gameSource/game.cpp
+++ b/SleepIsDeath/gameSource/game.cpp
-@@ -1411,7 +1411,7 @@
+@@ -910,7 +910,7 @@
void GameSceneHandler::initFromFiles() {
// translation language
@@ -89,7 +44,7 @@
if( languageNameFile.exists() ) {
char *languageNameText = languageNameFile.readFileContents();
-@@ -1424,6 +1424,7 @@
+@@ -923,6 +923,7 @@
if( numTokens > 0 ) {
char *languageName = *( tokens->getElement( 0 ) );
@@ -97,3 +52,14 @@
TranslationManager::setLanguage( languageName );
}
else {
+--- a/minorGems/game/platforms/SDL/gameSDL.cpp
++++ b/minorGems/game/platforms/SDL/gameSDL.cpp
+@@ -767,7 +767,7 @@
+
+ Image *readTGAFile( const char *inTGAFileName ) {
+
+- File tgaFile( new Path( "graphics" ), inTGAFileName );
++ File tgaFile( new Path( DATADIR"graphics" ), inTGAFileName );
+ FileInputStream tgaStream( &tgaFile );
+
+ TGAImageConverter converter;
Modified: packages/trunk/sleepisdeath/debian/patches/series
===================================================================
--- packages/trunk/sleepisdeath/debian/patches/series 2011-05-30 09:49:45 UTC (rev 12439)
+++ packages/trunk/sleepisdeath/debian/patches/series 2011-05-30 09:50:52 UTC (rev 12440)
@@ -1,2 +1,2 @@
-#abs_path.patch
+abs_path.patch
miniupnpc.patch
More information about the Pkg-games-commits
mailing list