New world biome previews and changed introduction...

This commit is contained in:
Ognjen Milan Robovic 2024-05-10 23:44:09 -04:00
parent 642a0b5046
commit 4f1dddd7d1
10 changed files with 16 additions and 26 deletions

View File

@ -195,18 +195,6 @@ package body core is
------------------------------------------------------------------------------------------
function import_text (file_path : in string) return text_box_data is
this : text_box_data;
begin
this.data := ray.load_text (c_string (file_path));
this.text := null_unbounded_string;
this.size := (0, 0);
--
return this;
end import_text;
------------------------------------------------------------------------------------------
procedure create_image (width, height : in integer) is
begin
global_mapshot := ray.image_colour (width * base, height * base, (0, 0, 0, 255));

View File

@ -127,7 +127,6 @@ package core is
function import_sprite (file_path : in string; frames, states : in integer) return sprite;
function import_font (file_path : in string; scale, space : in integer) return font;
function import_song (file_path : in string) return song;
function import_text (file_path : in string) return text_box_data;
procedure create_image (width, height : in integer);
procedure render_image (data : in sprite; x, y, u, v, width, height : in integer);

View File

@ -49,6 +49,8 @@ procedure main is
game_title : sprite;
game_preview : array (world.biome) of sprite; -- sand, grass, rough, snow, swamp
switch : natural := 0;
choose : world.biome := world.ash;
------------------------------------------------------------------------------------------
procedure check_move_camera_up is
@ -108,16 +110,6 @@ procedure main is
------------------------------------------------------------------------------------------
procedure introduction is
begin
draw (game_preview (world.ash), center_x (game_preview (world.ash).width * 2), center_y (game_preview (world.ash).height * 2), factor => 2);
draw (game_title, center_x (game_title.width * 2), center_y (game_title.height * 2), factor => 2);
--
ui.write ("[-- Please press Spacebar to continue]", 0, center_y (24), (102, 102, 102, 255));
end introduction;
------------------------------------------------------------------------------------------
procedure main_menu is
begin
draw (game_preview (world.ash), center_x (game_preview (world.ash).width * 2), center_y (game_preview (world.ash).height * 2), factor => 2);
@ -232,7 +224,17 @@ begin
--
exit when signal_mode = signal_space;
--
introduction;
case signal_mode is
when signal_none => null;
when signal_space => null;
when others => switch := (switch + 1) mod world.biome_count;
choose := world.biome'val (switch);
end case;
--
draw (game_preview (choose), center_x (game_preview (choose).width * 2), center_y (game_preview (choose).height * 2), factor => 2);
draw (game_title, center_x (game_title.width * 2), center_y (game_title.height * 2), factor => 2);
--
ui.write ("[-- Please press Spacebar to continue]", 0, center_y (24), (102, 102, 102, 255));
end loop introduction_loop;
main_menu_loop: loop

View File

@ -171,9 +171,8 @@ package ray is
--~void ShowCursor(void);
--~void HideCursor(void);
--~double GetTime(void);
--~void TakeScreenshot(const char *fileName);
--~void OpenURL(const char *url);
function load_text (file : in string) return access string with import => true, convention => c, external_name => "LoadFileText";
--~function load_text (file : in string) return access string with import => true, convention => c, external_name => "LoadFileText";
--~procedure unload_file (data : in access string) with import => true, convention => c, external_name => "UnloadFileText";
--~bool SaveFileText(const char *fileName, char *text);
--~FilePathList LoadDirectoryFilesEx(const char *basePath, const char *filter, bool scanSubdirs);

View File

@ -50,6 +50,8 @@ package world is
------------------------------------------------------------------------------------------
biome_count : constant natural := biome'pos (biome'last) + 1;
tiles : core.sprite;
landmarks : array (landmark_index) of core.sprite;

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
sprite/sandland_preview.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

BIN
sprite/snowland_preview.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB