| Age | Commit message (Collapse) | Author |
|
|
|
|
|
Some bonus off by ones and rounding corrections
|
|
|
|
I can't quite explain it, but something about the way floating point
numbers round meant that we weren't calculating consistent
distances (in pixels) for the length of the strip between the top of
the floor and the bottom of the ceiling in cells which had both.
|
|
Plus bonus graphical artefacts around the edges of such! In the end
the majority of this code was rather easy: take the upwards floor
drawing code and reflect it.
However, there were many edge-cases and plenty of off-by-one pixels
and rounding issues that didn't quite work the same way going down as
they do going up. Also the object drawing code used to take advantage
of the fact that the z-buffer was painted bottom-up only, so that
required change too.
|
|
|
|
|
|
Pre-emptive micro-optimisation is bad. There aren't that many sprites
pixels usually anyway.
|
|
Some amount of work went into finding appropriate integer arithmetic
formulae that were reasonably accurate. At this point i've settled for
the incorrect-but-faster version. The better-though-slower formulas
are still there in case i change my mind.
It would help to have an assumption such as, but not limited to, the
surfaces are always going to be fully opaque.
|
|
This confines hardware acceleration to scaling and the background
sprite. Unfortunately it would seem that to do proper object
rendering (partial transparency) i'll have to implement colour mixing
myself.
|
|
|
|
|
|
|