Performance counter macros

This commit is contained in:
jaynus
2015-03-10 12:59:40 -07:00
parent 45dbb0524c
commit 59db61e192
5 changed files with 152 additions and 20 deletions

View File

@ -0,0 +1,25 @@
//fnc_dumpArray.sqf
#include "script_component.hpp"
private ["_var", "_depth", "_pad", "_i", "_x"];
_var = _this select 0;
_depth = _this select 1;
_pad = "";
for "_i" from 0 to _depth do {
_pad = _pad + toString [9];
};
_depth = _depth + 1;
if(IS_ARRAY(_var)) then {
if((count _var) > 0) then {
diag_log text format["%1[", _pad];
{
[_x, _depth] call FUNC(dumpArray);
} forEach _var;
diag_log text format["%1],", _pad];
} else {
diag_log text format["%1[],", _pad];
};
} else {
diag_log text format["%1%2", _pad, [_var] call FUNC(formatVar)];
};