@@ -553,6 +553,9 @@ Include (-
553553 width_quarter
554554 height_sixth
555555 vertical_offset
556+ left_image
557+ right_image
558+ nautical
556559 ;
557560
558561 map_top = 0;
@@ -569,15 +572,16 @@ Include (-
569572 glk_window_get_size(graphwin, 0, gg_arguments);
570573 fullheight = gg_arguments-->0;
571574
572- ! let real-height be the height of the graphics window * 1.21
575+ ! let real-height be the height of the graphics window * 1.16
573576
574- ! This value is hand tuned (along with the 0.02 vertical_offset below
577+ ! This value is hand tuned (along with the 0.01 vertical_offset below)
575578 ! to minimize wasteful space at the top and bottom of the map
576579 ! while still looking reasonably good at all sizes and ratios.
577580 ! Looks less good on the yacht maps, though.
578581
579- ! REAL_NUMBER_TY_Divide(1210, 1000) is 1067114824
580- real_height = REAL_NUMBER_TY_Times(NUMBER_TY_to_REAL_NUMBER_TY(fullheight), 1067114824);
582+ ! REAL_NUMBER_TY_Divide(1160, 1000) is 1066695393
583+ real_height =
584+ REAL_NUMBER_TY_Times(NUMBER_TY_to_REAL_NUMBER_TY(fullheight), 1066695393);
581585 ratio = REAL_NUMBER_TY_Divide(real_ideal, real_height);
582586
583587 ! REAL_NUMBER_TY_Divide(722, 860) is 1062660473
@@ -604,13 +608,40 @@ Include (-
604608 {
605609 ! The window is wider than the map
606610
607- ! 0.02 REAL_NUMBER_TY_Divide(2, 100) is 1017370378
608- vertical_offset = REAL_NUMBER_TY_to_NUMBER_TY(REAL_NUMBER_TY_Times(scaled_height_real, 1017370378));
611+ ! 0.01 REAL_NUMBER_TY_Divide(1, 100) is 1008981770
612+ vertical_offset =
613+ REAL_NUMBER_TY_to_NUMBER_TY(REAL_NUMBER_TY_Times(scaled_height_real, 1008981770));
614+
615+ nautical = GetEitherOrProperty( real_location, (+ nautical +) );
616+
617+ ! the nautical map looks better if we nudge it down instead of up
618+ if (nautical)
619+ vertical_offset = -vertical_offset;
609620
610621 map_top = map_top - vertical_offset;
611622
612623 ! fill window with blue background colour
613624 glk_image_draw_scaled(graphwin, ResourceIDsOfFigures-->( (+ figure of background colour +) ), 0, 0, fullwidth, fullheight);
625+
626+ ! draw the padding images at the sides
627+ if (nautical)
628+ {
629+ left_image =
630+ ResourceIDsOfFigures-->( (+ Figure of nautical padding left +) );
631+ right_image =
632+ ResourceIDsOfFigures-->( (+ Figure of nautical padding right +) );
633+ }
634+ else
635+ {
636+ left_image = ResourceIDsOfFigures-->( (+ Figure of padding left +) );
637+ right_image = ResourceIDsOfFigures-->( (+ Figure of padding right +) );
638+
639+ }
640+
641+ glk_image_draw_scaled(graphwin, left_image, IntegerDivide(fullwidth - ideal_width, 2) - ideal_width, map_top, ideal_width, scaled_height);
642+
643+ glk_image_draw_scaled(graphwin, right_image, ideal_width + IntegerDivide(fullwidth - ideal_width, 2), map_top, ideal_width, scaled_height);
644+
614645 } else {
615646
616647 ! The window is narrower than the map
0 commit comments