diff --git a/atlas-start.tim b/atlas-start.tim index 70ec62b..c6b33ae 100644 Binary files a/atlas-start.tim and b/atlas-start.tim differ diff --git a/ps1bsp.h b/ps1bsp.h index b355ae4..b35d933 100755 --- a/ps1bsp.h +++ b/ps1bsp.h @@ -42,8 +42,8 @@ typedef struct typedef struct { unsigned char w, h; // These may be necessary for scaling UVs, especially since we use a mix of mip0 and mip1 textures - unsigned short tpage; // Texture page in PS1 VRAM (precalculated when generating the texture atlas) unsigned char uoffs, voffs; // Texture coordinate offset within the texture page + unsigned short tpage; // Texture page in PS1 VRAM (precalculated when generating the texture atlas) unsigned short nextframe; // If non-zero, the texture is animated and this points to the next texture in the sequence } ps1bsp_texture_t; diff --git a/test.ps1bsp b/test.ps1bsp index 49a0e86..edcc416 100755 Binary files a/test.ps1bsp and b/test.ps1bsp differ diff --git a/world.c b/world.c index 0898208..ed957c6 100644 --- a/world.c +++ b/world.c @@ -336,8 +336,8 @@ static void world_drawface(const world_t *world, const ps1bsp_face_t *face) { const ps1bsp_vertex_t *vert = &world->vertices[faceVertex->index]; *((SVECTOR*)curVec) = *((SVECTOR*)vert); - curVec->u = faceVertex->u + faceTexture->uoffs; - curVec->v = faceVertex->v + faceTexture->voffs; + curVec->u = (u_short)faceVertex->u + faceTexture->uoffs; + curVec->v = (u_short)faceVertex->v + faceTexture->voffs; curVec->pad = faceVertex->light; }