]> git.xolatile.top Git - xolatile-raylib-ada.git/commitdiff
File reordering, installation script, more...
authorxolatile <xolatile@proton.me>
Tue, 23 Apr 2024 12:58:19 +0000 (08:58 -0400)
committerxolatile <xolatile@proton.me>
Tue, 23 Apr 2024 12:58:19 +0000 (08:58 -0400)
compile.sh
install.sh [new file with mode: 0644]
texture.png [deleted file]
window.adb [deleted file]

index bc9aac4e87613203f1deb66caea338969d73dbd5..910308119f81e43ce82c932253e540ca9283b507 100644 (file)
@@ -2,8 +2,12 @@
 
 set -xe
 
+cd example
+
 gnatmake -c window.adb
 gnatbind window.ali
 gnatlink window.ali -lraylib
 
+mv window ../window
+
 exit
diff --git a/install.sh b/install.sh
new file mode 100644 (file)
index 0000000..0774358
--- /dev/null
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+set -xe
+
+cp raylib.ads /usr/lib/gcc/x86_64-linux-gnu/8/adainclude/raylib.ads
+
+exit
diff --git a/texture.png b/texture.png
deleted file mode 100644 (file)
index e9b69e9..0000000
Binary files a/texture.png and /dev/null differ
diff --git a/window.adb b/window.adb
deleted file mode 100644 (file)
index a0897cb..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-with Raylib;
-use  Raylib;
-
-procedure Window is
-
-       function C_String (Data : String) return String is
-       begin
-               return (Data & Character'Val (0));
-       end C_String;
-
-       Text : String := C_String ("Heyo world!");
-
-       Dragdown : Texture;
-
-       X : Integer := 120;
-       Y : Integer := 120;
-
-begin
-
-       Open_Window (720, 360, C_String ("Heyo Raylib!"));
-
-       Set_Exit_Key   (Key_Q); -- Default is Key_Escape
-       Set_Target_FPS (72);    -- Default is 60
-
-       Dragdown := Load_Texture (C_String ("./texture.png"));
-
-       Main_Loop: loop
-               exit when Window_Should_Close;
-               --
-               Begin_Drawing;
-               --
-               Clear_Background (Sky_Blue);
-               Draw_Texture     (Dragdown, 100, 100, White);
-               Draw_Text        (Text, 90, 90);
-               Draw_FPS         (X, Y);
-               Draw_Line        (0, 0, 300, 300, Black);
-               Draw_Rectangle   (120, 120, 30, 60, Blue);
-               --
-               if Is_Key_Pressed (Key_W) then Y := Y - 10; end if;
-               if Is_Key_Pressed (Key_S) then Y := Y + 10; end if;
-               if Is_Key_Pressed (Key_A) then X := X - 10; end if;
-               if Is_Key_Pressed (Key_D) then X := X + 10; end if;
-               --
-               End_Drawing;
-       end loop Main_Loop;
-
-       Unload_Texture (Dragdown);
-
-       Close_Window;
-
-end Window;