17 const unsigned int dw = 40, dh = 20;
19 uint8_t* data =
new uint8_t[dw*dh*2];
20 memset( data, 0,
sizeof(uint8_t) * dw * dh );
22 printf(
"\n[Rasterize] Raster of model \"%s\":\n",
29 modsz.y / (
float)dh );
31 for(
unsigned int y=0; y<dh; y++ )
33 printf(
"[Rasterize] " );
34 for(
unsigned int x=0; x<dw; x++ )
35 putchar( data[x + ((dh-y-1)*dw)] ?
'O' :
'.' );
39 puts(
"[Rasterize] Done" );
The Stage library uses its own namespace.
void Init(int *argc, char **argv[])
void Rasterize(uint8_t *data, unsigned int width, unsigned int height, meters_t cellwidth, meters_t cellheight)
const char * Token() const