diff --git a/build/ios/Roll them Bones.xcodeproj/project.pbxproj b/build/ios/Roll them Bones.xcodeproj/project.pbxproj index 6e16396..58a4dbb 100755 --- a/build/ios/Roll them Bones.xcodeproj/project.pbxproj +++ b/build/ios/Roll them Bones.xcodeproj/project.pbxproj @@ -10,6 +10,10 @@ 0097E2D912F70C4E00724AC5 /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0097E2D512F70C4D00724AC5 /* libSDL2.a */; }; 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; }; + 20A7A91D1A89F91300EDC1A0 /* RenderCamera.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 20A7A9151A89F91300EDC1A0 /* RenderCamera.cpp */; }; + 20A7A91E1A89F91300EDC1A0 /* RenderScene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 20A7A9171A89F91300EDC1A0 /* RenderScene.cpp */; }; + 20A7A91F1A89F91300EDC1A0 /* RenderSet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 20A7A9191A89F91300EDC1A0 /* RenderSet.cpp */; }; + 20A7A9201A89F91300EDC1A0 /* RenderView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 20A7A91B1A89F91300EDC1A0 /* RenderView.cpp */; }; 20FD2D3B1A67470A00B32F7B /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 20FD2D3A1A67470A00B32F7B /* main.cpp */; }; 28FD15000DC6FC520079059D /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 28FD14FF0DC6FC520079059D /* OpenGLES.framework */; }; 28FD15080DC6FC5B0079059D /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 28FD15070DC6FC5B0079059D /* QuartzCore.framework */; }; @@ -82,6 +86,15 @@ 1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 1D6058910D05DD3D006BFB54 /* Roll them Bones.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Roll them Bones.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; + 20020C301A8A006300F985D8 /* common.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = common.hpp; path = ../../src/common.hpp; sourceTree = SOURCE_ROOT; }; + 20A7A9151A89F91300EDC1A0 /* RenderCamera.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RenderCamera.cpp; path = ../../src/RenderCamera.cpp; sourceTree = SOURCE_ROOT; }; + 20A7A9161A89F91300EDC1A0 /* RenderCamera.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = RenderCamera.hpp; path = ../../src/RenderCamera.hpp; sourceTree = SOURCE_ROOT; }; + 20A7A9171A89F91300EDC1A0 /* RenderScene.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RenderScene.cpp; path = ../../src/RenderScene.cpp; sourceTree = SOURCE_ROOT; }; + 20A7A9181A89F91300EDC1A0 /* RenderScene.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = RenderScene.hpp; path = ../../src/RenderScene.hpp; sourceTree = SOURCE_ROOT; }; + 20A7A9191A89F91300EDC1A0 /* RenderSet.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RenderSet.cpp; path = ../../src/RenderSet.cpp; sourceTree = SOURCE_ROOT; }; + 20A7A91A1A89F91300EDC1A0 /* RenderSet.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = RenderSet.hpp; path = ../../src/RenderSet.hpp; sourceTree = SOURCE_ROOT; }; + 20A7A91B1A89F91300EDC1A0 /* RenderView.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RenderView.cpp; path = ../../src/RenderView.cpp; sourceTree = SOURCE_ROOT; }; + 20A7A91C1A89F91300EDC1A0 /* RenderView.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = RenderView.hpp; path = ../../src/RenderView.hpp; sourceTree = SOURCE_ROOT; }; 20FD2D3A1A67470A00B32F7B /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = main.cpp; path = ../../src/main.cpp; sourceTree = SOURCE_ROOT; }; 28FD14FF0DC6FC520079059D /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; }; 28FD15070DC6FC5B0079059D /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; @@ -201,10 +214,35 @@ name = Products; sourceTree = ""; }; + 20A7A9131A89F8F600EDC1A0 /* Classes */ = { + isa = PBXGroup; + children = ( + 20A7A9151A89F91300EDC1A0 /* RenderCamera.cpp */, + 20A7A9161A89F91300EDC1A0 /* RenderCamera.hpp */, + 20A7A9171A89F91300EDC1A0 /* RenderScene.cpp */, + 20A7A9181A89F91300EDC1A0 /* RenderScene.hpp */, + 20A7A9191A89F91300EDC1A0 /* RenderSet.cpp */, + 20A7A91A1A89F91300EDC1A0 /* RenderSet.hpp */, + 20A7A91B1A89F91300EDC1A0 /* RenderView.cpp */, + 20A7A91C1A89F91300EDC1A0 /* RenderView.hpp */, + ); + name = Classes; + sourceTree = ""; + }; + 20A7A9221A89F91B00EDC1A0 /* Other Sources */ = { + isa = PBXGroup; + children = ( + 20020C301A8A006300F985D8 /* common.hpp */, + ); + name = "Other Sources"; + sourceTree = ""; + }; 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { isa = PBXGroup; children = ( 29B97315FDCFA39411CA2CEA /* Sources */, + 20A7A9131A89F8F600EDC1A0 /* Classes */, + 20A7A9221A89F91B00EDC1A0 /* Other Sources */, 29B97317FDCFA39411CA2CEA /* Resources */, 0097E29812F70C4D00724AC5 /* SDL */, 29B97323FDCFA39411CA2CEA /* Frameworks */, @@ -307,6 +345,10 @@ buildActionMask = 2147483647; files = ( 20FD2D3B1A67470A00B32F7B /* main.cpp in Sources */, + 20A7A91D1A89F91300EDC1A0 /* RenderCamera.cpp in Sources */, + 20A7A91E1A89F91300EDC1A0 /* RenderScene.cpp in Sources */, + 20A7A91F1A89F91300EDC1A0 /* RenderSet.cpp in Sources */, + 20A7A9201A89F91300EDC1A0 /* RenderView.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/build/osx/Roll them Bones.xcodeproj/project.pbxproj b/build/osx/Roll them Bones.xcodeproj/project.pbxproj index 9afb41d..238329c 100644 --- a/build/osx/Roll them Bones.xcodeproj/project.pbxproj +++ b/build/osx/Roll them Bones.xcodeproj/project.pbxproj @@ -11,6 +11,8 @@ 20138FCE1A3DC7A700FD0095 /* SDL2.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 20138FCD1A3DC7A700FD0095 /* SDL2.framework */; }; 205D36CE1A6749FB00C05BD8 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 205D36CD1A6749FB00C05BD8 /* main.cpp */; }; 205D370C1A674B1D00C05BD8 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 205D370B1A674B1D00C05BD8 /* OpenGL.framework */; }; + 20A7A8D51A89E11200EDC1A0 /* RenderScene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 20A7A8D11A89E11200EDC1A0 /* RenderScene.cpp */; }; + 20A7A8D61A89E11200EDC1A0 /* RenderSet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 20A7A8D31A89E11200EDC1A0 /* RenderSet.cpp */; }; 20A8CE541A899B72004D2504 /* RenderCamera.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 20A8CE501A899B72004D2504 /* RenderCamera.cpp */; }; 20A8CE551A899B72004D2504 /* RenderView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 20A8CE521A899B72004D2504 /* RenderView.cpp */; }; 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; }; @@ -18,15 +20,19 @@ /* Begin PBXFileReference section */ 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; + 20020C6F1A8A01EE00F985D8 /* common.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = common.hpp; path = ../../src/common.hpp; sourceTree = SOURCE_ROOT; }; 20138FCB1A3DC7A700FD0095 /* SDL2_image.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SDL2_image.framework; path = /Library/Frameworks/SDL2_image.framework; sourceTree = ""; }; 20138FCD1A3DC7A700FD0095 /* SDL2.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SDL2.framework; path = /Library/Frameworks/SDL2.framework; sourceTree = ""; }; 205D36CD1A6749FB00C05BD8 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = main.cpp; path = ../../src/main.cpp; sourceTree = SOURCE_ROOT; }; 205D370B1A674B1D00C05BD8 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = ""; }; + 20A7A8D11A89E11200EDC1A0 /* RenderScene.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RenderScene.cpp; path = ../../src/RenderScene.cpp; sourceTree = SOURCE_ROOT; }; + 20A7A8D21A89E11200EDC1A0 /* RenderScene.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = RenderScene.hpp; path = ../../src/RenderScene.hpp; sourceTree = SOURCE_ROOT; }; + 20A7A8D31A89E11200EDC1A0 /* RenderSet.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RenderSet.cpp; path = ../../src/RenderSet.cpp; sourceTree = SOURCE_ROOT; }; + 20A7A8D41A89E11200EDC1A0 /* RenderSet.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = RenderSet.hpp; path = ../../src/RenderSet.hpp; sourceTree = SOURCE_ROOT; }; 20A8CE501A899B72004D2504 /* RenderCamera.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RenderCamera.cpp; path = ../../src/RenderCamera.cpp; sourceTree = SOURCE_ROOT; }; 20A8CE511A899B72004D2504 /* RenderCamera.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = RenderCamera.hpp; path = ../../src/RenderCamera.hpp; sourceTree = SOURCE_ROOT; }; 20A8CE521A899B72004D2504 /* RenderView.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RenderView.cpp; path = ../../src/RenderView.cpp; sourceTree = SOURCE_ROOT; }; 20A8CE531A899B72004D2504 /* RenderView.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = RenderView.hpp; path = ../../src/RenderView.hpp; sourceTree = SOURCE_ROOT; }; - 20A8CE681A899CF6004D2504 /* GL.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = GL.hpp; path = ../../src/GL.hpp; sourceTree = SOURCE_ROOT; }; 8D1107320486CEB800E47090 /* Roll them Bones.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Roll them Bones.app"; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ @@ -48,6 +54,10 @@ 080E96DDFE201D6D7F000001 /* Classes */ = { isa = PBXGroup; children = ( + 20A7A8D11A89E11200EDC1A0 /* RenderScene.cpp */, + 20A7A8D21A89E11200EDC1A0 /* RenderScene.hpp */, + 20A7A8D31A89E11200EDC1A0 /* RenderSet.cpp */, + 20A7A8D41A89E11200EDC1A0 /* RenderSet.hpp */, 20A8CE501A899B72004D2504 /* RenderCamera.cpp */, 20A8CE511A899B72004D2504 /* RenderCamera.hpp */, 20A8CE521A899B72004D2504 /* RenderView.cpp */, @@ -106,7 +116,7 @@ 29B97315FDCFA39411CA2CEA /* Other Sources */ = { isa = PBXGroup; children = ( - 20A8CE681A899CF6004D2504 /* GL.hpp */, + 20020C6F1A8A01EE00F985D8 /* common.hpp */, ); name = "Other Sources"; sourceTree = ""; @@ -193,6 +203,8 @@ 205D36CE1A6749FB00C05BD8 /* main.cpp in Sources */, 20A8CE541A899B72004D2504 /* RenderCamera.cpp in Sources */, 20A8CE551A899B72004D2504 /* RenderView.cpp in Sources */, + 20A7A8D51A89E11200EDC1A0 /* RenderScene.cpp in Sources */, + 20A7A8D61A89E11200EDC1A0 /* RenderSet.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/src/RenderCamera.hpp b/src/RenderCamera.hpp index 1aa2248..cba54fe 100644 --- a/src/RenderCamera.hpp +++ b/src/RenderCamera.hpp @@ -9,7 +9,7 @@ RenderScene and outputs all data to the friend class, RenderView. ================================================================ */ #ifndef RENDERCAMERA_HPP #define RENDERCAMERA_HPP -#include "GL.hpp" +#include "common.hpp" #include "RenderView.hpp" class RenderCamera { public: diff --git a/src/RenderScene.hpp b/src/RenderScene.hpp index 0a04b60..de67c0f 100644 --- a/src/RenderScene.hpp +++ b/src/RenderScene.hpp @@ -9,7 +9,7 @@ each of which correspond to a different scene perspective. ================================================================ */ #ifndef RENDERSCENE_HPP #define RENDERSCENE_HPP -#include "GL.hpp" +#include "common.hpp" #include "RenderCamera.hpp" #include class RenderScene { diff --git a/src/RenderSet.hpp b/src/RenderSet.hpp index f0c655c..0c87d09 100644 --- a/src/RenderSet.hpp +++ b/src/RenderSet.hpp @@ -10,7 +10,7 @@ rendering layers of the program. ================================================================ */ #ifndef RENDERSET_HPP #define RENDERSET_HPP -#include "GL.hpp" +#include "common.hpp" #include class RenderSet { public: diff --git a/src/RenderView.hpp b/src/RenderView.hpp index ef8c6d9..040cd7b 100644 --- a/src/RenderView.hpp +++ b/src/RenderView.hpp @@ -9,7 +9,7 @@ purposes, it is a wrapper around a FBO. ================================================================ */ #ifndef RENDERVIEW_HPP #define RENDERVIEW_HPP -#include "GL.hpp" +#include "common.hpp" class RenderView { friend class RenderCamera; public: diff --git a/src/GL.hpp b/src/common.hpp similarity index 65% rename from src/GL.hpp rename to src/common.hpp index aa16075..1940380 100644 --- a/src/GL.hpp +++ b/src/common.hpp @@ -1,6 +1,11 @@ /* ================================================================ -This file provides common includes to access OpenGL types and functions +This header provides common includes to SDL2 and OpenGL/OpenGLES ================================================================ */ +#if defined(__APPLE__) +#include +#endif +#include "SDL.h" + #if defined(__IPHONEOS__) || defined(__ANDROID__) #define HAVE_OPENGLES #endif diff --git a/src/main.cpp b/src/main.cpp index d80c32f..6282c8b 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,5 +1,4 @@ -#include "SDL.h" -#include "GL.hpp" +#include "common.hpp" int main(int argc, char *argv[]) { // TEMP location of video vars @@ -12,7 +11,7 @@ int main(int argc, char *argv[]) { int g_running = 0; // initialize SDL - if (SDL_Init(SDL_INIT_EVERYTHING) != 0) { + if (SDL_Init(SDL_INIT_EVERYTHING & ~SDL_INIT_HAPTIC) != 0) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "SDL_Init: %s\n", SDL_GetError()); return 1; }