From: xolatile Date: Tue, 23 Apr 2024 15:44:25 +0000 (-0400) Subject: Preview example and font... X-Git-Url: https://git.xolatile.top/?a=commitdiff_plain;h=2eafb4d3234dde2e53a099820475fc9ca8e481d4;p=xolatile-raylib-ada.git Preview example and font... --- diff --git a/.gitignore b/.gitignore index 38b4169..0da3e99 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ *.o *.ali window +preview diff --git a/compile.sh b/compile.sh index 9103081..c88d79a 100644 --- a/compile.sh +++ b/compile.sh @@ -8,6 +8,11 @@ gnatmake -c window.adb gnatbind window.ali gnatlink window.ali -lraylib +gnatmake -c preview.adb +gnatbind preview.ali +gnatlink preview.ali -lraylib + mv window ../window +mv preview ../preview exit diff --git a/example/preview.adb b/example/preview.adb new file mode 100644 index 0000000..5836ebe --- /dev/null +++ b/example/preview.adb @@ -0,0 +1,24 @@ +with Raylib; +use Raylib; + +procedure Preview is + + Map : Texture := No_Texture; + +begin + Open_Window (1280, 720, "Pandemos Empire" & ASCII.NUL); + -- + Map := Load_Texture ("./example/resource/pandemos.png" & ASCII.NUL); + -- + Main_Loop: loop + exit when Window_Should_Close; + -- + Begin_Drawing; + Draw_Texture (Map); + End_Drawing; + end loop Main_Loop; + -- + Unload_Texture (Map); + -- + Close_Window; +end Preview; diff --git a/example/resource/alagard.png b/example/resource/alagard.png new file mode 100644 index 0000000..9b31826 Binary files /dev/null and b/example/resource/alagard.png differ diff --git a/example/texture.adb b/example/texture.adb deleted file mode 100644 index c4fa5e2..0000000 --- a/example/texture.adb +++ /dev/null @@ -1,18 +0,0 @@ -with Raylib; -use Raylib; - -procedure Window is - -begin - Open_Window (1280, 720, "Pandemos Empire" & ASCII.NUL); - -- - Main_Loop: loop - exit when Window_Should_Close; - -- - Begin_Drawing; - Clear_Background; - End_Drawing; - end loop Main_Loop; - -- - Close_Window; -end Window;