1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2024-11-25 17:53:47 +00:00
Commit graph

1239 commits

Author SHA1 Message Date
fgenesis
d4b80525a9 Merge branch 'more-bspline' into tile-optimization 2024-07-07 05:36:51 +02:00
fgenesis
b55b5a033c make both spline modes toggle-able ("assist" mode) 2024-07-07 05:36:21 +02:00
fgenesis
8efdec5aa0 bugfixes 2024-07-07 03:45:47 +02:00
fgenesis
e34b854338 tbsp: bugfix when outputStride > 1 2024-07-07 03:31:17 +02:00
fgenesis
36aaa77436 bspline point gen is now properly integrated and only called while in the editor.
the remaining code uses the same old basic control points as it previously did.
2024-07-07 03:30:54 +02:00
fgenesis
77611b4188 dmon/win32: make it not need stdint.h 2024-07-05 02:11:25 +02:00
fgenesis
7d2f961573 tbsp: split into alloc, prep, generation steps 2024-07-05 02:10:27 +02:00
fgenesis
fc3580ca64 new tbsp version; working spline control point generation prototype 2024-07-04 21:40:31 +02:00
fgenesis
753718c7ad HOW DID THIS EVER WORK 2024-06-28 00:50:52 +02:00
fgenesis
32168bae9f more node colors to indicate type of node:
green: with Lua script attached
purple: built-in effect, no Lua script attached
salmon: default (no effect, no script)
2024-06-27 23:45:26 +02:00
fgenesis
2373fd7170 fixed to dmon win32 backend (made a PR) 2024-06-27 23:43:58 +02:00
fgenesis
f71c7f5d40 make dmon optional at compile time, and a dedicated runtime option
it's still experimental and might cause problems,
so only enable this if specifically requested,
since it's not needed for regular gameplay
2024-06-27 23:43:26 +02:00
fgenesis
5895703ac4 derp 2024-06-25 04:53:31 +02:00
fgenesis
5a6810e063 integrate directory watching for mod gfx in dev mode, and reload texture files that change 2024-06-25 04:49:44 +02:00
fgenesis
5676c41f45 integrate dmon from https://github.com/septag/dmon 2024-06-25 04:43:13 +02:00
fgenesis
8b73101f42 small visual fix for particle collision on the water line
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.
2024-05-12 18:03:38 +02:00
fgenesis
bcffbac2b5 remove RenderObjectLayer::update. now all layers are updated, always.
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.
2024-05-12 18:01:43 +02:00
fgenesis
db98e79e1d update gridrender immediately if visible
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.
2024-05-12 17:48:19 +02:00
fgenesis
b4acacf3bc Fix logic oversights that would sometimes mess up map tiles when moved to front or back 2024-05-12 17:45:01 +02:00
fgenesis
cd50cf6b70 need sleep aaaa 2024-05-08 04:52:25 +02:00
fgenesis
0f98893f28 Don't render the dark layer when its corresponding tile layer is hidden.
This would have the old (as it was last updated when visible) dark layer
stuck on the screen.

Regression from 09edbf49fd
2024-05-08 04:39:59 +02:00
fgenesis
4ebce3e36b fix oversight that caused assertion fail when "moving" tiles from one layer to the same layer
should just ignore this case

glad i put in that assert there though
2024-05-08 03:26:26 +02:00
fgenesis
5c0237b4e5 fix typo that broke moving tiles between layers 2024-05-08 03:25:19 +02:00
fgenesis
c0ac410009 Fix editor single-axis scaling sliding the tile around
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)
2024-05-08 03:05:29 +02:00
fgenesis
09f3cc4096 editor: forgot to create tile repeat data when setting flag, causing a crash 2024-05-08 01:24:01 +02:00
fgenesis
812c958661 fix SceneEditor::skinLevel() not working
- 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
2024-05-07 01:57:20 +02:00
fgenesis
18b0527bda unbind framebuffer after init; fixes loading bar screen staying black 2024-05-07 00:44:04 +02:00
fgenesis
4bebd71198 make editor outline not so dull, closer to what it was 2024-05-06 04:27:28 +02:00
fgenesis
3adc3f0c99 Fix map grid not drawing and tiles not regenerating after editor obs regen (F11)
forgot to get max grid dimensions after clearing and recomputing the grid
2024-05-06 04:26:54 +02:00
fgenesis
0326800940 fix broken scrolling in mod selector in vertical mode 2024-04-28 13:15:41 +02:00
fgenesis
8d1a0a1a8a don't update render water surface framebuffer when off screen
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.
2024-04-28 04:04:30 +02:00
fgenesis
56922a0b6e Vertical mode is a go!
- mouse problems fixed
- make sure subtitles stay near the bottom of the screen
2024-04-28 03:08:44 +02:00
fgenesis
2cf5932eb3 Preliminary support for vertial orientation:
- 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
2024-04-28 02:08:38 +02:00
fgenesis
b8dee723a2 Improvements to water surface rendering; get rid of magic number fudgery.
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.
2024-04-28 00:06:18 +02:00
fgenesis
d47aeea2ce Cleanup to world<->window coord conversion; add toWorldFromWindow() Lua func 2024-04-28 00:03:51 +02:00
fgenesis
be99840c6a tweaks to water surface rendering 2024-04-27 14:34:53 +02:00
fgenesis
f7090f33d5 fix issues with glDrawBuffersARB() code path in prev commit 2024-04-26 03:28:07 +02:00
fgenesis
5b57d4d6ff fix crash on shutdown (didn't happen on alt+f4 for some reason) 2024-04-26 03:26:28 +02:00
fgenesis
09edbf49fd Changes to rendering logic, incl water surface flicker fix, plus other fixes.
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.
2024-04-25 03:33:02 +02:00
fgenesis
dd7ab0448f warning fixes, signed vs unsigned mismatch, cleanups, c++98 compat
many many more to do but it's a little step closer to get rid of warnings
2024-04-16 01:43:36 +02:00
fgenesis
ebf49310b3 compile fixes for clang when c++98 is enforced 2024-02-07 03:26:18 +01:00
fgenesis
8c467517fd fix waving for tiles with EFX_WAVY set; minor optimizations 2024-02-06 04:01:13 +01:00
fgenesis
063c270e6a fix bone with spline deform not deforming (forgot tp update VBO)
also fix SplineGrid to actually deform own texture
(note to self: GRID_WAVY resets deform in update(). oops)
2024-02-06 01:36:38 +01:00
fgenesis
cd46cc24fa fix possible crash in GridRender
probably introduced in 22c8471bf2
2024-02-06 01:34:20 +01:00
fgenesis
5a24f2868b fix handling of EF_HURT -- shouldn't be trimmed 2024-01-31 01:11:25 +01:00
fgenesis
7a5a222b78 SceneEditor: fix scaling node via mouse 2024-01-13 18:47:58 +01:00
fgenesis
22c8471bf2 Instead of drawing the entire grid, draw only the horiz. slice that is on screen
Still a single draw call but the vertex range to draw is greatly reduced.
2024-01-13 05:59:23 +01:00
fgenesis
511f064bbe Make GridRender use a single draw call instead of expensive grid scanning 2024-01-13 04:25:27 +01:00
fgenesis
70b8e69402 remove last traces of GL_BLEND/glBlendFunc() manipulation
everything goes through RenderState now
some calls are left in FTGL but properly invalidated afterwards
2024-01-11 23:05:47 +01:00
fgenesis
d3cbc181bd some more TileRender optimization
- 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)
2024-01-11 23:02:34 +01:00