UnknownShadow200
feff50b4c4
Fix 128x256 default.png crashing the game
2020-04-20 18:37:03 +10:00
UnknownShadow200
4e0c4ffe2e
Make measuring text slightly faster for system fonts
2020-03-07 23:07:19 +11:00
UnknownShadow200
507badb3bc
Remove Drawer2D_BmpIndexed as it's never used
2020-03-03 19:39:03 +11:00
UnknownShadow200
29a8ea8441
Fix not compiling on non-windows, don't crash if out of memory for allocating system font data
2020-03-01 10:06:59 +11:00
UnknownShadow200
56d20790ce
Don't crash if out of memory reallocating data for freetype or allocating output buffer for music
2020-02-27 15:45:53 +11:00
UnknownShadow200
c8bc76dcbe
Don't include Options.h in Game.h
2020-02-17 17:00:58 +11:00
UnknownShadow200
4e367b3cdc
Prefer nicer looking default fonts like 'liberation sans' or 'nimbus sans' on linux, with 'century schoolbook l roman' being last fallback
2020-01-31 22:07:59 +11:00
UnknownShadow200
e793332132
Don't abort the game if out of memory allocating data for FreeType
2020-01-05 12:04:29 +11:00
UnknownShadow200
508477b0c6
Use Drawer2D_TextWidth instead of Drawer2D_MeasureText in more places
2019-11-26 20:03:08 +11:00
UnknownShadow200
01d94cd3d8
Get rid of GFX_NULL, just use 0
2019-11-23 18:52:47 +11:00
UnknownShadow200
f75e4b7f18
Only sync fonts cache with system's font when it's actually necessary (like clicking 'select system font' or current system font selected isn't in cache).
...
This reduces startup time for me (500 system fonts) by 100-130 ms.
2019-11-19 22:45:35 +11:00
UnknownShadow200
5f49e3e429
code cleanup
2019-11-14 22:27:04 +11:00
UnknownShadow200
b9dd22b41c
DPI scale system fonts so it doesn't look so atrocious on mobile
2019-10-28 11:22:47 +11:00
UnknownShadow200
cee0fd38c2
DPI scale widgets and stuff in web client too
2019-10-13 18:45:25 +11:00
UnknownShadow200
bbd0af1912
Fix launcher background stuffing up when either fully black or white (Thanks DuckTummy)
2019-10-12 08:06:04 +11:00
UnknownShadow200
7eec5b3b5b
Fix system fonts
2019-10-10 15:06:06 +11:00
UnknownShadow200
7b1f08b06f
ReturnCode -> cc_result
2019-10-10 13:30:07 +11:00
UnknownShadow200
540bd993b2
bool -> cc_bool, for better compatibility with system headers that define bool type
2019-10-10 13:20:30 +11:00
UnknownShadow200
060afd7d7b
Fix R/G/B not being clamped in Gradient_Blend
2019-10-10 10:57:06 +11:00
UnknownShadow200
e07712d725
Better c89 compatibility
2019-10-07 20:33:16 +11:00
UnknownShadow200
80ee35fdce
Fix all compile errors
...
Hopefully didn't break too much
2019-10-07 17:55:04 +11:00
UnknownShadow200
d7d73fa526
less compile errors
2019-10-07 14:56:16 +11:00
UnknownShadow200
df31c95f83
Initial WIP on making BitmapCol raw uint32.
...
Also causes hundreds of compile errors, oops.
2019-10-06 14:01:31 +11:00
UnknownShadow200
eba6ddd138
Add Font_ReducePadding method
...
Instead of drawing bitmapped font with large padding and then adjusting v1/v2 in the final texture, this method simply reduces the padding the bitmapped font gets drawn with
2019-09-05 08:21:52 +10:00
UnknownShadow200
cbc3d9c05e
Fix webclient build
2019-09-01 20:38:12 +10:00
UnknownShadow200
11e44e9a6b
Cache height for fonts
2019-08-29 15:16:44 +10:00
UnknownShadow200
12833fdaa5
Take FontDesc out of Core.h and remove its Typedef
2019-08-29 13:28:28 +10:00
UnknownShadow200
aac15edbab
Fix OSX build
2019-08-29 13:14:11 +10:00
UnknownShadow200
83ac758a38
Move the freetype system font stuff out of platform.c and into its more logical place in Drawer2D
...
Except for actually getting list of system fonts, that's still completely platform specific so stays in Platform.c
2019-08-29 13:05:54 +10:00
UnknownShadow200
7eabf45bcd
Drawer2D_MakeTextTexture shouldn't try to draw anything and just returns an empty texture when context is lost
2019-08-29 10:31:13 +10:00
UnknownShadow200
39cd47b2d3
use cc_uint8 instead of uint8_t so we can avoid stdint.h for gcc and clang
...
This fixes not compiling with mingw32 out of the box on windows (not mingw-w64, it works fine) due to WINVER being defined somewhere in the headers included by stdint.h. Even after that it would produce executables that wouldn't work properly unless DUNICODE was also added.
2019-08-25 19:36:45 +10:00
UnknownShadow200
bad7f79b7a
Fix chat input caret appearing at wrong Y position after resize with opengl
2019-08-25 11:41:08 +10:00
UnknownShadow200
d1fb95092e
Merge pull request #601 from UnknownShadow200/ScreenRewrite
...
Merge screen rewrite stuff
2019-08-25 10:44:12 +10:00
UnknownShadow200
3d7957570b
try to use TextHeight instead of MeasureText
2019-08-21 19:58:18 +10:00
UnknownShadow200
53f1c4463b
Fix game crashing with 'making default font failed' if the file associated with the default font is deleted
2019-08-19 21:41:18 +10:00
UnknownShadow200
bea6e546c1
Make Gfx_CreateTexture always return 0 if context is lost, instead of doing it in Drawer2D_Make2DTexture
...
Also start cleaning up screens code
2019-08-08 20:00:00 +10:00
UnknownShadow200
4a6e2c3419
Scale up flags with DPI
2019-08-06 12:25:02 +10:00
UnknownShadow200
68827ce82e
Store pointers to fonts in widgets and slightly optimise drawing clipped text
2019-08-04 20:27:23 +10:00
UnknownShadow200
9813402aee
cleanup drawer2d code
2019-08-01 18:25:07 +10:00
UnknownShadow200
2598ba18ce
Make getting shadow colour for text a bit faster
2019-07-30 20:39:27 +10:00
UnknownShadow200
8c57e07132
Box/Seperator widgets in launcher scale with DPI
2019-07-28 23:30:32 +10:00
UnknownShadow200
3286dcf58c
Make drawing stone/dirt background for classic mode launcher quite a bit faster
2019-07-28 18:56:39 +10:00
UnknownShadow200
8fb63080c8
Quick workaround for #594 , a real fix will come later. (Thanks igor725)
2019-07-20 11:10:32 +10:00
UnknownShadow200
ff7bbdb1ad
Rewrite how contexts are lost and restored
...
This means a) context isn't constantly destroyed and recreated when resizing window b) WebGL context is now partially restored, although all textures stay completely black
2019-07-18 21:34:39 +10:00
UnknownShadow200
e76aab0b55
Use union for PackedCol/BitmapCol, generates slightly better code on all compilers
2019-07-16 21:19:44 +10:00
UnknownShadow200
508414c96f
make field names of structs in LScreens.c lowercase
2019-07-12 20:04:26 +10:00
UnknownShadow200
6429663853
const static -> static const to reduce compiler warnings
2019-06-16 22:46:37 +10:00
UnknownShadow200
ad314a5c55
Fix null pointer crash if an error occurs when trying to makea sysem font ( Fixes #529 , thanks igor725)
2019-06-11 07:43:18 +10:00
UnknownShadow200
323818ae44
Fix web client compile errors
2019-06-01 17:49:26 +10:00
UnknownShadow200
8749a37e36
Also add cantarell as a default font to fix crash on some linux distribution setups (thanks xerolyph)
2019-04-24 19:16:34 +10:00