From 29cadf524b9523013cc6e82ebd0fb051538f8b05 Mon Sep 17 00:00:00 2001 From: Ray Date: Mon, 14 Sep 2020 15:54:58 +0200 Subject: [PATCH] Updated raylib data structures (markdown) --- raylib-data-structures.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/raylib-data-structures.md b/raylib-data-structures.md index 4203ce2..d9710a6 100644 --- a/raylib-data-structures.md +++ b/raylib-data-structures.md @@ -49,9 +49,9 @@ Those structures are quite common in most of the engines out there. // Audio related data struct Wave; [20 bytes] [+4 bytes] // Wave data pointer (RAM) and data parameters - struct AudioStream; [12 bytes] [+4 bytes] // Audio buffer pointer (private) and parameters - struct Sound; [16 bytes] [+8 bytes] // Audio stream and samples count - struct Music; [18 bytes] [+12 bytes] // Audio stream and music data pointer for streaming + struct AudioStream; [16 bytes] [+8 bytes] // Audio buffer pointer (private) and parameters + struct Sound; [20 bytes] [+12 bytes] // Audio stream and samples count + struct Music; [32 bytes] [+16 bytes] // Audio stream and music data pointer for streaming ``` raylib abuses the data pass-by-value on most of its functions, actually, only around 10% of the functions require dealing with data pointers. For this reason, I tried to keep data structures as small as possible, usually under 64 bytes size, and use internal pointers when data requires modification by some function (usually Load/Update/Unload functions).