Commit graph

1806 commits

Author SHA1 Message Date
Clownacy
48935eb10d Fix Windows builds when path contains accent char 2020-06-27 19:34:09 +01:00
Clownacy
cc8e875cb1 Merge branch 'accurate' into portable 2020-06-27 19:28:09 +01:00
Clownacy
a5bf854408 Document gMC.equip
All raw values have been replaced with enums
2020-06-27 19:27:57 +01:00
Clownacy
27a621f923 Update miniaudio to v0.10.9
Had to add a small bugfix to get it to work
2020-06-24 17:40:08 +01:00
Clownacy
dae87c6106 Update Wii U audio backend 2020-06-24 17:34:25 +01:00
Clownacy
f64f924b54 Update miniaudio backend 2020-06-24 17:24:41 +01:00
Clownacy
3fa4a91dc1 Reword audio backend logic
This will make it easier to integrate into the enhanced branch, and
also improved audio quality slightly (samples are mixed as 16-bit
instead of 8-bit).
2020-06-24 17:03:13 +01:00
Clownacy
70e431d35d Add missing(?) header 2020-06-24 16:02:28 +01:00
Clownacy
1ff5772843 Fix typo 2020-06-24 12:12:28 +01:00
Clownacy
2ee1bf131e Update miniaudio backend to new mixer 2020-06-24 01:15:21 +01:00
Clownacy
479fff2ccf New mostly-integer-only sound mixer
The mixer itself is integer-only, but the millibel stuff is still
float-based (I don't know if it's worth adding a 10001-value-long
lookup table to replace it).

Anyway, according to a quick test, this new mixer is significantly
faster than the old floating-point one - rarely going above 100
clock() ticks per callback, with the old one almost always running
above that.

For now, only the SDL2 backend supports it - I'll add the others in
upcoming commits.

This will no-doubt cause problems with the enhanced (lite) branch,
where clownaudio always outputs float samples.
2020-06-24 01:11:02 +01:00
Clownacy
29f7c19a02 Fixed Null backend 2020-05-06 23:15:02 +01:00
Clownacy
5596c33b38 Fix stuff
Looks like the Null backend's been broken for a while though
2020-05-06 23:10:40 +01:00
Clownacy
e93ee47728 More backend rearranging
The Window stuff isn't meant for the user, so hide it a bit more
2020-05-06 23:02:08 +01:00
Clownacy
dacd34072a Fix everything after the last commit 2020-05-06 22:52:11 +01:00
Clownacy
616b9cda9e Rearrange shader files
The old way just kind of mashed two approaches together.
2020-05-06 22:40:10 +01:00
Clownacy
4403d10c14 Merge branch 'accurate' into portable 2020-05-04 18:24:23 +01:00
Clownacy
70a3badc0d Cleanup 2020-05-04 18:21:44 +01:00
Clownacy
2f682a102f Merge branch 'accurate' into portable 2020-05-04 18:17:39 +01:00
Clownacy
4000615b45 This is also likely more accurate to the source 2020-05-03 22:13:28 +01:00
Clownacy
124aebaaa2 This is likely more accurate to the original code 2020-05-03 22:07:18 +01:00
Clownacy
e1af3336aa Fix compilation 2020-05-03 22:05:39 +01:00
Clownacy
496a50c272 More static function stuff
This time I'm using the Linux debug data
2020-05-03 21:52:37 +01:00
Clownacy
95b29bb516 Mark some functions as static
Mac debug data confirms these
2020-05-03 21:52:36 +01:00
Clownacy
486cf37161 Mark a char as signed
Might revert, not sure. I'm just doing this for consistency with
other bits of code.
2020-05-03 21:52:29 +01:00
Clownacy
03250d62a0 Make variables more accurate
This commit changes which variables are static: the Mac (and
presumably the Linux) debug data tells you what variables are static,
by prefixing their names with double_underscores.

The variable names themselves also hint at this: global variables are
prefixed with 'g', and use upper-camelcase, while static variables
use whatever_you_call_this.
2020-05-03 20:28:56 +01:00
Clownacy
4895880682 WiiU: Use different folder depending on language 2020-05-02 23:54:38 +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
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