src/gui/gui.c
FrameInfo gui_palette_dump(){
	FrameInfo info = {};
	static uint palette_buffer[32];
	info.size = 32;// Two rows of 16. Basically from 0x3F01 to 0x3F1F
	info.buffer = palette_buffer;
	info.width = 16;
	info.height = 16;

	for(uint i = 0; i < info.size; ++i){
		int colour_index = rmem_b_vram(i + UNIVERSAL_BACKGROUND_ADDR);
		palette_buffer[i] = encode_as_RGBA(COLOUR_PALETTE[colour_index]);
	}

	return info;
}
/**
 * Iterates through the VRAM, where the colour palette information is stored and fills in a FrameInfo struct
 * with the RGBA colour of each position. The UI will take care of creating the images and fill them in with the colour.
 */
Iterates through the VRAM, where the colour palette information is stored and fills in a FrameInfo struct
with the RGBA colour of each position. The UI will take care of creating the images and fill them in with the colour.
Iterates through the VRAM where the colour palette information is stored and fills in a FrameInfo struct with the RGBA colour of each position . The UI will take care of creating the images and fill them in with the colour .
FrameInfo gui_palette_dump(){
	FrameInfo info = {};
	static uint palette_buffer[32];
	info.size = 32;
	info.buffer = palette_buffer;
	info.width = 16;
	info.height = 16;
	for(uint i = 0; i < info.size; ++i){
		int colour_index = rmem_b_vram(i + UNIVERSAL_BACKGROUND_ADDR);
		palette_buffer[i] = encode_as_RGBA(COLOUR_PALETTE[colour_index]);
	}
	return info;
}
FrameInfo gui_palette_dump ( ) { FrameInfo info = { } ; static uint palette_buffer [ 32 ] ; info . size = 32 ; info . buffer = palette_buffer ; info . width = 16 ; info . height = 16 ; for ( uint i = 0 ; i < info . size ; ++ i ) { int colour_index = rmem_b_vram ( i + UNIVERSAL_BACKGROUND_ADDR ) ; palette_buffer [ i ] = encode_as_RGBA ( COLOUR_PALETTE [ colour_index ] ) ; } return info ; }
Iterates through the VRAM, where the colour palette information is stored and fills in a FrameInfo struct
 with the RGBA colour of each position.
Iterates through the VRAM where the colour palette information is stored and fills in a FrameInfo struct with the RGBA colour of each position .
// Two rows of 16. Basically from 0x3F01 to 0x3F1F