New world biome previews and changed introduction...
This commit is contained in:
parent
642a0b5046
commit
4f1dddd7d1
@ -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
|
procedure create_image (width, height : in integer) is
|
||||||
begin
|
begin
|
||||||
global_mapshot := ray.image_colour (width * base, height * base, (0, 0, 0, 255));
|
global_mapshot := ray.image_colour (width * base, height * base, (0, 0, 0, 255));
|
||||||
|
@ -127,7 +127,6 @@ package core is
|
|||||||
function import_sprite (file_path : in string; frames, states : in integer) return sprite;
|
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_font (file_path : in string; scale, space : in integer) return font;
|
||||||
function import_song (file_path : in string) return song;
|
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 create_image (width, height : in integer);
|
||||||
procedure render_image (data : in sprite; x, y, u, v, width, height : in integer);
|
procedure render_image (data : in sprite; x, y, u, v, width, height : in integer);
|
||||||
|
@ -49,6 +49,8 @@ procedure main is
|
|||||||
game_title : sprite;
|
game_title : sprite;
|
||||||
game_preview : array (world.biome) of sprite; -- sand, grass, rough, snow, swamp
|
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
|
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
|
procedure main_menu is
|
||||||
begin
|
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_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;
|
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;
|
end loop introduction_loop;
|
||||||
|
|
||||||
main_menu_loop: loop
|
main_menu_loop: loop
|
||||||
|
@ -171,9 +171,8 @@ package ray is
|
|||||||
--~void ShowCursor(void);
|
--~void ShowCursor(void);
|
||||||
--~void HideCursor(void);
|
--~void HideCursor(void);
|
||||||
--~double GetTime(void);
|
--~double GetTime(void);
|
||||||
--~void TakeScreenshot(const char *fileName);
|
|
||||||
--~void OpenURL(const char *url);
|
--~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";
|
--~procedure unload_file (data : in access string) with import => true, convention => c, external_name => "UnloadFileText";
|
||||||
--~bool SaveFileText(const char *fileName, char *text);
|
--~bool SaveFileText(const char *fileName, char *text);
|
||||||
--~FilePathList LoadDirectoryFilesEx(const char *basePath, const char *filter, bool scanSubdirs);
|
--~FilePathList LoadDirectoryFilesEx(const char *basePath, const char *filter, bool scanSubdirs);
|
||||||
|
@ -50,6 +50,8 @@ package world is
|
|||||||
|
|
||||||
------------------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
biome_count : constant natural := biome'pos (biome'last) + 1;
|
||||||
|
|
||||||
tiles : core.sprite;
|
tiles : core.sprite;
|
||||||
landmarks : array (landmark_index) of core.sprite;
|
landmarks : array (landmark_index) of core.sprite;
|
||||||
|
|
||||||
|
BIN
sprite/grassland_preview.png
Normal file
BIN
sprite/grassland_preview.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.3 KiB |
BIN
sprite/roughland_preview.png
Normal file
BIN
sprite/roughland_preview.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.1 KiB |
BIN
sprite/sandland_preview.png
Normal file
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
BIN
sprite/snowland_preview.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.2 KiB |
BIN
sprite/swampland_preview.png
Normal file
BIN
sprite/swampland_preview.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.9 KiB |
Loading…
Reference in New Issue
Block a user