summaryrefslogtreecommitdiff
path: root/src/game/GameView.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/GameView.cpp')
-rw-r--r--src/game/GameView.cpp28
1 files changed, 23 insertions, 5 deletions
diff --git a/src/game/GameView.cpp b/src/game/GameView.cpp
index bb76c97..7ba1fe7 100644
--- a/src/game/GameView.cpp
+++ b/src/game/GameView.cpp
@@ -1882,11 +1882,22 @@ void GameView::OnDraw()
{
if(showDebug)
{
- sampleInfo << c->ElementResolve(sample.particle.type);
- if(sample.particle.ctype > 0 && sample.particle.ctype < PT_NUM)
- sampleInfo << " (" << c->ElementResolve(sample.particle.ctype) << ")";
+ int ctype = sample.particle.ctype;
+ if (sample.particle.type == PT_PIPE || sample.particle.type == PT_PPIP)
+ ctype = sample.particle.tmp;
+
+ if (sample.particle.type == PT_LAVA && ctype > 0 && ctype < PT_NUM)
+ sampleInfo << "Molten " << c->ElementResolve(ctype);
+ else if((sample.particle.type == PT_PIPE || sample.particle.type == PT_PPIP) && ctype > 0 && ctype < PT_NUM)
+ sampleInfo << c->ElementResolve(sample.particle.type) << " with " << c->ElementResolve(ctype);
else
- sampleInfo << " ()";
+ {
+ sampleInfo << c->ElementResolve(sample.particle.type);
+ if(ctype > 0 && ctype < PT_NUM)
+ sampleInfo << " (" << c->ElementResolve(ctype) << ")";
+ else
+ sampleInfo << " ()";
+ }
sampleInfo << ", Temp: " << std::fixed << sample.particle.temp -273.15f;
sampleInfo << ", Life: " << sample.particle.life;
sampleInfo << ", Tmp: " << sample.particle.tmp;
@@ -1894,8 +1905,10 @@ void GameView::OnDraw()
}
else
{
- if(sample.particle.type == PT_LAVA && sample.particle.ctype > 0 && sample.particle.ctype < PT_NUM)
+ if (sample.particle.type == PT_LAVA && sample.particle.ctype > 0 && sample.particle.ctype < PT_NUM)
sampleInfo << "Molten " << c->ElementResolve(sample.particle.ctype);
+ else if((sample.particle.type == PT_PIPE || sample.particle.type == PT_PPIP) && sample.particle.tmp > 0 && sample.particle.tmp < PT_NUM)
+ sampleInfo << c->ElementResolve(sample.particle.type) << " with " << c->ElementResolve(sample.particle.tmp);
else
sampleInfo << c->ElementResolve(sample.particle.type);
sampleInfo << ", Temp: " << std::fixed << sample.particle.temp -273.15f;
@@ -1984,6 +1997,11 @@ void GameView::OnDraw()
#endif
fpsInfo << "FPS: " << std::fixed << ui::Engine::Ref().GetFps();
+ if (showDebug)
+ fpsInfo << " Parts: " << sample.NumParts;
+ if (ren->GetGridSize())
+ fpsInfo << " [GRID: " << ren->GetGridSize() << "]";
+
textWidth = Graphics::textwidth((char*)fpsInfo.str().c_str());
g->fillrect(12, 12, textWidth+8, 15, 0, 0, 0, 255*0.5);
g->drawtext(16, 16, (const char*)fpsInfo.str().c_str(), 32, 216, 255, 255*0.75);