/* pop_flow — только канонические pre-level маршруты и ветка scene 12. */ #include #include "tcheck.h" #include "pop_flow.h" TC_TEST(only_original_levels_have_pre_scenes) { uint8_t level; for (level = 0; level <= 14; level++) { pop_pre_cutscene_t scene = pop_flow_pre_cutscene(level, 60); if (level == 2 || level == 6) TC_EQ(scene, POP_PRE_2_6); else if (level == 4) TC_EQ(scene, POP_PRE_4); else if (level == 8) TC_EQ(scene, POP_PRE_8); else if (level == 9) TC_EQ(scene, POP_PRE_9); else if (level == 12) TC_EQ(scene, POP_PRE_12); else TC_EQ(scene, POP_PRE_NONE); } TC_EQ(pop_flow_pre_cutscene(15, 60), POP_PRE_NONE); } TC_TEST(scene_12_short_time_boundary) { TC_EQ(pop_flow_pre_cutscene(12, 6), POP_PRE_12); TC_EQ(pop_flow_pre_cutscene(12, 5), POP_PRE_12_SHORT); TC_EQ(pop_flow_pre_cutscene(12, 0), POP_PRE_12_SHORT); } TC_TEST(level_14_is_ending_without_number) { const pop_level_flow_t *flow = pop_flow_level(14); TC_TRUE(flow != 0); TC_FALSE(flow->show_level_number); TC_TRUE(flow->ending_rule); TC_TRUE(pop_flow_level(15) == 0); } TC_TEST(ending_room_is_exact) { TC_TRUE(pop_flow_is_ending(14, 5)); TC_FALSE(pop_flow_is_ending(14, 4)); TC_FALSE(pop_flow_is_ending(13, 5)); TC_FALSE(pop_flow_is_ending(15, 5)); } void main(void) { TC_RUN(only_original_levels_have_pre_scenes); TC_RUN(scene_12_short_time_boundary); TC_RUN(level_14_is_ending_without_number); TC_RUN(ending_room_is_exact); }