mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r1895) - Fix: add assert for charwidth getter just in case
This commit is contained in:
parent
d865c55007
commit
33ae18b8b3
6
gfx.h
6
gfx.h
|
@ -72,7 +72,11 @@ void ToggleFullScreen(const bool full_screen);
|
|||
#define ASCII_LETTERSTART 32
|
||||
VARDEF int _stringwidth_base;
|
||||
VARDEF byte _stringwidth_table[0x2A0];
|
||||
static inline byte GetCharacterWidth(int key) { return _stringwidth_table[key - ASCII_LETTERSTART];}
|
||||
static inline byte GetCharacterWidth(uint key)
|
||||
{
|
||||
assert(key >= ASCII_LETTERSTART && key - ASCII_LETTERSTART < lengthof(_stringwidth_table));
|
||||
return _stringwidth_table[key - ASCII_LETTERSTART];
|
||||
}
|
||||
|
||||
VARDEF DrawPixelInfo _screen;
|
||||
VARDEF DrawPixelInfo *_cur_dpi;
|
||||
|
|
Loading…
Reference in New Issue