1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2024-11-26 02:03:48 +00:00
Commit graph

461 commits

Author SHA1 Message Date
fgenesis
96f28702e4 fix anim editor not generating keyframes for newly inserted bones.
broke this during my recent anim editor work, oops
2022-11-13 12:29:11 +01:00
fgenesis
288fb6b7fa fix crash when saving skel after bones were removed 2022-10-12 18:59:25 +02:00
fgenesis
cc1530b5e5 eliminate one gigantic global float->uint->float roundtrip cast
whyyyy
2022-09-25 06:02:22 +02:00
fgenesis
58e9ba340e Add skel/bone gridDrawOrder attrib to control the way the gris is drawn
Also ignore grid.z (used as worldmap alpha) by default because it's really
only needed for the world map and ignoring it results in less GL calls.
2022-09-25 04:30:38 +02:00
fgenesis
cfa5d45932 render: remove one mutable hack, border color is now per-quad 2022-09-24 04:57:08 +02:00
fgenesis
e47d253945 fix derp in 4c52a147b0 2022-09-23 18:21:36 +02:00
fgenesis
575a83abd6 Initial implementation of bspline support in the animation editor 2022-09-23 18:10:44 +02:00
fgenesis
4c52a147b0 harden SimpleIStringStream against user errors and kill operator bool()
Like this:
  size_t x;
  if(is >> x) {...}
This used to return true despite x never being populated, because
is was casted to bool, which is fine to shift by uninitialized, and
likely returned true. Whatever.
2022-09-23 18:09:26 +02:00
fgenesis
b74c5a2986 Invert Quad::renderGrid() draw loop to be more cache friendly 2022-09-14 05:36:46 +02:00
fgenesis
4b64147914 MSVC optimizer doesn't like refs to primitive types 2022-09-14 05:21:25 +02:00
fgenesis
a1005dafe2 Make Bone::ANIM_* a bitmask. This also changes Lua constant ANIM_ALL from 10 to 3. 2022-09-14 05:20:37 +02:00
fgenesis
8e979e0e05 simplify Quad::drawGrid 2022-09-14 05:11:56 +02:00
fgenesis
29fd4ec44e clean up interpolators; WIP towards bspline support in anim editor 2022-09-13 18:38:44 +02:00
fgenesis
55689228bf Attempt to fix crash when instantiating Core alone but this is definitely not enough 2022-09-12 00:12:41 +02:00
fgenesis
0afd09dc75 bspline wip more 2022-09-05 17:19:34 +02:00
fgenesis
214590742d wip splines 2022-09-04 17:16:35 +02:00
fgenesis
a494a3f411 ignore mouse motion events generated by SDL_WarpMouse().
Also fix bug that mouse.change got stuck on a tiny value and constantly
move the camera in editor mode.
This is a continuation of 764d106d50 and seems to fix the
previous issues with SDL2 >= 2.0.17

Also remove some unused vars.
2022-08-24 14:16:25 +02:00
fgenesis
9e2c640b51 attempt to fix crash when loading a saved game on a map with an already collected health upgrade
This problem might have been introduced in 06270eaac0 but not sure.
The crash could happen due to a use-after-free memory access:
When deleting an entity with skel in postInit(), deletion would be
delayed by 1 frame because that is how entity_delete() works.
During deletion, RenderObject::children were removed and deleted
but SkeletalSprite::bones still had those pointers.
Additionally an object would delete its children in onUpdate() after
safeKill(), and still proceed to run scripts, which would then possibly
access freed memory too.
This fix causes children to not be deleted until we're out of the update()
cycle, and instead delete children together with the root object.
2022-07-18 23:00:22 +02:00
fgenesis
d7ff053efd Rewrite SceneEditor level generation and skinning, use light pink to designate areas that should not be skinned
This also fixes a long-standing off-by-one with the generated ObsRows:
Before this commit, the game would (upon F11) eat every black pixel from
the map template that was directly left of a white pixel, eg.
#### ## # ## ... would become
###  #    #  ...

GENERATED MAPS ARE NOW DIFFERENT!
With this bug gone, dumping obs (F8) and loading that back in as a map
template (F11) should now be fully round-trip compatible and not lose
pixels anymore.

Extra feature:
(R>=200, G in [128..199], B>=200) in the map template now designate zones
that should not be obstructed but also not generate border rocks when
skinned (F12). Makes editing energy temple styled maps much easier since
we don't have to manually erase tiles on layer "5" anymore, all the time.
2022-07-06 08:59:55 +02:00
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
fgenesis
2e3cd6a103 use (slightly fixed up) mojoAL instead of openALsoft in SDL2 builds 2022-03-21 18:03:01 +01:00
fgenesis
26759c8be1 remove iprof and BBGE_PROF (#74) 2022-03-17 20:50:42 +01:00
fgenesis
db079a55ef Replace the old Lua small block allocator with a new one (for #74)
Renamed original .c file to .cpp to make VS2008 happy
2021-01-23 14:07:39 +01:00
fgenesis
e4b2ee6e70 make travis happy (confirmed working with SDL1.2 + SDL2) 2021-01-23 13:52:10 +01:00
fgenesis
db054e7382 Fix startup on windows 10 with new SDL2 and sensors disabled by group policies 2021-01-23 13:23:33 +01:00
fgenesis
5897d369b0 Remove unused virtual RenderObject::onDestroy() method 2021-01-12 19:00:31 +01:00
fgenesis
4990ae3bf6 Fix ACTION_MENU* input to be sent as intended, broke in a7c2d054a2 iirc 2021-01-12 14:24:30 +01:00
fgenesis
37fa087c2e prevent jerkiness when creating window in fullscreen mode 2021-01-12 14:18:33 +01:00
fgenesis
067472d61b avoid creating a (0,0)-sized window at the start 2021-01-12 14:05:22 +01:00
fgenesis
a1f92433d8 fixes to window size management, fullscreen transition, etc 2021-01-12 11:06:09 +01:00
fgenesis
86cd7950ca Merge branch 'experimental' into controllerfixup + bring back BBGE_BUILD_OPENGL_DYNAMIC
# Conflicts:
#	BBGE/Base.cpp
#	BBGE/FrameBuffer.cpp
#	BBGE/Shader.cpp
2021-01-12 02:45:41 +01:00
False.Genesis
b3b3d98f79
Merge pull request #73 from dimag0g/experimental
Compatibility with non-standard build environments
2021-01-12 02:15:49 +01:00
fgenesis
94dbecac43 Only keep the one screen mode with the highest refresh rate per resolution 2021-01-12 01:57:29 +01:00
fgenesis
03c698320a Merge branch 'experimental' into controllerfixup
# Conflicts:
#	Aquaria/AnimationEditor.cpp
#	Aquaria/AquariaComboBox.cpp
#	Aquaria/AquariaMenuItem.h
#	Aquaria/Avatar.cpp
#	Aquaria/BitBlotLogo.cpp
#	Aquaria/Continuity.cpp
#	Aquaria/DSQ.cpp
#	Aquaria/DSQ.h
#	Aquaria/Game.cpp
#	Aquaria/Game.h
#	Aquaria/Intro.cpp
#	Aquaria/RecipeMenuEntry.cpp
#	Aquaria/SceneEditor.cpp
#	Aquaria/States.h
#	Aquaria/UserSettings.cpp
#	BBGE/ActionMapper.cpp
#	BBGE/Base.cpp
#	BBGE/BitmapFont.h
#	BBGE/Core.cpp
#	BBGE/Core.h
#	BBGE/ParticleManager.cpp
#	BBGE/Particles.h
#	BBGE/RenderObject.h
#	BBGE/Shader.cpp
#	BBGE/Shader.h
#	BBGE/SkeletalSprite.h
#	BBGE/Texture.cpp
#	BBGE/Vector.h
2021-01-12 00:26:44 +01:00
fgenesis
25696c4436 Enable msvc signed/unsigned mismatch warnings and fix remaining cases 2021-01-11 19:27:54 +01:00
Valentin Ochs
c3f1058ff2 Change some stuff for butt-endian architectures 2021-01-11 12:28:27 +01:00
Valentin Ochs
4c7c4c240e Fix some more warnings 2021-01-11 12:28:27 +01:00
Valentin Ochs
b9d402199c Get rid of a lot of gcc warnings
Mostly signed/unsigned comparisons. Also some bugs, but I don't remember
where :D
2021-01-11 12:28:27 +01:00
Dmitry Grigoryev
9596e7eac8 fix static FrameBuffer/Shader build 2021-01-02 02:14:15 +01:00
Dmitry Grigoryev
c6968454e6 Merge branch 'master' of https://github.com/dimag0g/Aquaria 2021-01-02 01:50:48 +01:00
fgenesis
c80176d20a preliminary support for joystick POV-hats 2020-07-07 22:30:25 +02:00
fgenesis
53b027067a improvements to key config menu
- hide actionset selection if only 1 set is present
- show keys pressed
- highlight "tabs" a bit more visually
- rumble selected controller on device select change
2020-07-07 16:24:03 +02:00
fgenesis
021512337e fix build on RPi4 (and probably newer gcc), thx pelupessy
Close #62
2020-07-04 18:13:48 +02:00
Yaroslav Isakov
74e196daa5 Force desktop OpenGL 2020-07-01 18:46:13 +02:00
fgenesis
1de786efc6 Fix bug that a bone's rq="0" attribute would disappear when skel was saved while visible 2019-09-06 02:56:53 +02:00
fgenesis
61f1e87180 fix uninitialized ptr. ooopsie 2019-04-15 02:26:48 +02:00
fgenesis
6704fd1ac6 fix SDL 1.2 window focus handling 2019-03-24 21:15:27 +01:00
fgenesis
0abe0f821c hard-wire Escape key to always trigger ACTION_ESC.
Additional config for more keys/button to trigger the same action
is still possible.
2019-03-18 01:07:14 +01:00
fgenesis
77709a2d85 Display errors when loading XML fails 2019-03-18 00:50:56 +01:00
fgenesis
b7a6b52fe5 SDL window backend cleanup 2019-03-18 00:50:36 +01:00
fgenesis
04c557f5e8 Refactor Window functionality out of Core. Minor cleanups.
SDL2 impl seems to work, SDL1 impl finalization pending.
2019-01-29 00:36:48 +01:00