diff GUIFont.h @ 170:91fa025e6ca6

font cleaning code
author C:\Documents and Settings\Administrator.SDF-1\Application Data\The Bat!
date Fri, 15 Feb 2013 01:21:53 +0400
parents 9c0607679772
children 941eb1cc5846
line wrap: on
line diff
--- a/GUIFont.h	Thu Feb 14 14:03:17 2013 +0200
+++ b/GUIFont.h	Fri Feb 15 01:21:53 2013 +0400
@@ -15,7 +15,9 @@
 #pragma pack(push, 1)
 struct GUIFont
 {
-  bool IsCharValid(char c);
+	
+//----- (0044C4DE) --------------------------------------------------------
+  bool IsCharValid(char c) {	return (c >= cFirstChar) && (c <= cLastChar) || (c == '\f') || (c == '\r') || (c == '\t') || (c == '\n');}
   int AlignText_Center(unsigned int uCenterX, const char *pString);
   int GetLineWidth(const char *pString);
   int CalcTextHeight(const char *pString, struct GUIWindow *pWindow, int a4, int a5);
@@ -25,7 +27,7 @@
   void DrawTextLine(unsigned int uDefaultColor, signed int uX, signed int uY, const char *Str, int a6);
   void _44D2FD_prolly_draw_credits_entry(GUIFont *pFont, int Str, int a4, unsigned int w, unsigned int h, unsigned __int16 a7, unsigned __int16 a8, const char *pString, unsigned __int16 *pPixels, unsigned int uPixelsWidth);
 
-  static char *__fastcall _44C933(const char *pString, GUIFont *pFont, GUIFont *a3, int a4, int a5, int a6);
+  static char * _44C933(const char *pString, GUIFont *pFont, GUIFont *a3, int a4, int a5, int a6);
 
   unsigned char cFirstChar;
   unsigned char cLastChar;
@@ -34,15 +36,15 @@
   char field_4;
   __int16 uFontHeight;
   char field_7;
-  int field_8;
+  int palletes_count;
   unsigned __int16 *pFontPalettes[5];
   GUICharMetric pMetrics[256];
   int field_C20[256];
 };
 #pragma pack(pop)
 
-
-
+GUIFont *LoadFont(const char *pFontFile, const char *pFontPalette, ...);
+char * FitTextInAWindow(const char *pInString, GUIFont *pFont, GUIWindow *pWindow, unsigned int uX, int a5);
 
 
 extern struct GUIFont *pAutonoteFont;