forgot to remove the artifical delay in the loading screen after making
authorJohn Tsiombikas <nuclear@member.fsf.org>
Sun, 8 May 2022 15:09:29 +0000 (18:09 +0300)
committerJohn Tsiombikas <nuclear@member.fsf.org>
Sun, 8 May 2022 15:09:29 +0000 (18:09 +0300)
the progress bar effect.

GNUmakefile
src/screen.c
src/util.c

index 0054bbc..ee7a35e 100644 (file)
@@ -11,7 +11,7 @@ bindata = data/loading.img
 inc = -I/usr/local/include -Isrc -Isrc/3dgfx -Isrc/scr -Isrc/glut -Ilibs \
          -Ilibs/imago/src -Ilibs/mikmod/include
 def = -DMINIGLUT_USE_LIBC -DMIKMOD_STATIC
-warn = -pedantic -Wall -Wno-unused-variable -Wno-unused-function
+warn = -pedantic -Wall -Wno-unused-variable -Wno-unused-function -Wno-address
 #opt = -O3 -ffast-math
 dbg = -g
 
index 2dc0b67..972e711 100644 (file)
@@ -195,7 +195,7 @@ int scr_change(struct screen *s, long trans_time)
 /* loading screen */
 extern uint16_t loading_pixels[];
 static long prev_load_msec;
-static long load_delay = 180;
+static long load_delay;
 
 void start_loadscr(void)
 {
@@ -206,7 +206,9 @@ void start_loadscr(void)
        }
 
        swap_buffers(loading_pixels);
-       sleep_msec(load_delay * 2);
+       if(load_delay) {
+               sleep_msec(load_delay * 2);
+       }
        prev_load_msec = get_msec();
 }
 
@@ -224,7 +226,9 @@ void end_loadscr(void)
        blitfb(loading_pixels + SPLAT_Y * 320 + SPLAT_X, loading_pixels + 320 * 240, 32, 72, 32);
        blit_key(loading_pixels + FING_Y * 320 + FING_LAST_X, 320, loading_pixels + 247 * 320 + 64, FING_W, FING_H, FING_W, 0);
        swap_buffers(loading_pixels);
-       sleep_msec(load_delay * 4);
+       if(load_delay) {
+               sleep_msec(load_delay * 3);
+       }
 }
 
 void loadscr(int n, int count)
index 515b4e6..2a70ec8 100644 (file)
@@ -3,6 +3,7 @@
 #include <string.h>
 #include <errno.h>
 #include "util.h"
+#include "demo.h"
 
 uint32_t perf_start_count, perf_interval_count;