@@ -682,17 +682,7 @@ ubyte show_mission_people_stats(struct ScreenBox *box)
682682
683683void init_debrief_screen_boxes (void )
684684{
685- ScrCoord scr_h , start_x , start_y ;
686- short space_w , space_h , border ;
687-
688- // Border value represents how much the box background goes
689- // out of the box area.
690- border = 3 ;
691- #ifdef EXPERIMENTAL_MENU_CENTER_H
692- scr_h = global_apps_bar_box .Y ;
693- #else
694- scr_h = 432 ;
695- #endif
685+ ScrCoord start_x , start_y ;
696686
697687 init_screen_box (& debrief_mission_box , 7u , 72u , 518u , 172 , 6 );
698688 debrief_mission_box .SpecialDrawFn = show_mission_stats ;
@@ -702,22 +692,17 @@ void init_debrief_screen_boxes(void)
702692
703693 // Reposition the components to current resolution
704694
695+ // For this screen, we will just align to other pre-positioned boxes;
696+ // No need to compute positions from scratch
705697 start_x = heading_box .X ;
706- // On the X axis, we're going for aligning below heading box, to both left and right
707- space_w = heading_box .Width - debrief_mission_box .Width - world_city_info_box .Width ;
708-
709- start_y = heading_box .Y + heading_box .Height ;
710- // On the top, we're aligning to spilled border of previous box; same goes inside.
711- // But on the bottom, we're aligning to hard border, without spilling. To compensate
712- // for that, add pixels for such border to the space.
713- space_h = scr_h - start_y - world_city_info_box .Height + border ;
698+ start_y = world_city_info_box .Y ;
714699
715700 // Expect world_city_info_box to be already set
716701 debrief_mission_box .X = start_x ;
717- debrief_mission_box .Y = world_city_info_box . Y ;
702+ debrief_mission_box .Y = start_y ;
718703
719704 debrief_people_box .X = start_x ;
720- debrief_people_box .Y = world_city_info_box . Y + world_city_info_box .Height - debrief_people_box .Height ;
705+ debrief_people_box .Y = start_y + world_city_info_box .Height - debrief_people_box .Height ;
721706}
722707
723708void reset_debrief_screen_boxes_flags (void )
0 commit comments