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

Method draw_stalkers

ogsr_engine/xrGame/level_graph_debug.cpp:158–310  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

156}
157
158void CLevelGraph::draw_stalkers(const int& vertex_id)
159{
160 if (!ai().get_alife())
161 return;
162
163 const float radius = .0105f;
164 const u32 color = D3DCOLOR_XRGB(255, 0, 0);
165 const CGameGraph& graph = ai().game_graph();
166 CGameFont& font = *HUD().Font().pFontDI;
167 Fvector position = convert_position(graph.vertex(vertex_id)->game_point());
168
169 font.SetColor(D3DCOLOR_XRGB(255, 255, 0));
170
171 bool show_text = true;
172 for (;;)
173 {
174 Fvector4 temp;
175 Device.mFullTransform.transform(temp, position);
176 font.OutSetI(temp.x, -temp.y);
177 font.SetHeightI(.05f / _sqrt(temp.w));
178
179 if (temp.z < 0.f)
180 {
181 show_text = false;
182 break;
183 }
184
185 if (temp.w < 0.f)
186 {
187 show_text = false;
188 break;
189 }
190
191 if (temp.x < -1.f)
192 {
193 show_text = false;
194 break;
195 }
196
197 if (temp.x > 1.f)
198 {
199 show_text = false;
200 break;
201 }
202
203 if (temp.y < -1.f)
204 {
205 show_text = false;
206 break;
207 }
208
209 if (temp.x > 1.f)
210 {
211 show_text = false;
212 break;
213 }
214
215 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