Debug logging, debug model.

This commit is contained in:
jaynus 2015-05-11 16:01:58 -07:00
parent 0a81f03447
commit b0b4d219ed
10 changed files with 241 additions and 16 deletions

Binary file not shown.

View File

@ -8,11 +8,18 @@ PREP(monitorResultsPFH);
PREP(parseResult); PREP(parseResult);
PREP(callExtension); PREP(callExtension);
// This value is used for debug loading of the extension with dynload
GVAR(extensionLibrary) = "z\ace\extensions\build\vd\Debug\ace_vd.dll";
GVAR(async) = true; GVAR(async) = true;
GVAR(ready) = false; GVAR(ready) = false;
#ifdef DEBUG_LOG_EXTENSION
GVAR(debug_log) = [];
#endif
#ifdef DEBUG_EXTENSION_DYNLOAD
// This value is used for debug loading of the extension with dynload
GVAR(extensionLibrary) = "z\ace\extensions\build\vd\Debug\ace_vd.dll";
#endif
// Extension dispatch events // Extension dispatch events
PREP(setAnimationNames); PREP(setAnimationNames);
@ -37,6 +44,37 @@ FUNC(_textVector) = {
_str _str
}; };
#ifdef DEBUG_LOG_EXTENSION
FUNC(clipboardExport) = {
private["_chunks"];
_chunks = [];
_chunks = [_this select 0, ";"] call CBA_fnc_split;
{
private["_chunk"];
_chunk = _x + ";";
"ace_clipboard" callExtension format["%1", _chunk];
} forEach _chunks;
"ace_clipboard" callExtension "--COMPLETE--";
};
FUNC(exportLog) = {
private["_chunks"];
_chunks = [str(_this select 0), ","] call CBA_fnc_split;
{
private["_chunk"];
_chunk = _x + ";";
"ace_clipboard" callExtension format["%1", _chunk];
} forEach _chunks;
"ace_clipboard" callExtension "--COMPLETE--";
};
#endif
[] call FUNC(initializeExtension); [] call FUNC(initializeExtension);
ADDON = true; ADDON = true;

View File

@ -1,7 +1,20 @@
#include "script_component.hpp" #include "script_component.hpp"
private["_extResult"];
#ifdef DEBUG_EXTENSION_DYNLOAD #ifdef DEBUG_EXTENSION_DYNLOAD
"ace_dynload" callExtension format["call:%1,%2", GVAR(extensionLibrary), _this]; _extResult = "ace_dynload" callExtension format["call:%1,%2", GVAR(extensionLibrary), _this];
#else #else
"ace_vd" callExtension _this; _extResult = "ace_vd" callExtension _this;
#endif #endif
#ifdef DEBUG_LOG_EXTENSION
if((_this find "fetch_result") < 0) then {
GVAR(debug_log) pushBack [_this, _extResult];
};
#endif
if(!isNil "_extResult") then {
_extResult
} else {
nil
};

View File

@ -1,4 +1,4 @@
#define DEBUG_MODE_FULL //#define DEBUG_MODE_FULL
#include "script_component.hpp" #include "script_component.hpp"
private["_vehicleData", "_animationNames", "_animationResults", "_sendToExtension"]; private["_vehicleData", "_animationNames", "_animationResults", "_sendToExtension"];
PARAMS_1(_vehicle); PARAMS_1(_vehicle);
@ -38,10 +38,6 @@ if(_sendToExtension) then {
_cmd = _cmd + format["%1,%2,", (_x select 0), (_x select 1)]; _cmd = _cmd + format["%1,%2,", (_x select 0), (_x select 1)];
} forEach _animationResults; } forEach _animationResults;
#ifdef DEBUG_MODE_FULL
TRACE_1("Updating Extension", _cmd);
copyToClipboard _cmd; // This was for debug saving animation states
#endif
_cmd call FUNC(callExtension); _cmd call FUNC(callExtension);
}; };

View File

@ -16,5 +16,6 @@
#define RELATIVE_VECTOR_TEXT(o,x) ([(o worldToModelVisual ((x) call EFUNC(common,ASLToPosition)))] call FUNC(_textVector)) #define RELATIVE_VECTOR_TEXT(o,x) ([(o worldToModelVisual ((x) call EFUNC(common,ASLToPosition)))] call FUNC(_textVector))
#define DEBUG_EXTENSION_DYNLOAD #define DEBUG_EXTENSION_DYNLOAD
#define DEBUG_LOG_EXTENSION
//#define DEBUG_EXTENSION_DYNLOAD_RELOAD //#define DEBUG_EXTENSION_DYNLOAD_RELOAD
//#define DEBUG_VEHICLEDAMAGE_RENDER //#define DEBUG_VEHICLEDAMAGE_RENDER

View File

@ -1,5 +1,9 @@
init: init:
debug_render: debug_render:
register_vehicle:\A3\Structures_F\Ind\Cargo\Cargo40_blue_F.p3d,0,4050.18;3802.55;5.075 register_vehicle:\A3\Armor_F_EPB\MBT_03\MBT_03_cannon_F.p3d, 1, 4046.21;3902.56;5.075
set_animation_state:Door_1_rot,1,Door_Locked_1_rot,0,Door_2_rot,0,Door_Locked_2_rot,0, #set_animation_state:damageHide, 0, Wheel_kolL1, 4.45242e-005, Wheel_koloL1, 4.45242e-005, Wheel_podkoloL1, 0.520781, Wheel_kolP1, 4.45066e-005, Wheel_koloP1, 4.45066e-005, Wheel_podkoloP1, 0.521964, Wheel_kolL2, 4.45242e-005, Wheel_kolP2, 4.45066e-005, Wheel_koloL2, 4.45242e-005, Wheel_koloL3, 4.45242e-005, Wheel_koloL4, 4.45242e-005, Wheel_koloL5, 4.45242e-005, Wheel_koloL6, 4.45242e-005, Wheel_koloL7, 4.45242e-005, Wheel_koloP2, 4.45066e-005, Wheel_koloP3, 4.45066e-005, Wheel_koloP4, 4.45066e-005, Wheel_koloP5, 4.45066e-005, Wheel_koloP6, 4.45066e-005, Wheel_koloP7, 4.45066e-005, Wheel_podkoloL2, 0.507025, Wheel_podkoloL3, 0.500526, Wheel_podkoloL4, 0.509195, Wheel_podkoloL5, 0.49289, Wheel_podkoloL6, 0.48161, Wheel_podkoloP2, 0.513542, Wheel_podkoloP3, 0.507042, Wheel_podkoloP4, 0.500768, Wheel_podkoloP5, 0.496353, Wheel_podkoloP6, 0.503705, podkoloL1_hide_damage, 0, podkoloL2_hide_damage, 0, podkoloL3_hide_damage, 0, podkoloL4_hide_damage, 0, podkoloL5_hide_damage, 0, podkoloL6_hide_damage, 0, podkoloL7_hide_damage, 0, podkoloL8_hide_damage, 0, podkoloP1_hide_damage, 0, podkoloP2_hide_damage, 0, podkoloP3_hide_damage, 0, podkoloP4_hide_damage, 0, podkoloP5_hide_damage, 0, podkoloP6_hide_damage, 0, podkoloP7_hide_damage, 0, podkoloP8_hide_damage, 0, damageVez, 0, MainTurret, 2.37036, MainGun, 0.347653, Recoil, 0, ObsTurret, 0, ObsGun, 0, MainGunOptics, 0.347653, Wheel_podkoloP7, 0.493503, Wheel_podkoloL7, 0.479849, HatchDriver, 0, HatchCommander, 0, HatchGunner, 0, damageVezVelitele, 0, poklop_commander_damage, 0, poklop_gunner_damage, 0, poklop_driver_damage, 0, zaslehROT_HMG, 0, zaslehROT_coax, 14.094, cannon_muzzle_flash, 0, zaslehROT_cannon, 18, HideHull, 0.303806, HideTurret, 0.0209581, LockMuzzle, 0,
fetch_result:1 #hit:1, \A3\Armor_F_EPB\MBT_03\MBT_03_cannon_F.p3d, ["damagehide"], 0.984803;0.173649;-0.00285841, 0.0029445;-0.000238176;0.999996, 2, Sh_120mm_APFSDS_Tracer_Yellow, 65, 27, 0, 0, 0, -108.073;1739.99;-17.7792, -18.9268;0.0336914;-1.73933, -0.0619889;0.998028;-0.00989257, 0.173648;-0.984808;-0.000745866
hit:1, \A3\Armor_F_EPB\MBT_03\MBT_03_cannon_F.p3d, [], 0.984803;0.173649;-0.00285841, 0.0029445;-0.000238176;0.999996, 2, Sh_120mm_APFSDS_Tracer_Yellow, 65, 27, 0, 0, 0, -107.792;1724.28;-18.3618, -18.9268;0.0336914;-1.73933, -0.0619889;0.998028;-0.00989257, 0.173648;-0.984808;-0.000746796
#hit:1, \A3\Armor_F_EPB\MBT_03\MBT_03_cannon_F.p3d, [], 0.984803;0.173649;-0.00285841, 0.0029445;-0.000238176;0.999996, 2, Sh_120mm_APFSDS_Tracer_Yellow, 65, 27, 0, 0, 0, -106.921;1703.28;-19.728, -18.9268;0.0336914;-1.73933, -0.0619889;0.998028;-0.00989257, 0.173648;-0.984808;-0.000745866
#hit:1, \A3\Armor_F_EPB\MBT_03\MBT_03_cannon_F.p3d, [], 0.984803;0.173649;-0.00285841, 0.0029445;-0.000238176;0.999996, 2, Sh_120mm_APFSDS_Tracer_Yellow, 65, 27, 0, 0, 0, -92.8136;1569.56;-19.7856, -18.9268;0.0336914;-1.73933, -0.0619889;0.998028;-0.00989257, 0.173648;-0.984808;-0.000746472
#hit:1, \A3\Armor_F_EPB\MBT_03\MBT_03_cannon_F.p3d, ["damagehide"], 0.984803;0.173649;-0.00285841, 0.0029445;-0.000238176;0.999996, 2, Sh_120mm_APFSDS_Tracer_Yellow, 65, 27, 0, 0, 0, -76.7551;1435.97;-17.8176, -18.9268;0.0336914;-1.73933, -0.0619889;0.998028;-0.00989257, 0.173648;-0.984808;-0.000745866

View File

@ -1,6 +1,5 @@
init: init:
debug_render: debug_render:
register_vehicle:\A3\Armor_F_EPB\MBT_03\MBT_03_cannon_F.p3d,0,4050.18;3802.55;5.075 register_vehicle:\A3\Structures_F\Ind\Cargo\Cargo40_blue_F.p3d,0,4050.18;3802.55;5.075
#set_animation_state:damageHide,0,Wheel_kolL1,4.45242e-005,Wheel_koloL1,4.45242e-005,Wheel_podkoloL1,0.516474,Wheel_kolP1,4.45066e-005,Wheel_koloP1,4.45066e-005,Wheel_podkoloP1,0.517239,Wheel_kolL2,4.45242e-005,Wheel_kolP2,4.45066e-005,Wheel_koloL2,4.45242e-005,Wheel_koloL3,4.45242e-005,Wheel_koloL4,4.45242e-005,Wheel_koloL5,4.45242e-005,Wheel_koloL6,4.45242e-005,Wheel_koloL7,4.45242e-005,Wheel_koloP2,4.45066e-005,Wheel_koloP3,4.45066e-005,Wheel_koloP4,4.45066e-005,Wheel_koloP5,4.45066e-005,Wheel_koloP6,4.45066e-005,Wheel_koloP7,4.45066e-005,Wheel_podkoloL2,0.502695,Wheel_podkoloL3,0.496173,Wheel_podkoloL4,0.504816,Wheel_podkoloL5,0.488489,Wheel_podkoloL6,0.477184,Wheel_podkoloP2,0.508792,Wheel_podkoloP3,0.50227,Wheel_podkoloP4,0.495971,Wheel_podkoloP5,0.491531,Wheel_podkoloP6,0.498859,podkoloL1_hide_damage,0,podkoloL2_hide_damage,0,podkoloL3_hide_damage,0,podkoloL4_hide_damage,0,podkoloL5_hide_damage,0,podkoloL6_hide_damage,0,podkoloL7_hide_damage,0,podkoloL8_hide_damage,0,podkoloP1_hide_damage,0,podkoloP2_hide_damage,0,podkoloP3_hide_damage,0,podkoloP4_hide_damage,0,podkoloP5_hide_damage,0,podkoloP6_hide_damage,0,podkoloP7_hide_damage,0,podkoloP8_hide_damage,0,damageVez,0,MainTurret,0,MainGun,0.174533,Recoil,0,ObsTurret,0,ObsGun,0,MainGunOptics,0.174533,Wheel_podkoloP7,0.488629,Wheel_podkoloL7,0.475399,HatchDriver,0,HatchCommander,0,HatchGunner,0,damageVezVelitele,0,poklop_commander_damage,0,poklop_gunner_damage,0,poklop_driver_damage,0,zaslehROT_HMG,0,zaslehROT_coax,1.669,cannon_muzzle_flash,0,zaslehROT_cannon,0,HideHull,0.374406,HideTurret,0.729166,LockMuzzle,0, set_animation_state:Door_1_rot,1,Door_Locked_1_rot,0,Door_2_rot,0,Door_Locked_2_rot,0,
set_animation_state:damageHide,0,Wheel_kolL1,4.45242e-005,Wheel_koloL1,4.45242e-005,Wheel_podkoloL1,0.518667,Wheel_kolP1,4.45066e-005,Wheel_koloP1,4.45066e-005,Wheel_podkoloP1,0.51903,Wheel_kolL2,4.45242e-005,Wheel_kolP2,4.45066e-005,Wheel_koloL2,4.45242e-005,Wheel_koloL3,4.45242e-005,Wheel_koloL4,4.45242e-005,Wheel_koloL5,4.45242e-005,Wheel_koloL6,4.45242e-005,Wheel_koloL7,4.45242e-005,Wheel_koloP2,4.45066e-005,Wheel_koloP3,4.45066e-005,Wheel_koloP4,4.45066e-005,Wheel_koloP5,4.45066e-005,Wheel_koloP6,4.45066e-005,Wheel_koloP7,4.45066e-005,Wheel_podkoloL2,0.505578,Wheel_podkoloL3,0.499702,Wheel_podkoloL4,0.509021,Wheel_podkoloL5,0.493307,Wheel_podkoloL6,0.48267,Wheel_podkoloP2,0.511259,Wheel_podkoloP3,0.505382,Wheel_podkoloP4,0.499742,Wheel_podkoloP5,0.495988,Wheel_podkoloP6,0.50392,podkoloL1_hide_damage,0,podkoloL2_hide_damage,0,podkoloL3_hide_damage,0,podkoloL4_hide_damage,0,podkoloL5_hide_damage,0,podkoloL6_hide_damage,0,podkoloL7_hide_damage,0,podkoloL8_hide_damage,0,podkoloP1_hide_damage,0,podkoloP2_hide_damage,0,podkoloP3_hide_damage,0,podkoloP4_hide_damage,0,podkoloP5_hide_damage,0,podkoloP6_hide_damage,0,podkoloP7_hide_damage,0,podkoloP8_hide_damage,0,damageVez,0,MainTurret,-0.0683285,MainGun,0.170289,Recoil,0.299856,ObsTurret,0,ObsGun,0,MainGunOptics,0.170289,Wheel_podkoloP7,0.494357,Wheel_podkoloL7,0.481555,HatchDriver,0,HatchCommander,0,HatchGunner,0,damageVezVelitele,0,poklop_commander_damage,0,poklop_gunner_damage,0,poklop_driver_damage,0,zaslehROT_HMG,0,zaslehROT_coax,75.207,cannon_muzzle_flash,0.299856,zaslehROT_cannon,512,HideHull,0.534082,HideTurret,0.83349,LockMuzzle,0,
fetch_result:1 fetch_result:1

View File

@ -0,0 +1,61 @@
//config.cpp
class CfgPatches
{
class nou_sys_snow
{
units[] = {};
weapons[] = {};
requiredVersion = 0.1;
requiredAddons[] = {"A3_Data_F"};
};
};
class CfgVehicles {
class House;
class nou_test_model: House
{
author = "Nou";
_generalMacro = "nou_snow_2x2";
scope = 2;
model = "\x\nou\addons\test_model\test.p3d";
vehicleClass = "Structures";
cost = 50000;
replaceDamagedLimit = 0.99999;
class AnimationSources {
class box1
{
source = "user";
animPeriod = 0.0001;
initPhase = 0;
minValue = 0;
maxValue = 3;
};
class box2
{
source = "user";
animPeriod = 0.0001;
initPhase = 0;
minValue = -1;
maxValue = 1;
};
class box3_translate
{
source = "user";
animPeriod = 0.0001;
initPhase = 0;
minValue = -10;
maxValue = 10;
};
class box3_rotate
{
source = "user";
animPeriod = 0.0001;
initPhase = 0;
minValue = 0;
maxValue = 1;
};
};
};
};

View File

@ -0,0 +1,113 @@
//model.cfg
class CfgSkeletons
{
class Default
{
isDiscrete = 1;
skeletonInherit = "";
skeletonBones[] = {};
};
class test_skeleton : Default {
skeletonBones[] =
{
"box1","",
"box2","box1",
"box3","box2"
};
pivotsModel = "";
};
};
class CfgModels
{
class Default
{
sectionsInherit = "";
sections[] = {};
};
class test : Default {
sectionsInherit = "";
sections[] =
{
};
skeletonName = "test_skeleton";
class Animations
{
class box1
{
type = "rotationY";
axis = "box2_translate_axis";
source = "box1";
selection = "box1";
animPeriod = 0.0001;
minValue = 0;
maxValue = 3;
offset0 = 0;
offset1 = 1;
angle0 = 0;
angle1 = "rad 360";
sourceAddress = "loop";
};
class box2 {
type = "translationZ";
source = "box2";
selection = "box2";
animPeriod = 0.0001;
minValue = -1;
maxValue = 1;
sourceAddress = "loop";
};
class box3_rotate
{
type = "direct";
source = "box3_rotate";
selection = "box3";
animPeriod = 0.0001;
axisPos[] = {1,2,3};
axisDir[] = {4,5,6};
angle = "401.070457";
axisOffset = 8;
sourceAddress = "loop";
minValue = 0;
maxValue = 10;
};
class box3_translate
{
type = "translation";
source = "box3_translate";
selection = "box3";
axis = "box2_translate_axis";
offset0 = 1;
offset1 = -1;
animPeriod = 0.0001;
minValue = -10;
maxValue = 10;
sourceAddress = "clamp";
};
/*
class box3_rotate
{
type = "direct";
source = "box3_rotate";
selection = "box3";
animPeriod = 0.0001;
axisPos[] = {0,0,0};
axisDir[] = {0,1,0};
angle = "1080";
axisOffset = 1;
sourceAddress = "loop";
minValue = 0;
maxValue = 10;
};
*/
};
};
};

Binary file not shown.