diff --git a/source/core.adb b/source/core.adb index 9a560d1..8b2d728 100644 --- a/source/core.adb +++ b/source/core.adb @@ -184,21 +184,22 @@ package body core is ------------------------------------------------------------------------------------------ procedure draw (data : in sprite; - x : in integer := 0; - y : in integer := 0; - u : in integer := 0; - v : in integer := 0; - width : in integer := 0; - height : in integer := 0; - state : in integer := 0) is - resize : vector := (0, 0); + x : in integer := 0; + y : in integer := 0; + u : in integer := 0; + v : in integer := 0; + width : in integer := 0; + height : in integer := 0; + state : in integer := 0; + factor : in integer := zoom; + tint : in ray.colour := (others => 255)) is + new_width : constant float := float ((if width = 0 then data.width else width)); + new_height : constant float := float ((if height = 0 then data.height else height)); begin - resize.x := (if width = 0 then data.width else width); - resize.y := (if height = 0 then data.height else height); - -- ray.draw_texture (data => texture_array (data.index), - uv => (float (if u = 0 then (animation_time mod data.frames) * data.width else u), float (v), float (resize.x), float (resize.y)), - view => (float (x), float (y), float (resize.x) * float (zoom), float (resize.y) * float (zoom))); + uv => (float (if u = 0 then (animation_time mod data.frames) * data.width else u), float (v), new_width, new_height), + view => (float (x), float (y), new_width * float (factor), new_height * float (factor)), + tint => tint); end draw; ------------------------------------------------------------------------------------------ diff --git a/source/core.ads b/source/core.ads index ba208de..eaa09a7 100644 --- a/source/core.ads +++ b/source/core.ads @@ -2,8 +2,8 @@ -- -- GNU General Public Licence (version 3 or later) -with ada.text_io, ada.strings.unbounded; -use ada.text_io, ada.strings.unbounded; +with ada.text_io, ada.strings.unbounded, ray; +use ada.text_io, ada.strings.unbounded, ray; package core is @@ -77,7 +77,8 @@ package core is global_time : natural := 0; gameplay_time : natural := 0; animation_time : natural := 0; - zoom : natural := 1; + + zoom : natural := 1; block_limit : constant natural := 40; block_count : natural := 0; @@ -108,13 +109,15 @@ package core is function import_song (file_path : in string) return song; procedure draw (data : in sprite; - x : in integer := 0; - y : in integer := 0; - u : in integer := 0; - v : in integer := 0; - width : in integer := 0; - height : in integer := 0; - state : in integer := 0); + x : in integer := 0; + y : in integer := 0; + u : in integer := 0; + v : in integer := 0; + width : in integer := 0; + height : in integer := 0; + state : in integer := 0; + factor : in integer := zoom; + tint : in ray.colour := (others => 255)); procedure write (text : in string := ""; x : in integer := 0; diff --git a/source/ui.adb b/source/ui.adb index e557659..ee7b236 100644 --- a/source/ui.adb +++ b/source/ui.adb @@ -347,7 +347,7 @@ package body ui is -- draw_horizontally (title_bar_middle, x + sprite (active, title_bar_left).width, y - sprite (active, title_bar_middle).height, middle_width); -- - core.write (title, x + sprite (active, title_bar_left).width / 2 + 20, y - sprite (active, title_bar_middle).height / 2 - 6, font (active)); + write (title, x + sprite (active, title_bar_left).width, y - sprite (active, title_bar_middle).height / 2 - 12); -- 12 = font.height / 2 end draw_title_bar; ------------------------------------------------------------------------------------------ diff --git a/sprite/ui/dwarf/title_bar_left.png b/sprite/ui/dwarf/title_bar_left.png index 461fde9..55dc9df 100644 Binary files a/sprite/ui/dwarf/title_bar_left.png and b/sprite/ui/dwarf/title_bar_left.png differ diff --git a/sprite/ui/dwarf/title_bar_middle.png b/sprite/ui/dwarf/title_bar_middle.png index 05dbd47..a2a6cb2 100644 Binary files a/sprite/ui/dwarf/title_bar_middle.png and b/sprite/ui/dwarf/title_bar_middle.png differ diff --git a/sprite/ui/dwarf/title_bar_right.png b/sprite/ui/dwarf/title_bar_right.png index 87186de..af7819f 100644 Binary files a/sprite/ui/dwarf/title_bar_right.png and b/sprite/ui/dwarf/title_bar_right.png differ diff --git a/sprite/ui/fairy/title_bar_middle.png b/sprite/ui/fairy/title_bar_middle.png index dbbb089..f20b259 100644 Binary files a/sprite/ui/fairy/title_bar_middle.png and b/sprite/ui/fairy/title_bar_middle.png differ diff --git a/sprite/ui/imp/title_bar_middle.png b/sprite/ui/imp/title_bar_middle.png index 17e907a..444f836 100644 Binary files a/sprite/ui/imp/title_bar_middle.png and b/sprite/ui/imp/title_bar_middle.png differ diff --git a/sprite/ui/kobold/title_bar_left.png b/sprite/ui/kobold/title_bar_left.png index 97aeb37..fc75448 100644 Binary files a/sprite/ui/kobold/title_bar_left.png and b/sprite/ui/kobold/title_bar_left.png differ diff --git a/sprite/ui/kobold/title_bar_middle.png b/sprite/ui/kobold/title_bar_middle.png index a8623f6..60c7fbf 100644 Binary files a/sprite/ui/kobold/title_bar_middle.png and b/sprite/ui/kobold/title_bar_middle.png differ diff --git a/sprite/ui/kobold/title_bar_right.png b/sprite/ui/kobold/title_bar_right.png index 0282f9d..db56ecf 100644 Binary files a/sprite/ui/kobold/title_bar_right.png and b/sprite/ui/kobold/title_bar_right.png differ diff --git a/sprite/ui/main/title_bar_left.png b/sprite/ui/main/title_bar_left.png index b167c9d..270bf4a 100644 Binary files a/sprite/ui/main/title_bar_left.png and b/sprite/ui/main/title_bar_left.png differ diff --git a/sprite/ui/main/title_bar_middle.png b/sprite/ui/main/title_bar_middle.png index e8ec68b..75ad065 100644 Binary files a/sprite/ui/main/title_bar_middle.png and b/sprite/ui/main/title_bar_middle.png differ diff --git a/sprite/ui/main/title_bar_right.png b/sprite/ui/main/title_bar_right.png index 926e7e0..e2cf22d 100644 Binary files a/sprite/ui/main/title_bar_right.png and b/sprite/ui/main/title_bar_right.png differ