static void start(long trans_time);
static void draw(void);
static void draw_lowres_raster(void);
+static void keypress(int key);
static int gen_texture(struct pimage *img, int xsz, int ysz);
static struct screen scr = {
destroy,
start, 0,
draw,
- 0
+ keypress
};
static float cam_theta, cam_phi = 25;
}
}
+static void keypress(int key)
+{
+ switch(key) {
+ case 'b':
+ use_bsp = !use_bsp;
+ printf("drawing with %s\n", use_bsp ? "BSP tree" : "z-sorting");
+ break;
+ }
+}
+
static int gen_texture(struct pimage *img, int xsz, int ysz)
{
int i, j;