unit ant_text;

//
// fast and dirty way to print text...
//

{$MODE FPC}
{$MODESWITCH DEFAULTPARAMETERS}
{$MODESWITCH OUT}
{$MODESWITCH RESULT}

interface

uses
  {$I deng_app_units.inc},
  dvector2i,
  dvector2f,
  DDrawFont;

var
AntTextData: record
  Font: TFont;
end;

procedure InitText;

procedure AntText(const Pos: TVec2f; const Text: AnsiString);

implementation

procedure InitText;
begin
  AntTextData.Font.InitFromJson(nil, @Eng, Asset('data/font/neucha.json'));
end;

procedure AntText(const Pos: TVec2f; const Text: AnsiString);
begin
  AntTextData.Font.Draw(Round2f(Pos), Text);
end;

end.
