[AD] test rest

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


The attached patch adds some rest calls to some subroutines in the allegro's "test" program.


--
Milan Mimica
http://sparklet.sf.net
Index: tests/test.c
===================================================================
--- tests/test.c	(revision 5789)
+++ tests/test.c	(working copy)
@@ -255,7 +255,7 @@
    oy = -1;
 
    while (!next()) {
-      rest(20);
+      rest(50);
       poll_mouse();
 
       if ((mouse_x != ox) || (mouse_y != oy)) {
@@ -1772,8 +1772,9 @@
 
    release_screen();
 
-   while (!next())
-      ;
+   while (!next()) {
+      rest(50);
+   }
 }
 
 
@@ -1846,6 +1847,7 @@
 	 textout_centre_ex(screen, font, buf, SCREEN_W/2, yoff+152, palette_color[15], palette_color[0]);
       }
       poll_mouse();
+      rest(50);
    } while (!mouse_b);
 
    do {
@@ -1918,6 +1920,7 @@
       rectfill(screen, xoff+110, yoff+90, xoff+130, yoff+110, palette_color[int_c1]);
       rectfill(screen, xoff+150, yoff+90, xoff+170, yoff+110, palette_color[int_c2]);
       rectfill(screen, xoff+190, yoff+90, xoff+210, yoff+110, palette_color[int_c3]);
+      rest(50);
    }
 
    remove_int(int1);
@@ -2117,6 +2120,7 @@
 	 y = VIRTUAL_H;
 
       scroll_screen(x, y);
+      rest(50);
    }
 
    do {
@@ -2299,6 +2303,7 @@
 	 }
       } 
 
+      rest(50);
    } while (c != 27);
 
    return D_REDRAW;
@@ -2401,6 +2406,7 @@
 
       ox = nx;
       oy = ny;
+      rest(50);
    }
 
    xor_mode(FALSE);
@@ -2433,6 +2439,7 @@
 
    do {
       poll_mouse();
+      rest(50);
    } while (mouse_b);
 
    do {
@@ -2478,6 +2485,7 @@
       if (keypressed())
 	 k = readkey() & 0xff;
 
+      rest(50);
    } while (k != 27);
 
    return D_REDRAW;
@@ -3106,6 +3114,7 @@
 	       break;
 	 }
       }
+      rest(50);
    }
 
    getout:


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/