move load guard here
authorhgn <hgodden00@gmail.com>
Fri, 14 Jun 2024 19:47:44 +0000 (20:47 +0100)
committerhgn <hgodden00@gmail.com>
Fri, 14 Jun 2024 19:47:44 +0000 (20:47 +0100)
vg_engine.c
vg_engine.h

index a7e8a686c02ff768451940cfedb614425a5df0fe..ed016bed1f0e2529cf6a99650eb486a829570947 100644 (file)
@@ -119,6 +119,8 @@ void async_internal_complete( void *payload, u32 size )
    }
 
    TEMP_STATUS_UNLOCK( &vg.sl_status );
+
+   vg.client_has_control = 1;
 }
 
 #ifdef VG_CUSTOM_SHADERS
@@ -127,6 +129,14 @@ void vg_auto_shader_register(void); /* created from codegen */
 
 static void _vg_load_full( void *data )
 {
+vg_info(" Copyright  .        . .       -----, ,----- ,---.   .---.  \n" );
+vg_info(" 2021-2024  |\\      /| |           /  |      |    | |    /| \n" );
+vg_info("            | \\    / | +--        /   +----- +---'  |   / | \n" );
+vg_info("            |  \\  /  | |         /    |      |   \\  |  /  | \n" );
+vg_info("            |   \\/   | |        /     |      |    \\ | /   | \n" );
+vg_info("            '        ' '--' [] '----- '----- '     ' '---'  " 
+        "SOFTWARE\n" );
+
    vg_preload();
    vg_tex2d_replace_with_error_async( &vg.tex_missing );
    vg_async_stall();
index 936a46436a317432326dc92432063e2e138b1ad2..54c595bbe163944ec2ba6613b92acf2b4d7a0d5b 100644 (file)
@@ -123,7 +123,14 @@ struct vg_engine
    /* Engine sync */
    SDL_Window     *window;
    SDL_GLContext  gl_context;
-   SDL_sem *sem_loader;        /* allows only one loader at a time */
+   SDL_sem        *sem_loader; /* allows only one loader at a time */
+
+   bool  client_has_control;  /* [T0] If 0: VG will display a loader screen
+                                      If 1: The game is responsible for 
+                                             drawing everything.
+                                 This can be set back to 0 after vg_load is 
+                                 complete to blinder the client
+                                 Not recommended! */
 
    SDL_threadID  thread_id_main,
                  thread_id_loader;