DETUtils Entry Point - The main file which is included in order to use the DETUtils libraries, because including them like they're standalones is not a good idea.
- Start to use the DETUtils by including
detutils.inc:
#include <DETUTILS\detutils>- Before including the entry point, you can define some compile-time options in order to configure the DETUtils libraries the way you want to.
- This is one of the most important build modes, it replaces all of the custom keywords and annotation names with
DETUTILS_-prefixed names:
@command(...) cmd(...)
{
}- With
DETUTILS_COMPATIBILITY_MODEenabled, you should do it like this:
@DETUTILS_command(...) cmd(...)
{
}- Or example with
d_vars:
get Integer(...);- With
DETUTILS_COMPATIBILITY_MODEenabled, you should do it like this:
DETUTILS_get Integer(...);- If you want all but one keyword or annotation, you can leave the compatibility mode off and just do:
#define DETUTILS_NO_ANNOTATION_command- or for keywords:
#define DETUTILS_NO_KEYWORD_get- Or if you want to use one keyword or annotation, but with compatibility mode enabled - you can do:
#define DETUTILS_ANNOTATION_command- or for keywords:
#define DETUTILS_KEYWORD_get- This is another special build mode I use while developing the DETUtils code. It basically enables
DETUTILS_DEBUG_MODE,DETUTILS_TESTING_MODEand disablesDETUTILS_NO_MODULE_WARNINGSif it was enabled.
#define DETUTILS_DEV_MODE- By default, DETUtils includes rarely print any debug messages in the console. Enabling the
DETUTILS_DEBUG_MODEflag will turn on the debug mode - this is really important and useful for beta feature testing!
#define DETUTILS_DEBUG_MODE- If you want to test DETUtils but don't know where to start, simply enable the
DETUTILS_TESTING_MODEflag and thed_testing_internal.incwill be included. In the basic terms,d_testing_entryis a just random gamemode written using the DETUtils includes.
#define DETUTILS_TESTING_MODE- By default, DETUtils includes will show you a warning in case something has been disabled, changed or whatsoever. The example of those warnings is below.
../detutils/DETUTILS\d_core\d_funcgen.inc(9165) : warning 237: user warning: [DETUtils]: (debug) - DETUTILSFUNCGEN_INDEX__ is '0'.
../detutils/DETUTILS\d_core\d_funcgen.inc(34) : warning 237: user warning: [DETUtils]: (debug) - DETUTILSFUNCGEN_INDEX__ is '1'.
../detutils/DETUTILS\detutils.inc(653) : warning 237: user warning: [DETUtils]: (warning) - testmode :: Testing mode is enabled. Remove `#define DETUTILS_TESTING_MODE` from your code to disable it.
../detutils/DETUTILS\d_core\d_funcgen.inc(49) : warning 237: user warning: [DETUtils]: (debug) - DETUTILSFUNCGEN_INDEX__ is '2'.
- If you see these annoying, you can disable them by using:
#define DETUTILS_NO_MODULE_WARNINGS- This compile-time option enables the old keyword-based syntax since the DETUtils syntax is now mainly based on decorator macros.
#define DETUTILS_COMPAT- If you're writing a filterscript, make sure that you enabled the
DETUTILS_FILTERSCRIPT_MODEflag for fixes and optimization!
#define DETUTILS_FILTERSCRIPT_MODE- This is a flag which enables the debug mode for the
d_alsinclude. If this is not enabled,d_alswon't spam your console with hooked function call messages.
#define DETUTILS_ALS_CALL_DEBUG- By default, DETUtils includes all the libraries at once. You can disable a certain library for any reason (i.e incompatibility issues, or other bugs that are yet unknown) by doing:
#define DETUTILS_NO_<UPPER-CASE LIBRARY NAME>- For examble:
#define DETUTILS_NO_ALS- This will uninclude
d_als.inc.
- Almost every DETUtils library is divided into sublibraries or rather submodules. They're often optional and thus you can disable them for any reason by using:
#define DETUTILS_NO_<UPPER-CASE LIBRARY NAME>_<UPPER-CASE SUBLIBRARY NAME>- For examble:
// Only disable d_vars_circular.inc submodule.
#define DETUTILS_NO_VARS_CIRCULAR- This will uninclude
d_vars_circular.inc. Please note that not all submodules are optional, so doing this:
#define DETUTILS_NO_COMMANDS_SETUP- Won't disable
d_commands_setupbecause it's a required library. In this case, you can only do this:
// Disable the whole d_commands.inc module.
#define DETUTILS_NO_COMMANDS- By default, DETUtils package entry includes its own
sscanfimplementation, you can disable it with:
#define DETUTILS_NO_SSCANF- Read more about this compile-time option here.
- Disables the
d_serverAndroid client check features.
- Makes almost all of internal definitions inaccessible by other third-party includes.
#define DETUTILS_STATIC_MODE- Basically, does the same thing as:
#pragma option -l- Disables the internal
d_rem.inclibrary.