1. Trammell Hudson
  2. vectorscope

Commits

Trammell Hudson  committed 06beabf Draft

truncate to 8-bit resolution

  • Participants
  • Parent commits d80d74b
  • Branches default

Comments (0)

Files changed (1)

File spacerocks.c

View file
 #define MAX_ROCKS	32
 #define MAX_BULLETS	4
 #define ROCK_VEL	64
+#define MIN_RADIUS 	10000
 
 static int frame_num = 0;
 
 		if (r->size != 0)
 			continue;
 
-fprintf(stderr, "%d: %d,%d\n", i, x, y);
 		r->size = size;
 		r->p.x = x;
 		r->p.y = y;
 	for (uint8_t i = 0 ; i < num ; i++)
 	{
 		// Make sure that there is space around the center
-#define MIN_RADIUS 1024
 		int16_t x = rand();
 		int16_t y = rand();
 		uint16_t size = (rand() % 32) * 256 + 512;
 )
 {
 	for (uint8_t i = 0 ; i < n ; i++)
-		printf("%d %d %d\n", x + p[2*i+0], y + p[2*i+1], frame_num);
+	{
+		uint8_t px = x + p[2*i+0];
+		uint8_t py = y + p[2*i+1];
+		printf("%d %d %d\n", px, py, frame_num);
+	}
+
 	printf("\n");
 }