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

127 commits

Author SHA1 Message Date
fgenesis
dc5d385864 remove self-refs (core->...) in Core 2023-05-31 17:40:41 +02:00
fgenesis
fd1ac85af3 remove pointless self-refs (dsq->... and core->...) in DSQ 2023-05-31 17:37:20 +02:00
fgenesis
70b8dcdc3a Rework texture loading, part 1
Major code/logic cleanups + it has a multithreaded batch mode now.
The VFS code doesn't like multiple threads at all,
so for now there's a big lock in front of where it matters.
Changed precacher, map/tileset, and worldmap loading to batched mode.

Still TODO:
- fix broken mod preview images
- reloading resources on debug key
- make mod recache entirely unnecessary
- actually drop resources when no longer needed
2023-05-31 00:55:16 +02:00
fgenesis
74ad8f7804 Build fixes for Linux, some warnings and compatibility fixes for C++17 and up 2023-05-25 16:58:08 +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
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
f01db61292 show better errors when we fail to start up 2022-06-20 04:25:18 +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
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
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
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
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
26759c8be1 remove iprof and BBGE_PROF (#74) 2022-03-17 20:50:42 +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
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
fgenesis
94dbecac43 Only keep the one screen mode with the highest refresh rate per resolution 2021-01-12 01:57:29 +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
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
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
fgenesis
3fe9b1590c SDL 1.2 backend compiles again, but window stays black 2018-04-17 01:28:23 +02:00
fgenesis
78352d4402 Multi-display fixes
- Enumerate display modes to show in the resolution selector based on the
  screen we're on
- Correct graphics init code to use the display index specified in
  user settings
2017-06-26 08:34:30 +02:00
fgenesis
6f170de929 Proper ~Joystick() dtor. Make haptics optional. Hopefully fixes #50. 2017-06-25 15:56:45 +02:00
fgenesis
acb515b738 Unstick highlight in input config 2017-04-04 19:27:53 +02:00
fgenesis
dd4739e9a0 Now runs with both SDL 1.2 and SDL2 again 2017-02-19 01:45:55 +01:00
fgenesis
3dda97d32a Hopefully fix build against SDL 1.2. Does not yet run!
Also: Recently introduced key names in usersettings.xml will no longer work.
But this should automatically detect key names as they used to be,
and convert automatically. Needs testing.
2017-02-15 04:41:52 +01:00
fgenesis
89c1987693 Fix crash on shutdown
GL symbols were already unloaded in ~DarkLayer().
Why did this never crash before?!
2017-02-08 22:11:55 +01:00
fgenesis
7456e785fa Remove mandatory defines and their checks:
BBGE_BUILD_SHADERS
BBGE_BUILD_FRAMEBUFFER
BBGE_BUILD_OPENGL
BBGE_BUILD_OPENGL_DYNAMIC
2017-02-05 22:51:25 +01:00
Valentin Ochs
9245bee717 Fix some warnings
mostly sign-related, but also some about commas after the last item in
an enum list, usage of default in switches, implicit or old-style casts
2017-01-20 19:10:40 +01:00
Valentin Ochs
f9357e7fca Merge branch 'gccwarn' into controllerfixup 2017-01-17 11:15:47 +01:00
Valentin Ochs
fe0ab0418b Get rid of a lot of gcc warnings
Mostly signed/unsigned comparisons. Also some bugs, but I don't remember
where :D
2017-01-14 18:10:20 +01:00
fgenesis
eb8ef1fdf7 Use refresh rate setting + attempt to improve window/fullscreen apply logic 2017-01-14 00:06:04 +01:00
fgenesis
b781b45789 Implement "Desktop" resolution (0x0, default). Also fix music slider update in options menu
This makes the window resizable in desktop mode, and fixed size otherwise.
Fullscreen desktop has always the dame resolution as the desktop.
Add config setting to specify initial display.
Add config setting for the refresh rate (not yet properly integrated)

Closes #17
2017-01-13 18:20:35 +01:00
fgenesis
0dc30e668d Merge branch 'experimental' into controllerfixup
# Conflicts:
#	Aquaria/Avatar.cpp
#	Aquaria/Continuity.cpp
#	Aquaria/DSQ.cpp
#	Aquaria/DSQ.h
#	Aquaria/Game.cpp
#	Aquaria/Game.h
#	Aquaria/Main.cpp
#	Aquaria/UserSettings.cpp
#	BBGE/Base.cpp
#	BBGE/Base.h
#	BBGE/Core.cpp
#	BBGE/Core.h
#	BBGE/DebugFont.cpp
#	BBGE/Shader.cpp
#	BBGE/SoundManager.h
2017-01-13 12:19:23 +01:00
fgenesis
8af953cb63 Replace spaces with tabs (future self: i'm sorry)
In most places, that is. Left some files unchanges because they are a mess.
2017-01-12 22:51:46 +01:00
Valentin Ochs
dcd21b57bd Merge pull request #41 2017-01-12 22:14:26 +01:00
fgenesis
0d8a5c191c More graphics init cleanup. Remove aspect ratio check. Fix screen transition effect that broke in prev. commits. 2016-11-15 13:00:30 +01:00
fgenesis
ce869ba55a Load GL symbols *after* creating the window, else we only get a basic GL 1.1 context 2016-11-15 04:49:53 +01:00
fgenesis
9422e74e43 Make window resizable 2016-11-14 04:17:04 +01:00
fgenesis
6d4f1175ba Fix input grabbing logic, add related user setting, minor cleanup 2016-11-14 03:42:11 +01:00
fgenesis
e92b76cf40 Some more opengl setup cleanup and fullscreen switching improvement 2016-11-14 03:42:10 +01:00
fgenesis
fe7c6ee048 Better fullscreen switching behavior, minor cleanup 2016-11-14 03:42:10 +01:00
fgenesis
1bad4d006d Avoid recreating the GL context on Alt+Tab, resolution change, or windowed/fullscreen switch 2016-11-09 01:17:23 +01:00