void CDebugger::DumpCrash(DWORD dwThreadId, DWORD dwProcessId, DWORD_PTR dwAddress) { PrintContext(dwThreadId); PrintDisAsm(dwProcessId, dwAddress); PrintCallStack(dwThreadId, dwProcessId); m_pCrash->Send(); m_pCrash->PrintLog(); }
SQInteger PrintRuntimeError(HSQUIRRELVM v) { SQPRINTFUNCTION pf = sq_geterrorfunc(v); if(pf) { const SQChar *sErr = 0; if(sq_gettop(v)>=1) { if(SQ_SUCCEEDED(sq_getstring(v,2,&sErr))) { pf(v,_SC("\nAN ERROR HAS OCCURED [%s]\n"),sErr); } else{ pf(v,_SC("\nAN ERROR HAS OCCURED [unknown]\n")); } PrintCallStack(v); } } return 0; }
// オブジェクト情報の表示 void PrintObjectInfo(TRACKING_OBJECT *o) { SYSTEMTIME t; char tmp[MAX_SIZE]; // 引数チェック if (o == NULL) { return; } UINT64ToSystem(&t, o->CreatedDate); GetDateTimeStrMilli(tmp, sizeof(tmp), &t); Print(" TRACKING_OBJECT ID: %u\n" " TRACKING_OBJECT TYPE: %s\n" " ADDRESS: 0x%p\n" " TRACKING_OBJECT SIZE: %u bytes\n" " CREATED DATE: %s\n", o->Id, o->Name, UINT64_TO_POINTER(o->Address), o->Size, tmp); PrintCallStack(o->CallStack); }
static QScriptValue ScaleOp_ScaleOp_float_float_float(QScriptContext *context, QScriptEngine *engine) { if (context->argumentCount() != 3) { printf("Error! Invalid number of arguments passed to function ScaleOp_ScaleOp_float_float_float in file %s, line %d!\nExpected 3, but got %d!\n", __FILE__, __LINE__, context->argumentCount()); PrintCallStack(context->backtrace()); return QScriptValue(); } float sx = qscriptvalue_cast<float>(context->argument(0)); float sy = qscriptvalue_cast<float>(context->argument(1)); float sz = qscriptvalue_cast<float>(context->argument(2)); ScaleOp ret(sx, sy, sz); return qScriptValueFromValue(engine, ret); }
static QScriptValue Capsule_ExtremePoint_float3_const(QScriptContext *context, QScriptEngine *engine) { if (context->argumentCount() != 1) { printf("Error! Invalid number of arguments passed to function Capsule_ExtremePoint_float3_const in file %s, line %d!\nExpected 1, but got %d!\n", __FILE__, __LINE__, context->argumentCount()); PrintCallStack(context->backtrace()); return QScriptValue(); } Capsule This = qscriptvalue_cast<Capsule>(context->thisObject()); float3 direction = qscriptvalue_cast<float3>(context->argument(0)); float3 ret = This.ExtremePoint(direction); return qScriptValueFromValue(engine, ret); }
static QScriptValue LCG_Float_float_float(QScriptContext *context, QScriptEngine *engine) { if (context->argumentCount() != 2) { printf("Error! Invalid number of arguments passed to function LCG_Float_float_float in file %s, line %d!\nExpected 2, but got %d!\n", __FILE__, __LINE__, context->argumentCount()); PrintCallStack(context->backtrace()); return QScriptValue(); } LCG This = qscriptvalue_cast<LCG>(context->thisObject()); float a = qscriptvalue_cast<float>(context->argument(0)); float b = qscriptvalue_cast<float>(context->argument(1)); float ret = This.Float(a, b); ToExistingScriptValue_LCG(engine, This, context->thisObject()); return qScriptValueFromValue(engine, ret); }
static QScriptValue Transform_SetScale_float3(QScriptContext *context, QScriptEngine *engine) { if (context->argumentCount() != 1) { printf("Error! Invalid number of arguments passed to function Transform_SetScale_float3 in file %s, line %d!\nExpected 1, but got %d!\n", __FILE__, __LINE__, context->argumentCount()); PrintCallStack(context->backtrace()); return QScriptValue(); } Transform This = qscriptvalue_cast<Transform>(context->thisObject()); float3 s = qscriptvalue_cast<float3>(context->argument(0)); This.SetScale(s); ToExistingScriptValue_Transform(engine, This, context->thisObject()); return QScriptValue(); }
static QScriptValue Transform_Transform_float4x4(QScriptContext *context, QScriptEngine *engine) { if (context->argumentCount() != 1) { printf("Error! Invalid number of arguments passed to function Transform_Transform_float4x4 in file %s, line %d!\nExpected 1, but got %d!\n", __FILE__, __LINE__, context->argumentCount()); PrintCallStack(context->backtrace()); return QScriptValue(); } float4x4 m = qscriptvalue_cast<float4x4>(context->argument(0)); Transform ret(m); return qScriptValueFromValue(engine, ret); }
static QScriptValue Transform_ctor(QScriptContext *context, QScriptEngine *engine) { if (context->argumentCount() == 0) return Transform_Transform(context, engine); if (context->argumentCount() == 3 && QSVIsOfType<float3>(context->argument(0)) && QSVIsOfType<float3>(context->argument(1)) && QSVIsOfType<float3>(context->argument(2))) return Transform_Transform_float3_float3_float3(context, engine); if (context->argumentCount() == 1 && QSVIsOfType<float3x3>(context->argument(0))) return Transform_Transform_float3x3(context, engine); if (context->argumentCount() == 1 && QSVIsOfType<float3x4>(context->argument(0))) return Transform_Transform_float3x4(context, engine); if (context->argumentCount() == 1 && QSVIsOfType<float4x4>(context->argument(0))) return Transform_Transform_float4x4(context, engine); printf("Transform_ctor failed to choose the right function to call! Did you use 'var x = Transform();' instead of 'var x = new Transform();'?\n"); PrintCallStack(context->backtrace()); return QScriptValue(); }
static QScriptValue Transform_Transform_float3_float3_float3(QScriptContext *context, QScriptEngine *engine) { if (context->argumentCount() != 3) { printf("Error! Invalid number of arguments passed to function Transform_Transform_float3_float3_float3 in file %s, line %d!\nExpected 3, but got %d!\n", __FILE__, __LINE__, context->argumentCount()); PrintCallStack(context->backtrace()); return QScriptValue(); } float3 pos_ = qscriptvalue_cast<float3>(context->argument(0)); float3 rot_ = qscriptvalue_cast<float3>(context->argument(1)); float3 scale = qscriptvalue_cast<float3>(context->argument(2)); Transform ret(pos_, rot_, scale); return qScriptValueFromValue(engine, ret); }
static QScriptValue Capsule_SetFrom_Sphere(QScriptContext *context, QScriptEngine *engine) { if (context->argumentCount() != 1) { printf("Error! Invalid number of arguments passed to function Capsule_SetFrom_Sphere in file %s, line %d!\nExpected 1, but got %d!\n", __FILE__, __LINE__, context->argumentCount()); PrintCallStack(context->backtrace()); return QScriptValue(); } Capsule This = qscriptvalue_cast<Capsule>(context->thisObject()); Sphere s = qscriptvalue_cast<Sphere>(context->argument(0)); This.SetFrom(s); ToExistingScriptValue_Capsule(engine, This, context->thisObject()); return QScriptValue(); }
static QScriptValue Capsule_Transform_float4x4(QScriptContext *context, QScriptEngine *engine) { if (context->argumentCount() != 1) { printf("Error! Invalid number of arguments passed to function Capsule_Transform_float4x4 in file %s, line %d!\nExpected 1, but got %d!\n", __FILE__, __LINE__, context->argumentCount()); PrintCallStack(context->backtrace()); return QScriptValue(); } Capsule This = qscriptvalue_cast<Capsule>(context->thisObject()); float4x4 transform = qscriptvalue_cast<float4x4>(context->argument(0)); This.Transform(transform); ToExistingScriptValue_Capsule(engine, This, context->thisObject()); return QScriptValue(); }
static QScriptValue Capsule_Capsule_float3_float3_float(QScriptContext *context, QScriptEngine *engine) { if (context->argumentCount() != 3) { printf("Error! Invalid number of arguments passed to function Capsule_Capsule_float3_float3_float in file %s, line %d!\nExpected 3, but got %d!\n", __FILE__, __LINE__, context->argumentCount()); PrintCallStack(context->backtrace()); return QScriptValue(); } float3 bottomPoint = qscriptvalue_cast<float3>(context->argument(0)); float3 topPoint = qscriptvalue_cast<float3>(context->argument(1)); float radius = qscriptvalue_cast<float>(context->argument(2)); Capsule ret(bottomPoint, topPoint, radius); return qScriptValueFromValue(engine, ret); }
static QScriptValue Capsule_Scale_float3_float(QScriptContext *context, QScriptEngine *engine) { if (context->argumentCount() != 2) { printf("Error! Invalid number of arguments passed to function Capsule_Scale_float3_float in file %s, line %d!\nExpected 2, but got %d!\n", __FILE__, __LINE__, context->argumentCount()); PrintCallStack(context->backtrace()); return QScriptValue(); } Capsule This = qscriptvalue_cast<Capsule>(context->thisObject()); float3 centerPoint = qscriptvalue_cast<float3>(context->argument(0)); float scaleFactor = qscriptvalue_cast<float>(context->argument(1)); This.Scale(centerPoint, scaleFactor); ToExistingScriptValue_Capsule(engine, This, context->thisObject()); return QScriptValue(); }
static QScriptValue Capsule_MinimalEnclosingOBB_const(QScriptContext *context, QScriptEngine *engine) { if (context->argumentCount() != 0) { printf("Error! Invalid number of arguments passed to function Capsule_MinimalEnclosingOBB_const in file %s, line %d!\nExpected 0, but got %d!\n", __FILE__, __LINE__, context->argumentCount()); PrintCallStack(context->backtrace()); return QScriptValue(); } Capsule This = qscriptvalue_cast<Capsule>(context->thisObject()); OBB ret = This.MinimalEnclosingOBB(); return qScriptValueFromValue(engine, ret); }
static QScriptValue Capsule_UniformPointPerhapsInside_float_float_float_const(QScriptContext *context, QScriptEngine *engine) { if (context->argumentCount() != 3) { printf("Error! Invalid number of arguments passed to function Capsule_UniformPointPerhapsInside_float_float_float_const in file %s, line %d!\nExpected 3, but got %d!\n", __FILE__, __LINE__, context->argumentCount()); PrintCallStack(context->backtrace()); return QScriptValue(); } Capsule This = qscriptvalue_cast<Capsule>(context->thisObject()); float l = qscriptvalue_cast<float>(context->argument(0)); float x = qscriptvalue_cast<float>(context->argument(1)); float y = qscriptvalue_cast<float>(context->argument(2)); float3 ret = This.UniformPointPerhapsInside(l, x, y); return qScriptValueFromValue(engine, ret); }
static QScriptValue LCG_ctor(QScriptContext *context, QScriptEngine *engine) { if (context->argumentCount() == 0) return LCG_LCG(context, engine); if (context->argumentCount() == 4 && QSVIsOfType<u32>(context->argument(0)) && QSVIsOfType<u32>(context->argument(1)) && QSVIsOfType<u32>(context->argument(2)) && QSVIsOfType<u32>(context->argument(3))) return LCG_LCG_u32_u32_u32_u32(context, engine); printf("LCG_ctor failed to choose the right function to call! Did you use 'var x = LCG();' instead of 'var x = new LCG();'?\n"); PrintCallStack(context->backtrace()); return QScriptValue(); }
static QScriptValue ScaleOp_ToFloat4x4_const(QScriptContext *context, QScriptEngine *engine) { if (context->argumentCount() != 0) { printf("Error! Invalid number of arguments passed to function ScaleOp_ToFloat4x4_const in file %s, line %d!\nExpected 0, but got %d!\n", __FILE__, __LINE__, context->argumentCount()); PrintCallStack(context->backtrace()); return QScriptValue(); } ScaleOp This = qscriptvalue_cast<ScaleOp>(context->thisObject()); float4x4 ret = This.ToFloat4x4(); return qScriptValueFromValue(engine, ret); }
static QScriptValue ScaleOp_ctor(QScriptContext *context, QScriptEngine *engine) { if (context->argumentCount() == 0) return ScaleOp_ScaleOp(context, engine); if (context->argumentCount() == 1 && QSVIsOfType<float3>(context->argument(0))) return ScaleOp_ScaleOp_float3(context, engine); if (context->argumentCount() == 3 && QSVIsOfType<float>(context->argument(0)) && QSVIsOfType<float>(context->argument(1)) && QSVIsOfType<float>(context->argument(2))) return ScaleOp_ScaleOp_float_float_float(context, engine); printf("ScaleOp_ctor failed to choose the right function to call! Did you use 'var x = ScaleOp();' instead of 'var x = new ScaleOp();'?\n"); PrintCallStack(context->backtrace()); return QScriptValue(); }
static QScriptValue Capsule_Contains_Frustum_const(QScriptContext *context, QScriptEngine *engine) { if (context->argumentCount() != 1) { printf("Error! Invalid number of arguments passed to function Capsule_Contains_Frustum_const in file %s, line %d!\nExpected 1, but got %d!\n", __FILE__, __LINE__, context->argumentCount()); PrintCallStack(context->backtrace()); return QScriptValue(); } Capsule This = qscriptvalue_cast<Capsule>(context->thisObject()); Frustum frustum = qscriptvalue_cast<Frustum>(context->argument(0)); bool ret = This.Contains(frustum); return qScriptValueFromValue(engine, ret); }
static QScriptValue Transform_Mul_Transform_const(QScriptContext *context, QScriptEngine *engine) { if (context->argumentCount() != 1) { printf("Error! Invalid number of arguments passed to function Transform_Mul_Transform_const in file %s, line %d!\nExpected 1, but got %d!\n", __FILE__, __LINE__, context->argumentCount()); PrintCallStack(context->backtrace()); return QScriptValue(); } Transform This = qscriptvalue_cast<Transform>(context->thisObject()); Transform rhs = qscriptvalue_cast<Transform>(context->argument(0)); Transform ret = This.Mul(rhs); return qScriptValueFromValue(engine, ret); }
static QScriptValue Capsule_Intersects_Polyhedron_const(QScriptContext *context, QScriptEngine *engine) { if (context->argumentCount() != 1) { printf("Error! Invalid number of arguments passed to function Capsule_Intersects_Polyhedron_const in file %s, line %d!\nExpected 1, but got %d!\n", __FILE__, __LINE__, context->argumentCount()); PrintCallStack(context->backtrace()); return QScriptValue(); } Capsule This = qscriptvalue_cast<Capsule>(context->thisObject()); Polyhedron polyhedron = qscriptvalue_cast<Polyhedron>(context->argument(0)); bool ret = This.Intersects(polyhedron); return qScriptValueFromValue(engine, ret); }
static QScriptValue Transform_SetOrientation_selector(QScriptContext *context, QScriptEngine *engine) { if (context->argumentCount() == 1 && QSVIsOfType<float3x3>(context->argument(0))) return Transform_SetOrientation_float3x3(context, engine); if (context->argumentCount() == 1 && QSVIsOfType<Quat>(context->argument(0))) return Transform_SetOrientation_Quat(context, engine); printf("Transform_SetOrientation_selector failed to choose the right function to call in file %s, line %d!\n", __FILE__, __LINE__); PrintCallStack(context->backtrace()); return QScriptValue(); }
static QScriptValue Capsule_ctor(QScriptContext *context, QScriptEngine *engine) { if (context->argumentCount() == 0) return Capsule_Capsule(context, engine); if (context->argumentCount() == 2 && QSVIsOfType<LineSegment>(context->argument(0)) && QSVIsOfType<float>(context->argument(1))) return Capsule_Capsule_LineSegment_float(context, engine); if (context->argumentCount() == 3 && QSVIsOfType<float3>(context->argument(0)) && QSVIsOfType<float3>(context->argument(1)) && QSVIsOfType<float>(context->argument(2))) return Capsule_Capsule_float3_float3_float(context, engine); printf("Capsule_ctor failed to choose the right function to call! Did you use 'var x = Capsule();' instead of 'var x = new Capsule();'?\n"); PrintCallStack(context->backtrace()); return QScriptValue(); }
static QScriptValue Transform_Transform(QScriptContext *context, QScriptEngine *engine) { if (context->argumentCount() != 0) { printf("Error! Invalid number of arguments passed to function Transform_Transform in file %s, line %d!\nExpected 0, but got %d!\n", __FILE__, __LINE__, context->argumentCount()); PrintCallStack(context->backtrace()); return QScriptValue(); } Transform ret; return qScriptValueFromValue(engine, ret); }
static QScriptValue LCG_Seed_u32_u32_u32_u32(QScriptContext *context, QScriptEngine *engine) { if (context->argumentCount() != 4) { printf("Error! Invalid number of arguments passed to function LCG_Seed_u32_u32_u32_u32 in file %s, line %d!\nExpected 4, but got %d!\n", __FILE__, __LINE__, context->argumentCount()); PrintCallStack(context->backtrace()); return QScriptValue(); } LCG This = qscriptvalue_cast<LCG>(context->thisObject()); u32 seed = qscriptvalue_cast<u32>(context->argument(0)); u32 multiplier = qscriptvalue_cast<u32>(context->argument(1)); u32 increment = qscriptvalue_cast<u32>(context->argument(2)); u32 modulus = qscriptvalue_cast<u32>(context->argument(3)); This.Seed(seed, multiplier, increment, modulus); ToExistingScriptValue_LCG(engine, This, context->thisObject()); return QScriptValue(); }
static QScriptValue Capsule_Distance_selector(QScriptContext *context, QScriptEngine *engine) { if (context->argumentCount() == 1 && QSVIsOfType<float3>(context->argument(0))) return Capsule_Distance_float3_const(context, engine); if (context->argumentCount() == 1 && QSVIsOfType<Plane>(context->argument(0))) return Capsule_Distance_Plane_const(context, engine); if (context->argumentCount() == 1 && QSVIsOfType<Sphere>(context->argument(0))) return Capsule_Distance_Sphere_const(context, engine); if (context->argumentCount() == 1 && QSVIsOfType<Ray>(context->argument(0))) return Capsule_Distance_Ray_const(context, engine); if (context->argumentCount() == 1 && QSVIsOfType<Line>(context->argument(0))) return Capsule_Distance_Line_const(context, engine); if (context->argumentCount() == 1 && QSVIsOfType<LineSegment>(context->argument(0))) return Capsule_Distance_LineSegment_const(context, engine); if (context->argumentCount() == 1 && QSVIsOfType<Capsule>(context->argument(0))) return Capsule_Distance_Capsule_const(context, engine); printf("Capsule_Distance_selector failed to choose the right function to call in file %s, line %d!\n", __FILE__, __LINE__); PrintCallStack(context->backtrace()); return QScriptValue(); }
static QScriptValue LCG_MaxInt_const(QScriptContext *context, QScriptEngine *engine) { if (context->argumentCount() != 0) { printf("Error! Invalid number of arguments passed to function LCG_MaxInt_const in file %s, line %d!\nExpected 0, but got %d!\n", __FILE__, __LINE__, context->argumentCount()); PrintCallStack(context->backtrace()); return QScriptValue(); } LCG This = qscriptvalue_cast<LCG>(context->thisObject()); u32 ret = This.MaxInt(); return qScriptValueFromValue(engine, ret); }
static QScriptValue Capsule_Intersects_selector(QScriptContext *context, QScriptEngine *engine) { if (context->argumentCount() == 1 && QSVIsOfType<Ray>(context->argument(0))) return Capsule_Intersects_Ray_const(context, engine); if (context->argumentCount() == 1 && QSVIsOfType<Line>(context->argument(0))) return Capsule_Intersects_Line_const(context, engine); if (context->argumentCount() == 1 && QSVIsOfType<LineSegment>(context->argument(0))) return Capsule_Intersects_LineSegment_const(context, engine); if (context->argumentCount() == 1 && QSVIsOfType<Plane>(context->argument(0))) return Capsule_Intersects_Plane_const(context, engine); if (context->argumentCount() == 1 && QSVIsOfType<Sphere>(context->argument(0))) return Capsule_Intersects_Sphere_const(context, engine); if (context->argumentCount() == 1 && QSVIsOfType<Capsule>(context->argument(0))) return Capsule_Intersects_Capsule_const(context, engine); if (context->argumentCount() == 1 && QSVIsOfType<AABB>(context->argument(0))) return Capsule_Intersects_AABB_const(context, engine); if (context->argumentCount() == 1 && QSVIsOfType<OBB>(context->argument(0))) return Capsule_Intersects_OBB_const(context, engine); if (context->argumentCount() == 1 && QSVIsOfType<Triangle>(context->argument(0))) return Capsule_Intersects_Triangle_const(context, engine); if (context->argumentCount() == 1 && QSVIsOfType<Polygon>(context->argument(0))) return Capsule_Intersects_Polygon_const(context, engine); if (context->argumentCount() == 1 && QSVIsOfType<Frustum>(context->argument(0))) return Capsule_Intersects_Frustum_const(context, engine); if (context->argumentCount() == 1 && QSVIsOfType<Polyhedron>(context->argument(0))) return Capsule_Intersects_Polyhedron_const(context, engine); printf("Capsule_Intersects_selector failed to choose the right function to call in file %s, line %d!\n", __FILE__, __LINE__); PrintCallStack(context->backtrace()); return QScriptValue(); }
static QScriptValue LCG_Float_selector(QScriptContext *context, QScriptEngine *engine) { if (context->argumentCount() == 0) return LCG_Float(context, engine); if (context->argumentCount() == 2 && QSVIsOfType<float>(context->argument(0)) && QSVIsOfType<float>(context->argument(1))) return LCG_Float_float_float(context, engine); printf("LCG_Float_selector failed to choose the right function to call in file %s, line %d!\n", __FILE__, __LINE__); PrintCallStack(context->backtrace()); return QScriptValue(); }