mirror of
https://github.com/ZDoom/zdbsp.git
synced 2025-02-14 08:01:16 +00:00
- fixed GLv2 nodes writing.
SVN r2290 (trunk)
This commit is contained in:
parent
5a5aafcce9
commit
478ecd5178
1 changed files with 6 additions and 5 deletions
|
@ -1223,10 +1223,10 @@ void FProcessor::WriteReject (FWadWriter &out)
|
|||
|
||||
void FProcessor::WriteGLVertices (FWadWriter &out, bool v5)
|
||||
{
|
||||
int i, count = (Level.NumGLVertices - Level.NumOrgVerts) * 2;
|
||||
fixed_t *vertdata = (fixed_t *)Level.GLVertices + Level.NumOrgVerts * 2;
|
||||
int i, count = (Level.NumGLVertices - Level.NumOrgVerts);
|
||||
WideVertex *vertdata = Level.Vertices + Level.NumOrgVerts;
|
||||
|
||||
fixed_t *verts = new fixed_t[count+1];
|
||||
fixed_t *verts = new fixed_t[count*2+1];
|
||||
char *magic = (char *)verts;
|
||||
magic[0] = 'g';
|
||||
magic[1] = 'N';
|
||||
|
@ -1235,9 +1235,10 @@ void FProcessor::WriteGLVertices (FWadWriter &out, bool v5)
|
|||
|
||||
for (i = 0; i < count; ++i)
|
||||
{
|
||||
verts[i+1] = LittleLong(vertdata[i]);
|
||||
verts[i*2+1] = LittleShort(vertdata[i].x);
|
||||
verts[i*2+2] = LittleShort(vertdata[i].y);
|
||||
}
|
||||
out.WriteLump ("GL_VERT", verts, sizeof(*verts)*(count+1));
|
||||
out.WriteLump ("GL_VERT", verts, sizeof(*verts)*(count*2+1));
|
||||
delete[] verts;
|
||||
|
||||
if (count > 65536)
|
||||
|
|
Loading…
Reference in a new issue