Skip to content

Commit 08f57e1

Browse files
Wuzzy2nerzhul
authored andcommittedJun 23, 2017
Show param1 and param2 in debug screen (#6031)
* Show param1 and param2 in debug screen * Add units and some formatting to debug screen * Minor refactor of param1/param2 debug display
1 parent 8dd548c commit 08f57e1

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed
 

‎src/game.cpp

+10-8
Original file line numberDiff line numberDiff line change
@@ -4303,17 +4303,17 @@ void Game::updateGui(const RunStats &stats, f32 dtime, const CameraOrientation &
43034303
std::ostringstream os(std::ios_base::binary);
43044304
os << std::fixed
43054305
<< PROJECT_NAME_C " " << g_version_hash
4306-
<< " FPS = " << fps
4307-
<< " (R: range_all=" << draw_control->range_all << ")"
4306+
<< "; " << fps << " FPS"
4307+
<< ", (R: range_all=" << draw_control->range_all << ")"
43084308
<< std::setprecision(0)
4309-
<< " drawtime = " << drawtime_avg
4309+
<< ", drawtime = " << drawtime_avg << " ms"
43104310
<< std::setprecision(1)
43114311
<< ", dtime_jitter = "
43124312
<< (stats.dtime_jitter.max_fraction * 100.0) << " %"
43134313
<< std::setprecision(1)
43144314
<< ", v_range = " << draw_control->wanted_range
43154315
<< std::setprecision(3)
4316-
<< ", RTT = " << client->getRTT();
4316+
<< ", RTT = " << client->getRTT() << " s";
43174317
setStaticText(guitext, utf8_to_wide(os.str()).c_str());
43184318
guitext->setVisible(true);
43194319
} else {
@@ -4334,7 +4334,7 @@ void Game::updateGui(const RunStats &stats, f32 dtime, const CameraOrientation &
43344334
<< "(" << (player_position.X / BS)
43354335
<< ", " << (player_position.Y / BS)
43364336
<< ", " << (player_position.Z / BS)
4337-
<< ") (yaw=" << (wrapDegrees_0_360(cam.camera_yaw))
4337+
<< ") (yaw=" << (wrapDegrees_0_360(cam.camera_yaw)) << "°"
43384338
<< " " << yawToDirectionString(cam.camera_yaw)
43394339
<< ") (seed = " << ((u64)client->getMapSeed())
43404340
<< ")";
@@ -4345,9 +4345,11 @@ void Game::updateGui(const RunStats &stats, f32 dtime, const CameraOrientation &
43454345
MapNode n = map.getNodeNoEx(runData.pointed_old.node_undersurface);
43464346
if (n.getContent() != CONTENT_IGNORE && nodedef->get(n).name != "unknown") {
43474347
const ContentFeatures &features = nodedef->get(n);
4348-
os << " (pointing_at = " << nodedef->get(n).name
4349-
<< " - " << features.tiledef[0].name.c_str()
4350-
<< ")";
4348+
os << " (pointing_at = \"" << nodedef->get(n).name
4349+
<< "\", param1 = " << (u64) n.getParam1()
4350+
<< ", param2 = " << (u64) n.getParam2()
4351+
<< ", tiledef[0] = \"" << features.tiledef[0].name.c_str()
4352+
<< "\")";
43514353
}
43524354
}
43534355

0 commit comments

Comments
 (0)
Please sign in to comment.