nuclear@4: #include "vdp.h" nuclear@4: nuclear@6: static const unsigned char pal[][3] = { nuclear@6: {0, 0, 0}, {64, 128, 255}, {255, 128, 32}, {255, 255, 255} nuclear@6: }; nuclear@6: nuclear@6: static const unsigned char pat[8] = { nuclear@6: 0, 0, 0, 0, /* 0 0 0 0 0 0 0 0 */ nuclear@6: 1, 0x11, 0x11, 0x11, /* 0 1 1 1 1 1 1 1 */ nuclear@6: 1, 0x11, 0x11, 0x11, /* 0 1 1 1 1 1 1 1 */ nuclear@6: 1, 0x11, 0x11, 0x12, /* 0 1 1 1 1 1 1 2 */ nuclear@6: 1, 0x11, 0x12, 0x22, /* 0 1 1 1 1 2 2 2 */ nuclear@6: 1, 0x11, 0x22, 0x22, /* 0 1 1 1 2 2 2 2 */ nuclear@6: 1, 0x11, 0x22, 0x22, /* 0 1 1 1 2 2 2 2 */ nuclear@6: 1, 0x12, 0x22, 0x22 /* 0 1 1 2 2 2 2 2 */ nuclear@6: }; nuclear@6: nuclear@4: int main(void) nuclear@4: { nuclear@6: unsigned char *tmap; nuclear@6: nuclear@6: vdp_init(); nuclear@6: nuclear@6: vdp_setpal(0, sizeof pal / sizeof *pal, (unsigned char*)pal); nuclear@5: VDP_SET_BGCOLOR(0, 0); nuclear@6: nuclear@6: vdp_set_tilemap_slot(VDP_PLANE_A, 0); nuclear@6: tmap = vdp_tilemap_ptr(VDP_PLANE_A); nuclear@6: nuclear@6: nuclear@4: return 0; nuclear@4: }