Commit graph

22 commits

Author SHA1 Message Date
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