Commit graph

2495 commits

Author SHA1 Message Date
Gabriel Ravier
b52a343760 CMakeLists: Fix CMP0072 warning
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2020-05-01 00:13:22 +02:00
Clownacy
bdbebf9a35 Merge branch 'portable' of https://github.com/Clownacy/Cave-Story-Engine-2 into portable 2020-04-29 16:13:08 +01:00
Clownacy
88602ccaf6 Do not create glyph textures with no height/width
This should fix the issue with cute_spritebatch.h, described in #116.
2020-04-29 13:09:51 +01:00
Clownacy
d0ec163e0a Merge branch 'accurate' into portable 2020-04-27 18:42:11 +01:00
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
3dd904adf6
Merge pull request #114 from GabrielRavier/accurateAddCMake3_10Support
Accurate: Change minimum CMake version from 3.12 to 3.5.1
2020-04-27 18:41:13 +01:00
Clownacy
16f29f6fb7 Merge branch 'accurate' into portable 2020-04-26 00:56:40 +01:00
Clownacy
1e63788c61 Use safe printf functions for Wii U code 2020-04-26 00:55:33 +01:00
Clownacy
aa18cccef5 Ditch the Nintendo-style controls
After asking around, people really seem to prefer Xbox-style
controllers. Admittedly, when I was playtesting with Nintendo
controls, I wound up using my fingers to press A/B because of how
awkward it was.
2020-04-26 00:50:43 +01:00
Clownacy
43c0b670ab Figured out the mystery values in RestoreSurfaces
They're ASCII characters.
2020-04-26 00:07:45 +01:00
Clownacy
e4e8453ba6 Make some logic more like vanilla 2020-04-25 17:58:19 +01:00
Clownacy
c5691d7570 Fix Wii U port when TV is set to 1080p
WUT's bugged. See here:
https://github.com/devkitPro/wut/issues/119

It apparently got this bug from the Decaf emulator. Maybe I should
tell those guys too.
2020-04-25 00:22:24 +01:00
Clownacy
22c9987191 Dear me: Test your fixes before committing them
you complete tit-head
2020-04-24 19:49:18 +01:00
Clownacy
cbeeb7a180 Fix WiiU-Software backend buffer being 5ms
5ms is too small: it cannot be updated fast enough, resulting in
crackling coming from the gamepad speakers. Now it's 10ms, as
intended.
2020-04-24 19:42:47 +01:00
Clownacy
20440ff5e0 Missing a line 2020-04-24 17:20:32 +01:00
Clownacy
8e2d8ab962 Add context initialisation to miniaudio backend
This is used for mutexes in the enhanced backend
2020-04-24 17:06:53 +01:00
Clownacy
bf8d824b70 Fix typo 2020-04-24 13:02:51 +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
fe69a5d76d Fix typo 2020-04-23 21:05:25 +01:00
Clownacy
231d1b93a7 Add error-handling to Font.cpp
Prevents a crash on the Wii U port in 1280x720 when you try to open
the pause menu. There's a giant delay now instead, and I'm not sure
where it comes from. Still, it's an improvement.
2020-04-23 20:50:12 +01:00
Clownacy
a7f2ec6a5e Safely-handle LockSurface failing
Fixes crash on Wii U at 1280x720 (LockSurface fails there because
CreateSurface fails - maybe it's running out of memory again)
2020-04-23 19:53:33 +01:00
Clownacy
a8d0595bcd Update other backends to current API
The only other backend besides the Wii U one to use `render_target`
is the SDLTexture one.
2020-04-23 14:38:45 +01:00
Clownacy
b841f22c6d Remember to free the glyph shader 2020-04-23 14:35:41 +01:00
Clownacy
b8dd512dc4 Free surface upon failure 2020-04-23 14:34:58 +01:00
Clownacy
d7c138f818 More error-handling 2020-04-23 14:33:59 +01:00
Clownacy
1f9247e587 Cleanup and extra error-handling 2020-04-23 14:31:19 +01:00
Clownacy
ee1d777ebb ...Actually do what the last commit said 2020-04-23 13:41:24 +01:00
Clownacy
a2cdd9ac18 Allow surfaces to be marked as not-render-targets
The Wii U has a very limited pool of memory for render targets
(32MB), so we should only use it if we have to.

This 'fixes' a bug in the enhanced branch, where if you use 2x
sprites at 854x480, the third line of the text box will be corrupted
(text will appear on the second line instead, and be black instead of
white).

The other renderers haven't been updated for the API change yet.
2020-04-23 13:23:10 +01:00
Clownacy
ebb96ad239 Cleanup 2020-04-22 01:50:31 +01:00
Clownacy
4752423ff3 Use pitch 2020-04-22 01:46:48 +01:00
Clownacy
0421a7ca54 Wii U: Glyphs don't use colour-buffers 2020-04-22 01:08:31 +01:00
Clownacy
6bdb406940 Also consistency with enhanced branch 2020-04-22 00:14:08 +01:00
Clownacy
f006508232 Sanity check 2020-04-22 00:13:54 +01:00
Clownacy
6a00057469 Do not stream bitmaps
Again - Wii U SD card IO is terrible, so load the whole file at
once instead.
2020-04-21 23:57:07 +01:00
Clownacy
abdd7fc771 Add missing case for Wii U screen size
My Wii U always uses this value
2020-04-21 23:53:37 +01:00
Clownacy
17fb47bce8 Correct typo 2020-04-21 22:27:13 +01:00
Clownacy
e1779248d9 Add error-prints to Wii U renderer 2020-04-21 22:22:00 +01:00
Clownacy
c454f4426d Wii U: Implemented Backend_PrintError & co. 2020-04-21 22:16:07 +01:00
Clownacy
a12e971509 Make Wii U software renderer support any res 2020-04-21 18:45:58 +01:00
Clownacy
31cd840297 Fix Wii U software renderer 2020-04-21 18:45:52 +01:00
Clownacy
bc7b078df5 Make Wii U renderer support non 4:3 aspect ratios 2020-04-21 17:58:24 +01:00
Clownacy
caa00c9a6b Update shader formulas 2020-04-21 16:48:31 +01:00
Clownacy
b4d9b15a9c Add a TODO 2020-04-21 15:23:20 +01:00
Clownacy
bfc2d4e326 ...Maybe I should test my fixes before commit 2020-04-21 14:59:05 +01:00
Clownacy
ff9c2dc4fc Remove now-unneeded sanity checks 2020-04-21 14:57:05 +01:00
Clownacy
afb3c834a7 Do not draw sprites with backwards/empty RECTs
Previously, each backend had to guard against it, which is messy,
results in duplication, and leaves new backends open to the risk
of not guarding against it (the Wii U GX2 renderer didn't).
2020-04-21 14:54:29 +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
7261106be8 Wii U: Swap X and Y buttons 2020-04-21 14:03:43 +01:00
Clownacy
11b5fd88c5 Wii U: Use linear-filtering on the screen texture
Makes the font looks less terrible (on 720p TVs, anyway).
2020-04-21 13:59:47 +01:00