Clownacy
1f88f7ffaf
Make some code uniform
2020-09-10 21:26:22 +01:00
Clownacy
988f1128dd
Convert a bunch of ints to size_t
...
ints are dumb - only use them when you have to
2020-09-10 17:36:21 +01:00
Gabriel Ravier
ca8b5ccaa1
Merge branch 'portable' into portableMinimizeHeaders
...
# Conflicts:
# src/BulHit.cpp
2020-07-02 15:26:33 +02:00
Clownacy
28964f166c
Merge branch 'accurate' into portable
2020-07-02 02:24:15 +01:00
Clownacy
5983b8e234
Don't mark out
as static
...
Causes it to be put in the wrong part of the EXE for some reason,
even though we know from the Mac port that it *was* static.
2020-07-01 21:57:57 +01:00
Gabriel Ravier
32c8795ead
src: Cleaned up includes to only (and always) include what we use
...
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2020-07-01 18:26:22 +02:00
Clownacy
e934cae696
Merge branch 'accurate' into portable
2020-06-30 17:32:19 +01:00
Clownacy
770f3be74e
Make font sizes more accurate to the vanilla EXE
...
This is such a nightmare
2020-06-30 16:04:25 +01:00
Clownacy
27a1fd900f
Revert more unnecessary edits
2020-06-30 13:48:46 +01:00
Gabriel Ravier
a62141e185
src: Added back stddef.h where accurate to get NULL/size_t properly (stdio.h provides them, but it's for file I/O, not essential definitions and types)
...
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2020-06-30 01:52:38 +02:00
Gabriel Ravier
66e4995135
src: Remove unnecessary includes
...
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2020-06-30 00:12:17 +02:00
Gabriel Ravier
771b944d17
src: Some cleanup for the MAX_PATH std::string PR
...
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2020-06-29 19:02:25 +02:00
Gabriel Ravier
564d42dbd2
src: Change from using asprintf-based code to using std::string-based code
...
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2020-06-29 18:33:22 +02:00
Gabriel Ravier
32a879ca58
src: Removed MAX_PATH and made the path/string handling better in general (ported over from supportPathsAboveFilenameMax)
...
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2020-06-29 00:14:30 +02: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
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
16f29f6fb7
Merge branch 'accurate' into portable
2020-04-26 00:56:40 +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
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
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
bfc2d4e326
...Maybe I should test my fixes before commit
2020-04-21 14:59: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
b89207b586
Merge branch 'accurate' into portable
2020-04-20 01:17:19 +01:00
Clownacy
93ad3ae7c5
Make font look better at 320x240
...
This restores some vanilla logic, where at 320x240, the font would
use a slightly larger size, in order to not look terrible.
2020-04-17 14:16:49 +01:00
Clownacy
8f49276d5e
Note some not-so-authentic variable names
2020-04-16 14:44:53 +01:00
Clownacy
b83b7f25fc
Found the real name for DummiedOutLogFunction..?
2020-04-16 13:47:17 +01:00
Clownacy
c51a074fad
Big disgusting backend rework
...
We need to avoid `WindowsWrapper.h` in the backends whenever we can,
to avoid name collisions (the Wii U homebrew library) defines its own
BOOL/TRUE/FALSE, which really doesn't work with CSE2.
2020-04-13 18:19:39 +01:00
Clownacy
135035bb1a
Change 'PlatformBackend' namespace to 'Backend'
2020-04-04 20:31:27 +01:00
Clownacy
4d322be866
Change render backend namespace to RenderBackend_
2020-04-04 20:24:34 +01:00
Clownacy
c4aa8e28bb
More refactoring
2020-04-01 14:57:07 +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
142bca6578
Split SDL2 code from Draw.cpp
2020-03-31 16:11:31 +01:00
Clownacy
b8de1cb5db
Merge branch 'accurate' into portable
2020-03-31 14:07:21 +01:00
Clownacy
7820926bfd
Remove outdated comments
2020-03-22 15:37:00 +00:00
Clownacy
c34a7fc354
Fix build error
2020-03-22 15:35:59 +00:00
Clownacy
b374a8046c
Add some missing global/static variable names
...
Also from the Mac port.
2020-03-22 15:31:28 +00:00
Clownacy
f6606b7748
Add some missing function names
...
These were retrieved from the Mac port (v0.0.7), which kept these
functions.
Unfortunately, this port is missing local variable names, so we can't
use it to make InitBack accurate.
2020-03-22 15:31:28 +00:00
Clownacy
cf75cbcad2
Don't embed font in executable
...
Creating a Japanese build would require 4GB+ of RAM because of this.
It's about time it got removed. It was a silly idea anyway.
2020-03-17 21:14:15 +00:00
Clownacy
2e5e1994c2
Enable debug console prints in non-debug builds
2020-02-03 16:44:52 +00:00
Clownacy
1cffacb72e
Added DecodeBitmapFromFile
2020-01-27 00:30:54 +00:00
Clownacy
2ef48bea8a
Change DecodeBitmap to use unsigned ints
...
Why would an image decoder ever return a _negative_ image
width/height?
2020-01-26 23:59:04 +00:00
Clownacy
cccef2b089
Fix memory leaks
2020-01-26 23:54:20 +00:00
Clownacy
5e60c15b1d
Add missing sanity check
2020-01-26 23:53:40 +00:00
Clownacy
b650294b8b
Change LoadFileToMemory's function signature
2020-01-26 20:06:31 +00:00
Clownacy
cf8977207e
Stop using SDL for .bmp decoding
...
Now it uses stb_image instead
2020-01-26 19:47:50 +00:00
Clownacy
6dac8254e2
Begin merge of Backend_Init/Backend_CreateWindow
...
OpenGL3+OpenGLES2 backend done so far
2020-01-22 22:19:55 +00:00
Clownacy
be533e2f55
Remove FRAMERATE constant
...
I don't see the point in it.
2020-01-20 23:54:46 +00:00