1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2025-01-24 17:26:41 +00:00
Commit graph

556 commits

Author SHA1 Message Date
fgenesis
7b8f540c7e Fixes to skel keyframe handling that would usually skip the first keyframe
This didn't seem to cause problems since apparently nothing ever depended
on the first keyframe being processed properly (ie. animationKey(),
bone commands, sounds, particle spawning, etc).
Curiously this was never an issue in the editor since the first keyframe
is hit immediately (since it keeps the time clamped to 0 when not animating),
and the first keyframe triggered ONLY when t==0 exactly.

With this change no keyframes are skipped, and during an animation loop,
the last and the first keyframe are hit together.
entity_setAnimationTime() got an extra param whether to skip keyframes
when setting the time manually (if not skipping, it'll catch up).

This commit also fixes a bug(?) that animationKey() was called with key -1
when changing animations, which was a side-effect of how the old code worked.
(I hope nothing depended on this behavior, i'm not sure but i think it's safe to fix)
2025-01-17 05:38:07 +01:00
fgenesis
140aa4d78d fix Lua func obj_fhTo() and variants, minor related cleanups in RenderObject 2025-01-13 04:57:35 +01:00
fgenesis
0e1283a4d7 Rework bone selection logic
A skeleton no longer has a "selectedBone".
It's all in the anim editor now.
2025-01-13 02:53:33 +01:00
fgenesis
1138eab08e couple random warning fixes, no functional changes 2025-01-13 00:56:28 +01:00
fgenesis
63892518cd more fixes and improvements to anim editor; eliminate OutlineRect 2025-01-12 18:42:58 +01:00
fgenesis
db2b71c3d8 fix many new anim editor bugs & typos after recent changes 2025-01-12 04:24:42 +01:00
fgenesis
d2040adbd5 more tweaks to anim editor, allow seeking via timeline when RMB is held 2025-01-12 03:30:08 +01:00
fgenesis
8369a7168f anim editor: support up to 9 tracks/anims at once. wip still. 2025-01-12 02:15:40 +01:00
fgenesis
2b2d4c712f exorcise another sneaky case of bubble sort 2025-01-08 03:52:45 +01:00
fgenesis
46d7a68034 remove GRID_DRAW_WORLDMAP and some associated code 2024-11-15 03:28:11 +01:00
fgenesis
c44c67a063 Worldmap overhaul, part 1
In short:
- No more grid-for-alpha; everything uses generated textures now
  (With proper bilinear filtering so it looks like the old method)
- All tiles are now shown partially uncovered at the same time;
  selecting one is no longer needed
- Gems can now be local (associated to a tile) or global.
  Local games move with their tile, global ones stay where they were placed

Background:
Originally there were two possible implementations of how to render the world map:
- One used write-alpha-to-texture to implement graual uncovering.
- The other (permanently enabled) used the DrawGrid to render the map tiles
  as a fine grid, each little square having its own alpha value
The downside of the first method was that it didn't look as good as the
second, so i guess that's why it was never fully finished.
The main downside of the second method was that it burned a lot of vertices
just to do alpha, so only one tile at a time could show the detailed grid.

I also never liked how an entire tile was effectively fully uncovered once
the map was first entered, taking away a lot of the exploration feeling
that could have been there if everything that hasn't been explored would be
completely invisible.
I've added this worldmap uncovering method as an optional config param,
<WorldMap revealMethod="1"/> but i've decided to fully switch over now.

Things left to be done:
- create a WorldMapRender instance only once and keep the tiles across map loads
- add debug option to reload/recreate worldmap at runtime
- cleanup gem storage and carry over the player gem properly (ged rid of std::list)
- remove "worldmap" grid render type
- Add more user "pyramid" gems as world map markers. More colors!
- check that gems and beacons still work as they should
2024-11-15 03:12:14 +01:00
fgenesis
b7eb5777ae save savefile previews as png. this finally kills .zga format, but it's kept for backwards compat 2024-11-09 03:46:52 +01:00
fgenesis
91b7c0bf3f Support _mods/modname/mod-info.xml in addition to the old _mods/modname.xml
Needs directory enumeration; I'm not sure that it builds on linux.
Will fix if it doesn't.
2024-11-04 22:38:29 +01:00
fgenesis
b59fb507ca Reduce Game::fillGrid() complexity from O(n^2) to O(n) when trimming
Eliminates stutter on slow machines or in debug mode when operating doors.
Also the game shouldn't freeze anymore when marking very large tiles
as obstructing.
2024-11-04 04:47:34 +01:00
fgenesis
55a37e7728 fix missed break in prev^2 commit 2024-10-15 04:11:30 +02:00
fgenesis
b8a9815de7 Change the text input box to use SDL textinput events
Add a cheap replacement for SDL1 that doesn't have textinput events.
2024-10-15 04:07:22 +02:00
fgenesis
22e682cebc don't lose tile flags when changing solidness; update grid when flipping solid tile 2024-09-23 23:29:10 +02:00
fgenesis
fef32b042c keep texture data in host RAM when pixel data are needed, eg. for collision calculations
This avoids downloading from the GPU *every single time*
the pixel data are needed
2024-09-23 03:28:03 +02:00
fgenesis
c7aa3e2ec3 typo; fix tile wavy-effect flip (this effectively made numpad 5+6 effects the same) 2024-09-22 04:32:18 +02:00
fgenesis
798b6193ab fix a warning 2024-09-22 03:23:51 +02:00
fgenesis
2c2153de9d Add MOUSE_BUTTON_REAL_* mapping IDs because sometimes we need to handle unmapped mouse buttons
One such case is the editor; if Ctrl was mapped to RMB then rotating
tiles in 45° increment mode is impossible
(since the editor checks for Ctrl to enable increment mode,
and it did the wrong thing when releasing "both" at the same time)
2024-09-22 02:36:18 +02:00
fgenesis
a046038c33 very minor perf thing: skip some RenderObject child checks when there are no children 2024-07-13 06:48:30 +02:00
fgenesis
1573eea051 optimize moving tiles to front/back a bit
First i thought this would fix the bug fixed in the prev. commit,
but it was unrelated.
Now that i've changed it and made it more readable, may as well keep it.
2024-07-13 06:47:07 +02:00
fgenesis
a5b25af6d5 ocd fix 2024-07-08 01:54:13 +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
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
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
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
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
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
5c0237b4e5 fix typo that broke moving tiles between layers 2024-05-08 03:25:19 +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
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
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
d47aeea2ce Cleanup to world<->window coord conversion; add toWorldFromWindow() Lua func 2024-04-28 00:03:51 +02:00
fgenesis
f7090f33d5 fix issues with glDrawBuffersARB() code path in prev commit 2024-04-26 03:28:07 +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
5a24f2868b fix handling of EF_HURT -- shouldn't be trimmed 2024-01-31 01:11:25 +01:00