Skip to content
GitLab
    • Explore Projects Groups Snippets
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • C code
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 9
    • Issues 9
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 1
    • Merge requests 1
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • gameprogcpp
  • code
  • Merge requests
  • !4
An error occurred while fetching the assigned milestone of the selected merge_request.

Chapters 1-5, 8

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge github/fork/chalonverse/master into master 7 years ago
  • Overview 1
  • Commits 41
  • Pipelines 0
  • Changes 234

Created by: chalonverse

Compare
  • master (base)

and
  • latest version
    80c945af
    41 commits, 2 years ago

234 files
+ 19789
- 4

    Preferences

    File browser
    Compare changes
Chap‎ter01‎
Chapter01-m‎ac.xcodeproj‎
project.x‎cworkspace‎
contents.xcw‎orkspacedata‎ +7 -0
xcshareddat‎a/xcschemes‎
Game-mac‎.xcscheme‎ +94 -0
project‎.pbxproj‎ +316 -0
Chapter01-‎windows.sln‎ +22 -0
Game‎.cpp‎ +257 -0
Gam‎e.h‎ +55 -0
Game.v‎cxproj‎ +110 -0
Game.vcxpr‎oj.filters‎ +22 -0
Main‎.cpp‎ +21 -0
Chap‎ter02‎
Ass‎ets‎
Enemy‎01.png‎ +0 -0
Enemy‎02.png‎ +0 -0
Enemy‎03.png‎ +0 -0
Enemy‎04.png‎ +0 -0
Enemy‎05.png‎ +0 -0
Enemy‎06.png‎ +0 -0
Farbac‎k01.png‎ +0 -0
Farbac‎k02.png‎ +0 -0
LICEN‎SE.txt‎ +5 -0
Lase‎r.png‎ +0 -0
MapLay‎er1.csv‎ +24 -0
MapLay‎er2.csv‎ +24 -0
MapLay‎er3.csv‎ +24 -0
Ship0‎1.png‎ +0 -0
Ship0‎2.png‎ +0 -0
Ship0‎3.png‎ +0 -0
Ship0‎4.png‎ +0 -0
Star‎s.png‎ +0 -0
Tile‎s.png‎ +0 -0
Chapter02-m‎ac.xcodeproj‎
project.x‎cworkspace‎
contents.xcw‎orkspacedata‎ +7 -0
xcshareddat‎a/xcschemes‎
Game-mac‎.xcscheme‎ +94 -0
project‎.pbxproj‎ +358 -0
Acto‎r.cpp‎ +83 -0
Act‎or.h‎ +60 -0
AnimSpriteC‎omponent.cpp‎ +49 -0
AnimSprite‎Component.h‎ +30 -0
BGSpriteCo‎mponent.cpp‎ +69 -0
BGSpriteC‎omponent.h‎ +37 -0
Chapter02-‎windows.sln‎ +22 -0
Compon‎ent.cpp‎ +27 -0
Compo‎nent.h‎ +27 -0
Game‎.cpp‎ +302 -0
Gam‎e.h‎ +57 -0
Game.v‎cxproj‎ +124 -0
Game.vcxpr‎oj.filters‎ +64 -0
Main‎.cpp‎ +21 -0
Math‎.cpp‎ +239 -0
Mat‎h.h‎ +1033 -0
Ship‎.cpp‎ +78 -0
Shi‎p.h‎ +22 -0
SpriteCom‎ponent.cpp‎ +56 -0
SpriteCo‎mponent.h‎ +30 -0
Chap‎ter03‎
Ass‎ets‎
Astero‎id.png‎ +0 -0
Lase‎r.png‎ +0 -0
Ship‎.png‎ +0 -0
ShipWithT‎hrust.png‎ +0 -0
Chapter03-m‎ac.xcodeproj‎
project.x‎cworkspace‎
contents.xcw‎orkspacedata‎ +7 -0
xcshareddat‎a/xcschemes‎
Game-mac‎.xcscheme‎ +94 -0
project‎.pbxproj‎ +382 -0
Acto‎r.cpp‎ +101 -0
Act‎or.h‎ +69 -0
Astero‎id.cpp‎ +46 -0
Aster‎oid.h‎ +20 -0
Chapter03-‎windows.sln‎ +22 -0
CircleCom‎ponent.cpp‎ +40 -0
CircleCo‎mponent.h‎ +26 -0
Compon‎ent.cpp‎ +27 -0
Compo‎nent.h‎ +31 -0
Game‎.cpp‎ +309 -0
Gam‎e.h‎ +63 -0
Game.v‎cxproj‎ +132 -0
Game.vcxpr‎oj.filters‎ +88 -0
InputComp‎onent.cpp‎ +47 -0
InputCom‎ponent.h‎ +45 -0
Lase‎r.cpp‎ +56 -0
Las‎er.h‎ +20 -0
Main‎.cpp‎ +21 -0
Math‎.cpp‎ +239 -0
Mat‎h.h‎ +1033 -0
MoveComp‎onent.cpp‎ +43 -0
MoveCom‎ponent.h‎ +29 -0
Rando‎m.cpp‎ +51 -0
Rand‎om.h‎ +36 -0
Ship‎.cpp‎ +50 -0
Shi‎p.h‎ +20 -0
SpriteCom‎ponent.cpp‎ +56 -0
SpriteCo‎mponent.h‎ +30 -0
Chap‎ter04‎
Ass‎ets‎
Airpla‎ne.png‎ +0 -0
Base‎.png‎ +0 -0
LICEN‎SE.txt‎ +3 -0
Missi‎le.png‎ +0 -0
Project‎ile.png‎ +0 -0
TileBr‎own.png‎ +0 -0
TileBrownS‎elected.png‎ +0 -0
TileGr‎een.png‎ +0 -0
TileGreenS‎elected.png‎ +0 -0
TileGr‎ey.png‎ +0 -0
TileGreySe‎lected.png‎ +0 -0
TileT‎an.png‎ +0 -0
TileTanSe‎lected.png‎ +0 -0
Towe‎r.png‎ +0 -0
Chapter04-m‎ac.xcodeproj‎
project.x‎cworkspace‎
contents.xcw‎orkspacedata‎ +7 -0
xcshareddat‎a/xcschemes‎
Game-mac‎.xcscheme‎ +94 -0
project‎.pbxproj‎ +402 -0
AICompo‎nent.cpp‎ +54 -0
AIComp‎onent.h‎ +29 -0
AISta‎te.cpp‎ +61 -0
AISt‎ate.h‎ +71 -0
Acto‎r.cpp‎ +101 -0
Act‎or.h‎ +69 -0
Bulle‎t.cpp‎ +53 -0
Bull‎et.h‎ +20 -0
Chapter04-‎windows.sln‎ +22 -0
CircleCom‎ponent.cpp‎ +40 -0
CircleCo‎mponent.h‎ +26 -0
Compon‎ent.cpp‎ +27 -0
Compo‎nent.h‎ +31 -0
Enem‎y.cpp‎ +56 -0
Ene‎my.h‎ +21 -0
Game‎.cpp‎ +329 -0
Gam‎e.h‎ +64 -0
Game.v‎cxproj‎ +139 -0
Game.vcxpr‎oj.filters‎ +109 -0
Grid‎.cpp‎ +246 -0
Gri‎d.h‎ +57 -0
Main‎.cpp‎ +21 -0
Math‎.cpp‎ +239 -0
Mat‎h.h‎ +1033 -0
MoveComp‎onent.cpp‎ +35 -0
MoveCom‎ponent.h‎ +26 -0
NavCompo‎nent.cpp‎ +49 -0
NavComp‎onent.h‎ +23 -0
Searc‎h.cpp‎ +575 -0
SpriteCom‎ponent.cpp‎ +56 -0
SpriteCo‎mponent.h‎ +30 -0
Tile‎.cpp‎ +66 -0
Til‎e.h‎ +46 -0
Towe‎r.cpp‎ +53 -0
Tow‎er.h‎ +22 -0
Chap‎ter05‎
Ass‎ets‎
Astero‎id.png‎ +0 -0
Lase‎r.png‎ +0 -0
Ship‎.png‎ +0 -0
ShipWithT‎hrust.png‎ +0 -0
Chapter05-m‎ac.xcodeproj‎
project.x‎cworkspace‎
contents.xcw‎orkspacedata‎ +7 -0
xcshareddat‎a/xcschemes‎
Game-mac‎.xcscheme‎ +94 -0
project‎.pbxproj‎ +402 -0
Sha‎ders‎
Basic‎.frag‎ +20 -0
Basic‎.vert‎ +23 -0
Sprit‎e.frag‎ +25 -0
Sprit‎e.vert‎ +33 -0
Transfo‎rm.vert‎ +23 -0
Acto‎r.cpp‎ +124 -0
Act‎or.h‎ +74 -0
Astero‎id.cpp‎ +46 -0
Aster‎oid.h‎ +20 -0
Chapter05-‎windows.sln‎ +25 -0
CircleCom‎ponent.cpp‎ +40 -0
CircleCo‎mponent.h‎ +26 -0
Compon‎ent.cpp‎ +27 -0
Compo‎nent.h‎ +33 -0
Game‎.cpp‎ +375 -0
Gam‎e.h‎ +71 -0
Game.v‎cxproj‎ +145 -0
Game.vcxpr‎oj.filters‎ +126 -0
InputComp‎onent.cpp‎ +47 -0
InputCom‎ponent.h‎ +45 -0
Lase‎r.cpp‎ +56 -0
Las‎er.h‎ +20 -0
Main‎.cpp‎ +21 -0
Math‎.cpp‎ +239 -0
Mat‎h.h‎ +1033 -0
MoveComp‎onent.cpp‎ +41 -0
MoveCom‎ponent.h‎ +26 -0
Rando‎m.cpp‎ +51 -0
Rand‎om.h‎ +36 -0
Shade‎r.cpp‎ +148 -0
Shad‎er.h‎ +41 -0
Ship‎.cpp‎ +50 -0
Shi‎p.h‎ +20 -0
SpriteCom‎ponent.cpp‎ +60 -0
SpriteCo‎mponent.h‎ +30 -0
Textu‎re.cpp‎ +69 -0
Text‎ure.h‎ +30 -0
VertexA‎rray.cpp‎ +51 -0
Vertex‎Array.h‎ +33 -0
Chap‎ter08‎
Ass‎ets‎
Astero‎id.png‎ +0 -0
Lase‎r.png‎ +0 -0
Ship‎.png‎ +0 -0
ShipWithT‎hrust.png‎ +0 -0
Chapter08-m‎ac.xcodeproj‎
project.x‎cworkspace‎
contents.xcw‎orkspacedata‎ +7 -0
xcshareddat‎a/xcschemes‎
Game-mac‎.xcscheme‎ +94 -0
project‎.pbxproj‎ +408 -0
Sha‎ders‎
Basic‎.frag‎ +20 -0
Basic‎.vert‎ +23 -0
Sprit‎e.frag‎ +25 -0
Sprit‎e.vert‎ +33 -0
Transfo‎rm.vert‎ +23 -0
Acto‎r.cpp‎ +124 -0
Act‎or.h‎ +74 -0
Astero‎id.cpp‎ +46 -0
Aster‎oid.h‎ +20 -0
Chapter08-‎windows.sln‎ +25 -0
CircleCom‎ponent.cpp‎ +40 -0
CircleCo‎mponent.h‎ +26 -0
Compon‎ent.cpp‎ +27 -0
Compo‎nent.h‎ +33 -0
Game‎.cpp‎ +397 -0
Gam‎e.h‎ +74 -0
Game.v‎cxproj‎ +147 -0
Game.vcxpr‎oj.filters‎ +132 -0
InputComp‎onent.cpp‎ +48 -0
InputCom‎ponent.h‎ +45 -0
InputSy‎stem.cpp‎ +282 -0
InputS‎ystem.h‎ +124 -0
Lase‎r.cpp‎ +56 -0
Las‎er.h‎ +20 -0
Main‎.cpp‎ +21 -0
Math‎.cpp‎ +239 -0
Mat‎h.h‎ +1033 -0
MoveComp‎onent.cpp‎ +41 -0
MoveCom‎ponent.h‎ +26 -0
Rando‎m.cpp‎ +51 -0
Rand‎om.h‎ +36 -0
Shade‎r.cpp‎ +148 -0
Shad‎er.h‎ +41 -0
Ship‎.cpp‎ +61 -0
Shi‎p.h‎ +23 -0
SpriteCom‎ponent.cpp‎ +60 -0
SpriteCo‎mponent.h‎ +30 -0
Textu‎re.cpp‎ +69 -0
Text‎ure.h‎ +30 -0
VertexA‎rray.cpp‎ +51 -0
Vertex‎Array.h‎ +33 -0
Extern‎al/FMOD‎
READ‎ME.md‎ +5 -0
READ‎ME.md‎ +4 -4
Chapter01/Chapter01-mac.xcodeproj/project.xcworkspace/contents.xcworkspacedata 0 → 100644
+ 7
- 0
  • View file @ 80c945af

  • Edit in single-file editor

  • Open in Web IDE

<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:/Users/Sanjay/gameprogcpp-final/Chapter01/Chapter01-mac.xcodeproj">
</FileRef>
</Workspace>
Chapter01/Chapter01-mac.xcodeproj/project.xcworkspace/contents.xcworkspacedata 0 → 100644
+ 7
- 0
  • View file @ 80c945af

  • Edit in single-file editor

  • Open in Web IDE

<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:/Users/Sanjay/gameprogcpp-final/Chapter01/Chapter01-mac.xcodeproj">
</FileRef>
</Workspace>
Chapter01/Chapter01-mac.xcodeproj/xcshareddata/xcschemes/Game-mac.xcscheme 0 → 100644
+ 94
- 0
  • View file @ 80c945af

  • Edit in single-file editor

  • Open in Web IDE

<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0920"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "92E46DF61B634EA30035CD21"
BuildableName = "Game-mac"
BlueprintName = "Game-mac"
ReferencedContainer = "container:Chapter01-mac.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "92E46DF61B634EA30035CD21"
BuildableName = "Game-mac"
BlueprintName = "Game-mac"
ReferencedContainer = "container:Chapter01-mac.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "YES"
customWorkingDirectory = "$(SRCROOT)"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "92E46DF61B634EA30035CD21"
BuildableName = "Game-mac"
BlueprintName = "Game-mac"
ReferencedContainer = "container:Chapter01-mac.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "92E46DF61B634EA30035CD21"
BuildableName = "Game-mac"
BlueprintName = "Game-mac"
ReferencedContainer = "container:Chapter01-mac.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
Chapter01/Chapter01-mac.xcodeproj/project.pbxproj 0 → 100644
+ 316
- 0
  • View file @ 80c945af

  • Edit in single-file editor

  • Open in Web IDE

// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
9223C4781F009428009A94D7 /* Game.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9223C4671F009428009A94D7 /* Game.cpp */; };
9223C47D1F009428009A94D7 /* Main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9223C4711F009428009A94D7 /* Main.cpp */; };
92D324FB1B697389005A86C7 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 92D324FA1B697389005A86C7 /* CoreFoundation.framework */; };
92E46E941B6353E50035CD21 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 92E46E931B6353E50035CD21 /* OpenGL.framework */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
9223C4671F009428009A94D7 /* Game.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Game.cpp; sourceTree = "<group>"; };
9223C4701F009428009A94D7 /* Game.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Game.h; sourceTree = "<group>"; };
9223C4711F009428009A94D7 /* Main.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Main.cpp; sourceTree = "<group>"; };
92D324FA1B697389005A86C7 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = System/Library/Frameworks/CoreFoundation.framework; sourceTree = SDKROOT; };
92E46DF71B634EA30035CD21 /* Game-mac */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "Game-mac"; sourceTree = BUILT_PRODUCTS_DIR; };
92E46E931B6353E50035CD21 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = System/Library/Frameworks/OpenGL.framework; sourceTree = SDKROOT; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
92E46DF41B634EA30035CD21 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
92D324FB1B697389005A86C7 /* CoreFoundation.framework in Frameworks */,
92E46E941B6353E50035CD21 /* OpenGL.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
92E46DEE1B634EA30035CD21 = {
isa = PBXGroup;
children = (
9223C4671F009428009A94D7 /* Game.cpp */,
9223C4701F009428009A94D7 /* Game.h */,
9223C4711F009428009A94D7 /* Main.cpp */,
92E46DF81B634EA30035CD21 /* Products */,
92D324FA1B697389005A86C7 /* CoreFoundation.framework */,
92E46E931B6353E50035CD21 /* OpenGL.framework */,
);
sourceTree = "<group>";
};
92E46DF81B634EA30035CD21 /* Products */ = {
isa = PBXGroup;
children = (
92E46DF71B634EA30035CD21 /* Game-mac */,
);
name = Products;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
92E46DF61B634EA30035CD21 /* Game-mac */ = {
isa = PBXNativeTarget;
buildConfigurationList = 92E46DFE1B634EA40035CD21 /* Build configuration list for PBXNativeTarget "Game-mac" */;
buildPhases = (
92E46DF31B634EA30035CD21 /* Sources */,
92E46DF41B634EA30035CD21 /* Frameworks */,
92E46EA11B63615B0035CD21 /* ShellScript */,
);
buildRules = (
);
dependencies = (
);
name = "Game-mac";
productName = "Game-mac";
productReference = 92E46DF71B634EA30035CD21 /* Game-mac */;
productType = "com.apple.product-type.tool";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
92E46DEF1B634EA30035CD21 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0920;
ORGANIZATIONNAME = "Sanjay Madhav";
TargetAttributes = {
92E46DF61B634EA30035CD21 = {
CreatedOnToolsVersion = 6.4;
};
};
};
buildConfigurationList = 92E46DF21B634EA30035CD21 /* Build configuration list for PBXProject "Chapter01-mac" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
en,
);
mainGroup = 92E46DEE1B634EA30035CD21;
productRefGroup = 92E46DF81B634EA30035CD21 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
92E46DF61B634EA30035CD21 /* Game-mac */,
);
};
/* End PBXProject section */
/* Begin PBXShellScriptBuildPhase section */
92E46EA11B63615B0035CD21 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
outputPaths = (
);
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\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\nfi";
};
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
92E46DF31B634EA30035CD21 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
9223C47D1F009428009A94D7 /* Main.cpp in Sources */,
9223C4781F009428009A94D7 /* Game.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin XCBuildConfiguration section */
92E46DFC1B634EA40035CD21 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
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;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.10;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
};
name = Debug;
};
92E46DFD1B634EA40035CD21 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
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;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.10;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = macosx;
};
name = Release;
};
92E46DFF1B634EA40035CD21 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_CXX_LANGUAGE_STANDARD = "c++14";
FRAMEWORK_SEARCH_PATHS = "";
GCC_ENABLE_CPP_RTTI = YES;
HEADER_SEARCH_PATHS = (
"$(inherited)",
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
"$(SRCROOT)/../external/SDL/include",
"$(SRCROOT)/../external/GLEW/include",
"$(SRCROOT)/../external/SOIL/include",
);
LIBRARY_SEARCH_PATHS = (
"$(SRCROOT)/../external/GLEW/lib/mac",
"$(SRCROOT)/../external/SDL/lib/mac",
"$(SRCROOT)/../external/SOIL/lib/mac",
);
OTHER_LDFLAGS = (
"-lGLEW.2.1.0",
"-lSDL2-2.0.0",
"-lSDL2_mixer-2.0.0",
"-lSDL2_ttf-2.0.0",
"-lSOIL",
"-lSDL2_image-2.0.0",
);
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Debug;
};
92E46E001B634EA40035CD21 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_CXX_LANGUAGE_STANDARD = "c++14";
FRAMEWORK_SEARCH_PATHS = "";
GCC_ENABLE_CPP_RTTI = YES;
HEADER_SEARCH_PATHS = (
"$(inherited)",
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
"$(SRCROOT)/../external/SDL/include",
"$(SRCROOT)/../external/GLEW/include",
"$(SRCROOT)/../external/SOIL/include",
);
LIBRARY_SEARCH_PATHS = (
"$(SRCROOT)/../external/GLEW/lib/mac",
"$(SRCROOT)/../external/SDL/lib/mac",
"$(SRCROOT)/../external/SOIL/lib/mac",
);
OTHER_LDFLAGS = (
"-lGLEW.2.1.0",
"-lSDL2-2.0.0",
"-lSDL2_mixer-2.0.0",
"-lSDL2_ttf-2.0.0",
"-lSOIL",
"-lSDL2_image-2.0.0",
);
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
92E46DF21B634EA30035CD21 /* Build configuration list for PBXProject "Chapter01-mac" */ = {
isa = XCConfigurationList;
buildConfigurations = (
92E46DFC1B634EA40035CD21 /* Debug */,
92E46DFD1B634EA40035CD21 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
92E46DFE1B634EA40035CD21 /* Build configuration list for PBXNativeTarget "Game-mac" */ = {
isa = XCConfigurationList;
buildConfigurations = (
92E46DFF1B634EA40035CD21 /* Debug */,
92E46E001B634EA40035CD21 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 92E46DEF1B634EA30035CD21 /* Project object */;
}
Chapter01/Chapter01-windows.sln 0 → 100644
+ 22
- 0
  • View file @ 80c945af

  • Edit in single-file editor

  • Open in Web IDE


Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26430.12
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Game", "Game.vcxproj", "{BC508D87-495F-4554-932D-DD68388B63CC}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{BC508D87-495F-4554-932D-DD68388B63CC}.Debug|Win32.ActiveCfg = Debug|Win32
{BC508D87-495F-4554-932D-DD68388B63CC}.Debug|Win32.Build.0 = Debug|Win32
{BC508D87-495F-4554-932D-DD68388B63CC}.Release|Win32.ActiveCfg = Release|Win32
{BC508D87-495F-4554-932D-DD68388B63CC}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
Chapter01/Game.cpp 0 → 100644
+ 257
- 0
  • View file @ 80c945af

  • Edit in single-file editor

  • Open in Web IDE

// ----------------------------------------------------------------
// From Game Programming in C++ by Sanjay Madhav
// Copyright (C) 2017 Sanjay Madhav. All rights reserved.
//
// Released under the BSD License
// See LICENSE in root directory for full details.
// ----------------------------------------------------------------
#include "Game.h"
const int thickness = 15;
const float paddleH = 100.0f;
Game::Game()
:mWindow(nullptr)
,mRenderer(nullptr)
,mTicksCount(0)
,mIsRunning(true)
,mPaddleDir(0)
{
}
bool Game::Initialize()
{
// Initialize SDL
int sdlResult = SDL_Init(SDL_INIT_VIDEO);
if (sdlResult != 0)
{
SDL_Log("Unable to initialize SDL: %s", SDL_GetError());
return false;
}
// Create an SDL Window
mWindow = SDL_CreateWindow(
"Game Programming in C++ (Chapter 1)", // Window title
100, // Top left x-coordinate of window
100, // Top left y-coordinate of window
1024, // Width of window
768, // Height of window
0 // Flags (0 for no flags set)
);
if (!mWindow)
{
SDL_Log("Failed to create window: %s", SDL_GetError());
return false;
}
//// Create SDL renderer
mRenderer = SDL_CreateRenderer(
mWindow, // Window to create renderer for
-1, // Usually -1
SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC
);
if (!mRenderer)
{
SDL_Log("Failed to create renderer: %s", SDL_GetError());
return false;
}
//
mPaddlePos.x = 10.0f;
mPaddlePos.y = 768.0f/2.0f;
mBallPos.x = 1024.0f/2.0f;
mBallPos.y = 768.0f/2.0f;
mBallVel.x = -200.0f;
mBallVel.y = 235.0f;
return true;
}
void Game::RunLoop()
{
while (mIsRunning)
{
ProcessInput();
UpdateGame();
GenerateOutput();
}
}
void Game::ProcessInput()
{
SDL_Event event;
while (SDL_PollEvent(&event))
{
switch (event.type)
{
// If we get an SDL_QUIT event, end loop
case SDL_QUIT:
mIsRunning = false;
break;
}
}
// Get state of keyboard
const Uint8* state = SDL_GetKeyboardState(NULL);
// If escape is pressed, also end loop
if (state[SDL_SCANCODE_ESCAPE])
{
mIsRunning = false;
}
// Update paddle direction based on W/S keys
mPaddleDir = 0;
if (state[SDL_SCANCODE_W])
{
mPaddleDir -= 1;
}
if (state[SDL_SCANCODE_S])
{
mPaddleDir += 1;
}
}
void Game::UpdateGame()
{
// Wait until 16ms has elapsed since last frame
while (!SDL_TICKS_PASSED(SDL_GetTicks(), mTicksCount + 16))
;
// Delta time is the difference in ticks from last frame
// (converted to seconds)
float deltaTime = (SDL_GetTicks() - mTicksCount) / 1000.0f;
// Clamp maximum delta time value
if (deltaTime > 0.05f)
{
deltaTime = 0.05f;
}
// Update tick counts (for next frame)
mTicksCount = SDL_GetTicks();
// Update paddle position based on direction
if (mPaddleDir != 0)
{
mPaddlePos.y += mPaddleDir * 300.0f * deltaTime;
// Make sure paddle doesn't move off screen!
if (mPaddlePos.y < (paddleH/2.0f + thickness))
{
mPaddlePos.y = paddleH/2.0f + thickness;
}
else if (mPaddlePos.y > (768.0f - paddleH/2.0f - thickness))
{
mPaddlePos.y = 768.0f - paddleH/2.0f - thickness;
}
}
// Update ball position based on ball velocity
mBallPos.x += mBallVel.x * deltaTime;
mBallPos.y += mBallVel.y * deltaTime;
// Bounce if needed
// Did we intersect with the paddle?
float diff = mPaddlePos.y - mBallPos.y;
// Take absolute value of difference
diff = (diff > 0.0f) ? diff : -diff;
if (
// Our y-difference is small enough
diff <= paddleH / 2.0f &&
// We are in the correct x-position
mBallPos.x <= 25.0f && mBallPos.x >= 20.0f &&
// The ball is moving to the left
mBallVel.x < 0.0f)
{
mBallVel.x *= -1.0f;
}
// Did the ball go off the screen? (if so, end game)
else if (mBallPos.x <= 0.0f)
{
mIsRunning = false;
}
// Did the ball collide with the right wall?
else if (mBallPos.x >= (1024.0f - thickness) && mBallVel.x > 0.0f)
{
mBallVel.x *= -1.0f;
}
// Did the ball collide with the top wall?
if (mBallPos.y <= thickness && mBallVel.y < 0.0f)
{
mBallVel.y *= -1;
}
// Did the ball collide with the bottom wall?
else if (mBallPos.y >= (768 - thickness) &&
mBallVel.y > 0.0f)
{
mBallVel.y *= -1;
}
}
void Game::GenerateOutput()
{
// Set draw color to blue
SDL_SetRenderDrawColor(
mRenderer,
0, // R
0, // G
255, // B
255 // A
);
// Clear back buffer
SDL_RenderClear(mRenderer);
// Draw walls
SDL_SetRenderDrawColor(mRenderer, 255, 255, 255, 255);
// Draw top wall
SDL_Rect wall{
0, // Top left x
0, // Top left y
1024, // Width
thickness // Height
};
SDL_RenderFillRect(mRenderer, &wall);
// Draw bottom wall
wall.y = 768 - thickness;
SDL_RenderFillRect(mRenderer, &wall);
// Draw right wall
wall.x = 1024 - thickness;
wall.y = 0;
wall.w = thickness;
wall.h = 1024;
SDL_RenderFillRect(mRenderer, &wall);
// Draw paddle
SDL_Rect paddle{
static_cast<int>(mPaddlePos.x),
static_cast<int>(mPaddlePos.y - paddleH/2),
thickness,
static_cast<int>(paddleH)
};
SDL_RenderFillRect(mRenderer, &paddle);
// Draw ball
SDL_Rect ball{
static_cast<int>(mBallPos.x - thickness/2),
static_cast<int>(mBallPos.y - thickness/2),
thickness,
thickness
};
SDL_RenderFillRect(mRenderer, &ball);
// Swap front buffer and back buffer
SDL_RenderPresent(mRenderer);
}
void Game::Shutdown()
{
SDL_DestroyRenderer(mRenderer);
SDL_DestroyWindow(mWindow);
SDL_Quit();
}
Chapter01/Game.h 0 → 100644
+ 55
- 0
  • View file @ 80c945af

  • Edit in single-file editor

  • Open in Web IDE

// ----------------------------------------------------------------
// From Game Programming in C++ by Sanjay Madhav
// Copyright (C) 2017 Sanjay Madhav. All rights reserved.
//
// Released under the BSD License
// See LICENSE in root directory for full details.
// ----------------------------------------------------------------
#pragma once
#include "SDL/SDL.h"
// Vector2 struct just stores x/y coordinates
// (for now)
struct Vector2
{
float x;
float y;
};
// Game class
class Game
{
public:
Game();
// Initialize the game
bool Initialize();
// Runs the game loop until the game is over
void RunLoop();
// Shutdown the game
void Shutdown();
private:
// Helper functions for the game loop
void ProcessInput();
void UpdateGame();
void GenerateOutput();
// Window created by SDL
SDL_Window* mWindow;
// Renderer for 2D drawing
SDL_Renderer* mRenderer;
// Number of ticks since start of game
Uint32 mTicksCount;
// Game should continue to run
bool mIsRunning;
// Pong specific
// Direction of paddle
int mPaddleDir;
// Position of paddle
Vector2 mPaddlePos;
// Position of ball
Vector2 mBallPos;
// Velocity of ball
Vector2 mBallVel;
};
Chapter01/Game.vcxproj 0 → 100644
+ 110
- 0
  • View file @ 80c945af

  • Edit in single-file editor

  • Open in Web IDE

<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<ItemGroup>
<ClCompile Include="Game.cpp" />
<ClCompile Include="Main.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="Game.h" />
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{BC508D87-495F-4554-932D-DD68388B63CC}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>Game</RootNamespace>
<WindowsTargetPlatformVersion>10.0.16299.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
<AdditionalIncludeDirectories>..\external\SDL\include;..\external\GLEW\include;..\external\SOIL\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<ExceptionHandling>Sync</ExceptionHandling>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalLibraryDirectories>..\external\SDL\lib\win\x86;..\external\GLEW\lib\win\x86;..\external\SOIL\lib\win\x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>opengl32.lib;SDL2.lib;SDL2main.lib;SDL2_ttf.lib;SDL2_mixer.lib;SDL2_image.lib;glew32.lib;SOIL.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalOptions>/NODEFAULTLIB:msvcrt.lib %(AdditionalOptions)</AdditionalOptions>
</Link>
<PostBuildEvent>
<Command>xcopy "$(ProjectDir)\..\external\SDL\lib\win\x86\*.dll" "$(OutDir)" /i /s /y
xcopy "$(ProjectDir)\..\external\GLEW\lib\win\x86\*.dll" "$(OutDir)" /i /s /y</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
<AdditionalIncludeDirectories>..\external\SDL\include;..\external\GLEW\include;..\external\SOIL\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<ExceptionHandling>Sync</ExceptionHandling>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalLibraryDirectories>..\external\SDL\lib\win\x86;..\external\GLEW\lib\win\x86;..\external\SOIL\lib\win\x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>opengl32.lib;SDL2.lib;SDL2main.lib;SDL2_ttf.lib;SDL2_mixer.lib;SDL2_image.lib;glew32.lib;SOIL.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<PostBuildEvent>
<Command>xcopy "$(ProjectDir)\..\external\SDL\lib\win\x86\*.dll" "$(OutDir)" /i /s /y
xcopy "$(ProjectDir)\..\external\GLEW\lib\win\x86\*.dll" "$(OutDir)" /i /s /y</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
\ No newline at end of file
Chapter01/Game.vcxproj.filters 0 → 100644
+ 22
- 0
  • View file @ 80c945af

  • Edit in single-file editor

  • Open in Web IDE

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="Game.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Main.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="Game.h">
<Filter>Source Files</Filter>
</ClInclude>
</ItemGroup>
</Project>
\ No newline at end of file
Chapter01/Main.cpp 0 → 100644
+ 21
- 0
  • View file @ 80c945af

  • Edit in single-file editor

  • Open in Web IDE

// ----------------------------------------------------------------
// From Game Programming in C++ by Sanjay Madhav
// Copyright (C) 2017 Sanjay Madhav. All rights reserved.
//
// Released under the BSD License
// See LICENSE in root directory for full details.
// ----------------------------------------------------------------
#include "Game.h"
int main(int argc, char** argv)
{
Game game;
bool success = game.Initialize();
if (success)
{
game.RunLoop();
}
game.Shutdown();
return 0;
}
Chapter02/Assets/Enemy01.png 0 → 100644
+ 0
- 0
  • View file @ 80c945af

10.25 KiB

Chapter02/Assets/Enemy02.png 0 → 100644
+ 0
- 0
  • View file @ 80c945af

10.07 KiB

Chapter02/Assets/Enemy03.png 0 → 100644
+ 0
- 0
  • View file @ 80c945af

9.98 KiB

0 Assignees
None
Assign to
0 Reviewers
None
Request review from
Labels
0
None
0
None
    Assign labels
  • Manage project labels

Milestone
No milestone
None
None
Time tracking
No estimate or time spent
Lock merge request
Unlocked
0
0 participants
Reference:
Source branch: github/fork/chalonverse/master

Menu

Explore Projects Groups Snippets