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

Method draw_objects

ogsr_engine/xrGame/level_graph_debug.cpp:312–464  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

310}
311
312void CLevelGraph::draw_objects(const int& vertex_id)
313{
314 if (!ai().get_alife())
315 return;
316
317 const float radius = .0105f;
318 const u32 color = D3DCOLOR_XRGB(255, 0, 0);
319 const CGameGraph& graph = ai().game_graph();
320 CGameFont& font = *HUD().Font().pFontDI;
321 Fvector position = convert_position(graph.vertex(vertex_id)->game_point());
322
323 font.SetColor(D3DCOLOR_XRGB(255, 255, 0));
324
325 bool show_text = true;
326 for (;;)
327 {
328 Fvector4 temp;
329 Device.mFullTransform.transform(temp, position);
330 font.OutSetI(temp.x, -temp.y);
331 font.SetHeightI(.05f / _sqrt(temp.w));
332
333 if (temp.z < 0.f)
334 {
335 show_text = false;
336 break;
337 }
338
339 if (temp.w < 0.f)
340 {
341 show_text = false;
342 break;
343 }
344
345 if (temp.x < -1.f)
346 {
347 show_text = false;
348 break;
349 }
350
351 if (temp.x > 1.f)
352 {
353 show_text = false;
354 break;
355 }
356
357 if (temp.y < -1.f)
358 {
359 show_text = false;
360 break;
361 }
362
363 if (temp.x > 1.f)
364 {
365 show_text = false;
366 break;
367 }
368
369 break;

Callers

nothing calls this directly

Calls 15

_sqrtFunction · 0.85
fis_zeroFunction · 0.85
get_alifeMethod · 0.80
FontMethod · 0.80
OutSetIMethod · 0.80
SetHeightIMethod · 0.80
movementMethod · 0.80
draw_aabbMethod · 0.80
vertexMethod · 0.45
SetColorMethod · 0.45
transformMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected