@@ -59,16 +59,14 @@ void Draw::OnMenu()
59
59
{
60
60
if (ImGui::BeginMenu (" Draw" ))
61
61
{
62
- #ifndef TR8
63
62
ImGui::MenuItem (" Draw instances" , nullptr , &m_drawInstances);
63
+ #ifndef TR8
64
64
ImGui::MenuItem (" Draw enemy route" , nullptr , &m_drawEnemyRouting);
65
65
#endif
66
-
67
66
ImGui::MenuItem (" Draw markup" , nullptr , &m_drawMarkUp);
68
67
ImGui::MenuItem (" Draw collision" , nullptr , &m_drawCollision);
69
68
ImGui::MenuItem (" Draw portals" , nullptr , &m_drawPortals);
70
69
ImGui::MenuItem (" Draw signals" , nullptr , &m_drawSignals);
71
-
72
70
#ifdef TR8
73
71
ImGui::MenuItem (" Draw triggers" , nullptr , &m_drawTriggers);
74
72
#endif
@@ -82,6 +80,11 @@ void Draw::OnFrame()
82
80
auto gameTracker = Game::GetGameTracker ();
83
81
auto level = gameTracker->level ;
84
82
83
+ // Default font in Underworld is a bit too large
84
+ #ifdef TR8
85
+ Font::SetScale (0 .6f , 0 .6f );
86
+ #endif
87
+
85
88
if (m_drawInstances || m_drawEnemyRouting)
86
89
{
87
90
DrawInstances ();
@@ -167,7 +170,6 @@ void Draw::DrawInstances()
167
170
168
171
void Draw::DrawInstance (Instance* instance)
169
172
{
170
- #ifndef TR8
171
173
auto name = instance->object ->name ;
172
174
auto data = (ObjectData*)instance->data ;
173
175
@@ -208,6 +210,7 @@ void Draw::DrawInstance(Instance* instance)
208
210
font->Print (" Family: %d" , data->family );
209
211
}
210
212
213
+ #ifndef TR8
211
214
// Draw enemy health
212
215
if (m_drawHealth && data && data->family == 0xDAF0 )
213
216
{
@@ -218,6 +221,7 @@ void Draw::DrawInstance(Instance* instance)
218
221
font->SetCursor (position.x , position.y );
219
222
font->Print (" Health: %g" , extraData->m_health .m_hitPoints );
220
223
}
224
+ #endif
221
225
222
226
// Draw animations
223
227
if (m_drawAnimation)
@@ -245,7 +249,6 @@ void Draw::DrawInstance(Instance* instance)
245
249
}
246
250
}
247
251
}
248
- #endif
249
252
}
250
253
251
254
void Draw::DrawEnemyRoute (Instance* instance)
@@ -300,7 +303,6 @@ void Draw::DrawMarkUp()
300
303
position += &box->instance ->position ;
301
304
}
302
305
303
- #ifndef TR8
304
306
TRANS_RotTransPersVectorf (&position, &position);
305
307
306
308
// Check if the text is on screen
@@ -309,7 +311,6 @@ void Draw::DrawMarkUp()
309
311
font->SetCursor (position.x , position.y );
310
312
font->PrintFormatted (FlagsToString (box->flags ).c_str ());
311
313
}
312
- #endif
313
314
314
315
// Draw the poly line
315
316
if (markup->polyLine )
@@ -410,7 +411,6 @@ void Draw::DrawPortals(Level* level)
410
411
position += &portal->max ;
411
412
position /= 2 ;
412
413
413
- #ifndef TR8
414
414
TRANS_RotTransPersVectorf (&position, &position);
415
415
416
416
// Check if the portal is on screen
@@ -420,7 +420,6 @@ void Draw::DrawPortals(Level* level)
420
420
font->SetCursor (position.x , position.y );
421
421
font->PrintCentered (" Portal to %s" , portal->tolevelname );
422
422
}
423
- #endif
424
423
425
424
// Draw the portal bounds
426
425
DrawPlane (&portal->min , &portal->max , RGBA (0 , 0 , 255 , 10 ));
0 commit comments