misc todo
authorhgn <hgodden00@gmail.com>
Thu, 13 Jun 2024 10:18:17 +0000 (11:18 +0100)
committerhgn <hgodden00@gmail.com>
Thu, 13 Jun 2024 10:18:17 +0000 (11:18 +0100)
submodules/SDL_GameControllerDB
submodules/anyascii
submodules/qoi
submodules/stb
vg_async.c
vg_async.h
vg_audio.h
vg_loader.h
vg_rigidbody_collision.c

index c5b4df0e1061175cb11e3ebbf8045178339864a5..6ed8d054340ee8a93a684e11360b66cd8a5c168e 160000 (submodule)
@@ -1 +1 @@
-Subproject commit c5b4df0e1061175cb11e3ebbf8045178339864a5
+Subproject commit 6ed8d054340ee8a93a684e11360b66cd8a5c168e
index eb5332d0b5e48d58397e6f27475a18e058330d23..44e971c774d9ec67ca6c1f16c5a476724821ab63 160000 (submodule)
@@ -1 +1 @@
-Subproject commit eb5332d0b5e48d58397e6f27475a18e058330d23
+Subproject commit 44e971c774d9ec67ca6c1f16c5a476724821ab63
index dfc056e813c98d307238d35f7f041a725d699dfc..b8d77df1e80b652a57f0b7270449b179a6b91f40 160000 (submodule)
@@ -1 +1 @@
-Subproject commit dfc056e813c98d307238d35f7f041a725d699dfc
+Subproject commit b8d77df1e80b652a57f0b7270449b179a6b91f40
index 5736b15f7ea0ffb08dd38af21067c314d6a3aae9..8b5f1f37b5b75829fc72d38e7b5d4bcbf8a26d55 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 5736b15f7ea0ffb08dd38af21067c314d6a3aae9
+Subproject commit 8b5f1f37b5b75829fc72d38e7b5d4bcbf8a26d55
index 0d7809da67e1be75ce73cdc3dc72c7ed48283c2c..7916282cb6e588369132197ffa2b9f2616fe90f6 100644 (file)
@@ -5,9 +5,6 @@ struct vg_async vg_async;
 enum vg_thread_purpose vg_thread_purpose(void);
 enum engine_status _vg_engine_status(void);
 
-/*
- * Allocate an asynchronous call with a bit of memory
- */
 vg_async_item *vg_async_alloc( u32 size )
 {
    /* ditch out here if engine crashed. this serves as the 'quit checking' */
@@ -69,15 +66,9 @@ vg_async_item *vg_async_alloc( u32 size )
 void vg_async_stall(void)
 {
    vg_assert_thread(k_thread_purpose_loader);
-#if 0
-   vg_info( "async_stall: %d\n", SDL_SemValue( vg_async.sem_wait_for_flush ) );
-#endif
    SDL_SemWait( vg_async.sem_wait_for_flush );
 }
 
-/*
- * Mark the call as being filled and ready to go
- */
 void vg_async_dispatch( vg_async_item *item, 
                         void (*runner)( void *payload, u32 size ) )
 {
@@ -90,9 +81,6 @@ void vg_async_dispatch( vg_async_item *item,
    SDL_AtomicUnlock( &vg_async.sl_index );
 }
 
-/*
- * Make a simple async call without allocating extra.
- */
 void vg_async_call( void (*runner)( void *payload, u32 size ), 
                     void *payload, u32 size )
 {
@@ -103,9 +91,6 @@ void vg_async_call( void (*runner)( void *payload, u32 size ),
    vg_async_dispatch( call, runner );
 }
 
-/*
- * Run as much of the async buffer as possible
- */
 void vg_run_async_checked(void)
 {
    SDL_AtomicLock( &vg_async.sl_index );
@@ -127,12 +112,11 @@ void vg_run_async_checked(void)
             }
          }
       }
-      else{
+      else
+      {
          SDL_AtomicUnlock( &vg_async.sl_index );
          return;
       }
-
-      /* TODO: if exceed max frametime.... */
    }
 
    if( !SDL_SemValue( vg_async.sem_wait_for_flush ) ){
index e0a252806b6dbdf02bf583e10d6cfce151f173ab..7f28c8ed270d8ad1b23fb43c32dcf7483a39b4a4 100644 (file)
@@ -10,7 +10,8 @@
 static void vg_assert_thread( enum vg_thread_purpose required );
 
 typedef struct vg_async_item vg_async_item;
-struct vg_async_item{
+struct vg_async_item
+{
    vg_async_item *next;
 
    void *payload;
@@ -30,14 +31,24 @@ struct vg_async
 }
 extern vg_async;
 
-/* TODO: Docu */
+void vg_async_init(void);
 
+/*
+ * Make a simple async call without allocating extra.
+ */
 void vg_async_call( void (*runner)( void *payload, u32 size ), 
                     void *payload, u32 size );
+
+/*
+ * Run as much of the async buffer as possible
+ */
 void vg_run_async_checked(void);
-void vg_async_init(void);
 
+/*
+ * Allocate an asynchronous call with a bit of memory
+ */
 vg_async_item *vg_async_alloc( u32 size );
+
 /*
  * Mark the call as being filled and ready to go
  */
index 2787423e7e23b5e7076e8c63f0afa85b15761452..a57948771f071de9807a2d4fb0150434226d9433 100644 (file)
@@ -51,18 +51,23 @@ typedef struct audio_lfo audio_lfo;
 
 struct audio_clip
 {
-   union {              /* TODO oof.. */
-      u64 _p64_;
+   union 
+   {
       const char *path;
       void *func;
+
+      u64 _p64_; /* force width to be 64 because we save this structure on
+                    disk in Skaterift yay */
    };
 
    u32 flags;
    u32 size;
 
-   union
-      u64 _p64;
+   union
+   { 
       void *data;
+
+      u64 _p64;
    };
 };
 
index ec8fb0d81a765d86626e0e442e7d9f2daf6a2769..b69b287267a18de62cacaddcab2db1b98e279dc4 100644 (file)
@@ -10,6 +10,9 @@
 
 #pragma once
 
+#include "vg_platform.h"
+#include "vg_engine.h"
+
 struct vg_loader
 {
    /* Shutdown steps */
index f70a39b03c00dd55755ac9b0dadada566ef9c636..1c1d0583fe4092619f3824462c2f043a881da390 100644 (file)
@@ -262,7 +262,6 @@ int rb_capsule__box( m4x3f mtxA, rb_capsule *ca,
    v3_sub( c1, p1, d1 );
    v3_sub( p1, p0, da );
    
-   /* TODO: ? */
    v3_normalize(d0);
    v3_normalize(d1);
    v3_normalize(da);