Updated raylib data structures (markdown)

master
Ray 4 年之前
父節點
當前提交
29cadf524b
共有 1 個檔案被更改,包括 3 行新增3 行删除
  1. +3
    -3
      raylib-data-structures.md

+ 3
- 3
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).

Loading…
取消
儲存