Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:RedDwarf:remakes
spirits
spirits-1.0-dirs.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File spirits-1.0-dirs.patch of Package spirits
--- src/ma_allegro/tmagame.cpp +++ src/ma_allegro/tmagame.cpp @@ -2,6 +2,7 @@ #define _TMAGAME_CPP_ #include "ma_allegro.h" +#include "../main/spirits.h" #include <ctype.h> // ************************************** @@ -57,15 +58,12 @@ putenv(buff); #endif } - getcwd(buff,1024); - strcat(buff,"/data/lang"); - for (int i=0;*(buff+i)!=0;i++) if (*(buff+i)=='\\') *(buff+i)='/'; // Establecemos el idioma // set_uformat(U_UTF8); setlocale(LC_MESSAGES,""); - bindtextdomain(domain,buff); + bindtextdomain(domain,TSpiritsGame::gamePath.getLangPrefix().text()); textdomain(domain); } --- src/ma_allegro/utils/utils.h +++ src/ma_allegro/utils/utils.h @@ -166,7 +166,7 @@ void replaceChar(char origen,char destino); - const char* text(void) {return Dato;}; + const char* text(void) const {return Dato;}; const char* operator *(void) {return Dato;}; char operator [](int P) {return Dato[P];}; --- src/main/spirits.cpp +++ src/main/spirits.cpp @@ -330,7 +330,7 @@ if (argc>1 && (strcmp(argv[1],"/log")==0)) { TSpiritsGame::gameLog.setLogFile( - TSpiritsGame::gamePath.makePath(TSpiritsGame::gamePath.getCurrentDirectory(),"/spirits.log").text() + TSpiritsGame::gamePath.makePath(TSpiritsGame::gamePath.getConfigPrefix(),"/spirits.log").text() ); } else --- src/misc/config.cpp +++ src/misc/config.cpp @@ -78,7 +78,7 @@ // Leemos la lista de lenguajes // - TMAString filename = path.makePath(path.getLangPrefix(),"lang.lst"); + TMAString filename = path.makePath(path.getDataPrefix(),"/lang/lang.lst"); ioLua.reset(); ls = ioLua.getHandler(); int result=ioLua.executeFileScript(filename.text()); --- src/misc/path.cpp +++ src/misc/path.cpp @@ -29,8 +29,7 @@ // Calculamos las rutas de los otros directorios // - data_prefix = (current_directory + "/") + DFLT_DATA_DIR; - scripts_prefix = (current_directory + "/") + DFLT_SCRIPTS_DIR; + data_prefix = DFLT_DATA_DIR; #ifdef LINUX config_prefix=getenv("HOME"); @@ -39,7 +38,8 @@ config_prefix=(current_directory + "/") + DFLT_DATA_DIR; #endif - lang_prefix = (current_directory + "/") + DFLT_LANG_DIR; + scripts_prefix = config_prefix+"/"; + lang_prefix = DFLT_LANG_DIR; } const TMAString& Path::getCurrentDirectory() --- src/misc/path.h +++ src/misc/path.h @@ -1,10 +1,6 @@ #ifndef _PATH_H_ #define _PATH_H_ -#define DFLT_DATA_DIR "data/" -#define DFLT_SCRIPTS_DIR "data/scripts/" -#define DFLT_LANG_DIR "data/lang/" - #include "../ma_allegro/utils/utils.h" class Path
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor