Набор мелких исправлений и подготовка к реализации режима двух роботов

This commit is contained in:
2022-12-11 15:08:17 +03:00
parent e114ea0cf4
commit 6195891e57
4 changed files with 301 additions and 249 deletions

View File

@@ -166,14 +166,19 @@ static void showAll() {
}
// рисуем роботов
sprintf(tmp, "R1");
// image_insert_sprite(2 + (robot1.mz.is_up ? 0 : 2), (robot1.curr_zone * 5) + 2, tmp);
image_insert_sprite(2 + (robot1.mz.is_up ? 0 : 2),
(robot1.dx.current_zone * 5) + 2 + (robot1_offset_pos * 2),
tmp);
if (hla_robot1_en) {
sprintf(tmp, "R1");
image_insert_sprite(2 + (robot1.mz.is_up ? 0 : 2),
(robot1.dx.current_zone * 5) + 2 + (robot1_offset_pos * 2),
tmp);
}
// sprintf(tmp, "R2");
// image_insert_sprite(3 + (robot2.mz.is_up ? 0 : 2), (robot2.curr_zone * 5) + 2, tmp);
if (hla_robot2_en) {
sprintf(tmp, "R2");
image_insert_sprite(2 + (robot2.mz.is_up ? 0 : 2),
(robot2.dx.current_zone * 5) + 2 + (robot2_offset_pos * 2),
tmp);
}
for (const auto & r : buffer) {
write(sock_fd, r, COLS);