Differences From Artifact [1b5856edcb]:
- File
src/MD2.m
— part of check-in
[6b85eefc85]
at
2025-03-23 02:47:40
on branch trunk
— Remove loop[ijkl]
They confused clang-format a lot. (user: js, size: 5212) [annotate] [blame] [check-ins using]
To Artifact [a74f6892f8]:
- File src/MD2.m — part of check-in [b5bfe2af86] at 2025-03-23 02:59:37 on branch trunk — Remove u{char,short,int} (user: js, size: 5236) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
10 11 12 13 14 15 16 | int numSkins, numVertices, numTexcoords; int numTriangles, numGlCommands, numFrames; int offsetSkins, offsetTexcoords, offsetTriangles; int offsetFrames, offsetGlCommands, offsetEnd; }; struct md2_vertex { | | | 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | int numSkins, numVertices, numTexcoords; int numTriangles, numGlCommands, numFrames; int offsetSkins, offsetTexcoords, offsetTriangles; int offsetFrames, offsetGlCommands, offsetEnd; }; struct md2_vertex { unsigned char vertex[3], lightNormalIndex; }; struct md2_frame { float scale[3]; float translate[3]; char name[16]; struct md2_vertex vertices[1]; |
︙ | ︙ | |||
124 125 126 127 128 129 130 | OFAssert(_mverts[frame] == NULL); _mverts[frame] = OFAllocMemory(_numVerts, sizeof(OFVector3D)); struct md2_frame *cf = (struct md2_frame *)((char *)_frames + _frameSize * frame); float sc = 16.0f / scale; for (int vi = 0; vi < _numVerts; vi++) { | | | 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 | OFAssert(_mverts[frame] == NULL); _mverts[frame] = OFAllocMemory(_numVerts, sizeof(OFVector3D)); struct md2_frame *cf = (struct md2_frame *)((char *)_frames + _frameSize * frame); float sc = 16.0f / scale; for (int vi = 0; vi < _numVerts; vi++) { unsigned char *cv = (unsigned char *)&cf->vertices[vi].vertex; OFVector3D *v = &(_mverts[frame])[vi]; v->x = (snap(sn, cv[0] * cf->scale[0]) + cf->translate[0]) / sc; v->y = -(snap(sn, cv[1] * cf->scale[1]) + cf->translate[1]) / sc; v->z = (snap(sn, cv[2] * cf->scale[2]) + cf->translate[2]) / sc; } } |
︙ | ︙ |