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.cpp35
1 files changed, 25 insertions, 10 deletions
diff --git a/src/game/GameView.cpp b/src/game/GameView.cpp
index 74a2b5a..7ba1fe7 100644
--- a/src/game/GameView.cpp
+++ b/src/game/GameView.cpp
@@ -1629,10 +1629,7 @@ void GameView::enableShiftBehaviour()
shiftBehaviour = true;
if(isMouseDown)
{
- if(!ctrlBehaviour)
- c->SetToolStrength(10.0f);
- else
- c->SetToolStrength(1.0f);
+ c->SetToolStrength(10.0f);
}
}
}
@@ -1681,7 +1678,7 @@ void GameView::enableCtrlBehaviour()
if(!shiftBehaviour)
c->SetToolStrength(.1f);
else
- c->SetToolStrength(1.0f);
+ c->SetToolStrength(10.0f);
}
}
}
@@ -1885,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;
@@ -1897,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;
@@ -1987,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);