|
Lines 26-41
Link Here
|
| 26 |
|
26 |
|
| 27 |
#include <SDL2/SDL.h> |
27 |
#include <SDL2/SDL.h> |
| 28 |
|
28 |
|
| 29 |
#ifndef __APPLE__ |
29 |
#include "Global.h" |
| 30 |
#ifndef __ANDROID__ |
|
|
| 31 |
#include "config.h" |
| 32 |
#endif |
| 33 |
#endif |
| 34 |
|
30 |
|
| 35 |
#ifdef __APPLE__ |
31 |
#ifdef __APPLE__ |
| 36 |
#if TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR |
32 |
#if TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR |
| 37 |
#include <physfs.h> |
33 |
#include <physfs.h> |
| 38 |
#else |
34 |
#endif |
|
|
35 |
#endif |
| 36 |
|
| 37 |
#if __DESKTOP__ |
| 38 |
#ifndef WIN32 |
| 39 |
#include "config.h" |
39 |
#include "config.h" |
| 40 |
#endif |
40 |
#endif |
| 41 |
#endif |
41 |
#endif |
|
Lines 99-112
Link Here
|
| 99 |
#if defined(WIN32) |
99 |
#if defined(WIN32) |
| 100 |
// Just write in installation directory |
100 |
// Just write in installation directory |
| 101 |
fs.setWriteDir("data"); |
101 |
fs.setWriteDir("data"); |
| 102 |
|
|
|
| 103 |
// handle the case when it is installed |
| 104 |
fs.addToSearchPath(BLOBBY_INSTALL_PREFIX "/share/blobby"); |
| 105 |
fs.addToSearchPath(BLOBBY_INSTALL_PREFIX "/share/blobby/gfx.zip"); |
| 106 |
fs.addToSearchPath(BLOBBY_INSTALL_PREFIX "/share/blobby/sounds.zip"); |
| 107 |
fs.addToSearchPath(BLOBBY_INSTALL_PREFIX "/share/blobby/scripts.zip"); |
| 108 |
fs.addToSearchPath(BLOBBY_INSTALL_PREFIX "/share/blobby/backgrounds.zip"); |
| 109 |
fs.addToSearchPath(BLOBBY_INSTALL_PREFIX "/share/blobby/rules.zip"); |
| 110 |
#else |
102 |
#else |
| 111 |
#ifndef __ANDROID__ |
103 |
#ifndef __ANDROID__ |
| 112 |
// Create a search path in the home directory and ensure that |
104 |
// Create a search path in the home directory and ensure that |
|
Lines 118-124
Link Here
|
| 118 |
std::string userdir = fs.getUserDir(); |
110 |
std::string userdir = fs.getUserDir(); |
| 119 |
#endif |
111 |
#endif |
| 120 |
#else |
112 |
#else |
|
|
113 |
// Linux |
| 121 |
std::string userdir = fs.getUserDir(); |
114 |
std::string userdir = fs.getUserDir(); |
|
|
115 |
|
| 116 |
// handle the case when it is installed |
| 117 |
fs.addToSearchPath(BLOBBY_INSTALL_PREFIX "/share/blobby"); |
| 118 |
fs.addToSearchPath(BLOBBY_INSTALL_PREFIX "/share/blobby/gfx.zip"); |
| 119 |
fs.addToSearchPath(BLOBBY_INSTALL_PREFIX "/share/blobby/sounds.zip"); |
| 120 |
fs.addToSearchPath(BLOBBY_INSTALL_PREFIX "/share/blobby/scripts.zip"); |
| 121 |
fs.addToSearchPath(BLOBBY_INSTALL_PREFIX "/share/blobby/backgrounds.zip"); |
| 122 |
fs.addToSearchPath(BLOBBY_INSTALL_PREFIX "/share/blobby/rules.zip"); |
| 122 |
#endif |
123 |
#endif |
| 123 |
std::string userAppend = ".blobby"; |
124 |
std::string userAppend = ".blobby"; |
| 124 |
std::string homedir = userdir + userAppend; |
125 |
std::string homedir = userdir + userAppend; |