gfx.h
changeset 5108 dc67d70b5a45
parent 4954 d773d01b35f5
equal deleted inserted replaced
5107:8791beb0ae51 5108:dc67d70b5a45
    41 void GfxScroll(int left, int top, int width, int height, int xo, int yo);
    41 void GfxScroll(int left, int top, int width, int height, int xo, int yo);
    42 
    42 
    43 
    43 
    44 // XXX doesn't really belong here, but the only
    44 // XXX doesn't really belong here, but the only
    45 // consumers always use it in conjunction with DoDrawString()
    45 // consumers always use it in conjunction with DoDrawString()
    46 #define UPARROW   "\x80"
    46 #define UPARROW   "\xEE\x8A\x80"
    47 #define DOWNARROW "\xAA"
    47 #define DOWNARROW "\xEE\x8A\xAA"
    48 
    48 
    49 
    49 
    50 int DrawStringCentered(int x, int y, StringID str, uint16 color);
    50 int DrawStringCentered(int x, int y, StringID str, uint16 color);
    51 int DrawStringCenteredTruncated(int xl, int xr, int y, StringID str, uint16 color);
    51 int DrawStringCenteredTruncated(int xl, int xr, int y, StringID str, uint16 color);
    52 int DoDrawStringCentered(int x, int y, const char *str, uint16 color);
    52 int DoDrawStringCentered(int x, int y, const char *str, uint16 color);
    94 void ToggleFullScreen(bool fs);
    94 void ToggleFullScreen(bool fs);
    95 
    95 
    96 /* gfx.c */
    96 /* gfx.c */
    97 #define ASCII_LETTERSTART 32
    97 #define ASCII_LETTERSTART 32
    98 extern FontSize _cur_fontsize;
    98 extern FontSize _cur_fontsize;
    99 extern byte _stringwidth_table[FS_END][224];
       
   100 
    99 
   101 static inline byte GetCharacterWidth(FontSize size, byte key)
   100 byte GetCharacterWidth(FontSize size, uint32 key);
   102 {
       
   103 	assert(key >= ASCII_LETTERSTART);
       
   104 	return _stringwidth_table[size][key - ASCII_LETTERSTART];
       
   105 }
       
   106 
   101 
   107 static inline byte GetCharacterHeight(FontSize size)
   102 static inline byte GetCharacterHeight(FontSize size)
   108 {
   103 {
   109 	switch (size) {
   104 	switch (size) {
   110 		default: NOT_REACHED();
   105 		default: NOT_REACHED();