MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / add_object

Function add_object

ogsr_engine/xrGame/level_script.cpp:954–971  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

952}
953
954DBG_ScriptObject* add_object(u16 id, DebugRenderType type)
955{
956 remove_object(id);
957 DBG_ScriptObject* dbg_obj{};
958
959 switch (type)
960 {
961 case eDBGSphere: dbg_obj = xr_new<DBG_ScriptSphere>(); break;
962 case eDBGBox: dbg_obj = xr_new<DBG_ScriptBox>(); break;
963 case eDBGLine: dbg_obj = xr_new<DBG_ScriptLine>(); break;
964 default: R_ASSERT(false, "Wrong debug object type used!");
965 }
966
967 R_ASSERT(dbg_obj);
968 Level().getScriptRenderQueue()->emplace(mk_pair(id, dbg_obj));
969
970 return dbg_obj;
971}
972
973
974static void shader_set_custom_param_vector(const char* key, const Fvector4 v) { shader_exports.set_custom_params(key, v); }

Callers

nothing calls this directly

Calls 3

remove_objectFunction · 0.85
emplaceMethod · 0.80
getScriptRenderQueueMethod · 0.80

Tested by

no test coverage detected