MCPcopy Create free account
hub / github.com/TombEngine/TombEngine / DrawLaraPathfinding

Function DrawLaraPathfinding

TombEngine/Game/control/box.cpp:168–198  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

166}
167
168void DrawLaraPathfinding(int boxIndex)
169{
170 if (boxIndex <= NO_VALUE || boxIndex >= g_Level.PathfindingBoxes.size())
171 return;
172
173 auto& currBox = g_Level.PathfindingBoxes[boxIndex];
174 auto index = currBox.overlapIndex;
175
176 // Current box color based on flags.
177 auto currentBoxColor = Vector3(0.0f, 1.0f, 1.0f);
178 if (currBox.flags & BLOCKABLE)
179 currentBoxColor = (currBox.flags & BLOCKED) ? Vector3(1.0f, 0.0f, 0.0f) : Vector3(0.0f, 1.0f, 0.0f);
180
181 DrawBox(boxIndex, currentBoxColor);
182
183 // Draw overlapping boxes.
184 while (true)
185 {
186 if (index >= g_Level.Overlaps.size())
187 break;
188
189 auto overlap = g_Level.Overlaps[index];
190
191 DrawBox(overlap.box, Vector3(1, 1, 0));
192
193 if (overlap.flags & OVERLAP_END_BIT)
194 break;
195 else
196 index++;
197 }
198}
199
200void DrawItemPathfinding(int itemNumber)
201{

Callers 1

DrawPathfindingDebugFunction · 0.85

Calls 3

DrawBoxFunction · 0.85
Vector3Function · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected