From bf313338c0cad7e6d546d8689afccf8aeb600bef Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Sun, 3 Jan 2021 14:44:29 +0000 Subject: [PATCH] Debug: Show cached sprite bounds in vehicle debug window --- src/table/newgrf_debug_data.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/table/newgrf_debug_data.h b/src/table/newgrf_debug_data.h index 236982acd7..956801bfcd 100644 --- a/src/table/newgrf_debug_data.h +++ b/src/table/newgrf_debug_data.h @@ -178,6 +178,10 @@ class NIHVehicle : public NIHelper { print(buffer); } + seprintf(buffer, lastof(buffer), " Cached sprite bounds: (%d, %d) to (%d, %d)", + v->sprite_seq_bounds.left, v->sprite_seq_bounds.top, v->sprite_seq_bounds.right, v->sprite_seq_bounds.bottom); + print(buffer); + if (HasBit(v->vehicle_flags, VF_SEPARATION_ACTIVE)) { std::vector progress_array = PopulateSeparationState(v); if (!progress_array.empty()) {