The water line is no longer offset by some pixels but goes exactly
where Game::waterLevel.x says it should. This compensates the change
in b8dee723a2 to look as it used to.
The original use case of the update flag was to prevent those layers that
only had map Element tiles on them to update each tile, which would be
very slow and most tiles never had any reason to be updated.
(Those that needed to were tracked in a separate list.)
Since the map Element class does no longer exist and tiles are handled
much more efficiently now, it makes sense to not arbitarily disable
object updates for layers that used to have only map tiles on them.
Note to self: This fixes the skeleton entities properly reacting to
shots now when placed on tile layers.
this fixes extra gridrenders (ie. for hurt or tile collision) showing stale
data when in the middle of setting tile properties while the gridrender
was displayed.
This re-implements movement compensation previoulsy done by
RenderObject::beforeScaleOffset, that got removed in 048a787cb1.
Turns out all that needs to be done is to take tile rotation into account.
(The removed FIXME comment has nothing to do with it; it's just a leftover
that turned out to work fine as-is)
- forgot to actually add new tiles, lol oops
- my fixup of the VERY weird tile randomizer made it less good looking,
replaced it with an easier and more readable version that looks fine imho
more accurate check than previously; because the normal isOnScreen()
uses a bounding circle check... which gets pretty large for something
that spans the entire screen width.
- remove top & bottom black bars
- fix minimap position to take virtual y offset into account
- same for editor bar, and version label
- fix grid render errorneously assuming that core->cameraPos.y was always 0
- fix typo in gradient height adjustment
- don't slide minimap when there's enough virtual space so that it's not in the way
Adjustments to make it a bit wider and make the reflection independent
of the camera position.
Still broken with vertical resolutions. Not worse than what it was though.
This commit changes a bunch of internal rendering logic to
use FBOs in a way that doesn't violate the GL spec.
The water surface FBO's output texture was bound for reading
while at the same time rendering the water surface back into the
same FBO! Depending on the card/driver/load/zoom factor/moon phase,
this could lead to water surface flickering, chessboard effects,
and other visual glitches.
In order to fix this an extra FBO is needed.
In theory this is a simple fix but in practice this is the Aquaria
codebase and everything is more complicated than it has any right to be.
Couple other things:
- FBOs no longer have a depth renderbuffer. Aquaria never uses the depth
buffer for anything, so this can go to save some memory.
Also remove renderbuffer GL function pointers.
- Make FBOs multi-"paged". This is supposedly more efficient on desktop GL,
if glDrawBuffer() supports GL_COLOR_ATTACHMENTn. This is currently checked
via the presence of glDrawBuffersARB().
- Main core FBO now has 2 pages becaus it's needed for the water surface.
The same 2 pages are later used by the after effect manager to ping-pong
postprocessing shaders. Remove private after effect FBO.
TODO:
- There's still a bug in the one-fbo-multiple-binding-points code path.
-> for now glDrawBuffersARB must be NULL to work properly.
- no longer uses GL matrix stack manipulation, all matrix math is done locally
- use fixed rotation matrixes for fh/fv
- don't touch GL buffers (fixes crash with prev. commit)
rq=0 used to hide the base head gfx to only show frames.
but rq=0 is not what we want after consolidating those extra quads into the base quad.
so in order to keep backwards compat, unhide a bone if it has frame tiles.