Explorar o código

Chapter 7 (Mac)

Sanjay Madhav %!s(int64=8) %!d(string=hai) anos
pai
achega
4561a0581f

+ 1 - 0
.gitignore

@@ -10,3 +10,4 @@ Release/
 .vs
 Chapter15/Assets/Saved.gplevel
 Chapter15/Assets/*.bin
+External/FMOD

+ 38 - 28
Chapter07/Chapter8-mac.xcodeproj/project.pbxproj → Chapter07/Chapter07-mac.xcodeproj/project.pbxproj

@@ -16,7 +16,6 @@
 		9223C47E1F009428009A94D7 /* Math.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9223C4721F009428009A94D7 /* Math.cpp */; };
 		9223C4801F009428009A94D7 /* SpriteComponent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9223C4761F009428009A94D7 /* SpriteComponent.cpp */; };
 		9223C48B1F0CA3CE009A94D7 /* MoveComponent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9223C48A1F0CA3CE009A94D7 /* MoveComponent.cpp */; };
-		9223C4941F0CA766009A94D7 /* CollisionComponent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9223C4901F0CA766009A94D7 /* CollisionComponent.cpp */; };
 		9223C4951F0CA766009A94D7 /* CircleComponent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9223C4911F0CA766009A94D7 /* CircleComponent.cpp */; };
 		92CF0D2F1F3BB5270086A0F3 /* AudioComponent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 92CF0D1D1F3BB5270086A0F3 /* AudioComponent.cpp */; };
 		92CF0D301F3BB5270086A0F3 /* AudioSystem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 92CF0D1F1F3BB5270086A0F3 /* AudioSystem.cpp */; };
@@ -50,9 +49,7 @@
 		9223C4771F009428009A94D7 /* SpriteComponent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpriteComponent.h; sourceTree = "<group>"; };
 		9223C48A1F0CA3CE009A94D7 /* MoveComponent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MoveComponent.cpp; sourceTree = "<group>"; };
 		9223C48C1F0CA3D4009A94D7 /* MoveComponent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MoveComponent.h; sourceTree = "<group>"; };
-		9223C4901F0CA766009A94D7 /* CollisionComponent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CollisionComponent.cpp; sourceTree = "<group>"; };
 		9223C4911F0CA766009A94D7 /* CircleComponent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CircleComponent.cpp; sourceTree = "<group>"; };
-		9223C4921F0CA766009A94D7 /* CollisionComponent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CollisionComponent.h; sourceTree = "<group>"; };
 		9223C4931F0CA766009A94D7 /* CircleComponent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CircleComponent.h; sourceTree = "<group>"; };
 		92CF0D1D1F3BB5270086A0F3 /* AudioComponent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AudioComponent.cpp; sourceTree = "<group>"; };
 		92CF0D1E1F3BB5270086A0F3 /* AudioComponent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AudioComponent.h; sourceTree = "<group>"; };
@@ -93,45 +90,43 @@
 		92E46DEE1B634EA30035CD21 = {
 			isa = PBXGroup;
 			children = (
+				9223C4681F009428009A94D7 /* Actor.cpp */,
+				9223C4691F009428009A94D7 /* Actor.h */,
 				92CF0D1D1F3BB5270086A0F3 /* AudioComponent.cpp */,
 				92CF0D1E1F3BB5270086A0F3 /* AudioComponent.h */,
 				92CF0D1F1F3BB5270086A0F3 /* AudioSystem.cpp */,
 				92CF0D201F3BB5270086A0F3 /* AudioSystem.h */,
 				92CF0D211F3BB5270086A0F3 /* CameraActor.cpp */,
 				92CF0D221F3BB5270086A0F3 /* CameraActor.h */,
-				92CF0D231F3BB5270086A0F3 /* Mesh.cpp */,
-				92CF0D241F3BB5270086A0F3 /* Mesh.h */,
-				92CF0D251F3BB5270086A0F3 /* MeshComponent.cpp */,
-				92CF0D261F3BB5270086A0F3 /* MeshComponent.h */,
-				92CF0D271F3BB5270086A0F3 /* PlaneActor.cpp */,
-				92CF0D281F3BB5270086A0F3 /* PlaneActor.h */,
-				92CF0D291F3BB5270086A0F3 /* Renderer.cpp */,
-				92CF0D2A1F3BB5270086A0F3 /* Renderer.h */,
-				92CF0D2B1F3BB5270086A0F3 /* SoundEvent.cpp */,
-				92CF0D2C1F3BB5270086A0F3 /* SoundEvent.h */,
-				92CF0D2D1F3BB5270086A0F3 /* VertexArray.cpp */,
-				92CF0D2E1F3BB5270086A0F3 /* VertexArray.h */,
-				9223C4681F009428009A94D7 /* Actor.cpp */,
-				9223C4691F009428009A94D7 /* Actor.h */,
 				9223C46E1F009428009A94D7 /* Component.cpp */,
 				9223C46F1F009428009A94D7 /* Component.h */,
 				9223C4911F0CA766009A94D7 /* CircleComponent.cpp */,
 				9223C4931F0CA766009A94D7 /* CircleComponent.h */,
-				9223C4901F0CA766009A94D7 /* CollisionComponent.cpp */,
-				9223C4921F0CA766009A94D7 /* CollisionComponent.h */,
 				9223C4671F009428009A94D7 /* Game.cpp */,
 				9223C4701F009428009A94D7 /* Game.h */,
 				9223C4711F009428009A94D7 /* Main.cpp */,
 				9223C4721F009428009A94D7 /* Math.cpp */,
 				9223C4731F009428009A94D7 /* Math.h */,
+				92CF0D231F3BB5270086A0F3 /* Mesh.cpp */,
+				92CF0D241F3BB5270086A0F3 /* Mesh.h */,
+				92CF0D251F3BB5270086A0F3 /* MeshComponent.cpp */,
+				92CF0D261F3BB5270086A0F3 /* MeshComponent.h */,
 				9223C48A1F0CA3CE009A94D7 /* MoveComponent.cpp */,
 				9223C48C1F0CA3D4009A94D7 /* MoveComponent.h */,
+				92CF0D271F3BB5270086A0F3 /* PlaneActor.cpp */,
+				92CF0D281F3BB5270086A0F3 /* PlaneActor.h */,
+				92CF0D291F3BB5270086A0F3 /* Renderer.cpp */,
+				92CF0D2A1F3BB5270086A0F3 /* Renderer.h */,
 				9206FDC71F140D40005078A2 /* Shader.cpp */,
 				9206FDC81F140D40005078A2 /* Shader.h */,
+				92CF0D2B1F3BB5270086A0F3 /* SoundEvent.cpp */,
+				92CF0D2C1F3BB5270086A0F3 /* SoundEvent.h */,
 				9223C4761F009428009A94D7 /* SpriteComponent.cpp */,
 				9223C4771F009428009A94D7 /* SpriteComponent.h */,
 				9206FDC41F140707005078A2 /* Texture.cpp */,
 				9206FDC51F140707005078A2 /* Texture.h */,
+				92CF0D2D1F3BB5270086A0F3 /* VertexArray.cpp */,
+				92CF0D2E1F3BB5270086A0F3 /* VertexArray.h */,
 				9206FDC31F13F7E8005078A2 /* Shaders */,
 				92E46DF81B634EA30035CD21 /* Products */,
 				92D324FA1B697389005A86C7 /* CoreFoundation.framework */,
@@ -173,7 +168,7 @@
 		92E46DEF1B634EA30035CD21 /* Project object */ = {
 			isa = PBXProject;
 			attributes = {
-				LastUpgradeCheck = 0830;
+				LastUpgradeCheck = 0920;
 				ORGANIZATIONNAME = "Sanjay Madhav";
 				TargetAttributes = {
 					92E46DF61B634EA30035CD21 = {
@@ -181,7 +176,7 @@
 					};
 				};
 			};
-			buildConfigurationList = 92E46DF21B634EA30035CD21 /* Build configuration list for PBXProject "Chapter8-mac" */;
+			buildConfigurationList = 92E46DF21B634EA30035CD21 /* Build configuration list for PBXProject "Chapter07-mac" */;
 			compatibilityVersion = "Xcode 3.2";
 			developmentRegion = English;
 			hasScannedForEncodings = 0;
@@ -210,7 +205,7 @@
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 			shellPath = /bin/sh;
-			shellScript = "if [ -d \"$BUILD_DIR/Debug\" ]; then\n    cp \"$SRCROOT\"/../external/GLEW/lib/mac/*.dylib $BUILD_DIR/Debug\n    cp \"$SRCROOT\"/../external/SDL/lib/mac/*.dylib $BUILD_DIR/Debug\n    cp \"$SRCROOT\"/../external/FMOD/lib/mac/*.dylib $BUILD_DIR/Debug\nfi\n\nif [ -d \"$BUILD_DIR/Release\" ]; then\n    cp \"$SRCROOT\"/../external/GLEW/lib/mac/*.dylib $BUILD_DIR/Release\n    cp \"$SRCROOT\"/../external/SDL/lib/mac/*.dylib $BUILD_DIR/Release\n    cp \"$SRCROOT\"/../external/FMOD/lib/mac/*.dylib $BUILD_DIR/Release\nfi";
+			shellScript = "if [ -d \"$BUILD_DIR/Debug\" ]; then\n    cp \"$SRCROOT\"/../external/GLEW/lib/mac/*.dylib $BUILD_DIR/Debug\n    cp \"$SRCROOT\"/../external/SDL/lib/mac/*.dylib $BUILD_DIR/Debug\n    cp \"$SRCROOT\"/../external/FMOD/\"FMOD Programmers API\"/api/lowlevel/lib/*.dylib $BUILD_DIR/Debug\n    cp \"$SRCROOT\"/../external/FMOD/\"FMOD Programmers API\"/api/studio/lib/*.dylib $BUILD_DIR/Debug\nfi\n\nif [ -d \"$BUILD_DIR/Release\" ]; then\n    cp \"$SRCROOT\"/../external/GLEW/lib/mac/*.dylib $BUILD_DIR/Release\n    cp \"$SRCROOT\"/../external/SDL/lib/mac/*.dylib $BUILD_DIR/Release\n    cp \"$SRCROOT\"/../external/FMOD/\"FMOD Programmers API\"/api/lowlevel/lib/*.dylib $BUILD_DIR/Release\n    cp \"$SRCROOT\"/../external/FMOD/\"FMOD Programmers API\"/api/studio/lib/*.dylib $BUILD_DIR/Release\nfi";
 		};
 /* End PBXShellScriptBuildPhase section */
 
@@ -220,7 +215,6 @@
 			buildActionMask = 2147483647;
 			files = (
 				92CF0D351F3BB5270086A0F3 /* Renderer.cpp in Sources */,
-				9223C4941F0CA766009A94D7 /* CollisionComponent.cpp in Sources */,
 				9223C47D1F009428009A94D7 /* Main.cpp in Sources */,
 				92CF0D331F3BB5270086A0F3 /* MeshComponent.cpp in Sources */,
 				9223C47E1F009428009A94D7 /* Math.cpp in Sources */,
@@ -253,14 +247,20 @@
 				CLANG_CXX_LIBRARY = "libc++";
 				CLANG_ENABLE_MODULES = YES;
 				CLANG_ENABLE_OBJC_ARC = YES;
+				CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
 				CLANG_WARN_BOOL_CONVERSION = YES;
+				CLANG_WARN_COMMA = YES;
 				CLANG_WARN_CONSTANT_CONVERSION = YES;
 				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
 				CLANG_WARN_EMPTY_BODY = YES;
 				CLANG_WARN_ENUM_CONVERSION = YES;
 				CLANG_WARN_INFINITE_RECURSION = YES;
 				CLANG_WARN_INT_CONVERSION = YES;
+				CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+				CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
 				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+				CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+				CLANG_WARN_STRICT_PROTOTYPES = YES;
 				CLANG_WARN_SUSPICIOUS_MOVE = YES;
 				CLANG_WARN_UNREACHABLE_CODE = YES;
 				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@@ -298,14 +298,20 @@
 				CLANG_CXX_LIBRARY = "libc++";
 				CLANG_ENABLE_MODULES = YES;
 				CLANG_ENABLE_OBJC_ARC = YES;
+				CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
 				CLANG_WARN_BOOL_CONVERSION = YES;
+				CLANG_WARN_COMMA = YES;
 				CLANG_WARN_CONSTANT_CONVERSION = YES;
 				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
 				CLANG_WARN_EMPTY_BODY = YES;
 				CLANG_WARN_ENUM_CONVERSION = YES;
 				CLANG_WARN_INFINITE_RECURSION = YES;
 				CLANG_WARN_INT_CONVERSION = YES;
+				CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+				CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
 				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+				CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+				CLANG_WARN_STRICT_PROTOTYPES = YES;
 				CLANG_WARN_SUSPICIOUS_MOVE = YES;
 				CLANG_WARN_UNREACHABLE_CODE = YES;
 				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@@ -339,14 +345,16 @@
 					"$(SRCROOT)/../external/SDL/include",
 					"$(SRCROOT)/../external/GLEW/include",
 					"$(SRCROOT)/../external/SOIL/include",
-					"$(SRCROOT)/../external/FMOD/include",
 					"$(SRCROOT)/../external/rapidjson/include",
+					"$(SRCROOT)/../external/FMOD/\"FMOD Programmers API\"/api/lowlevel/inc",
+					"$(SRCROOT)/../external/FMOD/\"FMOD Programmers API\"/api/studio/inc",
 				);
 				LIBRARY_SEARCH_PATHS = (
 					"$(SRCROOT)/../external/GLEW/lib/mac",
 					"$(SRCROOT)/../external/SDL/lib/mac",
 					"$(SRCROOT)/../external/SOIL/lib/mac",
-					"$(SRCROOT)/../external/FMOD/lib/mac",
+					"$(SRCROOT)/../external/FMOD/\"FMOD Programmers API\"/api/lowlevel/lib",
+					"$(SRCROOT)/../external/FMOD/\"FMOD Programmers API\"/api/studio/lib",
 				);
 				OTHER_LDFLAGS = (
 					"-lGLEW.2.1.0",
@@ -374,14 +382,16 @@
 					"$(SRCROOT)/../external/SDL/include",
 					"$(SRCROOT)/../external/GLEW/include",
 					"$(SRCROOT)/../external/SOIL/include",
-					"$(SRCROOT)/../external/FMOD/include",
 					"$(SRCROOT)/../external/rapidjson/include",
+					"$(SRCROOT)/../external/FMOD/\"FMOD Programmers API\"/api/lowlevel/inc",
+					"$(SRCROOT)/../external/FMOD/\"FMOD Programmers API\"/api/studio/inc",
 				);
 				LIBRARY_SEARCH_PATHS = (
 					"$(SRCROOT)/../external/GLEW/lib/mac",
 					"$(SRCROOT)/../external/SDL/lib/mac",
 					"$(SRCROOT)/../external/SOIL/lib/mac",
-					"$(SRCROOT)/../external/FMOD/lib/mac",
+					"$(SRCROOT)/../external/FMOD/\"FMOD Programmers API\"/api/lowlevel/lib",
+					"$(SRCROOT)/../external/FMOD/\"FMOD Programmers API\"/api/studio/lib",
 				);
 				OTHER_LDFLAGS = (
 					"-lGLEW.2.1.0",
@@ -400,7 +410,7 @@
 /* End XCBuildConfiguration section */
 
 /* Begin XCConfigurationList section */
-		92E46DF21B634EA30035CD21 /* Build configuration list for PBXProject "Chapter8-mac" */ = {
+		92E46DF21B634EA30035CD21 /* Build configuration list for PBXProject "Chapter07-mac" */ = {
 			isa = XCConfigurationList;
 			buildConfigurations = (
 				92E46DFC1B634EA40035CD21 /* Debug */,

+ 1 - 1
Chapter07/Chapter8-mac.xcodeproj/project.xcworkspace/contents.xcworkspacedata → Chapter07/Chapter07-mac.xcodeproj/project.xcworkspace/contents.xcworkspacedata

@@ -2,6 +2,6 @@
 <Workspace
    version = "1.0">
    <FileRef
-      location = "self:/Users/Sanjay/gameprogcpp-solutions/Chapter08/Chapter8-mac.xcodeproj">
+      location = "self:/Users/Sanjay/gameprogcpp-final/Chapter07/Chapter07-mac.xcodeproj">
    </FileRef>
 </Workspace>

+ 7 - 5
Chapter07/Chapter8-mac.xcodeproj/xcshareddata/xcschemes/Game-mac.xcscheme → Chapter07/Chapter07-mac.xcodeproj/xcshareddata/xcschemes/Game-mac.xcscheme

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <Scheme
-   LastUpgradeVersion = "0830"
+   LastUpgradeVersion = "0920"
    version = "1.3">
    <BuildAction
       parallelizeBuildables = "YES"
@@ -17,7 +17,7 @@
                BlueprintIdentifier = "92E46DF61B634EA30035CD21"
                BuildableName = "Game-mac"
                BlueprintName = "Game-mac"
-               ReferencedContainer = "container:Chapter8-mac.xcodeproj">
+               ReferencedContainer = "container:Chapter07-mac.xcodeproj">
             </BuildableReference>
          </BuildActionEntry>
       </BuildActionEntries>
@@ -26,6 +26,7 @@
       buildConfiguration = "Debug"
       selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
       selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+      language = ""
       shouldUseLaunchSchemeArgsEnv = "YES">
       <Testables>
       </Testables>
@@ -35,7 +36,7 @@
             BlueprintIdentifier = "92E46DF61B634EA30035CD21"
             BuildableName = "Game-mac"
             BlueprintName = "Game-mac"
-            ReferencedContainer = "container:Chapter8-mac.xcodeproj">
+            ReferencedContainer = "container:Chapter07-mac.xcodeproj">
          </BuildableReference>
       </MacroExpansion>
       <AdditionalOptions>
@@ -45,6 +46,7 @@
       buildConfiguration = "Debug"
       selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
       selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+      language = ""
       launchStyle = "0"
       useCustomWorkingDirectory = "YES"
       customWorkingDirectory = "$(SRCROOT)"
@@ -59,7 +61,7 @@
             BlueprintIdentifier = "92E46DF61B634EA30035CD21"
             BuildableName = "Game-mac"
             BlueprintName = "Game-mac"
-            ReferencedContainer = "container:Chapter8-mac.xcodeproj">
+            ReferencedContainer = "container:Chapter07-mac.xcodeproj">
          </BuildableReference>
       </BuildableProductRunnable>
       <AdditionalOptions>
@@ -78,7 +80,7 @@
             BlueprintIdentifier = "92E46DF61B634EA30035CD21"
             BuildableName = "Game-mac"
             BlueprintName = "Game-mac"
-            ReferencedContainer = "container:Chapter8-mac.xcodeproj">
+            ReferencedContainer = "container:Chapter07-mac.xcodeproj">
          </BuildableReference>
       </BuildableProductRunnable>
    </ProfileAction>