mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-15 06:08:35 +00:00
FREESCAPE: planar rendering fix
This commit is contained in:
parent
b14be7de66
commit
40c9f7941e
@ -228,6 +228,7 @@ void Area::draw(Freescape::Renderer *gfx, uint32 animationTicks, Math::Vector3d
|
||||
ObjectArray planarObjects;
|
||||
ObjectArray nonPlanarObjects;
|
||||
Object *floor = nullptr;
|
||||
Common::HashMap<Object *, float> sizes;
|
||||
float offset = !gfx->_isAccelerated ? 2.0 : 1.0;
|
||||
|
||||
for (auto &obj : _drawableObjects) {
|
||||
@ -271,6 +272,12 @@ void Area::draw(Freescape::Renderer *gfx, uint32 animationTicks, Math::Vector3d
|
||||
if (distance.length() > 0.0001)
|
||||
continue;
|
||||
|
||||
float sizeNonPlanar = object->_boundingBox.getSize().length();
|
||||
if (sizes[planar] >= sizeNonPlanar)
|
||||
continue;
|
||||
|
||||
sizes[planar] = sizeNonPlanar;
|
||||
|
||||
if (planar->getSize().x() == 0) {
|
||||
if (object->getOrigin().x() >= centerPlanar.x())
|
||||
offsetMap[planar] = -offset;
|
||||
|
Loading…
Reference in New Issue
Block a user