Clownacy
7d51a80007
Remove C++11 from GLFW3 platform backend
2020-09-08 03:56:52 +01:00
Clownacy
84d6b50bc2
Remove platform backend dependency on core engine
...
The backends need to have no dependency on the engine, otherwise
there'll be conflicts when we do stuff like include `window.h` in a
file that also happens to include "WindowsWrapper.h" somewhere.
2020-09-08 03:52:23 +01:00
Clownacy
bdcb1f3a3e
Remove Organya dependency from platform backend
2020-09-08 03:36:11 +01:00
Clownacy
b37e088465
Remove an empty line
2020-09-08 02:48:06 +01:00
Clownacy
f079a14b58
Update the SDLTexture renderer
2020-09-08 02:40:27 +01:00
Clownacy
0b83da1fd9
Make the Wii U batch its font rendering
...
Yaaaaaaaay
2020-09-08 02:12:37 +01:00
Clownacy
23156d38de
Optimise OpenGL renderer a little
2020-09-08 01:55:57 +01:00
Clownacy
b080954a71
Wii U cleanup
2020-09-08 01:50:49 +01:00
Clownacy
bcf5513495
Updated Wii U renderer
...
Turns out it doesn't even batch the font stuff. I'll need to add that
later.
2020-09-08 01:17:07 +01:00
Clownacy
1d9446d425
Update SDLSurface renderer for new font batcher
2020-09-07 23:44:51 +01:00
Clownacy
096fa3b578
New custom font batcher
...
Previously, the font batching system was very shoddy: basically,
glyph bitmaps would be cached to system memory, and uploaded
on-demand to the GPU.
The OpenGL3, OpenGLES2, and SDLTexture backends relied on
`cute_spritebatch.h` to handle batching. While nice, this library is
overkill: it's intended for managing a whole game, not just a couple
of glyphs. It also depends on C++11, which is something I'd rather be
without.
Being so complex, it appears that internally it spams the backend
when merging atlases together. According to bug reports, this causes
the game to skip a lot of frames.
Instead, I've ditched the system-memory-side caching, and made the
game maintain its own atlas. Unlike `cute_spritebatch.h`, this one
doesn't purge glyphs after they've gone unused for 30(?) seconds -
instead, glyphs are only purged when room in the atlas runs out, at
which point the oldest glyph is replaced. This method doesn't involve
creating or destroying atlases at runtime, avoiding the overhead of
whatever OpenGL/DirectX do internally when that happens.
Currently only the OpenGL3, OpenGLES2, and Software renderers have
been updated with this - the others will fail to build.
I know immediate-mode renderers won't benefit from this, but it
replaces the leaky old caching system, so it's still an improvement.
2020-09-07 23:11:01 +01:00
Clownacy
bc165d0f0a
Remove Organya-sleeping
...
Turns out that 'Sleep' call is ran on the *main* thread.
I have absolutely no idea why the game does this.
2020-09-04 02:26:31 +01:00
Clownacy
987b81c946
Fix other audio backends
2020-09-03 19:59:37 +01:00
Clownacy
7abab0039b
Pre-convert the Organya callback timer
...
Oh no, I used the naughty 'm' word :(
2020-09-03 19:19:55 +01:00
Clownacy
be6f46fabd
Refactor audio software mixer
...
Now the various backends have far less duplicate code, and are part
of a separate backend system specifically for the software mixer.
Now, any modifications to the MixSoundsAndUpdateOrganya function
will apply to all backends, instead of needing to manually be applied
to each one.
2020-09-03 19:19:50 +01:00
Clownacy
ab09dc67eb
Emulate the Organya thread pauses
...
Now there's a 100ms pause between songs.
Currently only the miniaudio backend supports this.
2020-09-03 18:14:52 +01:00
Clownacy
fbcb2f5f56
Optimise the linear-interpolator a little
...
Doesn't have to do two sets of shifts
2020-09-03 16:01:46 +01:00
Clownacy
b68eb076ca
Rename a variable
2020-09-03 15:00:07 +01:00
Clownacy
47543eb382
Another Lanczos optimisation
2020-09-03 14:38:56 +01:00
Clownacy
67ee8b9829
Optimise the Lanczos resampler some more
2020-09-03 14:28:04 +01:00
Clownacy
9f002b6180
Convert Lanczos resampler from double to float
...
Forgot that C++98 has a float version of `sin`.
2020-09-01 19:57:08 +01:00
Clownacy
9a79041c6c
Optimise the Lanczos resampler a little
...
Apprently floating-point divisions are slower than multiplications
2020-08-31 17:28:35 +01:00
Clownacy
48386d443b
Add optional Lanczos filter to the audio mixer
...
Should be higher-quality than the linear-interpolator, but also much
slower, so it's disabled by default.
2020-08-31 16:07:25 +01:00
Clownacy
39067057c1
Fix some code formatting
2020-08-29 18:10:59 +01:00
Clownacy
845ee1b96f
Don't store subsample offset as long
...
Only a short is needed.
2020-08-25 02:44:54 +01:00
Clownacy
da5d7982c6
Improve SDL2 event handling accuracy
...
Now the event loop doesn't run constantly when the window isn't
focussed. This should match the original WinAPI code's behaviour.
2020-07-13 17:31:30 +01:00
Clownacy
a392034fd6
Fix input lag in SDL2 backend
...
If you spam keyboard inputs, they'll eventually lag behind. This was
caused by improperly porting the WinAPI logic to SDL2 and CSE2's
fancy backend-abstraction system.
2020-07-13 00:19:27 +01:00
Clownacy
1582af91cf
Replace more float logic with integer-only
...
I hate floats >:(
2020-07-09 01:09:19 +01:00
Clownacy
6e486d9226
Er, actually remove those dead includes
2020-07-08 20:00:49 +01:00
Clownacy
ab82f014ae
Avoid some float logic
...
Also shuts up some VS2019 warnings
2020-07-08 19:33:53 +01:00
Clownacy
565c79a4ce
Fix GLFW3 software renderer in VS2019
...
GLFW will include these headers for us properly
2020-07-08 19:33:49 +01:00
Gabriel Ravier
ca8b5ccaa1
Merge branch 'portable' into portableMinimizeHeaders
...
# Conflicts:
# src/BulHit.cpp
2020-07-02 15:26:33 +02:00
Gabriel Ravier
81edd4db52
src: Restored SDL.h includes to conform to project style of including SDL2
...
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2020-07-02 14:59:55 +02:00
Gabriel Ravier
187847fbcc
src: Fixed not including headers that are included for detection of conflicting definitions
...
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2020-07-02 14:43:47 +02:00
Clownacy
6cc976d4d6
Wii U audio tweaks
...
Clean-up better, and neaten-up some code
2020-07-02 02:31:55 +01:00
Gabriel Ravier
3620e31bf8
src/BackendS/Platform/WiiU.cpp: Add explicit include of <stddef.h>
for NULL
...
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2020-07-01 18:33:25 +02:00
Gabriel Ravier
32c8795ead
src: Cleaned up includes to only (and always) include what we use
...
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2020-07-01 18:26:22 +02:00
Clownacy
1d76e25c35
Better Wii U audio cleanup
2020-06-30 20:39:20 +01:00
Clownacy
e0c67b421a
Add constant to control number of Wii U buffers
2020-06-30 20:38:28 +01:00
Clownacy
371d66255b
Fix popping in the Wii U audio backend
2020-06-30 20:37:16 +01:00
Clownacy
78da025796
Merge pull request #130 from GabrielRavier/portableSupportPathsAboveFilenameMax
...
Support paths above PATH_MAX (for portable)
2020-06-30 14:09:57 +01:00
Clownacy
47367614a3
More accuracy improvements
...
That one comment should go in the accurate branch, not here
2020-06-30 14:04:53 +01:00
Clownacy
27a1fd900f
Revert more unnecessary edits
2020-06-30 13:48:46 +01:00
Clownacy
a5c09b67f7
Wii U renderer cleanup
2020-06-29 22:13:03 +01:00
Clownacy
f6fe0537ed
Add vertex-batching to Wii U port
...
Should remove the last bit of lag that port has (like the Labyrinth
fight where you team-up with Curly)
2020-06-29 21:37:05 +01:00
Clownacy
9925c16b29
Minor cleanup
2020-06-29 19:19:50 +01:00
Clownacy
93535c5501
Sync OpenGL3 renderer with Wii U renderer
2020-06-29 18:36:38 +01:00
Gabriel Ravier
771b944d17
src: Some cleanup for the MAX_PATH std::string PR
...
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2020-06-29 19:02:25 +02:00
Gabriel Ravier
564d42dbd2
src: Change from using asprintf-based code to using std::string-based code
...
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2020-06-29 18:33:22 +02:00
Clownacy
1523f1d3a6
Unified the Wii U vertex buffers
2020-06-29 16:40:32 +01:00