diff options
Diffstat (limited to 'demo/source/initgfx.c')
-rw-r--r-- | demo/source/initgfx.c | 31 |
1 files changed, 22 insertions, 9 deletions
diff --git a/demo/source/initgfx.c b/demo/source/initgfx.c index 342bf20..14ea24f 100644 --- a/demo/source/initgfx.c +++ b/demo/source/initgfx.c @@ -2,15 +2,28 @@ #include <ax/gfx.h> +static_assert(ax_col(0x1Fu,0x0u,0x0u) == 0b000000000011111u); +static_assert(ax_col(0x0u,0x1Fu,0x0u) == 0b000001111100000u); +static_assert(ax_col(0x0u,0x0u,0x1Fu) == 0b111110000000000u); + void axd_initgfx(void) { - ax_set10(0x500'0000u,0b000000000000000u); - ax_set10(0x500'0002u,0b111111111111111u); - ax_set10(0x500'0004u,0b000000000011111u); - ax_set10(0x500'0006u,0b00001111111111u); - ax_set10(0x500'0008u,0b00001111100000u); - ax_set10(0x500'000Au,0b111111111100000u); - ax_set10(0x500'000Cu,0b111110000000000u); - ax_set10(0x500'000Eu,0b111110000011111u); + ax_set10(0x500'0000u,ax_col(0x00u,0x00u,0x00u)); /* Black */ + ax_set10(0x500'0002u,ax_col(0x07u,0x07u,0x07u)); /* Darkgrey */ + ax_set10(0x500'0004u,ax_col(0x0Fu,0x0Fu,0x0Fu)); /* Grey */ + ax_set10(0x500'0006u,ax_col(0x17u,0x17u,0x17u)); /* Lightgrey */ + ax_set10(0x500'0008u,ax_col(0x1Fu,0x1Fu,0x1Fu)); /* White */ + ax_set10(0x500'000Au,ax_col(0x11u,0x01u,0x07u)); /* Red */ + ax_set10(0x500'000Cu,ax_col(0x15u,0x06u,0x02u)); /* Vermillion */ + ax_set10(0x500'000Eu,ax_col(0x1Bu,0x0Eu,0x04u)); /* Orange */ + ax_set10(0x500'0010u,ax_col(0x1Du,0x12u,0x01u)); /* Amber */ + ax_set10(0x500'0012u,ax_col(0x1Du,0x17u,0x01u)); /* Yellow */ + ax_set10(0x500'0014u,ax_col(0x12u,0x19u,0x05u)); /* Chartreuse */ + ax_set10(0x500'0016u,ax_col(0x04u,0x0Fu,0x03u)); /* Green */ + ax_set10(0x500'0018u,ax_col(0x04u,0x11u,0x0Du)); /* Teal */ + ax_set10(0x500'001Au,ax_col(0x04u,0x08u,0x16u)); /* Blue */ + ax_set10(0x500'001Cu,ax_col(0x08u,0x05u,0x10u)); /* Violet */ + ax_set10(0x500'001Eu,ax_col(0x0Au,0x05u,0x11u)); /* Purple */ + ax_set10(0x500'0020u,ax_col(0x11u,0x03u,0x15u)); /* Magenta */ ax_set10(0x400'0000u,0x404u); - ax_clrscrn1(0x600'A000u,0x0u); + ax_clrscrn1(0x600'0000u,0x0u); } |