- if (!strat_infos.dump_enabled)
- return;
-
- printf_P(PSTR(" zone %s: "), zone->name);
-
- if (zone->flags & ZONE_F_DISC)
- printf_P(PSTR("DISC "));
- else if (zone->flags & ZONE_F_ZONE1)
- printf_P(PSTR("ZONE1 "));
- else if (zone->flags & ZONE_F_ZONE0)
- printf_P(PSTR("ZONE0 "));
-
- if (zone->flags & ZONE_F_BUSY)
- printf_P(PSTR("BUSY "));
- else
- printf_P(PSTR("FREE "));
-
- printf_P(PSTR("\r\n"));
-
- printf_P(PSTR(" lev=%d ckpt=(%d,%d) ltime=%d\r\n"),
- zone->level,
- zone->checkpoint_x, zone->checkpoint_y,
- zone->last_try_time);
-}
-
-void strat_dump_static_cols(void)
-{
- if (!strat_infos.dump_enabled)
- return;
-
- printf_P(PSTR(" static cols: l0=%d l1=%d l2=%d\r\n"),
- strat_infos.s_cols.flags & STATIC_COL_LINE0_DONE,
- strat_infos.s_cols.flags & STATIC_COL_LINE1_DONE,
- strat_infos.s_cols.flags & STATIC_COL_LINE2_DONE);
-}
-
-void strat_dump_col_disp(void)
-{
- if (!strat_infos.dump_enabled)
- return;
-
- printf_P(PSTR(" c1 cnt=%d ltt=%d\r\n"),
- strat_infos.c1.count, strat_infos.c1.last_try_time);
- printf_P(PSTR(" c2 cnt=%d ltt=%d\r\n"),
- strat_infos.c2.count, strat_infos.c2.last_try_time);
- printf_P(PSTR(" c3 cnt=%d ltt=%d\r\n"),
- strat_infos.c3.count, strat_infos.c3.last_try_time);
-}
-
-void strat_dump_lin_disp(void)
-{
- if (!strat_infos.dump_enabled)
- return;
- printf_P(PSTR(" l1 cnt=%d ltt=%d\r\n"),
- strat_infos.l1.count, strat_infos.l1.last_try_time);
- printf_P(PSTR(" l2 cnt=%d ltt=%d\r\n"),
- strat_infos.l2.count, strat_infos.l2.last_try_time);
-
-}
-
-void strat_dump_all_temples(void)
-{
- struct temple *temple;
- uint8_t i;
-
- if (!strat_infos.dump_enabled)
- return;
-
- for (i=0; i<MAX_TEMPLE; i++) {
- temple = &strat_infos.temple_list[i];
- if (!(temple->flags & TEMPLE_F_VALID))
- continue;
- strat_dump_temple(temple);
- }
-}
-
-void strat_dump_all_zones(void)
-{
- struct build_zone *zone;
- uint8_t i;
-
- if (!strat_infos.dump_enabled)
- return;
-
- for (i=0; i<MAX_ZONE; i++) {
- zone = &strat_infos.zone_list[i];
- if (!(zone->flags & ZONE_F_VALID))
- continue;
- strat_dump_zone(zone);
- }
-}
-
-/* display current information about the state of the game */
-void strat_dump_infos(const char *caller)
-{
- if (!strat_infos.dump_enabled)
- return;
-
- printf_P(PSTR("%s() dump strat infos:\r\n"), caller);
- strat_dump_static_cols();
- strat_dump_col_disp();
- strat_dump_lin_disp();
- strat_dump_all_temples();
- strat_dump_all_zones();
-}
-
-/* init current area state before a match. Dump update user conf
- * here */
-void strat_reset_infos(void)
-{
- uint8_t i;
-
- /* /!\ don't do a big memset() as there is static data */
- strat_infos.s_cols.flags = 0;
- strat_infos.c1.count = 5;
- strat_infos.c1.last_try_time = 0;
- strat_infos.c2.count = 5;
- strat_infos.c2.last_try_time = 0;
- strat_infos.c3.count = 5;
- strat_infos.c3.last_try_time = 0;
- strat_infos.l1.count = 1;
- strat_infos.l1.last_try_time = 0;
- strat_infos.l2.count = 1;
- strat_infos.l2.last_try_time = 0;
-
- strat_infos.taken_lintel = 0;
- strat_infos.col_in_boobs = 0;
- strat_infos.lazy_pickup_done = 0;
- strat_infos.i2c_loaded_skipped = 0;
-
- memset(strat_infos.temple_list, 0, sizeof(strat_infos.temple_list));
-
- for (i=0; i<MAX_ZONE; i++)
- strat_infos.zone_list[i].flags = ZONE_F_VALID;
- strat_infos.zone_list[ZONE_DISC_NUM].flags |= ZONE_F_DISC;
- strat_infos.zone_list[ZONE_1A_NUM].flags |= ZONE_F_ZONE1;
- strat_infos.zone_list[ZONE_1B_NUM].flags |= ZONE_F_ZONE1;
- strat_infos.zone_list[ZONE_0A_NUM].flags |= ZONE_F_ZONE0;
- strat_infos.zone_list[ZONE_0B_NUM].flags |= ZONE_F_ZONE0;
-
- strat_set_bounding_box();
-
- /* set lintel position, depending on color */
- if (mainboard.our_color == I2C_COLOR_RED) {
- strat_infos.l1.x = 912;
- strat_infos.l2.x = 1312;
- }
- else {
- strat_infos.l1.x = 888;
- strat_infos.l2.x = 1288;
- }