summaryrefslogtreecommitdiff
path: root/game.adb
diff options
context:
space:
mode:
authorrexim <reximkut@gmail.com>2024-03-16 01:59:08 +0700
committerrexim <reximkut@gmail.com>2024-03-16 01:59:08 +0700
commite3c746f58c1bb604f174ef76442385918ea5904b (patch)
tree952da451678fcfa81e05ef13b089d6f15dc05424 /game.adb
parentdcfd9a20ccd9fcabd02f78ced02657e54a693756 (diff)
Introduce Urmom color to the Palette
Diffstat (limited to 'game.adb')
-rw-r--r--game.adb8
1 files changed, 6 insertions, 2 deletions
diff --git a/game.adb b/game.adb
index 5919f39..70a56fc 100644
--- a/game.adb
+++ b/game.adb
@@ -26,6 +26,7 @@ procedure Game is
COLOR_BOMB,
COLOR_LABEL,
COLOR_SHREK,
+ COLOR_URMOM,
COLOR_CHECKPOINT,
COLOR_EXPLOSION,
COLOR_HEALTHBAR);
@@ -41,6 +42,7 @@ procedure Game is
COLOR_BOMB => To_Unbounded_String("Bomb"),
COLOR_LABEL => To_Unbounded_String("Label"),
COLOR_SHREK => To_Unbounded_String("Shrek"),
+ COLOR_URMOM => To_Unbounded_String("Urmom"),
COLOR_CHECKPOINT => To_Unbounded_String("Checkpoint"),
COLOR_EXPLOSION => To_Unbounded_String("Explosion"),
COLOR_HEALTHBAR => To_Unbounded_String("Healthbar")
@@ -231,7 +233,7 @@ procedure Game is
Dead: Boolean := True;
Prev_Position: IVector2;
Position: IVector2;
- Background: Color;
+ Background: Palette;
Size: IVector2 := (3, 3);
Health: Float := 1.0;
Attack_Cooldown: Integer := SHREK_ATTACK_COOLDOWN;
@@ -477,6 +479,7 @@ procedure Game is
for Boss of Game.Bosses loop
if Boss.Dead then
Boss.Dead := False;
+ Boss.Background := COLOR_URMOM;
Boss.Position := (Column, Row);
Boss.Prev_Position := (Column, Row);
Boss.Health := 1.0;
@@ -488,6 +491,7 @@ procedure Game is
when 'B' =>
for Boss of Game.Bosses loop
if Boss.Dead then
+ Boss.Background := COLOR_SHREK;
Boss.Dead := False;
Boss.Position := (Column, Row);
Boss.Prev_Position := (Column, Row);
@@ -896,7 +900,7 @@ procedure Game is
Size: constant Vector2 := To_Vector2(Boss.Size)*Cell_Size;
begin
if not Boss.Dead then
- Draw_Rectangle_V(Position, Cell_Size*To_Vector2(Boss.Size), Palette_RGB(COLOR_SHREK));
+ Draw_Rectangle_V(Position, Cell_Size*To_Vector2(Boss.Size), Palette_RGB(Boss.Background));
Health_Bar(Position, Size, C_Float(Boss.Health));
Draw_Number(Position, Size, Boss.Attack_Cooldown, (A => 255, others => 0));
end if;