Commit graph

211 commits

Author SHA1 Message Date
Clownacy
ef00bbcdd4 Get window icon working in GLFW
Amazingly, this actually works in SDL2, so now they both use this
method.
2020-04-02 22:03:08 +01:00
Clownacy
96f46f3387 Fix compilation error 2020-04-02 00:00:12 +01:00
Clownacy
30c7967ed4 Fixes 2020-04-01 23:15:22 +01:00
Clownacy
135365f941 Merge branch 'portable' of https://github.com/Clownacy/Cave-Story-Engine-2 into portable 2020-04-01 22:21:56 +01:00
Clownacy
00ee155176 Fixes and a comment 2020-04-01 21:58:02 +01:00
Clownacy
db2f079266 Cleanup and comments 2020-04-01 21:52:18 +01:00
Clownacy
0182ab6eb3 Get drag-and-drop working again 2020-04-01 21:43:04 +01:00
Clownacy
add0627f03 Restore custom cursor support 2020-04-01 21:36:46 +01:00
Clownacy
f23117bbdc Overhaul how window icon loading works
Now most of it has been moved out of the backends.
2020-04-01 21:20:26 +01:00
Clownacy
878cac3b3f Implement mouse-hiding in fullscreen 2020-04-01 21:05:05 +01:00
Clownacy
0c70b1ac31 Remove seemingly-useless casts 2020-04-01 20:50:45 +01:00
Clownacy
81b5a7e789 More cleanup 2020-04-01 16:47:58 +01:00
Clownacy
7d9d80f07a Improve SDL2 fullscreen creation 2020-04-01 16:30:46 +01:00
Clownacy
49f7887930 More cleanup 2020-04-01 16:27:55 +01:00
Clownacy
ff70664604 Cleanup and fixes 2020-04-01 16:11:34 +01:00
Clownacy
7bd6ff8617 Get the window icon working on GLFW3 2020-04-01 15:44:00 +01:00
Clownacy
8ff2f63416 Update SDL2 window backend
The window backends will probably be merged with the platform
backends at some point.
2020-04-01 15:26:39 +01:00
Clownacy
4d8be3bc36 More refactoring
Get fullscreen mostly working in GLFW3
2020-04-01 15:21:40 +01:00
Clownacy
c4aa8e28bb More refactoring 2020-04-01 14:57:07 +01:00
Clownacy
073712017f Get OpenGL ES 2.0 working again 2020-03-31 22:14:57 +01:00
Clownacy
5dbca99e19 Extremely horrible terrible nightmare refactoring
Working on ridding CSE2 of its hard SDL2 dependency.

For now, I have a rudimentary GLFW3 backend.
2020-03-31 21:56:10 +01:00
Clownacy
b57ccd7ed5 Shut up errors on Windows 2020-03-31 20:22:54 +01:00
Clownacy
b4ec82d81b Add dummy GLFW3 controller backend 2020-03-31 16:38:05 +01:00
Clownacy
63e75089d6 Split SDL2 code from Game.cpp 2020-03-31 16:32:50 +01:00
Clownacy
584ea57c5d Split SDL2 code from Profile.cpp and TextScr.cpp 2020-03-31 16:28:28 +01:00
Clownacy
37c5236b9b Split SDL2 code from Input.cpp
...So, *all* of it.
2020-03-31 16:24:20 +01:00
Clownacy
142bca6578 Split SDL2 code from Draw.cpp 2020-03-31 16:11:31 +01:00
Clownacy
3a5a5044b1 Split SDL2 code from Main.cpp 2020-03-31 16:07:34 +01:00
Clownacy
d0b20316de Don't do -Iexternal
It pollutes the #include space.
2020-03-31 14:26:24 +01:00
Clownacy
61e708751d Apply missing OpenGL constants 2020-03-31 12:53:58 +01:00
Clownacy
d91c1e9bdc Update the SDL2 audio backend
Now uses the shared software mixer
2020-03-31 12:19:44 +01:00
Clownacy
732d3bbc5c Split software audio mixer to its own file
This will be shared between the SDL2 and miniaudio backends,
eliminating all that digusting duplicate code.
2020-03-31 12:14:20 +01:00
Clownacy
4e58457e1d Make miniaudio backend use native sample rate
This avoids the need for miniaudio to resample the mixer's output.
2020-03-31 10:20:20 +01:00
Gabriel Ravier
fb353fbc7e Backends/Rendering/SDLTexture: Solve -Wnarrowing warning
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2020-03-18 11:54:46 +01:00
Clownacy
dd04977f29 Update miniaudio to v0.10.1
This newer version supports marking all of its declarations as
static, avoiding the conflict between the miniaudio audio backend,
and the copy of miniaudio embedded in clownaudio in the enhanced
branch.
2020-03-17 13:25:41 +00:00
Clownacy
9af25f7c67 Hopefully fixed miniaudio backend on Windows
Stupid BOOL type
2020-03-04 21:02:17 +00:00
Clownacy
af24d010a5 Clean-up miniaudio backend a little
Really need to figure out the best way to abstract-away the software
mixer...
2020-02-29 18:19:06 +00:00
Clownacy
8ec8a8d990 Added unfinished miniaudio audio backend
Currently only works with CMake
2020-02-29 18:18:59 +00:00
Clownacy
a767c16d83 Un-un-const a few things 2020-02-09 18:55:41 +00:00
Clownacy
f82a53d336 Prevent errors encountered by MSVC 2020-02-09 18:47:50 +00:00
Clownacy
d4004fe99a Store glyph pixels as chars, not floats
Smaller memory footprint, and probably-insignificant performance
impact.
2020-02-09 13:56:45 +00:00
Clownacy
bb11cd567d Software renderer cleanup 2020-02-09 13:44:02 +00:00
Clownacy
60d3cc2ed6 Update cute_spritebatch.h 2020-02-09 12:40:35 +00:00
Clownacy
8edca4fb2e Style tweak 2020-02-09 12:35:38 +00:00
Clownacy
59a8c2617f Tweak some variable naming
The enhanced branch calls them the 'internal *screen* width/height',
which I think is more appropriate.
2020-02-05 15:52:43 +00:00
Clownacy
d9e7ebac38 Correct a typo 2020-02-05 15:47:26 +00:00
Clownacy
2af6a043ef Clean-up the OpenGL renderers a little 2020-02-04 16:35:42 +00:00
Clownacy
1140ab0916 Clean-up renderer backend initialisation 2020-02-04 15:51:19 +00:00
Clownacy
ba6d711d3a Tick cute_spritebatch once per frame
...As opposed to once per draw call.

This change was made because multiple draw calls can be made per
frame, or a only a handful of draw calls may be made per minute.

Since draw calls are an inconsistent metric, I just switched to
frames instead.
2020-02-04 14:57:06 +00:00
Clownacy
2e5e1994c2 Enable debug console prints in non-debug builds 2020-02-03 16:44:52 +00:00