mirror of
https://git.freebsd.org/ports.git
synced 2025-04-30 10:36:38 -04:00
ASFML is an Ada semi-thick binding to SFML. The library uses Ada types, and portable defined types, which eliminates the inclusion of Ada interface libraries, however most of the functions are directly imported. Website: https://mgrojo.github.io/ASFML/ Differential Revision: https://reviews.freebsd.org/D42151
20 lines
1,020 B
Ada
20 lines
1,020 B
Ada
--- examples/pong/pong.adb.orig 2023-10-21 00:38:34 UTC
|
|
+++ examples/pong/pong.adb
|
|
@@ -42,7 +42,7 @@ begin
|
|
Reset (Gen);
|
|
Win := RenderWindow.Create(mode => (GameWidth, GameHeight, 32), title => "Ada SFML Pong");
|
|
RenderWindow.SetVerticalSyncEnabled(Win, sfTrue);
|
|
- BallSoundBuffer := SoundBuffer.CreateFromFile("ping_pong_8bit_beeep.ogg");
|
|
+ BallSoundBuffer := SoundBuffer.CreateFromFile("%%DATA_AUDIO%%ping_pong_8bit_beeep.ogg");
|
|
BallSound := Sound.Create;
|
|
Sound.SetBuffer(BallSound, BallSoundBuffer);
|
|
LeftPaddle := RectangleShape.Create;
|
|
@@ -65,7 +65,7 @@ begin
|
|
CircleShape.setOutlineColor (Ball, Color.sfBlack);
|
|
CircleShape.setFillColor (Ball, Color.sfWhite);
|
|
CircleShape.setOrigin (Ball, (0.5 * BallRadius, 0.5 * BallRadius));
|
|
- GameFont := Font.CreateFromFile("../renderwindow/aerial.ttf");
|
|
+ GameFont := Font.CreateFromFile("%%DATA_FONTS%%aerial.ttf");
|
|
GameMessage := Text.Create;
|
|
Text.setFont (GameMessage, GameFont);
|
|
Text.setCharacterSize (GameMessage, 30);
|