DEADSOFTWARE

gl: handle punch animation in render
[d2df-sdl.git] / src / game / renders / opengl / r_textures.pas
index b51afd2e964bfbd9a76e2edddc8cf4641a43e97f..64d4f533ab39c7fd89e4704d808258864489a51e 100644 (file)
@@ -111,6 +111,7 @@ interface
         destructor Destroy; override;
         function GetChar (c: AnsiChar): TGLTexture;
         function GetWidth (c: AnsiChar): Integer;
+        function GetMaxWidth (): Integer;
         function GetMaxHeight (): Integer;
         function GetSpace (): Integer;
     end;
@@ -778,6 +779,15 @@ implementation
     result := self.info.ch[c].w;
     if result = 0 then
       result := self.info.w;
+    if self.info.kern < 0 then
+      result := result + self.info.kern;
+  end;
+
+  function TGLFont.GetMaxWidth (): Integer;
+  begin
+    result := self.info.w;
+    if self.info.kern < 0 then
+      result := result + self.info.kern;
   end;
 
   function TGLFont.GetMaxHeight (): Integer;