diff --git a/mac/starfighter.xcodeproj/project.pbxproj b/mac/starfighter.xcodeproj/project.pbxproj index 7160754..61e2bc1 100644 --- a/mac/starfighter.xcodeproj/project.pbxproj +++ b/mac/starfighter.xcodeproj/project.pbxproj @@ -436,6 +436,11 @@ "$(PROJECT_DIR)", ); GCC_PREPROCESSOR_DEFINITIONS = "VERSION=\\\"1.5.1\\\""; + HEADER_SEARCH_PATHS = ( + SDL2.framework/Headers, + SDL2_mixer.framework/Headers, + SDL2_image.framework/Headers, + ); INFOPLIST_FILE = starfighter/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = uk.me.fantastic.starfighter; @@ -453,6 +458,11 @@ "$(PROJECT_DIR)", ); GCC_PREPROCESSOR_DEFINITIONS = "VERSION=\\\"1.5.1\\\""; + HEADER_SEARCH_PATHS = ( + SDL2.framework/Headers, + SDL2_mixer.framework/Headers, + SDL2_image.framework/Headers, + ); INFOPLIST_FILE = starfighter/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = uk.me.fantastic.starfighter; diff --git a/src/Starfighter.cpp b/src/Starfighter.cpp index a80ca1e..4e89219 100644 --- a/src/Starfighter.cpp +++ b/src/Starfighter.cpp @@ -20,6 +20,10 @@ along with this program. If not, see . #include "Starfighter.h" +#ifdef __APPLE__ +#include "CoreFoundation/CoreFoundation.h" +#endif + int main(int argc, char **argv) { bool cheatAttempt; diff --git a/src/Starfighter.h b/src/Starfighter.h index 9a2269f..9bdbc83 100644 --- a/src/Starfighter.h +++ b/src/Starfighter.h @@ -28,16 +28,9 @@ along with this program. If not, see . #include #include -#ifdef __APPLE__ -#include -#include -#include -#include "CoreFoundation/CoreFoundation.h" -#else #include "SDL.h" #include "SDL_image.h" #include "SDL_mixer.h" -#endif #include "defs.h" #include "structs.h" diff --git a/src/colors.cpp b/src/colors.cpp index 44cb609..137e1fe 100644 --- a/src/colors.cpp +++ b/src/colors.cpp @@ -17,6 +17,8 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ +#include + #include "Starfighter.h" Uint32 red; diff --git a/src/engine.h b/src/engine.h index e657a04..52cc990 100644 --- a/src/engine.h +++ b/src/engine.h @@ -20,12 +20,7 @@ along with this program. If not, see . #ifndef GLOBALS_H #define GLOBALS_H -#ifdef __APPLE__ -#include -#else #include "SDL.h" -#endif - #include "defs.h" #include "structs.h" diff --git a/src/renderer.cpp b/src/renderer.cpp index f43db47..cd46d81 100644 --- a/src/renderer.cpp +++ b/src/renderer.cpp @@ -17,12 +17,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifdef __APPLE__ -#include -#else #include "SDL.h" -#endif - #include "screen.h" diff --git a/src/screen.cpp b/src/screen.cpp index 12f3717..c0e44f2 100644 --- a/src/screen.cpp +++ b/src/screen.cpp @@ -19,6 +19,8 @@ along with this program. If not, see . #include +#include "SDL.h" + #include "engine.h" #include "gfx.h" #include "structs.h" diff --git a/src/window.cpp b/src/window.cpp index 4faefc5..2c6f17a 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -17,11 +17,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifdef __APPLE__ -#include -#else -#include "SDL.h" -#endif +#include "SDL.h" SDL_Window *window;