Page 1 of 1

[Not a bug] flooritem (and probably other stuff) shading

Posted: Tue Oct 24, 2006 4:59 pm
by linflas
i found this one when i made a teleporter that transports you from the land level with light greyblue shading to the forest level with black shading.
i made a grass flooritem that is used into both levels.
when i teleport into the forest, the grass keep the light greyblue shading color.
then i tried with a rock flooritem. if i "see" it in the land, and then go to the forest, it keeps the light greyblue shading too.
other flooritems in the forest have a black shading, because they weren't seen in the land...

Posted: Tue Oct 24, 2006 6:25 pm
by THOM
could it be that, after teleporting the shade-pixel isn't refreshed but taken from the old wallset you are coming from?

Posted: Tue Oct 24, 2006 6:52 pm
by linflas
yes it seems, but only on flooritems that have been displayed before.

Posted: Tue Oct 24, 2006 7:11 pm
by George Gilbert
Hmmm - that is actually working as intended.

The issue is that flooritems are specified by *actual* bitmaps for each scaling (as opposed to, say monsters, which only have a single bitmap and the engine scales and shades it).

Your flooritem is (presumably) making use of the auto-scaling feature for floor bitmaps. When the bitmap is scaled then it becomes an *actual* bitmap (which is logically completely independent of the original). The problem comes when you change areas to a differently shaded one at which point the engine *shouldn't* re-shade your bitmap (because it is a bitmap that you've specified).

The way to get around this is simply to have two different objects, one for use in each shading area - BTW this is what DM-II does for things like the stone table and mud in the graveyard / thicket areas...

Posted: Tue Oct 24, 2006 7:16 pm
by linflas
all right, i plan to use only 2 shade colors for the whole story.
i only have to duplicate grass and rocks at the moment, so that's not a big problem.