Example #1
0
void vid_set_window_size(int scale)
{
	int width, height;
	int x, y;
	width = 160 * scale;
	height = 144 * scale;
	x = (528 - width) / 2;
	y = (320 - height + 16) / 2;
	lcdc_set_vram_address((void*)0xAC202800);
	lcdc_set_window(x, y, width, height);
}
Example #2
0
void vid_settitle(char * title)
{
	char caption[30] = "Gnuboy EX - ";
	strncat(caption, title, 16);
	lcdc_set_vram_address((void*)0xAC200000);
	lcdc_set_window(104, 8, 320, 16);
	set_pen(create_rgb16(0, 0, 0));
	draw_rect(0, 0, 320, 16);
	set_pen(create_rgb16(0xff, 0xff, 0xff));
	render_text(0, 2, caption);
	lcdc_copy_vram();
}
Example #3
0
void graphics_init(uint16_t width, uint16_t height, void * vram)
{
	lcdc_set_window(0, 0, width, height);
	lcdc_set_vram_address(vram);
}