From 4be93b4380f365e4a617d71d068755bcac489dda Mon Sep 17 00:00:00 2001 From: xolatile Date: Sat, 25 May 2024 13:57:13 -0400 Subject: [PATCH] Added lake corners... --- source/world.adb | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/source/world.adb b/source/world.adb index bd0e566..849e44f 100644 --- a/source/world.adb +++ b/source/world.adb @@ -36,13 +36,6 @@ package body world is ------------------------------------------------------------------------------------------ - procedure earth_to_water_transition is - begin - null; - end earth_to_water_transition; - - ------------------------------------------------------------------------------------------ - procedure configure is begin core.echo (core.comment, "Configuring world components..."); @@ -128,6 +121,29 @@ package body world is end loop; end loop; end loop; + -- + for x in -lake_reach - 1 .. lake_reach + 2 loop + for y in -lake_reach - 1 .. lake_reach + 2 loop + declare matrix : array (0 .. 1, 0 .. 1) of natural := (others => (others => 0)); + begin + matrix (0, 0) := boolean'pos (map.tiles (lake_x + x - 1, lake_y + y - 1) not in 18 .. 23); + matrix (1, 0) := boolean'pos (map.tiles (lake_x + x, lake_y + y - 1) not in 18 .. 23); + matrix (0, 1) := boolean'pos (map.tiles (lake_x + x - 1, lake_y + y) not in 18 .. 23); + matrix (1, 1) := boolean'pos (map.tiles (lake_x + x, lake_y + y) not in 18 .. 23); + -- + if matrix = ((1, 1), (1, 0)) then + map.tiles (lake_x + x - 1, lake_y + y - 1) := 28; + elsif matrix = ((1, 1), (0, 1)) then + map.tiles (lake_x + x - 1, lake_y + y) := 30; + elsif matrix = ((1, 0), (1, 1)) then + map.tiles (lake_x + x, lake_y + y - 1) := 29; + elsif matrix = ((0, 1), (1, 1)) then + map.tiles (lake_x + x, lake_y + y) := 31; + --~elsif matrix = ((1, 1), (1, 0)) then + end if; + end; + end loop; + end loop; end; end loop; --