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

392 commits

Author SHA1 Message Date
fgenesis
71ceac4d22 oops 2022-07-02 21:04:18 +02:00
fgenesis
cfba5d7d4a update RenderObject::gravity like the rest of the InterpolatedVectors 2022-06-20 18:39:08 +02:00
fgenesis
614f987df2 Make Game::fillGridFromQuad() and RenderObject::getInvRotPosition() use glm instead of the GL matrix stack 2022-06-20 18:36:49 +02:00
fgenesis
baa1170e6f remove RenderObject::isPieceFlippedHorizontal() + tiny cleanup 2022-06-20 17:46:37 +02:00
fgenesis
21c51e06cb git gud 2022-06-20 04:35:51 +02:00
fgenesis
f01db61292 show better errors when we fail to start up 2022-06-20 04:25:18 +02:00
fgenesis
60dd1d7bc7 fix build on osx? 2022-06-19 03:59:54 +02:00
fgenesis
e960b238be revert part of 72f2b44620, now rendering of entities that are just simple quads is ok again 2022-06-10 03:51:26 +02:00
fgenesis
72f2b44620 Tiny simplification in render pass logic 2022-06-09 02:32:19 +02:00
fgenesis
a2e7e4a670 undo prev. commit and fix this properly. i'm just blind. 2022-06-06 01:41:50 +02:00
fgenesis
8b3c00dc76 fix quad coloring when overridden by parent (eg. entity damage flash) 2022-06-05 23:40:26 +02:00
fgenesis
b4ae208886 remove now unused constant OVERRIDE_NONE 2022-05-25 21:19:14 +02:00
fgenesis
4e9e0acb4a correct rendering entities that have no skel 2022-05-25 21:18:55 +02:00
fgenesis
f91d66a0e0 bind texture only when we're really about to render 2022-05-25 01:05:52 +02:00
fgenesis
f466e1e7c8 remove overrideRenderPass completely
Also removes Lua functions:
- obj_setOverrideRenderPass()
* entity_setRenderPass() is now the same as obj_setRenderPass(),
  without the special case alternate name in Lua
2022-05-25 00:40:47 +02:00
fgenesis
1a90625979 refactor rendering logic to be a lot less wasteful
Observations:
- Entity::renderPass was never set to RENDER_ALL -> can simplify some things
- The initial pass check in RenderObject::render() was constant for each pass
-> All logic that is per-pass-constant can be moved to a renderability pre-check
- Core::overrideStartLayer, Core::overrideEndLayer, Core::rlayer were never used
- Should be possible eventually to prepare & render layers in parallel

I am not sure if the changes in this commit are 100% correct, but layer passes
are still working and the hug looks like it should.

Thinking about it, the overrideRenderPass functionality should never have existed.
The game scripts don't actually use entity_setRenderPass
(which in turn calls Entity::setOverrideRenderPass())
so I might remove that function in a future commit,
together with the rest of the "override" functionality.
2022-05-22 17:26:16 +02:00
fgenesis
da23098692 remove PostProcessingFX
It was broken on modern graphics cards anyway and should rather be re-introduced
in a cleaner way once the renderer is ready for it
2022-05-21 18:56:27 +02:00
fgenesis
693223552d remove Quad::createStrip(), related members, and cleanup Bone strip handling
Saves some work when rendering EVERY SINGLE QUAD in the game
2022-05-21 17:31:50 +02:00
fgenesis
80d23900de Don't cache blend type while glBlendFunc() is still called elsewhere 2022-05-21 16:31:38 +02:00
fgenesis
5c558c122f Remove RenderObject::setColorMult() hack and related members 2022-05-21 16:31:10 +02:00
fgenesis
cec6bc5ebf Remove Quad::repeatingTextureToFill 2022-05-20 04:05:54 +02:00
fgenesis
5c419efd79 Remove RenderObject::updateAfterParent; simplify + clarify ParentManaged logic
SkeletalSprite was the only thing using it.
Instead of PM_STATIC it's now added to its Entity as PM_NONE.
PM_NONE is not auto-updated so SkeletalSprite::update() is now called
at the end of Entity::onUpdate()

(There's now a bug that during spirit form the screen stays black,
probably added that in an earlier commit. Will fix.)

(On second tought, maybe ParentManaged should be boolean.
Instead add a noAutoUpdate flag. But i'll save that for another time when i get around
to move all RenderObject bools into a bitmask.)
2022-05-20 03:27:15 +02:00
fgenesis
68b3c61852 Add RenderState to be passed through the scene graph
This will eventually handle all mutable state during rendering
2022-05-20 01:04:19 +02:00
fgenesis
b6fb6944f6 first step towards making the render process const 2022-05-19 05:17:00 +02:00
fgenesis
46010244f5 remove RenderObject::blendEnabled and cleanup the blend code a bit 2022-05-19 01:34:31 +02:00
fgenesis
06270eaac0 remove RenderObject::childGarbage 2022-05-19 00:01:27 +02:00
fgenesis
140f750d00 More RenderObject slimming; reorder members, split out motion blur data + collideRadius, add new CollideQuad type
CollideQuad is now base class for Shot, Entity, Bone
2022-05-18 19:44:42 +02:00
fgenesis
ac80b3461a simplify RenderObject::renderCall() a bit 2022-05-18 04:04:44 +02:00
fgenesis
4db7990ac2 remove displaylist support
i'd rather trim all possible fat off the renderer and then modularize it
into multiple backends. gotta start somewhere.
2022-05-18 03:39:33 +02:00
fgenesis
c82aab1e51 Move RenderObject::positionSnapTo to PauseQuad
And another RenderObject member less...
2022-05-18 02:52:30 +02:00
fgenesis
046b98c725 delete some unused code 2022-05-18 02:38:53 +02:00
fgenesis
111cd43805 Move members related to collision mask from RenderObject to Bone 2022-05-18 02:15:19 +02:00
fgenesis
e33bde0a89 Small extension to bone:
+ attrib c="0" in the anim XML to turn off all collision for a bone
  even if collide radius or collision mask is set
+ Lua func: bone_toggleCollision() to change the above setting at runtime
+ Lua func: bone_spawnParticlesFromCollisionMask()
- Fix int truncation in entity_collideSkeletalVsLine()
2022-05-18 01:18:27 +02:00
fgenesis
e1f78aaca7 QuadGrid now working 2022-05-14 05:14:08 +02:00
fgenesis
fa35ee41bd some work on quadgrid, still untested 2022-05-13 17:13:27 +02:00
fgenesis
ad36f6cf99 remove unused QuadTrail 2022-05-12 17:35:39 +02:00
fgenesis
e357a22784 another temp commit 2022-05-07 02:47:59 +02:00
fgenesis
ce4ca7f794 Temp commit, some WIP things:
- QuadGrid draft
- Fix minimap_setHealthBarTex accidentally calling MiniMapRender::setAvatarTex
- don't trunkcate to int in entity_rotateTo*() functions
2022-05-06 19:14:47 +02:00
fgenesis
764d106d50 Work around issues with SDL_WarpMouse() in SDL > 2.0.20
Without this and using an affected SDL version, the song circle
is all jittery; the mouse cursor appears to really like to stick
to notes in the left half of the circle.

This issue first appeared in SDL commit 82793ac279d19b5 and caused
the entire game to hang (infinitely firing mouse motion events);
SDL commit 31f8c3ef4409a93fa fixed the hang but instead made
SDL_WarpCursor() jittery.
(Also see SDL commit 331859079674465 for a follow-up)
2022-05-04 03:04:26 +02:00
fgenesis
e32603e6c0 less compression for screenshots so taking one is faster 2022-04-29 10:34:10 +02:00
fgenesis
9290acd379 fix taking screenshots 2022-04-29 10:26:25 +02:00
fgenesis
988c8c79e4 set better default compiler options; optional console in release mode on windows 2022-04-08 19:31:16 +02:00
fgenesis
b1611d4870 oops, spam a little less 2022-04-07 03:14:54 +02:00
fgenesis
a97b1bbd5c try harder to display early errors (eg. before SDL init) 2022-04-07 03:12:21 +02:00
fgenesis
d34a962e78 fix linux/gcc build 2022-04-07 03:11:24 +02:00
fgenesis
49b9e0f05a Rework & cleanup CMake project files
- Building with CMake for development is now actually sane
- Split deps into projects and extra files
- Building against external deps should still work but needs testing
- Can now build out of the box without further adjustments as long as SDL(2) is found properly
- Build Lua in C++ mode (so it can use exceptions instead of setjmp/longjmp)
  - Unfortunately we need to enable exceptions for this :(

- Remove these defines:
  * AQUARIA_BUILD_SCENEEDITOR (now always on)
  * AQUARIA_BUILD_CONSOLE (now always on)
  * BBGE_BUILD_ACHIEVEMENTS_INTERNAL (now always on unless BBGE_BUILD_STEAMWORKS is defined)
  * BBGE_BUILD_OPENGL_DYNAMIC (now always on, define BBGE_BUILD_OPENGL_STATIC if needed)
  * BBGE_BUILD_FMOD_OPENAL_BRIDGE (now always on)
- BBGE_BUILD_STEAMWORKS is not actually implemented (any volunteers?)
- Prepare later removal of SDL & the old vc90 project from the repo. See #74 for extra notes.
2022-04-07 02:38:39 +02:00
fgenesis
f0f9f1a719 Fix wrongly disabled mipmap sampling in GL_GENERATE_MIPMAP mode 2022-04-05 10:02:33 +02:00
fgenesis
e7594ecead Obsolete & remove BBGE_BUILD_SDL2. Closes #65. 2022-04-05 09:58:57 +02:00
fgenesis
96216503c4 remove zlib, libpng, glpng and related code; add some stb libs; rework texture loading 2022-03-31 21:03:40 +02:00
fgenesis
e07723939f thanks clang 2022-03-30 19:32:37 +02:00