added some awful hackery to handle the different offsetting of Blood's native voxels vs. those imported via .DEF.

This commit is contained in:
Christoph Oelckers 2023-10-26 19:28:49 +02:00
parent 94b92a355d
commit bb6bb85508
3 changed files with 4 additions and 0 deletions

View file

@ -94,6 +94,7 @@ struct TexExtInfo
uint8_t tileshade; // Blood's shade.dat uint8_t tileshade; // Blood's shade.dat
}; };
int16_t tiletovox; // engine-side voxel index int16_t tiletovox; // engine-side voxel index
int16_t voxoffs;
picanm_t picanm; // tile-based animation data. picanm_t picanm; // tile-based animation data.
uint32_t flags; // contents are game dependent. uint32_t flags; // contents are game dependent.
TileOffs hiofs; TileOffs hiofs;

View file

@ -637,6 +637,8 @@ void viewProcessSprites(tspriteArray& tsprites, const DVector3& cPos, DAngle cA,
{ {
pTSprite->cstat &= ~(CSTAT_SPRITE_XFLIP | CSTAT_SPRITE_YFLIP); pTSprite->cstat &= ~(CSTAT_SPRITE_XFLIP | CSTAT_SPRITE_YFLIP);
auto tex = TexMan.GetGameTexture(pTSprite->spritetexture()); auto tex = TexMan.GetGameTexture(pTSprite->spritetexture());
auto ofs = GetExtInfo(nTex).voxoffs;
pTSprite->yoffset += ofs;
if (nAnimType == 7) if (nAnimType == 7)
{ {
pTSprite->Angles.Yaw = myclock.Normalized360(); pTSprite->Angles.Yaw = myclock.Normalized360();

View file

@ -87,6 +87,7 @@ void GameInterface::LoadTextureInfo(TilesetBuildInfo& info)
if (voxindex > -1 && (info.tile[i].extinfo.picanm.extra & 7) >= 6) if (voxindex > -1 && (info.tile[i].extinfo.picanm.extra & 7) >= 6)
{ {
info.tile[i].extinfo.tiletovox = voxindex; info.tile[i].extinfo.tiletovox = voxindex;
info.tile[i].extinfo.voxoffs = (uint8_t)info.tile[i].orgimage->GetOffsets().second;
} }
} }
} }