From 0bf427b8433de00d213877a71c63c6075d50fa12 Mon Sep 17 00:00:00 2001 From: Gin <> Date: Fri, 13 Oct 2023 19:40:47 -0700 Subject: [PATCH] add more logging for pokecenter detection --- .../Source/PokemonSV/Programs/PokemonSV_Navigation.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SerialPrograms/Source/PokemonSV/Programs/PokemonSV_Navigation.cpp b/SerialPrograms/Source/PokemonSV/Programs/PokemonSV_Navigation.cpp index aca227142..f9dfa6167 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/PokemonSV_Navigation.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/PokemonSV_Navigation.cpp @@ -25,7 +25,7 @@ #include "PokemonSV_Navigation.h" #include - +#include namespace PokemonAutomation{ namespace NintendoSwitch{ namespace PokemonSV{ @@ -523,6 +523,9 @@ bool detect_closest_pokecenter_and_move_map_cursor_there(const ProgramInfo& info } // Find the detected PokeCenter icon closest to the screen center (where player character is on the map). for(const auto& box: pokecenter_watcher.found_locations()){ + std::ostringstream os; + os << "Found pokecenter at box: x=" << box.x << ", y=" << box.y << ", width=" << box.width << ", height=" << box.height << std::endl; + console.log(os.str()); const double loc_x = (box.x + box.width/2) * screen_width; const double loc_y = (box.y + box.height/2) * screen_height; const double x_diff = loc_x - center_x, y_diff = loc_y - center_y;