/** * \defgroup Debug Debug utilities * @{ */ /** \brief Prints current call stack (stack trace) \return \p void @code DumpStack(); @endcode \verbatim Output: -- Stack trace -- SaveFile() Scripts\Entities\Modules\ModuleBase\ModuleFileHandler.c : 51 SaveConfigToFile() Scripts\Entities\Modules\ModuleBase\ModuleFileHandler\ModuleLocalProfile.c : 114 SaveParameterArray() Scripts\Entities\Modules\ModuleBase\ModuleFileHandler\ModuleLocalProfile.c : 133 SetParameterArray() Scripts\Entities\Modules\ModuleBase\ModuleFileHandler\ModuleLocalProfile.c : 231 PresetAdd() Scripts\Entities\Modules\ModuleBase\ModuleFileHandler\ModuleLocalProfile\ModuleLocalProfileUI.h : 46 OnKeyPress() Scripts/mission/missionGameplay.c : 215 OnKeyPress() Scripts/DayZGame.c : 334 ----------------- \endverbatim */ proto void DumpStack(); /** \brief Prints current call stack (stack trace) to given output \return \p void @code string tmp; DumpStackString(tmp); Print(tmp); @endcode \verbatim Output: SaveFile() Scripts\Entities\Modules\ModuleBase\ModuleFileHandler.c : 51 SaveConfigToFile() Scripts\Entities\Modules\ModuleBase\ModuleFileHandler\ModuleLocalProfile.c : 114 SaveParameterArray() Scripts\Entities\Modules\ModuleBase\ModuleFileHandler\ModuleLocalProfile.c : 133 SetParameterArray() Scripts\Entities\Modules\ModuleBase\ModuleFileHandler\ModuleLocalProfile.c : 231 PresetAdd() Scripts\Entities\Modules\ModuleBase\ModuleFileHandler\ModuleLocalProfile\ModuleLocalProfileUI.h : 46 OnKeyPress() Scripts/mission/missionGameplay.c : 215 OnKeyPress() Scripts/DayZGame.c : 334 \endverbatim */ proto void DumpStackString(out string stack); //! Triggers breakpoint in C++ in run time(when app is running in debug enviroment) proto void DebugBreak(bool condition = true, void param1 = NULL, void param2 = NULL, void param3 = NULL, void param4 = NULL, void param5 = NULL, void param6 = NULL, void param7 = NULL, void param8 = NULL, void param9 = NULL); //! Triggers breakpoint in C++ in compile time(when app is running in debug enviroment) void CompileBreak(); //! Prints content of variable to console/log. Should be used for critical messages so it will appear in debug log proto void DPrint(string var); enum ErrorExSeverity { INFO, WARNING, ERROR, } /** \brief Error message, prefixed by method name, above 'INFO' will show a messagebox \note Format: [%className%::%methodName%] :: [%severity%] :: %errString% \param \p string Error message to use @code class ErrorExTest { void ThrowWarning() { // [ErrorExTest::ThrowWarning] :: [WARNING] :: This is a warning. ErrorEx("This is a warning.", ErrorExSeverity.WARNING); } } @endcode */ proto void ErrorEx(string err, ErrorExSeverity severity = ErrorExSeverity.ERROR); proto void ErrorExString(string err, out string str, ErrorExSeverity severity = ErrorExSeverity.ERROR); //! Messagebox with error message proto native void Error2(string title, string err); //! Messagebox with error message void Error(string err) { Error2("", err); } //!Prints content of variable to console/log proto void Print(void var); //!Prints content of variable to RPT file (performance warning - each write means fflush! use with care) proto void PrintToRPT(void var); /** \brief Prints formated text to console/log @code string c = "Peter"; PrintFormat("Hello %1, how are you?", c); // prints "Hello 'Peter', how are you?" @endcode */ proto void PrintFormat(string fmt, void param1 = NULL, void param2 = NULL, void param3 = NULL, void param4 = NULL, void param5 = NULL, void param6 = NULL, void param7 = NULL, void param8 = NULL, void param9 = NULL); //------------------------------------------ /** * \defgroup DebugShape Debug Shape API definition * @{ */ enum ShapeType { BBOX, //< Just box LINE, //< One or more lines SPHERE, //< Sphere represented by triangle mesh CYLINDER, //< Cylinder represented by triangle mesh DIAMOND, //< Eight faced pyramid. Defined by bound-box, where middle part is equal to horizontal extents of box and top/bottom apogees lies on top/bottom side of box. PYRAMID //< Four sided pyramid. Defined by bound-box, where base is equal to bottom side of box. }; enum ShapeFlags { NOZBUFFER, //< Do not compare z-buffer when render NOZWRITE, //< Do not update z-buffer when render WIREFRAME, //< Render just wire-frame outline. No solid faces TRANSP, //< Is translucent DOUBLESIDE, //< Double-sided (do not cull back-faces) ONCE, //< Rendered just once and then it's automatically destroyed. Do not keep pointer to these!! NOOUTLINE, //< Render just solid faces. No wire-frame outline. BACKFACE, //< Render just back faces NOCULL, //< Do not cull shapes by view frustum VISIBLE, //< Make it visible. Set by default ADDITIVE //< Additive blending (works with ShapeFlags.TRANSP) }; enum CollisionFlags { FIRSTCONTACT, //