- replaced all direct access to vertex coordinates with wrapper functions.

So that code replacement can be done piece by piece and not all at once.
This commit is contained in:
Christoph Oelckers 2016-03-29 10:07:06 +02:00
commit c7ae4688a3
26 changed files with 328 additions and 299 deletions

View file

@ -167,8 +167,8 @@ static int WriteVERTEXES (FILE *file)
for (int i = 0; i < numvertexes; ++i)
{
mv.x = LittleShort(short(vertexes[i].x >> FRACBITS));
mv.y = LittleShort(short(vertexes[i].y >> FRACBITS));
mv.x = LittleShort(short(vertexes[i].fixX() >> FRACBITS));
mv.y = LittleShort(short(vertexes[i].fixY() >> FRACBITS));
fwrite (&mv, sizeof(mv), 1, file);
}
return numvertexes * sizeof(mv);
@ -189,7 +189,7 @@ static int WriteSEGS (FILE *file)
ms.v2 = LittleShort(short(segs[i].v2 - vertexes));
ms.linedef = LittleShort(short(segs[i].linedef - lines));
ms.side = segs[i].sidedef == segs[i].linedef->sidedef[0] ? 0 : LittleShort((short)1);
ms.angle = LittleShort(short(R_PointToAngle2 (segs[i].v1->x, segs[i].v1->y, segs[i].v2->x, segs[i].v2->y)>>16));
ms.angle = LittleShort(short(R_PointToAngle2 (segs[i].v1->fixX(), segs[i].v1->fixY(), segs[i].v2->fixX(), segs[i].v2->fixY())>>16));
fwrite (&ms, sizeof(ms), 1, file);
}
}