Commit graph

29 commits

Author SHA1 Message Date
Clownacy
30968a626c Remove all the C-compatibility stuff 2020-01-07 04:46:58 +00:00
Clownacy
b5ad6f5154 Made Star.cpp compile as C89 in VS2003
I hope this doesn't get *too* invasive.
2020-01-06 18:39:23 +00:00
Clownacy
451945e80c Ripped out SDL2, and begun made WinMain ASM-accurate
Almost there... see #74.
2019-09-01 14:39:16 +01:00
Clownacy
f956eb9264 Mostly ASM-accurate Draw.cpp
See #74
2019-08-31 17:43:45 +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
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
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
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
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
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
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
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
d5dd2c9575 Made TextScr.cpp almost ASM-accurate
TextScriptProc is all that's left, but it's being a pain, so I'm
commiting this now, and dealing with the straggler later.
2019-05-13 23:51:11 +01:00
Clownacy
9b82baeb02 Made MiniMap.cpp actually ASM-accurate 2019-05-13 17:50:09 +01:00
Clownacy
676ee004fe Removed the dependency on stdint.h
This doesn't exist in MSVC2003, and nothing in the Linux port's debug
symbols indicate Pixel used it.
2019-05-13 15:18:33 +01:00
Clownacy
168f69adf2 Shut up some -pedantic warnings 2019-03-07 00:18:48 +00:00
Clownacy
5ba0454bc8 Made Fade.cpp ASM-accurate 2019-02-21 19:46:52 +00:00
Clownacy
fbaf46548f Made Back.cpp about as ASM-accurate as I can make it
...without removing the widescreen stuff, at least.
2019-02-19 00:50:16 +00:00
Clownacy
e1e49a4dcc Made ArmsItem.cpp ASM-accurate 2019-02-19 00:18:32 +00:00
Clownacy
0bb9760d87 Rearranged #includes 2019-02-18 21:30:22 +00:00
Clownacy
e5caff593c Removed the SDL dependency from Draw.h
Should make compiling with VC++ 2003 simpler
2019-02-18 20:40:07 +00:00
Clownacy
132d3c5110 Applied SURFACE_ID constants to everything 2019-02-18 14:36:58 +00:00
Clownacy
c44186d93a Ditched SDL's file IO for stdio and our own convenience functions
ASM-accurate file stuff can come later.
2019-02-15 20:33:08 +00:00
cuckydev
c7da84bb9f accuracy? 2019-02-12 20:58:42 -05:00
Clownacy
4f7db164d6 Overhauled graphics system
Along with being more accurate to the original, this fixes switching out
of fullscreen causing textures to disappear. This was caused by DirectX
destroying textures that are marked as render-targets when a device-loss
occurs. SDL2 doesn't do anything to recover them, unlike regular
textures, so my solution is just to avoid render-target textures
entirely.

On the upside, this should make drawing text to surfaces much faster,
since we're not reading back bitmaps from the GPU.
2019-01-30 21:07:47 +00:00
Clownacy
90ef30bece Added option for fonts to be loaded from Windows
This restores some compatibility with Config.dat's font settings.
2019-01-29 14:20:25 +00:00
cuckydev
a2c86d9f7c fixed scaling to be accurate 2019-01-23 16:17:43 -05:00
cuckydev
b1bb48148b resource and japanese 2019-01-20 15:55:28 -05:00
cuckydev
c84f49f1dc wip 2019-01-16 22:48:21 -05:00