Permalink
Browse files

Reorganized project structure and renamed files.

  • Loading branch information...
1 parent bbd8663 commit 6bf058283a42652be204f06b3125feb98c5d1b38 @agustincordes agustincordes committed Dec 4, 2011
Showing with 83,821 additions and 58 deletions.
  1. +2 −0 .gitignore
  2. +306 −44 Dagon.xcodeproj/project.pbxproj
  3. +7 −0 Dagon.xcodeproj/project.xcworkspace/contents.xcworkspacedata
  4. BIN Dagon.xcodeproj/project.xcworkspace/xcuserdata/Agustin.xcuserdatad/UserInterfaceState.xcuserstate
  5. +19 −0 Dagon.xcodeproj/xcuserdata/Agustin.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist
  6. +84 −0 Dagon.xcodeproj/xcuserdata/Agustin.xcuserdatad/xcschemes/Dagon.xcscheme
  7. +22 −0 Dagon.xcodeproj/xcuserdata/Agustin.xcuserdatad/xcschemes/xcschememanagement.plist
  8. +22 −0 Dagon/DGAppDelegate.h
  9. +37 −0 Dagon/DGAppDelegate.m
  10. +138 −0 Dagon/DGArray.c
  11. +51 −0 Dagon/DGArray.h
  12. +565 −0 Dagon/DGAudio.c
  13. +52 −0 Dagon/DGAudio.h
  14. +596 −0 Dagon/DGCamera.c
  15. +112 −0 Dagon/DGCamera.h
  16. +33 −0 Dagon/DGColors.h
  17. +32 −0 Dagon/DGCommon.h
  18. +40 −0 Dagon/DGCommonGL.h
  19. +71 −0 Dagon/DGConfig.c
  20. +78 −0 Dagon/DGConfig.h
  21. +128 −0 Dagon/DGConsole.c
  22. +38 −0 Dagon/DGConsole.h
  23. +727 −0 Dagon/DGControl.c
  24. +44 −0 Dagon/DGControl.h
  25. +82 −0 Dagon/DGDefines.h
  26. +186 −0 Dagon/DGEffects.c
  27. +33 −0 Dagon/DGEffects.h
  28. +256 −0 Dagon/DGFont.c
  29. +22 −0 Dagon/DGFont.h
  30. +4,089 −0 Dagon/DGFontData.c
  31. +49 −0 Dagon/DGLanguage.h
  32. +256 −0 Dagon/DGLog.c
  33. +50 −0 Dagon/DGLog.h
  34. +38 −0 Dagon/DGMemory.c
  35. +23 −0 Dagon/DGMemory.h
  36. +244 −0 Dagon/DGNode.c
  37. +35 −0 Dagon/DGNode.h
  38. +112 −0 Dagon/DGObject.c
  39. +59 −0 Dagon/DGObject.h
  40. +307 −0 Dagon/DGParticleData.c
  41. +131 −0 Dagon/DGPlatform.h
  42. +510 −0 Dagon/DGRender.c
  43. +45 −0 Dagon/DGRender.h
  44. +124 −0 Dagon/DGRoom.c
  45. +36 −0 Dagon/DGRoom.h
  46. +1,773 −0 Dagon/DGScript.c
  47. +28 −0 Dagon/DGScript.h
  48. +14,459 −0 Dagon/DGSplashData.c
  49. +433 −0 Dagon/DGSpot.c
  50. +83 −0 Dagon/DGSpot.h
  51. +45 −0 Dagon/DGState.c
  52. +23 −0 Dagon/DGState.h
  53. +28 −0 Dagon/DGSystem.h
  54. +257 −0 Dagon/DGSystem.m
  55. +607 −0 Dagon/DGTexture.c
  56. +42 −0 Dagon/DGTexture.h
  57. +151 −0 Dagon/DGTextureManager.c
  58. +29 −0 Dagon/DGTextureManager.h
  59. +65 −0 Dagon/DGTimer.c
  60. +23 −0 Dagon/DGTimer.h
  61. +24 −0 Dagon/DGVersion.h
  62. +639 −0 Dagon/DGVideo.c
  63. +61 −0 Dagon/DGVideo.h
  64. +21 −0 Dagon/DGViewDelegate.h
  65. +112 −0 Dagon/DGViewDelegate.m
  66. +21 −0 Dagon/DGWindowDelegate.h
  67. +43 −0 Dagon/DGWindowDelegate.m
  68. +101 −0 Dagon/DGWorld.c
  69. +44 −0 Dagon/DGWorld.h
  70. +14 −0 Dagon/Dagon.entitlements
  71. +33 −0 Dagon/main.c
  72. +0 −14 Dagon/main.m
  73. BIN Documents/BrandLarge.png
  74. BIN Documents/BrandSmall.png
  75. +29 −0 Documents/Credits.rtf
  76. BIN Documents/LogoLarge.png
  77. BIN Documents/LogoSmall.png
  78. BIN Documents/Splash.png
  79. +36 −0 Info.plist
  80. +446 −0 Libraries/Headers/AL/EFX-Util.h
  81. +732 −0 Libraries/Headers/AL/al.h
  82. +281 −0 Libraries/Headers/AL/alc.h
  83. +151 −0 Libraries/Headers/AL/efx-creative.h
  84. +737 −0 Libraries/Headers/AL/efx.h
  85. +94 −0 Libraries/Headers/AL/xram.h
  86. +15,343 −0 Libraries/Headers/GL/glew.h
  87. +1,537 −0 Libraries/Headers/GL/glxew.h
  88. +1,287 −0 Libraries/Headers/GL/wglew.h
  89. +829 −0 Libraries/Headers/GLES/gl.h
  90. +313 −0 Libraries/Headers/GLES/glext.h
  91. +1 −0 Libraries/Headers/GLES/glu.h
  92. +269 −0 Libraries/Headers/GLES/glues.h
  93. +391 −0 Libraries/Headers/freetype2/freetype/config/ftconfig.h
  94. +780 −0 Libraries/Headers/freetype2/freetype/config/ftheader.h
  95. +20 −0 Libraries/Headers/freetype2/freetype/config/ftmodule.h
  96. +693 −0 Libraries/Headers/freetype2/freetype/config/ftoption.h
  97. +173 −0 Libraries/Headers/freetype2/freetype/config/ftstdlib.h
  98. +3,862 −0 Libraries/Headers/freetype2/freetype/freetype.h
  99. +179 −0 Libraries/Headers/freetype2/freetype/ftadvanc.h
  100. +94 −0 Libraries/Headers/freetype2/freetype/ftbbox.h
  101. +209 −0 Libraries/Headers/freetype2/freetype/ftbdf.h
  102. +227 −0 Libraries/Headers/freetype2/freetype/ftbitmap.h
  103. +1,125 −0 Libraries/Headers/freetype2/freetype/ftcache.h
  104. +103 −0 Libraries/Headers/freetype2/freetype/ftchapters.h
  105. +166 −0 Libraries/Headers/freetype2/freetype/ftcid.h
  106. +239 −0 Libraries/Headers/freetype2/freetype/fterrdef.h
  107. +206 −0 Libraries/Headers/freetype2/freetype/fterrors.h
  108. +120 −0 Libraries/Headers/freetype2/freetype/ftgasp.h
  109. +613 −0 Libraries/Headers/freetype2/freetype/ftglyph.h
  110. +358 −0 Libraries/Headers/freetype2/freetype/ftgxval.h
  111. +102 −0 Libraries/Headers/freetype2/freetype/ftgzip.h
  112. +1,254 −0 Libraries/Headers/freetype2/freetype/ftimage.h
  113. +349 −0 Libraries/Headers/freetype2/freetype/ftincrem.h
  114. +172 −0 Libraries/Headers/freetype2/freetype/ftlcdfil.h
  115. +273 −0 Libraries/Headers/freetype2/freetype/ftlist.h
  116. +99 −0 Libraries/Headers/freetype2/freetype/ftlzw.h
  117. +274 −0 Libraries/Headers/freetype2/freetype/ftmac.h
  118. +378 −0 Libraries/Headers/freetype2/freetype/ftmm.h
  119. +441 −0 Libraries/Headers/freetype2/freetype/ftmodapi.h
  120. +155 −0 Libraries/Headers/freetype2/freetype/ftmoderr.h
  121. +203 −0 Libraries/Headers/freetype2/freetype/ftotval.h
  122. +538 −0 Libraries/Headers/freetype2/freetype/ftoutln.h
  123. +172 −0 Libraries/Headers/freetype2/freetype/ftpfr.h
  124. +234 −0 Libraries/Headers/freetype2/freetype/ftrender.h
  125. +159 −0 Libraries/Headers/freetype2/freetype/ftsizes.h
  126. +170 −0 Libraries/Headers/freetype2/freetype/ftsnames.h
  127. +716 −0 Libraries/Headers/freetype2/freetype/ftstroke.h
  128. +80 −0 Libraries/Headers/freetype2/freetype/ftsynth.h
  129. +346 −0 Libraries/Headers/freetype2/freetype/ftsystem.h
  130. +350 −0 Libraries/Headers/freetype2/freetype/fttrigon.h
  131. +587 −0 Libraries/Headers/freetype2/freetype/fttypes.h
  132. +274 −0 Libraries/Headers/freetype2/freetype/ftwinfnt.h
  133. +80 −0 Libraries/Headers/freetype2/freetype/ftxf86.h
  134. +504 −0 Libraries/Headers/freetype2/freetype/t1tables.h
  135. +1,247 −0 Libraries/Headers/freetype2/freetype/ttnameid.h
  136. +756 −0 Libraries/Headers/freetype2/freetype/tttables.h
  137. +107 −0 Libraries/Headers/freetype2/freetype/tttags.h
  138. +59 −0 Libraries/Headers/freetype2/freetype/ttunpat.h
  139. +61 −0 Libraries/Headers/ft2build.h
  140. +174 −0 Libraries/Headers/lauxlib.h
  141. +388 −0 Libraries/Headers/lua.h
  142. +9 −0 Libraries/Headers/lua.hpp
  143. +763 −0 Libraries/Headers/luaconf.h
  144. +53 −0 Libraries/Headers/lualib.h
  145. +25 −0 Libraries/Headers/ogg/config_types.h
  146. +209 −0 Libraries/Headers/ogg/ogg.h
  147. +147 −0 Libraries/Headers/ogg/os_types.h
  148. +591 −0 Libraries/Headers/theora/codec.h
  149. +784 −0 Libraries/Headers/theora/theora.h
  150. +325 −0 Libraries/Headers/theora/theoradec.h
  151. +486 −0 Libraries/Headers/theora/theoraenc.h
  152. +243 −0 Libraries/Headers/vorbis/codec.h
  153. +436 −0 Libraries/Headers/vorbis/vorbisenc.h
  154. +206 −0 Libraries/Headers/vorbis/vorbisfile.h
  155. BIN Libraries/libGLEW.a
  156. BIN Libraries/liblua.a
  157. BIN Libraries/libogg.a
  158. BIN Libraries/libtheora.a
  159. BIN Libraries/libvorbis.a
  160. BIN Libraries/libvorbisfile.a
  161. 0 Dagon/Dagon-Prefix.pch → Other Sources/Prefix.pch
  162. +4,673 −0 Other Sources/stb_image.c
  163. +261 −0 Other Sources/stb_image.h
  164. BIN Resources/Dagon.icns
  165. +2 −0 Resources/English.lproj/InfoPlist.strings
  166. +652 −0 Resources/English.lproj/MainMenu.xib
  167. BIN build/Dagon.build/Debug/Dagon.build/Dagon-all-target-headers.hmap
  168. BIN build/Dagon.build/Debug/Dagon.build/Dagon-generated-files.hmap
  169. BIN build/Dagon.build/Debug/Dagon.build/Dagon-own-target-headers.hmap
  170. BIN build/Dagon.build/Debug/Dagon.build/Dagon-project-headers.hmap
  171. +55 −0 build/Dagon.build/Debug/Dagon.build/Dagon.dep
  172. BIN build/Dagon.build/Debug/Dagon.build/Dagon.hmap
  173. +13 −0 build/Dagon.build/Debug/Dagon.build/Dagon~.dep
  174. +2 −0 build/Dagon.build/Debug/Dagon.build/Objects-normal/x86_64/AppDelegate.d
  175. BIN build/Dagon.build/Debug/Dagon.build/Objects-normal/x86_64/AppDelegate.o
  176. +12 −0 build/Dagon.build/Debug/Dagon.build/Objects-normal/x86_64/DGAppDelegate.d
  177. BIN build/Dagon.build/Debug/Dagon.build/Objects-normal/x86_64/DGAppDelegate.o
  178. +10 −0 build/Dagon.build/Debug/Dagon.build/Objects-normal/x86_64/DGArray.d
  179. BIN build/Dagon.build/Debug/Dagon.build/Objects-normal/x86_64/DGArray.o
  180. +14 −0 build/Dagon.build/Debug/Dagon.build/Objects-normal/x86_64/DGAudio.d
  181. BIN build/Dagon.build/Debug/Dagon.build/Objects-normal/x86_64/DGAudio.o
  182. +12 −0 build/Dagon.build/Debug/Dagon.build/Objects-normal/x86_64/DGCamera.d
  183. BIN build/Dagon.build/Debug/Dagon.build/Objects-normal/x86_64/DGCamera.o
  184. +9 −0 build/Dagon.build/Debug/Dagon.build/Objects-normal/x86_64/DGConfig.d
  185. BIN build/Dagon.build/Debug/Dagon.build/Objects-normal/x86_64/DGConfig.o
  186. +16 −0 build/Dagon.build/Debug/Dagon.build/Objects-normal/x86_64/DGConsole.d
  187. BIN build/Dagon.build/Debug/Dagon.build/Objects-normal/x86_64/DGConsole.o
  188. +28 −0 build/Dagon.build/Debug/Dagon.build/Objects-normal/x86_64/DGControl.d
  189. BIN build/Dagon.build/Debug/Dagon.build/Objects-normal/x86_64/DGControl.o
  190. +13 −0 build/Dagon.build/Debug/Dagon.build/Objects-normal/x86_64/DGEffects.d
  191. BIN build/Dagon.build/Debug/Dagon.build/Objects-normal/x86_64/DGEffects.o
  192. +27 −0 build/Dagon.build/Debug/Dagon.build/Objects-normal/x86_64/DGFont.d
  193. BIN build/Dagon.build/Debug/Dagon.build/Objects-normal/x86_64/DGFont.o
  194. +1 −0 build/Dagon.build/Debug/Dagon.build/Objects-normal/x86_64/DGFontData.d
  195. BIN build/Dagon.build/Debug/Dagon.build/Objects-normal/x86_64/DGFontData.o
  196. +10 −0 build/Dagon.build/Debug/Dagon.build/Objects-normal/x86_64/DGLog.d
  197. BIN build/Dagon.build/Debug/Dagon.build/Objects-normal/x86_64/DGLog.o
  198. +8 −0 build/Dagon.build/Debug/Dagon.build/Objects-normal/x86_64/DGMemory.d
  199. BIN build/Dagon.build/Debug/Dagon.build/Objects-normal/x86_64/DGMemory.o
  200. +12 −0 build/Dagon.build/Debug/Dagon.build/Objects-normal/x86_64/DGNode.d
  201. BIN build/Dagon.build/Debug/Dagon.build/Objects-normal/x86_64/DGNode.o
  202. +9 −0 build/Dagon.build/Debug/Dagon.build/Objects-normal/x86_64/DGObject.d
  203. BIN build/Dagon.build/Debug/Dagon.build/Objects-normal/x86_64/DGObject.o
  204. +1 −0 build/Dagon.build/Debug/Dagon.build/Objects-normal/x86_64/DGParticleData.d
  205. BIN build/Dagon.build/Debug/Dagon.build/Objects-normal/x86_64/DGParticleData.o
  206. +18 −0 build/Dagon.build/Debug/Dagon.build/Objects-normal/x86_64/DGRender.d
  207. BIN build/Dagon.build/Debug/Dagon.build/Objects-normal/x86_64/DGRender.o
  208. +12 −0 build/Dagon.build/Debug/Dagon.build/Objects-normal/x86_64/DGRoom.d
  209. BIN build/Dagon.build/Debug/Dagon.build/Objects-normal/x86_64/DGRoom.o
  210. +26 −0 build/Dagon.build/Debug/Dagon.build/Objects-normal/x86_64/DGScript.d
  211. BIN build/Dagon.build/Debug/Dagon.build/Objects-normal/x86_64/DGScript.o
  212. +1 −0 build/Dagon.build/Debug/Dagon.build/Objects-normal/x86_64/DGSplashData.d
  213. BIN build/Dagon.build/Debug/Dagon.build/Objects-normal/x86_64/DGSplashData.o
  214. +10 −0 build/Dagon.build/Debug/Dagon.build/Objects-normal/x86_64/DGSpot.d
  215. BIN build/Dagon.build/Debug/Dagon.build/Objects-normal/x86_64/DGSpot.o
  216. +9 −0 build/Dagon.build/Debug/Dagon.build/Objects-normal/x86_64/DGState.d
  217. BIN build/Dagon.build/Debug/Dagon.build/Objects-normal/x86_64/DGState.o
  218. +15 −0 build/Dagon.build/Debug/Dagon.build/Objects-normal/x86_64/DGSystem.d
  219. BIN build/Dagon.build/Debug/Dagon.build/Objects-normal/x86_64/DGSystem.o
  220. +14 −0 build/Dagon.build/Debug/Dagon.build/Objects-normal/x86_64/DGTexture.d
  221. BIN build/Dagon.build/Debug/Dagon.build/Objects-normal/x86_64/DGTexture.o
  222. +13 −0 build/Dagon.build/Debug/Dagon.build/Objects-normal/x86_64/DGTextureManager.d
  223. BIN build/Dagon.build/Debug/Dagon.build/Objects-normal/x86_64/DGTextureManager.o
  224. +8 −0 build/Dagon.build/Debug/Dagon.build/Objects-normal/x86_64/DGTimer.d
  225. BIN build/Dagon.build/Debug/Dagon.build/Objects-normal/x86_64/DGTimer.o
  226. +15 −0 build/Dagon.build/Debug/Dagon.build/Objects-normal/x86_64/DGVideo.d
  227. BIN build/Dagon.build/Debug/Dagon.build/Objects-normal/x86_64/DGVideo.o
  228. +11 −0 build/Dagon.build/Debug/Dagon.build/Objects-normal/x86_64/DGViewDelegate.d
  229. BIN build/Dagon.build/Debug/Dagon.build/Objects-normal/x86_64/DGViewDelegate.o
  230. +10 −0 build/Dagon.build/Debug/Dagon.build/Objects-normal/x86_64/DGWindowDelegate.d
  231. BIN build/Dagon.build/Debug/Dagon.build/Objects-normal/x86_64/DGWindowDelegate.o
  232. +14 −0 build/Dagon.build/Debug/Dagon.build/Objects-normal/x86_64/DGWorld.d
  233. BIN build/Dagon.build/Debug/Dagon.build/Objects-normal/x86_64/DGWorld.o
  234. +31 −0 build/Dagon.build/Debug/Dagon.build/Objects-normal/x86_64/Dagon.LinkFileList
  235. +10 −0 build/Dagon.build/Debug/Dagon.build/Objects-normal/x86_64/main.d
  236. BIN build/Dagon.build/Debug/Dagon.build/Objects-normal/x86_64/main.o
  237. +1 −0 build/Dagon.build/Debug/Dagon.build/Objects-normal/x86_64/stb_image.d
  238. BIN build/Dagon.build/Debug/Dagon.build/Objects-normal/x86_64/stb_image.o
  239. +1,753 −0 build/Dagon.build/Debug/Dagon.build/build-state.dat
  240. +202 −0 build/Dagon.build/Debug/Dagon.build/build-state~.dat
  241. +50 −0 build/Debug/Dagon.app/Contents/Info.plist
  242. BIN build/Debug/Dagon.app/Contents/MacOS/Dagon
  243. +1 −0 build/Debug/Dagon.app/Contents/PkgInfo
  244. +29 −0 build/Debug/Dagon.app/Contents/Resources/Credits.rtf
  245. BIN build/Debug/Dagon.app/Contents/Resources/Dagon.icns
  246. BIN build/Debug/Dagon.app/Contents/Resources/English.lproj/InfoPlist.strings
  247. BIN build/Debug/Dagon.app/Contents/Resources/English.lproj/MainMenu.nib
  248. +36 −0 build/Debug/Dagon.app/Contents/Resources/Info.plist
  249. +20 −0 build/Debug/dagon.log
View
@@ -0,0 +1,2 @@
+*.DS_store
+build

Large diffs are not rendered by default.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Bucket
+ type = "1"
+ version = "1.0">
+ <FileBreakpoints>
+ <FileBreakpoint
+ shouldBeEnabled = "No"
+ ignoreCount = "0"
+ continueAfterRunningActions = "No"
+ isPathRelative = "1"
+ filePath = "Dagon/DGAppDelegate.m"
+ timestampString = "344574310.983561"
+ startingColumnNumber = "9223372036854775807"
+ endingColumnNumber = "9223372036854775807"
+ startingLineNumber = "9"
+ endingLineNumber = "9">
+ </FileBreakpoint>
+ </FileBreakpoints>
+</Bucket>
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+ version = "1.3">
+ <BuildAction
+ parallelizeBuildables = "YES"
+ buildImplicitDependencies = "YES">
+ <BuildActionEntries>
+ <BuildActionEntry
+ buildForTesting = "YES"
+ buildForRunning = "YES"
+ buildForProfiling = "YES"
+ buildForArchiving = "YES"
+ buildForAnalyzing = "YES">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "FBC8882D14574F08008D548F"
+ BuildableName = "Dagon.app"
+ BlueprintName = "Dagon"
+ ReferencedContainer = "container:Dagon.xcodeproj">
+ </BuildableReference>
+ </BuildActionEntry>
+ </BuildActionEntries>
+ </BuildAction>
+ <TestAction
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.GDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.GDB"
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ buildConfiguration = "Debug">
+ <Testables>
+ </Testables>
+ <MacroExpansion>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "FBC8882D14574F08008D548F"
+ BuildableName = "Dagon.app"
+ BlueprintName = "Dagon"
+ ReferencedContainer = "container:Dagon.xcodeproj">
+ </BuildableReference>
+ </MacroExpansion>
+ </TestAction>
+ <LaunchAction
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.GDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.GDB"
+ launchStyle = "0"
+ useCustomWorkingDirectory = "NO"
+ buildConfiguration = "Debug"
+ debugDocumentVersioning = "YES"
+ allowLocationSimulation = "YES">
+ <BuildableProductRunnable>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "FBC8882D14574F08008D548F"
+ BuildableName = "Dagon.app"
+ BlueprintName = "Dagon"
+ ReferencedContainer = "container:Dagon.xcodeproj">
+ </BuildableReference>
+ </BuildableProductRunnable>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ </LaunchAction>
+ <ProfileAction
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ savedToolIdentifier = ""
+ useCustomWorkingDirectory = "NO"
+ buildConfiguration = "Release"
+ debugDocumentVersioning = "YES">
+ <BuildableProductRunnable>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "FBC8882D14574F08008D548F"
+ BuildableName = "Dagon.app"
+ BlueprintName = "Dagon"
+ ReferencedContainer = "container:Dagon.xcodeproj">
+ </BuildableReference>
+ </BuildableProductRunnable>
+ </ProfileAction>
+ <AnalyzeAction
+ buildConfiguration = "Debug">
+ </AnalyzeAction>
+ <ArchiveAction
+ buildConfiguration = "Release"
+ revealArchiveInOrganizer = "YES">
+ </ArchiveAction>
+</Scheme>
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>SchemeUserState</key>
+ <dict>
+ <key>Dagon.xcscheme</key>
+ <dict>
+ <key>orderHint</key>
+ <integer>0</integer>
+ </dict>
+ </dict>
+ <key>SuppressBuildableAutocreation</key>
+ <dict>
+ <key>FBC8882D14574F08008D548F</key>
+ <dict>
+ <key>primary</key>
+ <true/>
+ </dict>
+ </dict>
+</dict>
+</plist>
View
@@ -0,0 +1,22 @@
+/*
+ * DAGON
+ * Copyright (c) 2011 Senscape s.r.l.
+ * All rights reserved.
+ *
+ * NOTICE: Senscape permits you to use, modify, and distribute this
+ * file in accordance with the terms of the license agreement accompanying it.
+ *
+ */
+
+#import "DGPlatform.h"
+
+
+@interface DagonAppDelegate : NSObject {
+
+}
+
+- (void)audioLoop;
+- (void)mainLoop;
+- (void)videoLoop;
+
+@end
View
@@ -0,0 +1,37 @@
+/*
+ * DAGON
+ * Copyright (c) 2011 Senscape s.r.l.
+ * All rights reserved.
+ *
+ * NOTICE: Senscape permits you to use, modify, and distribute this
+ * file in accordance with the terms of the license agreement accompanying it.
+ *
+ */
+
+#import "DGAudio.h"
+#import "DGScript.h"
+#import "DGVideo.h"
+
+#import "DGAppDelegate.h"
+
+
+@implementation DagonAppDelegate
+
+- (void)audioLoop {
+ while (dg_audio_loop()) {
+ [NSThread sleepForTimeInterval:0.01f];
+ }
+}
+
+- (void)mainLoop {
+ dg_script_loop();
+}
+
+- (void)videoLoop {
+ while (dg_video_loop()) {
+ //[NSThread sleepForTimeInterval:0.0000001f];
+ [NSThread sleepForTimeInterval:0.000001f];
+ }
+}
+
+@end
View
@@ -0,0 +1,138 @@
+/*
+ * DAGON
+ * Copyright (c) 2011 Senscape s.r.l.
+ * All rights reserved.
+ *
+ * NOTICE: Senscape permits you to use, modify, and distribute this
+ * file in accordance with the terms of the license agreement accompanying it.
+ *
+ */
+
+#include "DGArray.h"
+#include "DGMemory.h"
+
+
+////////////////////////////////////////////////////////////////////////////////
+///// Standard New / Release /////
+////////////////////////////////////////////////////////////////////////////////
+
+DG_ARRAY* dg_array_new(unsigned capacity) {
+ DG_ARRAY* array = dg_alloc(sizeof(DG_ARRAY));
+
+ if (!capacity)
+ capacity = DG_DEF_ARRAYSIZE;
+
+ array->capacity = capacity;
+ array->count = 0;
+ array->objects = NULL;
+ array->objects = dg_alloc(sizeof(DG_OBJECT**) * capacity);
+
+ return array;
+}
+
+void dg_array_release(DG_ARRAY* array) {
+ if (array) {
+ unsigned c = array->count;
+
+ while (c-- > 0) {
+ // TODO: Objects NOT being free, it is the responsibility of each module
+ // NOTE: Perhaps can provide a special function...
+ //dg_object_release(array->objects[c]);
+ }
+
+ dg_free(array);
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////
+///// Implementation - Checks /////
+////////////////////////////////////////////////////////////////////////////////
+
+unsigned dg_array_count(DG_ARRAY* array) {
+ return array->count;
+}
+
+DG_BOOL dg_array_has_object(DG_ARRAY* array, DG_OBJECT* object) {
+ if (array) {
+ unsigned i;
+
+ for (i = 0; i < array->count; i++)
+ if (array->objects[i] == object)
+ return DG_YES;
+ }
+
+ return DG_NO;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+///// Implementation - Gets /////
+////////////////////////////////////////////////////////////////////////////////
+
+DG_OBJECT* dg_array_first(DG_ARRAY* array) {
+ if (array->count == 0)
+ return NULL;
+
+ return array->objects[0];
+}
+
+DG_OBJECT* dg_array_last(DG_ARRAY* array) {
+ if (array->count == 0)
+ return NULL;
+
+ return array->objects[array->count - 1];
+}
+
+DG_OBJECT* dg_array_get_object(DG_ARRAY* array, unsigned index) {
+ if (index >= array->count) {
+ // TODO: Raise exception
+ return NULL;
+ }
+
+ return array->objects[index];
+}
+
+DG_OBJECT* dg_array_get_object_by_name(DG_ARRAY* array, const char* name) {
+ unsigned int i;
+
+ for (i = 0; i < array->count; i++)
+ if (strcmp(array->objects[i]->name, name) == 0)
+ return array->objects[i];
+
+ return NULL;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+///// Implementation - Sets /////
+////////////////////////////////////////////////////////////////////////////////
+
+void dg_array_add_object(DG_ARRAY* array, DG_OBJECT* object) {
+ if (object == NULL) {
+ // TODO: Raise exception
+ return;
+ }
+
+ array->objects[array->count] = object;
+ array->count++;
+
+ if (array->count > array->capacity) {
+ // WARNING: There seems to be some problems with this...
+ DG_OBJECT** newObjects;
+ array->capacity = array->capacity * 2;
+ newObjects = dg_realloc(array->objects, sizeof(DG_OBJECT**) * array->capacity);
+ array->objects = newObjects;
+ }
+}
+
+void dg_array_delete_object(DG_ARRAY* array, unsigned index) {
+ unsigned int i, last = array->count - 1;
+
+ if (index > last)
+ return;
+
+ for (i = index; i < last - 1; i++)
+ array->objects[i] = array->objects[i+1];
+
+ dg_object_release(array->objects[last]);
+
+ array->count--;
+}
View
@@ -0,0 +1,51 @@
+/*
+ * DAGON
+ * Copyright (c) 2011 Senscape s.r.l.
+ * All rights reserved.
+ *
+ * NOTICE: Senscape permits you to use, modify, and distribute this
+ * file in accordance with the terms of the license agreement accompanying it.
+ *
+ */
+
+#ifndef dg_array_H
+#define dg_array_H
+
+#include "DGCommon.h"
+#include "DGObject.h"
+
+#define DG_DEF_ARRAYSIZE 500
+
+
+// TODO: Must implement the enumerator feature here
+
+typedef struct {
+ unsigned capacity;
+ unsigned count;
+ DG_OBJECT** objects;
+} DG_ARRAY;
+
+
+// New / Release
+
+DG_ARRAY* dg_array_new(unsigned capacity);
+void dg_array_release(DG_ARRAY* array);
+
+// Checks
+
+unsigned dg_array_count(DG_ARRAY* array);
+DG_BOOL dg_array_has_object(DG_ARRAY* array, DG_OBJECT* object);
+
+// Gets
+
+DG_OBJECT* dg_array_first(DG_ARRAY* array);
+DG_OBJECT* dg_array_last(DG_ARRAY* array);
+DG_OBJECT* dg_array_get_object(DG_ARRAY* array, unsigned index);
+DG_OBJECT* dg_array_get_object_by_name(DG_ARRAY* array, const char* name);
+
+// Sets
+
+void dg_array_add_object(DG_ARRAY* array, DG_OBJECT* object);
+void dg_array_delete_object(DG_ARRAY* array, unsigned index);
+
+#endif // dg_array_H
Oops, something went wrong.

0 comments on commit 6bf0582

Please sign in to comment.