On Mon, Jan 26, 2009 at 11:19 PM, Kai Sterker <kai.ster...@gmail.com> wrote:

> During collision phase, we already retrieved all tiles beneath the
> character to figure out the ground level. These are the tiles that
> during rendering will potentially have the shadow on them.
> So with only a minimum overhead, each of those tiles gets the shadow
> object assigned.
> Of course, these tiles might be so far below the character, that the
> shadow would not be visible on the mapview. In that case, those tiles
> do not even appear during rendering.
>
> If a tile gets rendered, we will also draw the shadow. We use the
> object bounding box to clip the shadow to this tile. Afterwards, we
> subtract the clipping rectangle from the shadow area, so that this
> part of the shadow will not be drawn on the next tile.

It's implemented and committed. Unfortunately, there's one major flaw:

Rendering usually happens in reverse z-order, so currently the shadow
will always be applied to the bottom-most object. That means, all the
clipping and cutting the shadow in parts needs to happen at the
collision detection stage, where we actually have the objects in the
correct order. Then, during rendering, we just draw and don't have to
worry about any order.

For today I'm done, however. So enjoy the shadow on the ground ...
more correct behavior should come soon.

Kai


_______________________________________________
Adonthell-devel mailing list
Adonthell-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/adonthell-devel

Reply via email to