Convert md2 and mapmodelinfo to ObjC

FossilOrigin-Name: cfbd2ec1e63de153d5113d4f69ba8556107d9b1891e907b06745407573a45287
This commit is contained in:
Jonathan Schleifer 2025-03-04 00:51:34 +00:00
parent 6f64252d65
commit a94e06cb3b
5 changed files with 210 additions and 138 deletions

View file

@ -36,17 +36,17 @@ renderentities()
{
entity &e = ents[i];
if (e.type == MAPMODEL) {
mapmodelinfo *mmi = getmminfo(e.attr2);
if (!mmi)
MapModelInfo *mmi = getmminfo(e.attr2);
if (mmi == nil)
continue;
@autoreleasepool {
rendermodel(@(mmi->name), 0, 1, e.attr4,
(float)mmi->rad, e.x,
(float)S(e.x, e.y)->floor + mmi->zoff +
rendermodel(mmi.name, 0, 1, e.attr4,
(float)mmi.rad, e.x,
(float)S(e.x, e.y)->floor + mmi.zoff +
e.attr3,
e.y,
(float)((e.attr1 + 7) - (e.attr1 + 7) % 15),
0, false, 1.0f, 10.0f, mmi->snap);
0, false, 1.0f, 10.0f, mmi.snap);
}
} else {
if (OUTBORD(e.x, e.y))