* fixed BLPloader - do not try to load over end of mip block

* fixed scale factor of doodads
This commit is contained in:
bluma4862 2008-04-13 14:52:35 +00:00
parent 66ec320724
commit f484de89a9
3 changed files with 6 additions and 4 deletions

View File

@ -103,7 +103,8 @@ IImage* CImageLoaderBLP::loadImage(io::IReadFile* file) const
core::array<DXC3chunk> imagedata3;
core::array<DXC1chunk> imagedata1;
for(u32 i=0;i<(header.mip_size[0]/8);i++)
u32 count = header.mip_size[0] / (header.alpha_bitdepth > 1 ? 16 : 8);
for(u32 i=0;i<count;i++)
{
if(header.compression==2&&header.alpha_bitdepth>1)
{

View File

@ -387,6 +387,7 @@ void SceneWorld::UpdateTerrain(void)
//doodad->addShadowVolumeSceneNode();
doodad->setPosition(core::vector3df(-d->x, d->z, -d->y));
doodad->setRotation(core::vector3df(-d->ox, -d->oy-90, -d->oz));
doodad->setScale(core::vector3df(d->scale, d->scale, d->scale));
SceneNodeWithGridPos gp;
gp.gx = mapmgr->GetGridX() + tilex - 1;
gp.gy = mapmgr->GetGridY() + tiley - 1;

View File

@ -50,15 +50,15 @@ struct MCIN_chunk
struct MDDF_chunk
{
uint32 id; // position in the MMDX list
uint32 uniqueid; // unique instance id (?)
uint32 uniqueid; // unique instance id
float x; // position (quaternion)
float y;
float z;
float a; // rotatation
float a; // rotation
float b;
float c;
uint16 flags;
uint16 scale;
uint16 flags;
};
struct MODF_chunk