fixed the outgoing transitions to not delay needlessly when there is no stop function.
[dosdemo] / src / screen.c
index 4379778..927903b 100644 (file)
@@ -7,7 +7,8 @@
 
 struct screen *tunnel_screen(void);
 struct screen *fract_screen(void);
-struct screen *mike_screen(void);
+struct screen *grise_screen(void);
+struct screen *polytest_screen(void);
 
 #define NUM_SCR        32
 static struct screen *scr[NUM_SCR];
@@ -26,7 +27,10 @@ int scr_init(void)
        if(!(scr[idx++] = fract_screen())) {
                return -1;
        }
-       if (!(scr[idx++] = mike_screen())) {
+       if (!(scr[idx++] = grise_screen())) {
+               return -1;
+       }
+       if(!(scr[idx++] = polytest_screen())) {
                return -1;
        }
        num_screens = idx;
@@ -113,11 +117,8 @@ int scr_change(struct screen *s, long trans_time)
                trans_dur = 0;
        }
 
-       if(cur) {
-               if(cur->stop) {
-                       cur->stop(trans_dur);
-               }
-
+       if(cur && cur->stop) {
+               cur->stop(trans_dur);
                prev = cur;
                next = s;
        } else {