torqueConfig.h 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246
  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. /// What's the name of your application? Used in a variety of places.
  32. #define TORQUE_APP_NAME "Full"
  33. #define TORQUE_NET_DEFAULT_MULTICAST_ADDRESS "ff04::7467:656E:6574:776B"
  34. /// What version of the application specific source code is this?
  35. ///
  36. /// Version number is major * 1000 + minor * 100 + revision * 10.
  37. #define TORQUE_APP_VERSION 1000
  38. /// Human readable application version string.
  39. #define TORQUE_APP_VERSION_STRING "1.0"
  40. /// Define me if you want to enable multithreading support.
  41. #ifndef TORQUE_MULTITHREAD
  42. #define TORQUE_MULTITHREAD
  43. #endif
  44. /// Define me if you want to disable Torque memory manager.
  45. #ifndef TORQUE_DISABLE_MEMORY_MANAGER
  46. #define TORQUE_DISABLE_MEMORY_MANAGER
  47. #endif
  48. /// The improved SimDictionary uses C++11 and is designed for games where
  49. /// there are over 10000 simobjects active normally. To enable the new
  50. /// SimDictionary just uncomment the line below.
  51. //#define USE_NEW_SIMDICTIONARY
  52. /// Define me if you want to disable the virtual mount system.
  53. //#define 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. //#define TORQUE_DISABLE_FIND_ROOT_WITHIN_ZIP
  58. //Uncomment this define if you want to use the alternative zip support where you can
  59. //define your directories and files inside the zip just like you would on disk
  60. //instead of the default zip support that treats the zip as an extra directory.
  61. //#define TORQUE_ZIP_DISK_LAYOUT
  62. /// Define me if you don't want Torque to compile dso's
  63. #define TORQUE_NO_DSO_GENERATION
  64. // Define me if this build is a tools build
  65. #ifndef TORQUE_PLAYER
  66. # define TORQUE_TOOLS
  67. #else
  68. # undef TORQUE_TOOLS
  69. #endif
  70. /// Define me if you want to enable the profiler.
  71. /// See also the TORQUE_SHIPPING block below
  72. //#define TORQUE_ENABLE_PROFILER
  73. /// Define me to enable debug mode; enables a great number of additional
  74. /// sanity checks, as well as making AssertFatal and AssertWarn do something.
  75. /// This is usually defined by the build target.
  76. //#define TORQUE_DEBUG
  77. /// Define me if this is a shipping build; if defined I will instruct Torque
  78. /// to batten down some hatches and generally be more "final game" oriented.
  79. /// Notably this disables a liberal resource manager file searching, and
  80. /// console help strings.
  81. //#define TORQUE_SHIPPING
  82. /// Define me to enable a variety of network debugging aids.
  83. ///
  84. /// - NetConnection packet logging.
  85. /// - DebugChecksum guards to detect mismatched pack/unpacks.
  86. /// - Detection of invalid destination ghosts.
  87. ///
  88. //#define TORQUE_DEBUG_NET
  89. /// Define me to enable detailed console logging of net moves.
  90. //#define TORQUE_DEBUG_NET_MOVES
  91. /// Enable this define to change the default Net::MaxPacketDataSize
  92. /// Do this at your own risk since it has the potential to cause packets
  93. /// to be split up by old routers and Torque does not have a mechanism to
  94. /// stitch split packets back together. Using this define can be very useful
  95. /// in controlled network hardware environments (like a LAN) or for singleplayer
  96. /// games (like BArricade and its large paths)
  97. //#define MAXPACKETSIZE 1500
  98. /// Modify me to enable metric gathering code in the renderers.
  99. ///
  100. /// 0 does nothing; higher numbers enable higher levels of metric gathering.
  101. //#define TORQUE_GATHER_METRICS 0
  102. /// Define me if you want to enable debug guards in the memory manager.
  103. ///
  104. /// Debug guards are known values placed before and after every block of
  105. /// allocated memory. They are checked periodically by Memory::validate(),
  106. /// and if they are modified (indicating an access to memory the app doesn't
  107. /// "own"), an error is flagged (ie, you'll see a crash in the memory
  108. /// manager's validate code). Using this and a debugger, you can track down
  109. /// memory corruption issues quickly.
  110. //#define TORQUE_DEBUG_GUARD
  111. /// Define me if you want to enable instanced-static behavior
  112. //#define TORQUE_ENABLE_THREAD_STATICS
  113. /// Define me if you want to gather static-usage metrics
  114. //#define TORQUE_ENABLE_THREAD_STATIC_METRICS
  115. /// Define me if you want to enable debug guards on the FrameAllocator.
  116. ///
  117. /// This is similar to the above memory manager guards, but applies only to the
  118. /// fast FrameAllocator temporary pool memory allocations. The guards are only
  119. /// checked when the FrameAllocator frees memory (when it's water mark changes).
  120. /// This is most useful for detecting buffer overruns when using FrameTemp<> .
  121. /// A buffer overrun in the FrameAllocator is unlikely to cause a crash, but may
  122. /// still result in unexpected behavior, if other FrameTemp's are stomped.
  123. //#define FRAMEALLOCATOR_DEBUG_GUARD
  124. /// This #define is used by the FrameAllocator to align starting addresses to
  125. /// be byte aligned to this value. This is important on the 360 and possibly
  126. /// on other platforms as well. Use this #define anywhere alignment is needed.
  127. ///
  128. /// NOTE: Do not change this value per-platform unless you have a very good
  129. /// reason for doing so. It has the potential to cause inconsistencies in
  130. /// memory which is allocated and expected to be contiguous.
  131. ///
  132. ///@ TODO: Make sure that everywhere this should be used, it is being used.
  133. #define TORQUE_BYTE_ALIGNMENT 4
  134. /// This #define should be set if the engine should use a 32-bit format for
  135. /// 24-bit textures. The most notable case is converting RGB->RGBX for various
  136. /// reasons.
  137. // CodeReview: It may be worth determining this at run-time. Right now I just
  138. // want to wrap code which forces the conversion from 24->32 in a common
  139. // #define so it is easily turned on/off for the problems we are encountering in
  140. // the lighting. [5/11/2007 Pat]
  141. //#define TORQUE_FORCE_24_BIT_TO_32_BIT_TEXTURES
  142. /// This #define is used by the FrameAllocator to set the size of the frame.
  143. ///
  144. /// It was previously set to 3MB but I've increased it to 32MB due to the
  145. /// FrameAllocator being used as temporary storage for bitmaps in the D3D9
  146. /// texture manager.
  147. #define TORQUE_FRAME_SIZE 32 << 20
  148. // Finally, we define some dependent #defines. This enables some subsidiary
  149. // functionality to get automatically turned on in certain configurations.
  150. #ifdef TORQUE_DEBUG
  151. #define TORQUE_GATHER_METRICS 0
  152. #define TORQUE_ENABLE_PROFILE_PATH
  153. #ifndef TORQUE_DEBUG_GUARD
  154. #define TORQUE_DEBUG_GUARD
  155. #endif
  156. #ifndef TORQUE_NET_STATS
  157. #define TORQUE_NET_STATS
  158. #endif
  159. // Enables the C++ assert macros AssertFatal, AssertWarn, etc.
  160. #define TORQUE_ENABLE_ASSERTS
  161. #endif
  162. #ifdef TORQUE_RELEASE
  163. // If it's not DEBUG, it's a RELEASE build, put appropriate things here.
  164. #endif
  165. #ifdef TORQUE_SHIPPING
  166. // TORQUE_SHIPPING flags here.
  167. #else
  168. // Enable the profiler by default, if we're not doing a shipping build.
  169. #define TORQUE_ENABLE_PROFILER
  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. // This is the lighting system thats enabled by default when the scene graphs are created.
  182. //#define DEFAULT_LIGHTING_SYSTEM "SynapseGaming Lighting Kit"
  183. #define DEFAULT_LIGHTING_SYSTEM "Basic Lighting"
  184. // Someday, it might make sense to do some pragma magic here so we error
  185. // on inconsistent flags.
  186. // The Xbox360 has it's own profiling tools, the Torque Profiler should not be used
  187. #ifdef TORQUE_OS_XENON
  188. # ifdef TORQUE_ENABLE_PROFILER
  189. # undef TORQUE_ENABLE_PROFILER
  190. # endif
  191. #
  192. # ifdef TORQUE_ENABLE_PROFILE_PATH
  193. # undef TORQUE_ENABLE_PROFILE_PATH
  194. #endif
  195. #endif
  196. #endif // _TORQUECONFIG_H_