Commit graph

185 commits

Author SHA1 Message Date
Clownacy
99ed3ead55
Merge pull request #115 from GabrielRavier/portableAddCMake3_10Support
Add support for CMake 3.8 in portable
2020-04-27 18:41:34 +01:00
Clownacy
8945ca8275 Remove old Wii U window backend
Made redundant by hardware-accelerated one.
2020-04-23 21:06:36 +01:00
Clownacy
f55450d141 Rename WiiU.cpp to WiiU-Hardware.cpp 2020-04-21 14:27:15 +01:00
Clownacy
5cc1d5ac01 Update CMake options and readme 2020-04-21 14:26:06 +01:00
Clownacy
8377f011cf Add in-progress hardware Wii U renderer
*Very* incomplete. Right now, it can render textures and perform
colour-fills to the screen.
2020-04-21 00:59:12 +01:00
Clownacy
bcfcf2c017 Rename 'BUILD_DOCONFIG' to just 'DOCONFIG' 2020-04-20 12:50:53 +01:00
Clownacy
07ee648181 Add Wii U software audio mixer
The hardware-accelerated one is suffering from a bizarre-ass bug that
I can't fix for the life of me.
2020-04-19 19:03:00 +01:00
Clownacy
9e9b86c6e9 Add new Wii U window backend
This uses basic hardware-acceleration to bounce the software-rendered
frame to both the gamepad *and* the TV!

The previous method only supported the gamepad, suffered from V-tear,
and used slightly more CPU (my test with the end of Egg Corridor ran
at 52FPS, while this new method runs at 55FPS).
2020-04-19 13:34:45 +01:00
Gabriel Ravier
8f4ef85cf8 CMakeLists: Add CMake 3.8 support
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2020-04-17 19:48:12 +02:00
Clownacy
a7ebdb75e5 Added unfinished Wii U audio backend
Currently doesn't produce sound unless you stop Organya from calling
AudioBackend_CreateSound, because it exhausts the Wii U's 150-sound
pool before the SFX get any of them.
2020-04-16 22:19:00 +01:00
Gabriel Ravier
99d4a6fbd4 CMakeLists: Added support for CMake 3.10.2
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2020-04-16 11:20:53 +02:00
Clownacy
6d53668bed Add Wii U platform backend
With this backend, CSE2 can run on the Wii U.

It's not ideal - it doesn't have its own renderer yet, so it just
uses the software renderer, and it only displays on the gamepad,
because drawing to the TV as well makes the game lag.

Also there's no sound.

Also the lack of input rebinding is annoying.
2020-04-14 00:31:13 +01:00
Clownacy
db0b2d0293 Add option to disable DoConfig
Needed for console ports
2020-04-13 19:10:58 +01:00
Clownacy
f4f85f1f9d Add Null platform backend
Also does absolute nothing.

The point of these things is so it's easier to test out new ports.
For example, with the Null backends and the software renderer, we
don't need to write any code to build for other platforms.

In addition, by having no platform-dependant code, this can be used
to trace crashes. For example, I was having crashes on the Wii U,
despite there being no Wii U-specific code at all - the cause turned
out to be that the executable wasn't stripped, and it had nothing to
do with the code at all.
2020-04-13 18:54:34 +01:00
Clownacy
02f570cec7 Add Null audio backend
Literally doesn't do anything
2020-04-13 18:31:39 +01:00
Clownacy
938eca3224 Cleanup 2020-04-09 19:54:05 +01:00
Clownacy
1f06027403 Added GLFW3 support for the software renderer
A few things need cleaning-up
2020-04-09 19:29:45 +01:00
Clownacy
b775003e94 Correct stupid typos
...I didn't get much sleep, last night.
2020-04-05 20:27:00 +01:00
Clownacy
09fa34cbc7 Do not link libSDL2main.a
Causes stupid annoying errors and CSE2 doesn't even need it anyway so
wtf
2020-04-05 20:13:24 +01:00
Clownacy
0aa65f7cd3 Fix pkg-config static linking
For some reason, [LIB]_STATIC_LINK_LIBRARIES is blank. Thanks a lot,
CMake.
2020-04-05 16:58:52 +01:00
Clownacy
1ae63bea96 Move window ownership to the window backend 2020-04-04 20:51:07 +01:00
Clownacy
135035bb1a Change 'PlatformBackend' namespace to 'Backend' 2020-04-04 20:31:27 +01:00
Clownacy
8acdcface4 Update CMakeLists.txt 2020-04-04 19:56:57 +01:00
Clownacy
7ee2e68c2e Fix 2020-04-04 19:28:52 +01:00
Clownacy
40464a9fc0 Move-around Backend files
Hoping to introduce some degree of grouping
2020-04-03 14:42:11 +01:00
Clownacy
dded47f921 Cleanup 2020-04-03 02:00:51 +01:00
Clownacy
5b996b3459 Give glad a CMake file
Today I learned that CMake will error if the project shares a
dependency with a nested CMake file (which could be from an
entirely-separate project that you have no control over).

I'm starting to really hate CMake.
2020-04-03 01:34:47 +01:00
Clownacy
7d30407206 Use LINK_LIBRARIES instead of LIBRARIES
macOS Travis complains about not finding -lSDL2, so use absolute
paths instead.
2020-04-02 20:57:16 +01:00
Clownacy
5244967fab Update documentation 2020-04-02 20:22:52 +01:00
Clownacy
9a0d2c4c94 Fix GLFW3 pkg-config detection 2020-04-02 00:37:30 +01:00
Clownacy
6b34ea64c5 Shut up some CMake warnings 2020-04-02 00:28:44 +01:00
Clownacy
cf0ee89e93 Avoid WinMain on Windows
This is a better for GLFW on Windows, and it might have fixed the
long-standing bug where FORCE_LOCAL_LIBS on MSYS2 wouldn't work
because SDL2 would mysteriously fail because of something involving
WinMain.
2020-04-02 00:16:43 +01:00
Clownacy
30c7967ed4 Fixes 2020-04-01 23:15:22 +01:00
Clownacy
85e1afb35a Added GLFW3 sources
This allows it to be compiled locally.
2020-04-01 22:51:10 +01:00
Clownacy
1e0f0ed99c Add pkg-config GLFW3 support 2020-04-01 22:42:27 +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
03fab974fc Tweaks 2020-04-01 20:20:04 +01:00
Clownacy
a008410b96 List it in the readme 2020-04-01 20:19:24 +01:00
Clownacy
883e994949 Rename to PKG_CONFIG_STATIC_LIBS 2020-04-01 20:17:16 +01:00
Clownacy
ca5b092807 Add static-linkage support to CMake file
Well, kind of.

It uses pkg-config and GCC's `-static' flag. It's very tied the Linux
way of doing things.
2020-04-01 20:14:44 +01:00
Clownacy
6301c01315 Shup up a warning when using local SDL2
Really need to update to SDL2 2.0.12 at some point.
2020-04-01 15:31:16 +01:00
Clownacy
b74aac6b3c Make other SDL2-renderer combos valid 2020-04-01 15:30:36 +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
b4ec82d81b Add dummy GLFW3 controller backend 2020-03-31 16:38:05 +01:00
Clownacy
37c5236b9b Split SDL2 code from Input.cpp
...So, *all* of it.
2020-03-31 16:24:20 +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
424edc5256 Add header file to CMake file as well 2020-03-31 12:20:39 +01:00