procedural generator for the steam tunnels part
[dosdemo] / src / screen.c
index fb89206..fa70413 100644 (file)
@@ -14,6 +14,7 @@ struct screen *bump_screen(void);
 struct screen *thunder_screen(void);
 struct screen *metaballs_screen(void);
 struct screen *greets_screen(void);
+struct screen *infcubes_screen(void);
 
 #define NUM_SCR 32
 static struct screen *scr[NUM_SCR];
@@ -53,6 +54,9 @@ int scr_init(void)
        if(!(scr[idx++] = greets_screen())) {
                return -1;
        }
+       if(!(scr[idx++] = infcubes_screen())) {
+               return -1;
+       }
        num_screens = idx;
 
        assert(num_screens <= NUM_SCR);
@@ -93,6 +97,13 @@ void scr_draw(void)
        if(cur) cur->draw();
 }
 
+void scr_keypress(int key)
+{
+       if(cur && cur->keypress) {
+               cur->keypress(key);
+       }
+}
+
 struct screen *scr_lookup(const char *name)
 {
        int i;