@@ -126,7 +126,14 @@ BoxSorter::BoxSorter()
126126 }
127127
128128 BoxDetector box_detector (COLOR_RED, &env.console .overlay ());
129- box_detector.move_cursor (env.program_info (), env.console , context, dest_cursor.row +1 , dest_cursor.column , holding_pokemon);
129+ box_detector.move_cursor (
130+ env.program_info (),
131+ env.console ,
132+ context,
133+ (uint8_t )dest_cursor.row + 1 ,
134+ (uint8_t )dest_cursor.column ,
135+ holding_pokemon
136+ );
130137
131138 return dest_cursor;
132139}
@@ -278,7 +285,13 @@ void BoxSorter::program(SingleSwitchProgramEnvironment& env, ProControllerContex
278285 int num_empty_slots = 0 ;
279286 for (size_t row = 0 ; row < BOX_ROWS; row++){
280287 for (size_t column = 0 ; column < BOX_COLS; column++){
281- box_detector.move_cursor (env.program_info (), env.console , context, row+1 , column);
288+ box_detector.move_cursor (
289+ env.program_info (),
290+ env.console ,
291+ context,
292+ (uint8_t )row + 1 ,
293+ (uint8_t )column
294+ );
282295
283296 pbf_wait (context, 100ms); // wait some time for the pokemon info to be updated
284297 VideoSnapshot screen = env.console .video ().snapshot ();
@@ -297,12 +310,12 @@ void BoxSorter::program(SingleSwitchProgramEnvironment& env, ProControllerContex
297310 }
298311
299312 // XXX TODO: change code to use regional dex, both Lumiose and Hyperspace
300- int dex_number = dex_number_detector.dex_number ();
313+ uint16_t dex_number = dex_number_detector.dex_number ();
301314 std::string name_slug;
302315 // env.add_overlay_log(std::to_string(dex_number_detector.dex_type_color_ratio()));
303316 if (dex_number_detector.dex_type () == DexType::HYPERSPACE){
304317 name_slug = HYPERSPACE_DEX_SLUGS ()[dex_number-1 ];
305- dex_number += LUMIOSE_DEX_SLUGS ().size ();
318+ dex_number += ( uint16_t ) LUMIOSE_DEX_SLUGS ().size ();
306319 } else {
307320 name_slug = LUMIOSE_DEX_SLUGS ()[dex_number-1 ];
308321 }
0 commit comments