MCPcopy Create free account
hub / github.com/bfbbdecomp/bfbb / xEntMotionDebugWrite

Function xEntMotionDebugWrite

src/SB/Core/x/xEntMotion.cpp:1025–1242  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1023}
1024
1025static void xEntMotionDebugWrite(const xEntMotion* xem)
1026{
1027 const char* owner;
1028 const char* gps;
1029
1030 switch (xem->type)
1031 {
1032 case XENTMOTION_TYPE_ER:
1033 gps = "extend/retract";
1034 break;
1035 case XENTMOTION_TYPE_ORB:
1036 gps = "orbital";
1037 break;
1038 case XENTMOTION_TYPE_SPL:
1039 gps = "spline";
1040 break;
1041 case XENTMOTION_TYPE_MP:
1042 gps = "movepoint";
1043 break;
1044 case XENTMOTION_TYPE_MECH:
1045 gps = "mechanism";
1046 break;
1047 case XENTMOTION_TYPE_PEN:
1048 gps = "pendulum";
1049 break;
1050 default:
1051 gps = "????";
1052 break;
1053 }
1054
1055 xprintf("type: %s\n", gps);
1056 xprintf("stopped: %s\n", xbtoa(xem->flags & 4));
1057
1058 if (xem->owner != NULL)
1059 {
1060 owner = xSceneID2Name(g_xSceneCur, xem->owner->id);
1061 }
1062 else
1063 {
1064 owner = "null";
1065 }
1066
1067 xprintf("owner: %s\n", owner);
1068 xprintf("t: %.3f d: %.3f tmr: %.3f\n", xem->t, xem->d, xem->tmr);
1069
1070 switch (xem->type)
1071 {
1072 case XENTMOTION_TYPE_ER:
1073 xprintf("a: <%.3f %.3f %.3f>\n", xem->er.a.x, xem->er.a.y, xem->er.a.z);
1074 xprintf("b: <%.3f %.3f %.3f>\n", xem->er.b.x, xem->er.b.y, xem->er.b.z);
1075 xprintf("b-a: <%.3f %.3f %.3f>\n", xem->asset->er.ext_dpos.x, xem->asset->er.ext_dpos.y,
1076 xem->asset->er.ext_dpos.z);
1077 xprintf("ext_tm: %.3f\n", xem->er.et);
1078 xprintf("ret_tm: %.3f\n", xem->er.rt);
1079 xprintf("wait_et: %.3f\n", xem->er.wet);
1080 xprintf("wait_rt: %.3f\n", xem->er.wrt);
1081 xprintf("period: %.3f\n", xem->er.p);
1082 break;

Callers 1

xEntMotionDebugCBFunction · 0.70

Calls 3

xprintfFunction · 0.85
xbtoaFunction · 0.85
xSceneID2NameFunction · 0.85

Tested by

no test coverage detected