Commit f36c60b
committed
Harden the parser; add an error API; add web builds and a sample viewer; bump version to 1.1.0
That was quite a lot I've been dragging my feet on.
Security and memory safety:
* Fix discovered memory-safety bugs: signed-overflow in the warp grid
expansion, an out-of-bounds read on negative keyframe indices, NULL+0
pointer arithmetic when the blend-key table is empty, NULL derefs on
empty art-mesh bindings and missing key_count reads at the blend-window
boundary, and an index underflow in psm__valid_range.
* Improved fuzzing verification: PSM_DEBUG_MALLOC build mode that uses
`malloc` for every model field.
Public API:
* Add per-model csmGetLastError / csmGetErrorString; record error codes
in the MOC3 header's padding, and expose csmGetMocError so applications
can receive detailed failure status.
* Add csmGetExtendedVersionString() with embedded git hash to query the
exact library build.
* Misc. correctness fixes: propagate color to opacity-0 meshes and stop the
v5.3 extended-modes bit masking constant-mode bits.
Style / housekeeping:
* .clang-format for the library (BSD-KNF) and samples/viewer (raylib
layout), a clang-format pre-commit hook, make format/format-check
targets, and a CI check.
* Line wrapping, standardizing on `bool` for all booleans, remove VLAs,
rename many symbols for consistency, and more!
Sample viewer:
* Implement a sample MOC3 viewer (both v5 and v6 ABI support) using Raylib.
Supports all blend modes from v6.
WASM port:
* Web/WASM drop-in Live2DCubismCore.js for both v5 and v6.
Build:
* Makefile rewrite with per-OS shared rules and a proper platform matrix.
WASM support also added.
* Bundle now generated from a template (src/bundle.c.in) instead of manually
by a script.
* CMake build system added for cross-compilation. This should be easier to
build on plain Windows.
CI:
* Misc improvements: cross-build is skipped on v* tag pushes (the release
job rebuilds the matrix itself), and the release job verifies the tag
matches PSM_TRUE_VERSION in the header before building.1 parent 97dd2a5 commit f36c60b
83 files changed
Lines changed: 14323 additions & 2049 deletions
File tree
- .githooks
- .github/workflows
- cmake
- docs
- include
- scripts
- src
- samples
- vendor
- viewer
- shaders
- tests
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
11 | 28 | | |
12 | 29 | | |
13 | 30 | | |
| |||
28 | 45 | | |
29 | 46 | | |
30 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
31 | 54 | | |
32 | 55 | | |
33 | 56 | | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
41 | 64 | | |
42 | 65 | | |
43 | 66 | | |
44 | 67 | | |
45 | 68 | | |
46 | 69 | | |
47 | 70 | | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
48 | 102 | | |
49 | | - | |
| 103 | + | |
50 | 104 | | |
51 | 105 | | |
52 | 106 | | |
53 | 107 | | |
54 | 108 | | |
55 | | - | |
| 109 | + | |
56 | 110 | | |
57 | 111 | | |
58 | 112 | | |
59 | 113 | | |
60 | | - | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
61 | 118 | | |
62 | 119 | | |
63 | 120 | | |
64 | 121 | | |
65 | 122 | | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
66 | 139 | | |
67 | 140 | | |
68 | 141 | | |
| |||
73 | 146 | | |
74 | 147 | | |
75 | 148 | | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
76 | 173 | | |
77 | 174 | | |
78 | 175 | | |
| |||
92 | 189 | | |
93 | 190 | | |
94 | 191 | | |
95 | | - | |
| 192 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
0 commit comments