From 7300a38ce67a320ee0e21c985804c99b5a14acc2 Mon Sep 17 00:00:00 2001 From: Richard Fine Date: Tue, 1 Jan 2019 19:58:23 +0000 Subject: [PATCH] Show peep coordinates in debug tab As a first debug stat to show, display a peep's current coordinates in the debug tab --- src/openrct2-ui/windows/Guest.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/openrct2-ui/windows/Guest.cpp b/src/openrct2-ui/windows/Guest.cpp index 1ee0d34c19..9f3b7c8054 100644 --- a/src/openrct2-ui/windows/Guest.cpp +++ b/src/openrct2-ui/windows/Guest.cpp @@ -2330,4 +2330,16 @@ void window_guest_debug_paint(rct_window* w, rct_drawpixelinfo* dpi) window_guest_thoughts_tab_paint(w, dpi); window_guest_inventory_tab_paint(w, dpi); window_guest_debug_tab_paint(w, dpi); + + rct_peep* peep = GET_PEEP(w->number); + + // cx + int32_t x = w->x + window_guest_debug_widgets[WIDX_PAGE_BACKGROUND].left + 4; + // dx + int32_t y = w->y + window_guest_debug_widgets[WIDX_PAGE_BACKGROUND].top + 4; + + char buffer[4096]; + snprintf(buffer, 4096, "Position: %i, %i, %i", peep->x, peep->y, peep->z); + gfx_draw_string(dpi, buffer, COLOUR_BLACK, x, y); + y += LIST_ROW_HEIGHT; }