torqueConfig.h 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222
  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. #ifndef _TORQUECONFIG_H_
  23. #define _TORQUECONFIG_H_
  24. //-----------------------------------------------------------------------------
  25. //Hi, and welcome to the Torque Config file.
  26. //
  27. //This file is a central reference for the various configuration flags that
  28. //you'll be using when controlling what sort of a Torque build you have. In
  29. //general, the information here is global for your entire codebase, applying
  30. //not only to your game proper, but also to all of your tools.
  31. /// Since we can build different engine "products" out of the same
  32. /// base engine source we need a way to differentiate which product
  33. /// this particular game is using.
  34. ///
  35. /// TGE 0001
  36. /// TGEA 0002
  37. /// TGB 0003
  38. /// TGEA 360 0004
  39. /// TGE WII 0005
  40. /// Torque 3D 0006
  41. ///
  42. #define TORQUE_ENGINE_PRODUCT 0006
  43. /// What's the name of your application? Used in a variety of places.
  44. #define TORQUE_APP_NAME "Empty"
  45. /// What version of the application specific source code is this?
  46. ///
  47. /// Version number is major * 1000 + minor * 100 + revision * 10.
  48. #define TORQUE_APP_VERSION 2009
  49. /// Human readable application version string.
  50. #define TORQUE_APP_VERSION_STRING "2009"
  51. /// Define me if you want to enable multithreading support.
  52. #ifndef TORQUE_MULTITHREAD
  53. #define TORQUE_MULTITHREAD
  54. #endif
  55. /// Define me if you want to disable Torque memory manager.
  56. #ifndef TORQUE_DISABLE_MEMORY_MANAGER
  57. #define TORQUE_DISABLE_MEMORY_MANAGER
  58. #endif
  59. /// Define me if you want to disable the virtual mount system.
  60. //#define TORQUE_DISABLE_VIRTUAL_MOUNT_SYSTEM
  61. /// Define me if you want to disable looking for the root of a given path
  62. /// within a zip file. This means that the zip file name itself must be
  63. /// the root of the path. Requires the virtual mount system to be active.
  64. //#define TORQUE_DISABLE_FIND_ROOT_WITHIN_ZIP
  65. /// Define me if you don't want Torque to compile dso's
  66. #define TORQUE_NO_DSO_GENERATION
  67. // Define me if this build is a tools build
  68. #ifndef TORQUE_PLAYER
  69. # define TORQUE_TOOLS
  70. #else
  71. # undef TORQUE_TOOLS
  72. #endif
  73. /// Define me if you want to enable the profiler.
  74. /// See also the TORQUE_SHIPPING block below
  75. //#define TORQUE_ENABLE_PROFILER
  76. /// Define me to enable debug mode; enables a great number of additional
  77. /// sanity checks, as well as making AssertFatal and AssertWarn do something.
  78. /// This is usually defined by the build target.
  79. //#define TORQUE_DEBUG
  80. /// Define me if this is a shipping build; if defined I will instruct Torque
  81. /// to batten down some hatches and generally be more "final game" oriented.
  82. /// Notably this disables a liberal resource manager file searching, and
  83. /// console help strings.
  84. //#define TORQUE_SHIPPING
  85. /// Define me to enable a variety of network debugging aids.
  86. ///
  87. /// - NetConnection packet logging.
  88. /// - DebugChecksum guards to detect mismatched pack/unpacks.
  89. /// - Detection of invalid destination ghosts.
  90. ///
  91. //#define TORQUE_DEBUG_NET
  92. /// Define me to enable detailed console logging of net moves.
  93. //#define TORQUE_DEBUG_NET_MOVES
  94. /// Enable this define to change the default Net::MaxPacketDataSize
  95. /// Do this at your own risk since it has the potential to cause packets
  96. /// to be split up by old routers and Torque does not have a mechanism to
  97. /// stitch split packets back together. Using this define can be very useful
  98. /// in controlled network hardware environments (like a LAN) or for singleplayer
  99. /// games (like BArricade and its large paths)
  100. //#define MAXPACKETSIZE 1500
  101. /// Modify me to enable metric gathering code in the renderers.
  102. ///
  103. /// 0 does nothing; higher numbers enable higher levels of metric gathering.
  104. //#define TORQUE_GATHER_METRICS 0
  105. /// Define me if you want to enable debug guards in the memory manager.
  106. ///
  107. /// Debug guards are known values placed before and after every block of
  108. /// allocated memory. They are checked periodically by Memory::validate(),
  109. /// and if they are modified (indicating an access to memory the app doesn't
  110. /// "own"), an error is flagged (ie, you'll see a crash in the memory
  111. /// manager's validate code). Using this and a debugger, you can track down
  112. /// memory corruption issues quickly.
  113. //#define TORQUE_DEBUG_GUARD
  114. /// Define me if you want to enable instanced-static behavior
  115. //#define TORQUE_ENABLE_THREAD_STATICS
  116. /// Define me if you want to gather static-usage metrics
  117. //#define TORQUE_ENABLE_THREAD_STATIC_METRICS
  118. /// Define me if you want to enable debug guards on the FrameAllocator.
  119. ///
  120. /// This is similar to the above memory manager guards, but applies only to the
  121. /// fast FrameAllocator temporary pool memory allocations. The guards are only
  122. /// checked when the FrameAllocator frees memory (when it's water mark changes).
  123. /// This is most useful for detecting buffer overruns when using FrameTemp<> .
  124. /// A buffer overrun in the FrameAllocator is unlikely to cause a crash, but may
  125. /// still result in unexpected behavior, if other FrameTemp's are stomped.
  126. //#define FRAMEALLOCATOR_DEBUG_GUARD
  127. /// This #define is used by the FrameAllocator to set the size of the frame.
  128. ///
  129. /// It was previously set to 3MB but I've increased it to 16MB due to the
  130. /// FrameAllocator being used as temporary storage for bitmaps in the D3D9
  131. /// texture manager.
  132. #define TORQUE_FRAME_SIZE 16 << 20
  133. // Finally, we define some dependent #defines. This enables some subsidiary
  134. // functionality to get automatically turned on in certain configurations.
  135. #ifdef TORQUE_DEBUG
  136. #define TORQUE_GATHER_METRICS 0
  137. #define TORQUE_ENABLE_PROFILE_PATH
  138. #ifndef TORQUE_DEBUG_GUARD
  139. #define TORQUE_DEBUG_GUARD
  140. #endif
  141. #ifndef TORQUE_NET_STATS
  142. #define TORQUE_NET_STATS
  143. #endif
  144. // Enables the C++ assert macros AssertFatal, AssertWarn, etc.
  145. #define TORQUE_ENABLE_ASSERTS
  146. #endif
  147. #ifdef TORQUE_RELEASE
  148. // If it's not DEBUG, it's a RELEASE build, put appropriate things here.
  149. #endif
  150. #ifdef TORQUE_SHIPPING
  151. // TORQUE_SHIPPING flags here.
  152. #else
  153. // Enable the profiler by default, if we're not doing a shipping build.
  154. #define TORQUE_ENABLE_PROFILER
  155. // Enable the TorqueScript assert() instruction if not shipping.
  156. #define TORQUE_ENABLE_SCRIPTASSERTS
  157. // We also enable GFX debug events for use in Pix and other graphics
  158. // debugging tools.
  159. #define TORQUE_ENABLE_GFXDEBUGEVENTS
  160. #endif
  161. #ifdef TORQUE_TOOLS
  162. # define TORQUE_INSTANCE_EXCLUSION "TorqueToolsTest"
  163. #else
  164. # define TORQUE_INSTANCE_EXCLUSION "TorqueTest"
  165. #endif
  166. // Someday, it might make sense to do some pragma magic here so we error
  167. // on inconsistent flags.
  168. // The Xbox360 has it's own profiling tools, the Torque Profiler should not be used
  169. #ifdef TORQUE_OS_XENON
  170. # ifdef TORQUE_ENABLE_PROFILER
  171. # undef TORQUE_ENABLE_PROFILER
  172. # endif
  173. #
  174. # ifdef TORQUE_ENABLE_PROFILE_PATH
  175. # undef TORQUE_ENABLE_PROFILE_PATH
  176. #endif
  177. #endif
  178. #endif // _TORQUECONFIG_H_