torqueConfig.h.in 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233
  1. //-----------------------------------------------------------------------------
  2. // Copyright (c) 2012 GarageGames, LLC
  3. //
  4. // Permission is hereby granted, free of charge, to any person obtaining a copy
  5. // of this software and associated documentation files (the "Software"), to
  6. // deal in the Software without restriction, including without limitation the
  7. // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
  8. // sell copies of the Software, and to permit persons to whom the Software is
  9. // furnished to do so, subject to the following conditions:
  10. //
  11. // The above copyright notice and this permission notice shall be included in
  12. // all copies or substantial portions of the Software.
  13. //
  14. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  15. // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  16. // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  17. // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  18. // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  19. // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
  20. // IN THE SOFTWARE.
  21. //-----------------------------------------------------------------------------
  22. #pragma once
  23. //-----------------------------------------------------------------------------
  24. //Hi, and welcome to the Torque Config file.
  25. //
  26. //This file is a central reference for the various configuration flags that
  27. //you'll be using when controlling what sort of a Torque build you have. In
  28. //general, the information here is global for your entire codebase, applying
  29. //not only to your game proper, but also to all of your tools.
  30. /// What's the name of your application? Used in a variety of places.
  31. #define TORQUE_APP_NAME "@TORQUE_APP_NAME@"
  32. #cmakedefine USE_TEMPLATE_MATRIX
  33. /// What version of the application specific source code is this?
  34. ///
  35. /// Version number is major * 1000 + minor * 100 + revision * 10.
  36. #define TORQUE_APP_VERSION @TORQUE_APP_VERSION@
  37. /// Human readable application version string.
  38. #define TORQUE_APP_VERSION_STRING "@TORQUE_APP_VERSION_STRING@"
  39. /// Define me if you want path case insensitivity support on POSIX systems. Does nothing on Windows.
  40. #cmakedefine TORQUE_POSIX_PATH_CASE_INSENSITIVE
  41. /// Define me if you want path case insensitivity support in ZIP files.
  42. #cmakedefine TORQUE_ZIP_PATH_CASE_INSENSITIVE
  43. /// Define me if you want to enable secure VFS support.
  44. #cmakedefine TORQUE_SECURE_VFS
  45. /// Define me if you want to enable multithreading support.
  46. #cmakedefine TORQUE_MULTITHREAD
  47. /// Define me if you want to disable Torque memory manager.
  48. #cmakedefine TORQUE_DISABLE_MEMORY_MANAGER
  49. #ifndef TORQUE_ENABLE_ASSERTS // disable memory manager when in release build.
  50. #define TORQUE_DISABLE_MEMORY_MANAGER
  51. #endif
  52. /// Define me if you want to disable the virtual mount system.
  53. #cmakedefine TORQUE_DISABLE_VIRTUAL_MOUNT_SYSTEM
  54. /// Define me if you want to disable looking for the root of a given path
  55. /// within a zip file. This means that the zip file name itself must be
  56. /// the root of the path. Requires the virtual mount system to be active.
  57. /// i.e. data/ui.zip would be mounted as data/ui, so the zip should not
  58. /// contain the ui folder, only it's contents. The one exception to this
  59. /// is if a file game.zip is located in the executable directory. The zip
  60. /// name 'game' will NOT be added as an extra directory.
  61. #cmakedefine TORQUE_DISABLE_FIND_ROOT_WITHIN_ZIP
  62. /// Define me if you want to use the alternative zip support where you can
  63. /// define your directories and files inside the zip just like you would on disk
  64. /// instead of the default zip support that treats the zip as an extra directory.
  65. /// With this define, all zips should be placed in the executable directory and
  66. /// contain the full path structure to the files.
  67. #cmakedefine TORQUE_ZIP_DISK_LAYOUT
  68. /// If this is defined all zip file names and mount directories will need to
  69. /// be all lower case (even on windows). This is because the root map
  70. /// mRootMap.tryGetValue(root, fsList) call is case sensitive. Define to match
  71. /// legacy zip case behavior.
  72. /* #undef TORQUE_LOWER_ZIPCASE */
  73. /// Define me if you don't want Torque to compile dso's
  74. #cmakedefine TORQUE_NO_DSO_GENERATION
  75. /// Define the default extension to be used for TorqueScript files
  76. #cmakedefine TORQUE_SCRIPT_EXTENSION "@TORQUE_SCRIPT_EXTENSION@"
  77. /// Specify a console function to execute instead of looking for a main.tscript file
  78. #cmakedefine TORQUE_ENTRY_FUNCTION "@TORQUE_ENTRY_FUNCTION@"
  79. // Define me if this build is a tools build
  80. #cmakedefine TORQUE_PLAYER
  81. /// Define me if you want to enable the profiler.
  82. /// See also the TORQUE_SHIPPING block below
  83. #cmakedefine TORQUE_ENABLE_PROFILER
  84. /// Define me to enable debug mode; enables a great number of additional
  85. /// sanity checks, as well as making AssertFatal and AssertWarn do something.
  86. /// This is usually defined by the build target.
  87. // TORQUE_DEBUG is now set dynamically and not here anymore
  88. // #cmakedefine TORQUE_DEBUG
  89. #cmakedefine DEBUG_SPEW
  90. #cmakedefine TORQUE_DEBUG_GFX_MODE
  91. /// Define me if this is a shipping build; if defined I will instruct Torque
  92. /// to batten down some hatches and generally be more "final game" oriented.
  93. /// Notably this disables a liberal resource manager file searching, and
  94. /// console help strings.
  95. #cmakedefine TORQUE_SHIPPING
  96. /// Define me to enable a variety of network debugging aids.
  97. ///
  98. /// - NetConnection packet logging.
  99. /// - DebugChecksum guards to detect mismatched pack/unpacks.
  100. /// - Detection of invalid destination ghosts.
  101. ///
  102. #cmakedefine TORQUE_DEBUG_NET
  103. /// Define me to enable detailed console logging of net moves.
  104. #cmakedefine TORQUE_DEBUG_NET_MOVES
  105. /// Enable this define to change the default Net::MaxPacketDataSize
  106. /// Do this at your own risk since it has the potential to cause packets
  107. /// to be split up by old routers and Torque does not have a mechanism to
  108. /// stitch split packets back together. Using this define can be very useful
  109. /// in controlled network hardware environments (like a LAN) or for singleplayer
  110. /// games (like BArricade and its large paths)
  111. //#define MAXPACKETSIZE 1500
  112. /// Modify me to enable metric gathering code in the renderers.
  113. ///
  114. /// 0 does nothing; higher numbers enable higher levels of metric gathering.
  115. //#define TORQUE_GATHER_METRICS 0
  116. /// Define me if you want to enable debug guards in the memory manager.
  117. ///
  118. /// Debug guards are known values placed before and after every block of
  119. /// allocated memory. They are checked periodically by Memory::validate(),
  120. /// and if they are modified (indicating an access to memory the app doesn't
  121. /// "own"), an error is flagged (ie, you'll see a crash in the memory
  122. /// manager's validate code). Using this and a debugger, you can track down
  123. /// memory corruption issues quickly.
  124. //#define TORQUE_DEBUG_GUARD
  125. /// Define me if you want to enable instanced-static behavior
  126. //#define TORQUE_ENABLE_THREAD_STATICS
  127. /// Define me if you want to gather static-usage metrics
  128. //#define TORQUE_ENABLE_THREAD_STATIC_METRICS
  129. /// Define me if you want to enable debug guards on the FrameAllocator.
  130. ///
  131. /// This is similar to the above memory manager guards, but applies only to the
  132. /// fast FrameAllocator temporary pool memory allocations. The guards are only
  133. /// checked when the FrameAllocator frees memory (when it's water mark changes).
  134. /// This is most useful for detecting buffer overruns when using FrameTemp<> .
  135. /// A buffer overrun in the FrameAllocator is unlikely to cause a crash, but may
  136. /// still result in unexpected behavior, if other FrameTemp's are stomped.
  137. //#define FRAMEALLOCATOR_DEBUG_GUARD
  138. /// This #define is used by the FrameAllocator to set the size of the frame.
  139. ///
  140. /// It was previously set to 3MB but I've increased it to 32MB due to the
  141. /// FrameAllocator being used as temporary storage for bitmaps in the D3D9
  142. /// texture manager.
  143. #define TORQUE_FRAME_SIZE 32 << 20
  144. // Finally, we define some dependent #defines. This enables some subsidiary
  145. // functionality to get automatically turned on in certain configurations.
  146. #ifdef TORQUE_DEBUG
  147. #define TORQUE_GATHER_METRICS 0
  148. #ifndef TORQUE_DEBUG_GUARD
  149. #define TORQUE_DEBUG_GUARD
  150. #endif
  151. #ifndef TORQUE_NET_STATS
  152. #define TORQUE_NET_STATS
  153. #endif
  154. // Enables the C++ assert macros AssertFatal, AssertWarn, etc.
  155. #ifndef TORQUE_ENABLE_ASSERTS
  156. #define TORQUE_ENABLE_ASSERTS
  157. #endif
  158. #endif
  159. #ifdef TORQUE_RELEASE
  160. // If it's not DEBUG, it's a RELEASE build, put appropriate things here.
  161. #endif
  162. #ifdef TORQUE_SHIPPING
  163. // TORQUE_SHIPPING flags here.
  164. #else
  165. // Enable the profiler by default, if we're not doing a shipping build.
  166. #define TORQUE_ENABLE_PROFILER
  167. #ifdef TORQUE_DEBUG
  168. #define TORQUE_ENABLE_PROFILE_PATH
  169. #endif
  170. // Enable the TorqueScript assert() instruction if not shipping.
  171. #define TORQUE_ENABLE_SCRIPTASSERTS
  172. // We also enable GFX debug events for use in Pix and other graphics
  173. // debugging tools.
  174. #define TORQUE_ENABLE_GFXDEBUGEVENTS
  175. #endif
  176. #ifdef TORQUE_TOOLS
  177. # define TORQUE_INSTANCE_EXCLUSION "TorqueToolsTest"
  178. #else
  179. # define TORQUE_INSTANCE_EXCLUSION "TorqueTest"
  180. #endif
  181. //use sdl backend?
  182. #if defined(TORQUE_SDL)
  183. #include <SDL.h>
  184. #endif
  185. /// Password to use when opening encrypted zip files. Change this to whatever the password is for your zips.
  186. #define DEFAULT_ZIP_PASSWORD "@TORQUE_APP_PASSWORD@"