Clownacy
8acd46bce6
Move the font gamma-correction up to Font.cpp
...
Reduces duplicate code
2019-08-08 05:04:08 +00:00
Clownacy
7e04741c29
Correct the rendering backend glyph API, and add a missing #include
...
For some reason, FT_BITMAP's 'width' member specifies subpixels,
not pixels as the documentation says.
2019-08-07 22:31:45 +00:00
Clownacy
6a7fd14833
Font refactor part 2: SDL_Surface
...
No per-component alpha support here
2019-07-23 17:20:56 +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
24d104e2e8
Tweak in Font.cpp
...
MSVC2003 would complain about that code because it didn't understand
the C++ standard. It looked ugly anyway.
2019-07-19 09:02:17 +01:00
Clownacy
a679373c14
Disable font anti-aliasing when FIX_BUGS is enabled
...
It causes ugly artifacting around the text
2019-07-15 18:20:24 +00: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
ac904aa4ae
Fixed uninitialised pointer
2019-04-22 00:40:03 +01:00
Clownacy
cc4eb82162
Added caching to the font system
...
I never liked how much of a bottleneck the font renderer was. Maybe now
the credits won't stutter like mad on the Raspberry Pi.
2019-04-21 23:54:05 +01:00
Clownacy
f25df2ce07
Remove SDL2 dependency from Font.cpp
2019-04-21 21:28:18 +01:00
Clownacy
c45326295a
Minor Font.cpp cleanup
2019-03-11 22:19:12 +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
c9b681299c
Shut up some MSVC2003 warnings
2019-03-11 03:40:51 +00:00
Clownacy
6744235892
Added our own Shift-JIS to Unicode converter
...
This removes the dependency on iconv, meaning MSVC2003 should be able to
compile the Japanese build now.
2019-03-11 03:06:41 +00:00
Clownacy
2266a5ee6d
Font code cleanup
2019-03-07 00:18:24 +00:00
Clownacy
8484fc2c2d
Fix Font.cpp not expecting the font colour in BGR
2019-02-23 23:36:53 +00:00
Clownacy
01ddc5e923
Fixed some warning MSVC2003 was giving in /W3 mode
2019-02-23 21:45:57 +00:00
Clownacy
d55f72aeaf
Another missing #include that MSVC2003 noticed
2019-02-23 15:25:49 +00:00
Clownacy
55f1d3a9fe
Fixed some problems found while compiling most of this with VC++2003
...
I could compile most of this, but not link it (SDL2's .lib files must
be too new).
2019-02-20 03:55:05 +00:00
Clownacy
9203105235
Shut up some warnings
2019-02-19 22:57:00 +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
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
Clownacy
d7813fd900
Fixed some warnings
2019-02-13 15:43:35 +00:00
Clownacy
f81fd7b1cd
Fixed Japanese text
2019-02-09 22:52:47 +00:00
Clownacy
ee88e805b3
Fix some errors and prevent some GCC warnings
2019-02-05 22:51:44 +00:00
Clownacy
d52a69b0e6
Fix dumbass font problems
...
The 320x240 font is still one pixel too high, but honestly I don't give
a shit. It looks better anyway since the vanilla way is off-centre.
2019-02-01 13:50:32 +00: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
Clownacy
b325efd981
Improved Japanese build a little
2019-01-25 12:02:52 +00:00
Clownacy
414fe76abc
Safer UTF-8 decoder
2019-01-25 12:02:52 +00:00
Clownacy
69a2357ca3
Fixed font gamma-correction
...
Also did some cleanup.
2019-01-25 03:57:17 +00:00
Clownacy
3bb0435c27
Overhauled font system
...
Now with super-sexy accurate subpixel rendering and Japanese support
2019-01-24 17:36:18 +00:00