diff --git a/font/alagard.png b/font/alagard.png new file mode 100644 index 0000000..61a2c67 Binary files /dev/null and b/font/alagard.png differ diff --git a/font/courier.ttf b/font/courier.ttf new file mode 100644 index 0000000..5a2cf3c Binary files /dev/null and b/font/courier.ttf differ diff --git a/source/core.adb b/source/core.adb index 3c6b582..2ee45a7 100644 --- a/source/core.adb +++ b/source/core.adb @@ -86,16 +86,16 @@ package body core is procedure draw_state_box (x, y : in integer) is begin - write ("Cursor X :" & integer'image (cursor_x), x, y + 0, 16#CCCCCC#); - write ("Cursor Y :" & integer'image (cursor_y), x, y + 32, 16#CCCCCC#); - write ("Cursor Mode :" & integer'image (cursor_mode), x, y + 64, 16#CCCCCC#); - write ("Signal Code :" & signal_code'image (signal_code'val (signal_mode)), x, y + 96, 16#CCCCCC#); - write ("Camera X :" & integer'image (camera.x), x, y + 128, 16#CCCCCC#); - write ("Camera Y :" & integer'image (camera.y), x, y + 160, 16#CCCCCC#); - write ("Global Time :" & integer'image (global_time), x, y + 192, 16#CCCCCC#); - write ("Gameplay Time :" & integer'image (gameplay_time), x, y + 224, 16#CCCCCC#); - write ("Animation Time :" & integer'image (animation_time), x, y + 256, 16#CCCCCC#); - write ("Framerate :" & integer'image (framerate), x, y + 288, 16#CCCCCC#); + write ("Cursor X :" & integer'image (cursor_x), x, y + 0); + write ("Cursor Y :" & integer'image (cursor_y), x, y + 32); + write ("Cursor Mode :" & integer'image (cursor_mode), x, y + 64); + write ("Signal Code : " & signal_code'image (signal_code'val (signal_mode)), x, y + 96); + write ("Camera X :" & integer'image (camera.x), x, y + 128); + write ("Camera Y :" & integer'image (camera.y), x, y + 160); + write ("Global Time :" & integer'image (global_time), x, y + 192); + write ("Gameplay Time :" & integer'image (gameplay_time), x, y + 224); + write ("Animation Time :" & integer'image (animation_time), x, y + 256); + write ("Framerate :" & integer'image (framerate), x, y + 288); end draw_state_box; ------------------------------------------------------------------------------------------ @@ -219,7 +219,7 @@ package body core is ------------------------------------------------------------------------------------------ - procedure write (text : in string; x, y : in integer; colour : in integer := 16#A37A28#; data : in font := fonts (0)) is + procedure write (text : in string; x, y : in integer; colour : in integer := 16#FFFFFF#; data : in font := fonts (1)) is begin render_string (c_string (text), x, y, colour, data.index, data.size, data.pad); end write; diff --git a/source/core.ads b/source/core.ads index 9593b5c..4f360ff 100644 --- a/source/core.ads +++ b/source/core.ads @@ -155,7 +155,7 @@ package core is procedure line (origin, offset : in vector_2); - procedure write (text : in string; x, y : in integer; colour : in integer := 16#A37A28#; data : in font := fonts (0)); + procedure write (text : in string; x, y : in integer; colour : in integer := 16#FFFFFF#; data : in font := fonts (1)); procedure debug (text : in string); procedure hexagonal_grid (x, y, width, height : in integer; fill : in boolean); diff --git a/source/main.adb b/source/main.adb index 3860cb0..87a9ff6 100644 --- a/source/main.adb +++ b/source/main.adb @@ -29,11 +29,7 @@ begin core.configure; ui.configure; - core.fonts (1) := core.load_font ("./font/pixel.ttf", 12, 2); - core.fonts (2) := core.load_font ("./font/ferrum.ttf", 22, 2); - core.fonts (3) := core.load_font ("./font/gothic.ttf", 22, 2); - core.fonts (4) := core.load_font ("./font/unitblock.ttf", 22, 2); - core.fonts (5) := core.load_font ("./font/tenderness.ttf", 22, 2); + core.fonts (1) := core.load_font ("./font/alagard.png", 24, 0); core.play_sound (core.import_sound (core.c_string ("./song/main_menu.ogg"))); @@ -115,14 +111,6 @@ begin --~might.menu (0, 0, true); -- ui.draw_text_box (0, core.window_height - 32, core.window_width, 32); - -- - core.write ("Heyo world!", 1600, 700 + 0, 16#CCCCCC#, core.fonts (0)); - core.write ("Nyaa world!", 1600, 700 + 32, 16#CCCCCC#, core.fonts (1)); - core.write ("Cyaa world!", 1600, 700 + 64, 16#CCCCCC#, core.fonts (2)); - core.write ("Neon world!", 1600, 700 + 96, 16#CCCCCC#, core.fonts (3)); - core.write ("Neon world!", 1600, 700 + 128, 16#CCCCCC#, core.fonts (4)); - core.write ("Neon world!", 1600, 700 + 160, 16#CCCCCC#, core.fonts (5)); - core.write ("Neon world!", 0, 0, 16#FFFFFF#, core.fonts (0)); end loop gameplay; ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ diff --git a/source/ui.adb b/source/ui.adb index de5d361..b0b0539 100644 --- a/source/ui.adb +++ b/source/ui.adb @@ -132,7 +132,7 @@ package body ui is draw (text_lower_left, x, y + height - offset); draw (text_lower_right, x + width - offset, y + height - offset); -- - core.write (core.read_text_box, x, y, 16#999999#); + core.write (core.read_text_box, x, y); end draw_text_box; ------------------------------------------------------------------------------------------ @@ -170,7 +170,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 - 12, y - sprite (active, title_bar_middle).height + 24, 16#C9952D#); + core.write (title, x + sprite (active, title_bar_left).width - 12, y - sprite (active, title_bar_middle).height + 24); end draw_title_bar; ------------------------------------------------------------------------------------------ diff --git a/source/unit.adb b/source/unit.adb index fc2a2db..8022145 100644 --- a/source/unit.adb +++ b/source/unit.adb @@ -102,7 +102,7 @@ package body unit is ui.draw_icon (attribute.trait (data).text, move_x + view_width + 12 + offset, move_y + offset + move); attribute.draw (data, move_x + view_width + 12 + offset, move_y + offset + move); -- - core.write (integer'image (trait (index).attributes (data)), move_x + view_width + 12 + offset + core.icon, move_y + offset + move, 16#999999#); + core.write (integer'image (trait (index).attributes (data)), move_x + view_width + 12 + offset + core.icon, move_y + offset + move); end loop; for animate in animation loop