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
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
9398314af6
Shut up some MSVC2003 warnings, and comment on another one
...
I'm not fixing that last one, since I'd rather futureproof the code in
the event the SDL2 devs update the function to use size_t.
2019-05-13 15:45:45 +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
Gabriel Ravier
bf4aa6b6c0
Did some formatting and grammatical/orthographic corrections
...
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2019-05-10 09:46:05 +02:00
Gabriel Ravier
3d42044917
Corrected weird half-commented-out code
...
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2019-05-07 17:52:33 +02:00
Gabriel Ravier
e8875bd051
Redid formatting for files starting with [C-E]
...
Also fixed potentially erroneous macro MAX_STRIP (would have problems with operation order in operations)
Btw used regex "((//|\;)[^ \t]|(for|while|if|while|do|void|int|bool)\(|(for|while|if|while|do)\ \(.*\)\;|\(\ |\ \)|//\ [a-z])" for this
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2019-05-07 15:39:59 +02:00
Gabriel Ravier
960fa6f456
Removed all trailing spaces and added newline at EOF (when not present)
...
Also changed a "linux" to "Linux"
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2019-05-07 11:55:42 +02:00
Clownacy
a6ac6787d3
Embed the fonts in the EXE
...
Now CSE2.exe should be drop-in replacement for Doukutsu.exe, with
no extra files needed.
2019-05-05 14:03:16 +01:00
Clownacy
f7c1ca86c3
Remove Resource.cpp's dependence on SDL2
...
This also makes its API a lot more similar to Windows'
2019-05-05 01:57:23 +01:00
Clownacy
f25df2ce07
Remove SDL2 dependency from Font.cpp
2019-04-21 21:28:18 +01:00
Clownacy
d38c96622c
Remove Raspberry Pi hack that forces SDL2 to use OpenGLES2
...
This was only for Void and Arch ARM, but I think I'm just setting them up
wrong. Raspbian doesn't need this hack to reach 60FPS.
2019-04-18 19:58:40 +01:00
Clownacy
923cd5a6e3
Added some Raspberry Pi hacks
...
Also added a debug print that tells you what backend SDL2 is using
2019-03-18 20:54:03 +00:00
Clownacy
e864f7e142
Removed the alpha channel from the surfaces
...
It's not needed here, where we use a colour-key instead. The enhanced
branch will need it though.
2019-03-11 14:38:11 +00:00
Clownacy
923749e41e
Some more fixes for errors MSVC2003 noticed
...
Now I've got the entire project building with MSVC2003, _and_ I can
compare its ASM with Devilution's disassembler tool.
2019-02-22 21:18:39 +00:00
Clownacy
b648268283
Changed CortBox(2) col parameter from RGB to BGR
...
That's how it is in the original. Look up Microsoft's COLORREF.
2019-02-21 21:01:16 +00:00
Clownacy
5ba0454bc8
Made Fade.cpp ASM-accurate
2019-02-21 19:46:52 +00:00
Clownacy
367b41bc88
Fixed another case of assuming long is 32-bit
2019-02-20 15:08:35 +00:00
Clownacy
a76b7a3a87
Fix sprite upscaling on platforms where long isn't 32-bit
...
That was dumb.
2019-02-19 23:35:37 +00:00
Clownacy
9203105235
Shut up some warnings
2019-02-19 22:57:00 +00:00
Clownacy
ec148c1072
Made the spriterects C++03-compatible
2019-02-19 22:30:43 +00:00
Clownacy
4d04590b28
Made the game compile as C++03
...
Still need to sort out the C++11-only initialiser lists that GCC allows
in C++03 mode with a warning.
2019-02-19 16:05:28 +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
0403f26f66
Two fixes
...
Made InitBack work with .bmp backgrounds, and fixed a file not being
closed in Draw.cpp
2019-02-15 20:52:03 +00:00
Clownacy
3b395c2639
Draw.cpp fix and optimisations
...
For whatever reason, alpha blending is enabled by default on surfaces.
Disabling it should result in faster blits, and also follow DirectDraw's
behaviour more closely.
2019-02-14 14:18:05 +00:00
Clownacy
c844bc9f49
Avoid VLAs
...
'VLAs are bad because stack overflows' yeah yeah yeah except this
doesn't involve the stack at all.
2019-02-13 16:49:45 +00:00
cuckydev
08d9ca4ad8
fix???
2019-02-12 21:28:44 -05:00
cuckydev
c387c31d04
help
2019-02-12 21:27:14 -05:00