1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
#include <ax-demo.h>
#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_set01(0x400'0000u,0b00000100'10000100u);
ax_setcol(0x00u,ax_col(0x00u,0x00u,0x00u)); /* Black */
ax_setcol(0x01u,ax_col(0x07u,0x07u,0x07u)); /* Darkgrey */
ax_setcol(0x02u,ax_col(0x0Fu,0x0Fu,0x0Fu)); /* Grey */
ax_setcol(0x03u,ax_col(0x17u,0x17u,0x17u)); /* Lightgrey */
ax_setcol(0x04u,ax_col(0x1Fu,0x1Fu,0x1Fu)); /* White */
ax_setcol(0x05u,ax_col(0x11u,0x01u,0x07u)); /* Red */
ax_setcol(0x06u,ax_col(0x17u,0x0Au,0x04u)); /* Vermillion */
ax_setcol(0x07u,ax_col(0x1Bu,0x0Eu,0x04u)); /* Orange */
ax_setcol(0x08u,ax_col(0x1Bu,0x11u,0x01u)); /* Amber */
ax_setcol(0x09u,ax_col(0x1Du,0x16u,0x02u)); /* Yellow */
ax_setcol(0x0Au,ax_col(0x12u,0x19u,0x05u)); /* Chartreuse */
ax_setcol(0x0Bu,ax_col(0x04u,0x0Fu,0x03u)); /* Green */
ax_setcol(0x0Cu,ax_col(0x04u,0x11u,0x0Du)); /* Teal */
ax_setcol(0x0Du,ax_col(0x04u,0x08u,0x16u)); /* Blue */
ax_setcol(0x0Eu,ax_col(0x08u,0x05u,0x10u)); /* Violet */
ax_setcol(0x0Fu,ax_col(0x13u,0x09u,0x17u)); /* Purple */
ax_setcol(0x10u,ax_col(0x1Bu,0x03u,0x15u)); /* Magenta */
ax_clrscrn1(0x600'0000u,0x4u);
}
|