Browse Source

Updated vertex field names to match, to facilitate blitting to SVECTOR

master
Nico de Poel 3 years ago
parent
commit
225ec746ec
  1. 6
      main.cpp
  2. 2
      ps1bsp.h

6
main.cpp

@ -279,9 +279,9 @@ int process_faces(const world_t* world, const TextureList& textures)
// Ensure we don't overflow 16-bit short values. Most Quake maps will stay within these bounds so it *should* be fine (for now). // Ensure we don't overflow 16-bit short values. Most Quake maps will stay within these bounds so it *should* be fine (for now).
if (inVertex.x > -8192 && inVertex.x < 8192 && inVertex.y > -8192 && inVertex.y < 8192 && inVertex.z > -8192 && inVertex.z < 8192) if (inVertex.x > -8192 && inVertex.x < 8192 && inVertex.y > -8192 && inVertex.y < 8192 && inVertex.z > -8192 && inVertex.z < 8192)
{ {
outVertex.x = (short)(inVertex.x * WORLDSCALE);
outVertex.y = (short)(inVertex.y * WORLDSCALE);
outVertex.z = (short)(inVertex.z * WORLDSCALE);
outVertex.vx = (short)(inVertex.x * WORLDSCALE);
outVertex.vy = (short)(inVertex.y * WORLDSCALE);
outVertex.vz = (short)(inVertex.z * WORLDSCALE);
} }
else else
{ {

2
ps1bsp.h

@ -63,7 +63,7 @@ typedef struct
// This matches the SVECTOR data type; we can use the extra padding to store some more data. // This matches the SVECTOR data type; we can use the extra padding to store some more data.
typedef struct typedef struct
{ {
short x, y, z;
short vx, vy, vz;
short pad; short pad;
} ps1bsp_vertex_t; } ps1bsp_vertex_t;

Loading…
Cancel
Save