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
Clownacy
70a3badc0d
Cleanup
2020-05-04 18:21:44 +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
43c0b670ab
Figured out the mystery values in RestoreSurfaces
...
They're ASCII characters.
2020-04-26 00:07:45 +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
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
58d7a45392
Empty Tags.h
...
There's no evidence Tags.h contained these variables (if anything, it
appears that Pixel manually declared them in every file that used
them).
gg Pixel
2020-01-06 21:20:17 +00:00
Clownacy
989013168c
Clean-up Draw.cpp
2019-11-15 21:00:29 +00:00
Clownacy
a8cf5e1846
Fix a typo in a comment
2019-10-20 21:08:47 +00:00
Clownacy
3889bd9f1d
Add missing #include to Draw.cpp
...
Thanks to GabrielRavier for noticing.
2019-09-10 12:31:38 +00:00
Clownacy
93029e8e2c
Fix incorrectly-ordered #include
2019-09-04 14:13:51 +00:00
Clownacy
dcf9921481
Move SystemTask from WindowsWrapper.h to Main.h
2019-09-04 02:23:49 +01:00
Clownacy
0faf06224f
Added a bugfix for font creation
...
Fixes Japanese builds using the wrong charset on non-Japanese Windows
installations, and fixed the font using antialiasing, causing it to
clash with the game's colour-keying.
2019-09-01 20:30:26 +01:00
Clownacy
f956eb9264
Mostly ASM-accurate Draw.cpp
...
See #74
2019-08-31 17:43:45 +01:00
Clownacy
03e513365b
PATH_LENGTH is actually Windows's MAX_PATH
...
When MAX_PATH isn't available, use FILENAME_MAX. This might be a bad
idea.
2019-08-31 01:44:53 +01:00
Clownacy
0af39741d4
Merge branch 'master' into accurate
2019-08-29 00:22:18 +01:00
Clownacy
9f81f9e080
Move MakeSurface_Generic to the correct place in Draw.cpp
2019-08-29 00:21:43 +01:00
Clownacy
e67c1e3640
Migrated to the native Windows resource file system
2019-08-27 23:59:57 +01:00
Clownacy
b6322d5e0f
Make LoadBitmap take a pixel buffer instead of an SDL_RWops
2019-08-27 16:10:37 +01:00
Clownacy
64598dc2a5
Rename Surface_Ids to SurfaceID
...
For code style consistency (this isn't a vanilla enum name - I don't
think there even was an enum for this in the original source code)
2019-08-21 16:18:55 +00:00
Clownacy
f354b84f6a
Revert "Glyphs now regenerate with the rest of the game's textures"
...
This reverts commit aa6174b3f2
.
2019-08-14 16:26:37 +00:00
Clownacy
e708dc3a7d
Make the surface_metadata struct match the original
2019-08-13 19:48:18 +01:00
Clownacy
aa6174b3f2
Glyphs now regenerate with the rest of the game's textures
...
God-damn this code is ugly
2019-08-13 18:32:44 +01:00
Clownacy
16b2f6a474
Added enums for the surface types
2019-08-13 04:42:29 +00:00
Clownacy
d47f683491
Ported the Windows version's surface regeneration
...
Has the same imperfections: if you regenerate the surfaces while a
text box is open (and while using Courier New I guess), the text will
regenerate with smaller spaces.
2019-08-13 04:36:05 +00:00
Clownacy
1b6804bbe1
Fix BackupSurface
2019-08-13 02:52:37 +00:00
Clownacy
3f8ead09d6
Renderer backend simplification part 1: Draw.cpp and Software.cpp
...
By emulating the DirectDraw code more closely, I can simplify the
renderer backend API.
2019-08-13 01:39:08 +00:00
Clownacy
85f58d7d39
Rendering backend API naming improvements
2019-08-10 19:50:10 +01:00
Clownacy
2b86db32a0
Backend_Blit always uses a colour key
2019-08-10 19:31:45 +01:00
Clownacy
607bbfcef8
Remove some debug prints
...
I prefer to only print on error
2019-07-31 23:12:06 +00:00
Clownacy
9948fa8b07
Move the SDL_Window creation to the rendering backends
...
Whoops, didn't mean to commit the Main.cpp edit way back when I made
the OpenGL 2.1 backend.
2019-07-24 20:20:06 +01:00
Clownacy
6d385e674f
Font refactor part 1: Software
...
With this, font blitting is handled by the rendering backend, paving
the way for hardware-accelerated font drawing in the accelerated
backends.
2019-07-23 16:38:04 +01:00
Clownacy
a3278a60b5
A fix, some documentation, and cleanup
2019-07-19 19:19:35 +01:00
Clownacy
74c9931ebb
Change the renderer backend API for uploading pixels
...
Also fix some blatant build errors. I must be going mad - I swear
I've fixed that typedef thing like twice already.
2019-07-19 08:45:59 +01:00
Clownacy
36fdb4596d
Cleanup and an accuracy improvement
2019-07-16 13:21:21 +01:00
Clownacy
81eb438482
Fixes and tweaks
2019-07-16 00:15:20 +01:00
Clownacy
6a4f4e0df3
Added handlers for render target loss/window resize
...
These only really happen when you use exclusive fullscreen and
alt-tab out. Or, at least, it does on Windows with SDL2 in DirectX
mode.
2019-07-15 17:47:22 +01:00
Clownacy
15bfd00d25
Added hardware-accelerated rendering backend
...
Still need to add the code for surviving render target losses
2019-07-15 16:47:10 +01:00
Clownacy
21cf78b86d
Split Draw.cpp into common code and backend code
...
Should be easy to add the new hardware renderer now
2019-07-15 13:42:49 +01:00
Clownacy
3ef9b67b1d
Replaced a lot of Draw.cpp with a software renderer
...
Also fixed the SDL_Window not being freed. This commit's a bit of a
blob, since I made a bunch of tweaks to Draw.cpp while adding the new
renderer. Don't worry though, I'll add the hardware accelerated code
back again soon. In fact, I've got an idea on how to make it even
faster, while still being able to survive render target losses.
Hopefully this software renderer will come in handy for the Wii U
port: its SDL2 port's hardware acceleration is broken, and the
SDL_Surface API is too slow.
2019-07-15 11:41:40 +01:00
Clownacy
21d5ba34b0
Shut up some Clang warnings in the Enhanced branch
...
Once again SDL2 using plain ints everywhere causes issues.
2019-06-27 18:01:55 +00:00
Clownacy
44f142d8e7
Big ugly rework of WindowsWrapper.h
...
Okay so WindowsWrapper.h now just includes Windows.h if it wants
non-portability. This meant I had to split the custom RECT struct
back to the original RECT and unknown nameless struct (one uses
left/right, while the other uses front/back).
2019-06-20 20:06:55 +01:00
Clownacy
c80b593a3f
Some #include fixes
...
Finally figured out how to get include-what-you-use working
2019-06-06 18:44:28 +00:00
Clownacy
d2b5872c95
Weeded out some bool usage
...
Cave Story was written in C89. No bools. I've left in Sound.cpp's
though, since that's written in C++98 currently.
2019-05-24 10:07:30 +01:00
Clownacy
fcaddc6252
Added a missing #include to Draw.cpp
2019-05-20 15:03:15 +01:00