Commit graph

2649 commits

Author SHA1 Message Date
Clownacy
f9993b264c Fix dumb typo 2020-10-11 21:18:52 +01:00
Clownacy
5b4778fb06 Fix the 3DS crash when closing
For whatever reason, the 3DS *really* doesn't like it when I do all
the audio mixing in the callback function. Instead, it seems I have
to use a dedicated thread.
2020-10-11 21:16:47 +01:00
Clownacy
6df224400c Okay never mind this doesn't avoid it at all
Seriously wtf why is it crashing
2020-10-11 16:01:27 +01:00
Clownacy
0a99762fec Force 3DS to 320x240 by default
I kind of want to avoid hacks like this, but I suppose I can find a
proper way to do this in the future.
2020-10-11 15:59:40 +01:00
Clownacy
8d296f0385 Allow backend to specify data folder
On the 3DS, I want the data files to go in the read-only ROMFS, while
save data goes on the SD card. This is impossible with the current
system, so I'm changing it.

The other backends will need updating to support this.
2020-10-11 15:58:48 +01:00
Clownacy
f3ff030869 Avoid 3DS crash when closing the game 2020-10-11 15:58:27 +01:00
Clownacy
2a73c12a5f 3DS cleanup 2020-10-11 15:17:00 +01:00
Clownacy
c398ec7c25 Cleanup and enable New3DS speedup 2020-10-11 14:42:27 +01:00
Clownacy
80725016f7 Add mutexes to 3DS audio backend
Doesn't seem to fix the annoying crashes though...
2020-10-11 14:42:04 +01:00
Clownacy
75a31005d1 Add basic 3DS audio support
It's using the software mixer for now. I might be able to make it
hardware-accelerated in the future.
2020-10-11 14:27:39 +01:00
Clownacy
7013c28e26 Remove an unnecessary newline 2020-10-11 14:27:10 +01:00
Clownacy
5597245865 Optimise 3DS rendering a little
Double-buffering is enabled by default, and I don't need to flush
every single buffer.
2020-10-11 14:26:15 +01:00
Clownacy
10c4831160 Better 3DS debug logging and fix console output
Was using the wrong screen
2020-10-11 14:25:48 +01:00
Clownacy
f5b3b2e0d0 Add a basic 3DS port
Was a lot easier than I expected. The software renderer is such a
godsend for quick-and-dirty ports.

Oddly enough, even on an old3DS, this actually almost runs at full
speed (hits around 40FPS in Mimiga Village).

There's a lot of work left to do before this is actually useable:
* There's no audio
* You can't save
* A proper hardware-accelerated renderer is needed
2020-10-11 00:09:22 +01:00
Clownacy
49027c4ab7 Minor comment cleanup 2020-10-10 20:40:57 +01:00
Clownacy
c478cf242b Add a missing #include 2020-10-10 15:25:58 +01:00
Clownacy
3a00286890 Fix SDL2 version check
SDL2 didn't start reporting its version until recently, so this check
is pointless.
2020-10-05 01:48:46 +01:00
Clownacy
12b7990cf9 Wii U: Fix usage of wrong shader 2020-10-04 21:00:38 +01:00
Clownacy
94dd419858 Add explicit parameter for render targets
With the new Wii U upscaling code, 640x480 uses too much MEM1.

Honestly, maybe I should just overhaul how render targets work on the
Wii U. Surely there's a way to dynamically allocate only one colour
buffer at a time?
2020-10-04 14:19:16 +01:00
Clownacy
8eb4e29b10 Remove needless parameter 2020-10-04 13:56:43 +01:00
Clownacy
ce6e4e2a32 Add Wii U smooth framebuffer upscaling 2020-10-04 13:51:16 +01:00
Clownacy
30ec081d7b Refactor Wii U renderer in preparation
This is in preparation for an upscaled-framebuffer system like the
OpenGL backend has.

I wonder if it's possible to just use a shader instead, and avoid the
need for an upscaled framebuffer to make the linear filtering not
look terrible.
2020-10-04 13:00:22 +01:00
Clownacy
385b7531ef Remove leftover files I was using for testing 2020-10-04 00:47:55 +01:00
Clownacy
914034c406 Remove unused variable 2020-10-04 00:39:07 +01:00
Clownacy
771f83d06a Fix the 'Studio Pixel Presents' text on Wii U
The vertex buffer was being deleted and recreated *after* it was
binded.
2020-10-04 00:37:49 +01:00
Clownacy
4b2a14167e Wii U shader fixes
I don't know what bugs, if any, these fix
2020-10-03 22:29:13 +01:00
Clownacy
9458d2aea7 Avoid some duplicate code in Wii U flush function 2020-10-03 21:01:36 +01:00
Clownacy
6803438358 Fix Wii U using an uninitialised vertex buffer 2020-10-03 18:35:40 +01:00
Clownacy
c7cd67c410 Remove another useless variable 2020-10-03 16:11:58 +01:00
Clownacy
858fd0beb9 Fix Backend_EnableDragAndDrop not matching header 2020-10-03 16:10:34 +01:00
Clownacy
076a477239 Remove useless variable 2020-10-03 16:09:22 +01:00
Clownacy
7ab6866d6b Change Font.cpp to use CP1252 instead of UTF-8
This is accurate to the original EXE, which would default to CP1252
depending on what region Windows was set to. This is the case for
English and Spanish regions, and likely others.

This should make this branch compatible with a number of fan-made
translations. However, this also makes it so that the `PutText`
functions will no longer support UTF-8 strings.

Modders may prefer to switch to UTF-8 entirely, so I've left the old
UTF-8 parsing function in a comment.
2020-10-03 12:29:43 +01:00
Clownacy
71d7aafaf9 Remove FreeType licence stuff
Binaries will no longer contain FreeType code
2020-09-30 21:20:05 +01:00
Clownacy
9a5ac1606d Correct a typo 2020-09-30 21:18:59 +01:00
Clownacy
603cfdd9db Merge branch 'accurate' into portable 2020-09-29 16:44:49 +01:00
Clownacy
0730bb74ef More cleanup 2020-09-27 22:02:45 +01:00
Clownacy
97a042dcc0 Deobfuscate some values 2020-09-27 21:12:39 +01:00
Clownacy
59aeae07f8 More documentation 2020-09-27 20:57:24 +01:00
Clownacy
69eed6a966 More documentation 2020-09-27 20:45:08 +01:00
Clownacy
2ab0ff2455 Document Ending.cpp a little 2020-09-27 20:35:58 +01:00
Clownacy
80d5691a7e Clean-up some code 2020-09-27 20:12:12 +01:00
Clownacy
d1dc861bc3 Another TODO 2020-09-27 20:08:51 +01:00
Clownacy
0df697d5ee Add a TODO 2020-09-27 20:07:06 +01:00
Clownacy
ad5785611b Change a float literal to double 2020-09-27 19:31:23 +01:00
Clownacy
35bf490f0d Fix GLFW3 build error
Great API...
2020-09-27 17:51:16 +01:00
Clownacy
baf88b0d4b Convert cursors to RGBA
...instead of colour-keyed RGB. Less goofing-around for the user.
2020-09-27 17:16:58 +01:00
Clownacy
51e6cb5a6c Convert cursors and icon to PNG
No point using BMP, since they're way bigger, and they're not
required for authenticity, since the original files were .cur and
.ico files. At some point, I'd like to support those formats, so this
branch can use the original files.
2020-09-27 17:16:58 +01:00
Clownacy
b7e25cd9be Wii U renderer cleanup 2020-09-27 17:16:58 +01:00
Clownacy
9b29717f41 Merge branch 'accurate' into portable 2020-09-26 23:30:19 +01:00
Clownacy
098aae8d73 Ignore Visual Studio 2019 stuff 2020-09-26 23:25:02 +01:00