Rename to the Gamebit
This commit is contained in:
parent
43031413a7
commit
51fa8ffc07
|
@ -1,3 +1,5 @@
|
|||
= Flappybit
|
||||
= Gamebit
|
||||
|
||||
Flappybit for the micro.bit
|
||||
Gamebit is a set of games and tools for building games using a
|
||||
link:https://microbit.co.uk[micro:bit] and a
|
||||
link:https://www.waveshare.com/wiki/1.8inch_LCD_for_micro:bit[Waveshare 1.8 LCD]
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
with "contrib/Ada_Drivers_Library/boards/MicroBit/microbit_zfp.gpr";
|
||||
|
||||
project Flappybit is
|
||||
|
||||
project Gamebit is
|
||||
for Runtime ("ada") use "zfp-microbit";
|
||||
for Target use "arm-eabi";
|
||||
for Main use ("main.adb");
|
||||
|
@ -23,4 +22,4 @@ project Flappybit is
|
|||
for Connection_Tool use "pyocd";
|
||||
end Ide;
|
||||
|
||||
end Flappybit;
|
||||
end Gamebit;
|
|
@ -2,7 +2,7 @@
|
|||
with HAL.GPIO;
|
||||
with MicroBit.IOs;
|
||||
|
||||
package body Flappybit.LCD is
|
||||
package body Gamebit.LCD is
|
||||
|
||||
procedure Initialize is
|
||||
begin
|
||||
|
@ -104,4 +104,4 @@ package body Flappybit.LCD is
|
|||
end Update;
|
||||
|
||||
|
||||
end Flappybit.LCD;
|
||||
end Gamebit.LCD;
|
|
@ -7,7 +7,7 @@ with ST7735R; use ST7735R;
|
|||
|
||||
with HAL.Bitmap;
|
||||
|
||||
package Flappybit.LCD is
|
||||
package Gamebit.LCD is
|
||||
|
||||
Height : constant Positive := 160;
|
||||
Width : constant Positive := 128;
|
||||
|
@ -33,4 +33,4 @@ package Flappybit.LCD is
|
|||
|
||||
procedure Update
|
||||
with Pre => Initialized;
|
||||
end Flappybit.LCD;
|
||||
end Gamebit.LCD;
|
|
@ -1,6 +1,6 @@
|
|||
with HAL.Bitmap; use HAL.Bitmap;
|
||||
|
||||
package body Flappybit.Sprites is
|
||||
package body Gamebit.Sprites is
|
||||
|
||||
function Height (B : in Bird) return Positive is
|
||||
pragma Unreferenced (B);
|
||||
|
@ -68,4 +68,4 @@ package body Flappybit.Sprites is
|
|||
B.Buffer := Buffer;
|
||||
end Set_Framebuffer;
|
||||
|
||||
end Flappybit.Sprites;
|
||||
end Gamebit.Sprites;
|
|
@ -1,13 +1,13 @@
|
|||
|
||||
with HAL.Bitmap;
|
||||
|
||||
with Flappybit;
|
||||
with Gamebit;
|
||||
|
||||
package Flappybit.Sprites is
|
||||
package Gamebit.Sprites is
|
||||
|
||||
type Direction is (Left, Right, Up, Down);
|
||||
|
||||
type Bird is new Flappybit.Sprite with private;
|
||||
type Bird is new Gamebit.Sprite with private;
|
||||
function Height (B : in Bird) return Positive;
|
||||
function Width (B : in Bird) return Positive;
|
||||
function Position (B : in Bird) return Point;
|
||||
|
@ -18,7 +18,7 @@ package Flappybit.Sprites is
|
|||
|
||||
private
|
||||
|
||||
type Bird is new Flappybit.Sprite with record
|
||||
type Bird is new Gamebit.Sprite with record
|
||||
Buffer : HAL.Bitmap.Any_Bitmap_Buffer;
|
||||
Alive : Boolean := True;
|
||||
Trajectory : Direction := Left;
|
||||
|
@ -27,4 +27,4 @@ private
|
|||
Y : Natural;
|
||||
end record;
|
||||
|
||||
end Flappybit.Sprites;
|
||||
end Gamebit.Sprites;
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
with HAL.Bitmap;
|
||||
|
||||
package Flappybit is
|
||||
package Gamebit is
|
||||
|
||||
type Point is record
|
||||
X : Natural;
|
||||
|
@ -25,4 +25,4 @@ package Flappybit is
|
|||
|
||||
procedure Set_Framebuffer (S : in out Sprite; Framebuffer : in HAL.Bitmap.Any_Bitmap_Buffer ) is abstract;
|
||||
|
||||
end Flappybit;
|
||||
end Gamebit;
|
10
src/main.adb
10
src/main.adb
|
@ -1,13 +1,13 @@
|
|||
|
||||
|
||||
with Flappybit.LCD; use Flappybit.LCD;
|
||||
with HAL.Bitmap; use HAL.Bitmap;
|
||||
with Gamebit.LCD; use Gamebit.LCD;
|
||||
with HAL.Bitmap;
|
||||
|
||||
with Flappybit.Sprites;
|
||||
with Gamebit.Sprites;
|
||||
|
||||
procedure Main is
|
||||
Bird : Flappybit.Sprites.Bird;
|
||||
Background : constant Bitmap_Color := Black;
|
||||
Bird : Gamebit.Sprites.Bird;
|
||||
Background : constant HAL.Bitmap.Bitmap_Color := HAL.Bitmap.Black;
|
||||
begin
|
||||
Initialize;
|
||||
|
||||
|
|
Loading…
Reference in New Issue