summaryrefslogblamecommitdiff
path: root/demo/source/initgfx.c
blob: 14ea24f500165fbb0140ff464cf0c391077ada02 (plain) (tree)
1
2
3
4
5
6
7
8
9

                      
                   
 



                                                             
                        
















                                                                         
                                     
                                      
 
#include <agbx-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_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'0000u,0x0u);
}