commit c325f4fa
physfs support in Windows
git-svn-id: https://blockattack.svn.sourceforge.net/svnroot/blockattack/trunk@86 9d7177f8-192b-0410-8f35-a16a89829b06
Changed files
| M | source/code/BlockAttackWin32.dev before |
| M | source/code/main.cpp before |
diff --git a/source/code/BlockAttackWin32.dev b/source/code/BlockAttackWin32.dev
index fa2c218..48fcc62 100644
--- a/source/code/BlockAttackWin32.dev
+++ b/source/code/BlockAttackWin32.dev
@@ -12,9 +12,9 @@ ResourceIncludes=
MakeIncludes=
Compiler=
CppCompiler=
-Linker=-lmingw32 -lSDLmain -lSDL -lSDL_Mixer -lSDL_image_@@_../../../../../Dev-Cpp/lib/libwsock32.a_@@_../../../../../Dev-Cpp/lib/libws2_32.a_@@_../../../../../Dev-Cpp/lib/libenet.a_@@_-lwsock32_@@_-lwinmm_@@_-lws2_32_@@_
+Linker=-lmingw32 -lSDLmain -lSDL -lSDL_Mixer -lSDL_image_@@_../../../../../Dev-Cpp/lib/libwsock32.a_@@_../../../../../Dev-Cpp/lib/libws2_32.a_@@_../../../../../Dev-Cpp/lib/libenet.a_@@_-lwsock32_@@_-lwinmm_@@_-lws2_32_@@_-lphysfs_@@_-lz_@@_
IsCpp=1
-Icon=BlockAttackWin32.ico
+Icon=
ExeOutput=..\..\Game
ObjectOutput=Objects
OverrideOutput=1
@@ -27,24 +27,24 @@ CustomMakefile=
IncludeVersionInfo=1
SupportXPThemes=0
CompilerSet=0
-CompilerSettings=0000000000000000000000
+CompilerSettings=0000000001001000000100
[VersionInfo]
Major=1
Minor=4
-Release=0
+Release=1
Build=1
LanguageID=1033
CharsetID=1252
CompanyName=
-FileVersion=1.4.0
+FileVersion=1.4.1
FileDescription=Block Attack - Rise of the Blocks (tetris Attack Clone)
InternalName=
LegalCopyright=Poul Sander
LegalTrademarks=
OriginalFilename=
ProductName=Block Attack - Rise of the Blocks
-ProductVersion=1.4.0
+ProductVersion=1.4.1
AutoIncBuildNr=0
[Unit1]
diff --git a/source/code/main.cpp b/source/code/main.cpp
index 17657fd..13e8f35 100644
--- a/source/code/main.cpp
+++ b/source/code/main.cpp
@@ -3438,13 +3438,13 @@ int main(int argc, char *argv[])
#elif defined(_WIN32)
//Now for Windows NT/2k/xp/2k3 etc.
string tempA = getMyDocumentsPath()+"\\My Games";
- CreateDirectory(tempA.c_str(),NULL);//system(tempA.c_str());
+ CreateDirectory(tempA.c_str(),NULL);
tempA = getMyDocumentsPath()+"\\My Games\\blockattack";
- CreateDirectory(tempA.c_str(),NULL);//system(tempA.c_str());
+ CreateDirectory(tempA.c_str(),NULL);
tempA = getMyDocumentsPath()+"\\My Games\\blockattack\\replays";
- CreateDirectory(tempA.c_str(),NULL);//system(tempA.c_str());
+ CreateDirectory(tempA.c_str(),NULL);
tempA = getMyDocumentsPath()+"\\My Games\\blockattack\\screenshots";
- CreateDirectory(tempA.c_str(),NULL);//system(tempA.c_str());
+ CreateDirectory(tempA.c_str(),NULL);
#endif
highPriority = false; //if true the game will take most resources, but increase framerate.
bFullscreen = false;
@@ -3602,8 +3602,17 @@ int main(int argc, char *argv[])
#if USE_ABSTRACT_FS
//Init the file system abstraction layer
PHYSFS_init(argv[0]);
- PHYSFS_addToSearchPath("blockattack.data", 1);
-
+ //Look in blockattack.data
+ PHYSFS_addToSearchPath(((string)SHAREDIR+"blockattack.data").c_str(), 1);
+ //Look in folder
+ PHYSFS_addToSearchPath(SHAREDIR, 1);
+ //Look in home folder
+ #if defined(__unix__)
+ PHYSFS_addToSearchPath(home+"/.gamesaves/blockattack", 1);
+ #elif defined(_WIN32)
+ if (&home!=NULL)
+ PHYSFS_addToSearchPath((home+"/My Games/blockattack").c_str(), 1);
+ #endif
#endif
//Init SDL