diff options
| author | Syndamia <kamen@syndamia.com> | 2026-03-16 20:59:04 +0200 |
|---|---|---|
| committer | Syndamia <kamen@syndamia.com> | 2026-03-16 20:59:04 +0200 |
| commit | ef4a2773e90ebc6ed7ad66bcfd4e30165c04fb93 (patch) | |
| tree | f2ee90c08ae5f11692bd6c3ccf85077aab465e6b /graphics.c | |
| parent | 2202e87c466803eeaddd974006aa9950d8e0d067 (diff) | |
| download | ppm_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.c | 13 |
1 files changed, 6 insertions, 7 deletions
@@ -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 = { |
