From f2dede1a1693dbfcf313ac0b2ad063158396ecf8 Mon Sep 17 00:00:00 2001 From: xolatile Date: Thu, 16 May 2024 15:28:02 -0400 Subject: [PATCH] Added landmark descriptions and names, and 4 new ones... --- source/world.adb | 28 +++++++++++------ source/world.ads | 49 ++++++++++++++++------------- sprite/world/landmark/grave.png | Bin 0 -> 184 bytes sprite/world/landmark/humble_grave.png | Bin 0 -> 195 bytes sprite/world/landmark/royal_grave.png | Bin 0 -> 202 bytes sprite/world/landmark/wooden_wide_sign.png | Bin 0 -> 189 bytes 6 files changed, 45 insertions(+), 32 deletions(-) create mode 100644 sprite/world/landmark/grave.png create mode 100644 sprite/world/landmark/humble_grave.png create mode 100644 sprite/world/landmark/royal_grave.png create mode 100644 sprite/world/landmark/wooden_wide_sign.png diff --git a/source/world.adb b/source/world.adb index e47af00..e2e7bee 100644 --- a/source/world.adb +++ b/source/world.adb @@ -186,16 +186,16 @@ package body world is v => v, width => core.base, height => core.base); - --~if core.cursor.x > offset.x + (horizontal - core.camera.x ) * core.base * core.zoom - 6 - --~and core.cursor.x < offset.x + (horizontal - core.camera.x + 1) * core.base * core.zoom + 6 - --~and core.cursor.y > offset.y + (vertical - core.camera.y ) * core.base * core.zoom - 6 - --~and core.cursor.y < offset.y + (vertical - core.camera.y + 1) * core.base * core.zoom + 6 - --~and core.cursor_mode = 1 - --~and not ui.prioritize then - --~core.camera.x := horizontal; - --~core.camera.y := vertical; - --~core.cursor_mode := 0; - --~end if; + if core.cursor.x > offset.x + (horizontal - core.camera.x ) * core.base * core.zoom - 6 + and core.cursor.x < offset.x + (horizontal - core.camera.x + 1) * core.base * core.zoom + 6 + and core.cursor.y > offset.y + (vertical - core.camera.y ) * core.base * core.zoom - 6 + and core.cursor.y < offset.y + (vertical - core.camera.y + 1) * core.base * core.zoom + 6 + and core.cursor_mode = 1 + and not ui.prioritize then + core.camera.x := horizontal; + core.camera.y := vertical; + core.cursor_mode := 0; + end if; end if; end loop; end loop; @@ -205,6 +205,14 @@ package body world is core.draw (data => landmarks (landmark_index'val (map.landmarks (index).index)), x => offset.x + (map.landmarks (index).x - core.camera.x) * core.base * core.zoom, y => offset.y + (map.landmarks (index).y - core.camera.y) * core.base * core.zoom); + if core.cursor_inside (x => offset.x + (map.landmarks (index).x - core.camera.x) * core.base * core.zoom, + y => offset.y + (map.landmarks (index).y - core.camera.y) * core.base * core.zoom, + width => landmarks (landmark_index'val (map.landmarks (index).index)).width, + height => landmarks (landmark_index'val (map.landmarks (index).index)).height) + and core.cursor_mode = 2 + and not ui.prioritize then + core.write_text_box (trait (landmark_index'val (map.landmarks (index).index)).name); + end if; end if; end loop; -- diff --git a/source/world.ads b/source/world.ads index b718f57..138fa8e 100644 --- a/source/world.ads +++ b/source/world.ads @@ -18,10 +18,11 @@ package world is dead_tree, mossy_rock, palm_tree, pine_tree, pine_forest, reeds, rock, snowed_pine_tree, snowed_rock, spiky_rock, wooden_sign, wooden_arrow_sign, rune_stone, snowed_rune_stone, mossy_rune_stone, snowed_pine_forest, hyacinths, orchids, - asters, daffodils + asters, daffodils, royal_grave, grave, humble_grave, wooden_wide_sign ); type landmark_trait is record + name : core.short_string; spawn : biome; clip : boolean; frames : integer; @@ -57,30 +58,34 @@ package world is tiles : core.sprite; landmarks : array (landmark_index) of core.sprite; - landmark_limit : constant integer := 120; + landmark_limit : constant integer := 360; landmark_count : constant natural := landmark_index'pos (landmark_index'last) + 1; trait : constant array (landmark_index) of landmark_trait := ( - dead_tree => (ash, true, 1), - mossy_rock => (swamp, true, 1), - palm_tree => (sand, true, 4), - pine_tree => (grass, true, 4), - pine_forest => (grass, true, 4), - reeds => (swamp, false, 4), - rock => (sand, true, 1), - snowed_pine_tree => (snow, true, 4), - snowed_rock => (snow, true, 1), - spiky_rock => (ash, true, 1), - wooden_sign => (grass, false, 1), - wooden_arrow_sign => (grass, false, 1), - rune_stone => (grass, true, 4), - snowed_rune_stone => (snow, true, 1), - mossy_rune_stone => (swamp, true, 4), - snowed_pine_forest => (snow, true, 4), - hyacinths => (grass, false, 1), - orchids => (grass, false, 1), - asters => (grass, false, 1), - daffodils => (grass, false, 1) + dead_tree => ("Dead Tree ", ash, true, 1), + mossy_rock => ("Mossy Rock ", swamp, true, 1), + palm_tree => ("Palm Tree ", sand, true, 4), + pine_tree => ("Pine Tree ", grass, true, 4), + pine_forest => ("Pine Forest ", grass, true, 4), + reeds => ("Reeds ", swamp, false, 4), + rock => ("Rock ", sand, true, 1), + snowed_pine_tree => ("Snowed Pine Tree ", snow, true, 4), + snowed_rock => ("Snowed Rock ", snow, true, 1), + spiky_rock => ("Spiky Rock ", ash, true, 1), + wooden_sign => ("Wooden Sign ", grass, false, 1), + wooden_arrow_sign => ("Wooden Arrow Sign ", grass, false, 1), + rune_stone => ("Rune Stone ", grass, true, 4), + snowed_rune_stone => ("Snowed Rune Stone ", snow, true, 1), + mossy_rune_stone => ("Mossy Rune Stone ", swamp, true, 4), + snowed_pine_forest => ("Snowed Pine Forest ", snow, true, 4), + hyacinths => ("Hyacinths ", grass, false, 1), + orchids => ("Orchids ", grass, false, 1), + asters => ("Asters ", grass, false, 1), + daffodils => ("Daffodils ", grass, false, 1), + royal_grave => ("Royal Grave ", ash, true, 1), + grave => ("Grave ", ash, true, 1), + humble_grave => ("Humble Grave ", ash, true, 1), + wooden_wide_sign => ("Wooden Wide Sign ", grass, false, 1) ); map : information; diff --git a/sprite/world/landmark/grave.png b/sprite/world/landmark/grave.png new file mode 100644 index 0000000000000000000000000000000000000000..4168120b7d3f453e5681c654e9f0f2652ef3cef8 GIT binary patch literal 184 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`oCO|{#S9F3${@^GvDCf{D46Bx z;uvCa`t9V6f(H~hTtA-kyjQSp;*Pe>7Tl|6sI^u#y_}@9|53yLAG}KW+GltdRI-Kg zsxf3}s(w$>Ol@en$HVb}sew_bcgC{Hu$o;NFa1C4WV!Y#!7{lTxdGf;eY7h+DzKG#et9wHM~a+2!-wakhl(3hHgion zB;v4X>6A0V-kP#1cTTG~USgT>Mq&11ZcjCXb6tynp3pmI623Vlp>e2R2?4cG3{1fT;LJYD@<);T3K0RYBXLLmSE literal 0 HcmV?d00001 diff --git a/sprite/world/landmark/royal_grave.png b/sprite/world/landmark/royal_grave.png new file mode 100644 index 0000000000000000000000000000000000000000..7ed9d3761f7d081c94b65b2c346dceddfd7e5622 GIT binary patch literal 202 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`oCO|{#S9F3${@^GvDCf{C|Kj^ z;uvCa`sn0?yayCGTrXOjls{)0b-h3=JyEnelSk^HncN@oj#JI~OcyhEeq?ai$~EKW zN(KhgV;N;7phYK~QES`BcJS%78jFG#kW)S#_Rg8_TjZGze zVk*Poz2A9yd3bofK527g4sy7*TjSv0>m6$tefi{m_?%#yz?{(7adrZmiq8dxRgG*m hoU0nI9B~t2V7M(R_dvi>`xVe?22WQ%mvv4FO#skvI>i70 literal 0 HcmV?d00001