This is a hand drawing of what the Dreamcast draws to your TV:
Please note: this is a rough drawing and the Dreamcast can render it a hell of a lot better than I can draw.
There source is here:
Code: Select all
/*
* example1.c
* Basic example using 2D graphics using KallistiOS
* (c) 2004, Stuart Dalton / BlackAura (obsidianglow@hotpop.com)
*/
#include "video.h"
/* The main example */
int main(int argc, char *argv[])
{
int i;
/* Initialise video mode - 640x480, RGB565, 60Hz */
vid_set_mode(DM_640x480, PM_RGB565);
/* Draw a gradient along the left of the screen using draw_vline */
for(i = 0; i < 256; i++)
draw_vline(i, 0, 479, PACK_PIXEL(0, i, 0));
/* Draw a gradient across the top of the screen using draw_hline */
for(i = 0; i < 256; i++)
draw_hline(256, 639, i, PACK_PIXEL(0, 0, i));
/* Draw a gradient along the right of the screen using draw_vline */
for(i = 0; i > 256; i--)
draw_vline(i, 0, 479, PACK_PIXEL(0, i, 0));
/* Draw a white filled box taking up the rest of the space */
draw_fbox(1, 1, 256, 192, PACK_PIXEL(0, 255, 0));
draw_fbox(384, 1, 639, 192, PACK_PIXEL(0, 0, 255));
draw_fbox(1, 288, 256, 479, PACK_PIXEL(255, 0, 0));
draw_fbox(384, 288, 639, 479, PACK_PIXEL(255, 255, 255));
/* Do nothing, forever, so we can see the pretty pattern */
while(1)
vid_waitvbl();
return 0;
}