summaryrefslogtreecommitdiff
path: root/graphics.c
diff options
context:
space:
mode:
authorSyndamia <kamen@syndamia.com>2026-03-16 20:59:04 +0200
committerSyndamia <kamen@syndamia.com>2026-03-16 20:59:04 +0200
commitef4a2773e90ebc6ed7ad66bcfd4e30165c04fb93 (patch)
treef2ee90c08ae5f11692bd6c3ccf85077aab465e6b /graphics.c
parent2202e87c466803eeaddd974006aa9950d8e0d067 (diff)
downloadppm_graphics-ef4a2773e90ebc6ed7ad66bcfd4e30165c04fb93.tar
ppm_graphics-ef4a2773e90ebc6ed7ad66bcfd4e30165c04fb93.tar.gz
ppm_graphics-ef4a2773e90ebc6ed7ad66bcfd4e30165c04fb93.zip
feat: Implement circle and rename square
Diffstat (limited to 'graphics.c')
-rw-r--r--graphics.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/graphics.c b/graphics.c
index b752cef..931c486 100644
--- a/graphics.c
+++ b/graphics.c
@@ -66,7 +66,7 @@ main() {
Animation_pushEvent(&anim, 0, 120, A_Interpolate, &i1);
// Yellow square
- struct AO_SquareSettings s1 = {
+ struct AO_Square s1 = {
.width = 20, .height = 20, .color = 0xFFFFFF00,
};
struct AM_MoveSpin ms1 = {
@@ -82,21 +82,20 @@ main() {
};
Animation_pushEvent(&anim, 0, 80, AM_MoveLinear, &ml3);
- // White square
- struct AO_SquareSettings s4 = {
- .width = 20, .height = 20, .color = 0xFFFFFFFF,
+ // White circle
+ struct AO_Circle s4 = {
+ .radius = 20, .color = 0xFFFFFFFF,
};
struct AM_MoveLinear ml4 = {
.startRow = 40, .startCol = 40,
.dRow = 2, .dCol = 2,
- .wrapCoordinates = true,
- .callback = AO_Square, .priv = &s4,
+ .callback = AO_Circle, .priv = &s4,
};
Animation_pushEvent(&anim, 0, 80, AM_MoveLinear, &ml4);
// Green square
- struct AO_SquareSettings s2 = {
+ struct AO_Square s2 = {
.width = 35, .height = 50, .color = 0xA009FAA5,
};
struct AM_MoveLinear ml2 = {