aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-10-28 19:01:20 +0000
committertobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-10-28 19:01:20 +0000
commitcf4e5393ccee3af7d592c680ecf7c22f7bc4a4be (patch)
tree2e8a2aa03b00aa91bd6160e69dd8d097a739cb17
parente8a388e32a4563ac9ea0895ca6c7cdf83cf9d3ec (diff)
downloadusdx-cf4e5393ccee3af7d592c680ecf7c22f7bc4a4be.tar.gz
usdx-cf4e5393ccee3af7d592c680ecf7c22f7bc4a4be.tar.xz
usdx-cf4e5393ccee3af7d592c680ecf7c22f7bc4a4be.zip
- glPrint(Pchar) -> glPrint(string)
- glPrintLetter removed git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1483 b956fd51-792f-4845-bead-9b4dfca2ff2c
-rw-r--r--src/base/TextGL.pas13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/base/TextGL.pas b/src/base/TextGL.pas
index ad4c0ee2..57f3d6f5 100644
--- a/src/base/TextGL.pas
+++ b/src/base/TextGL.pas
@@ -41,9 +41,8 @@ uses
procedure BuildFont; // build our bitmap font
procedure KillFont; // delete the font
-function glTextWidth(text: PChar): real; // returns text width
-procedure glPrintLetter(letter: char);
-procedure glPrint(text: pchar); // custom GL "Print" routine
+function glTextWidth(const text: string): real; // returns text width
+procedure glPrint(const text: string); // custom GL "Print" routine
procedure ResetFont(); // reset font settings of active font
procedure SetFontPos(X, Y: real); // sets X and Y
procedure SetFontZ(Z: real); // sets Z
@@ -205,7 +204,7 @@ begin
//glDeleteLists(..., 256);
end;
-function glTextWidth(text: pchar): real;
+function glTextWidth(const text: string): real;
var
Letter: char;
i: integer;
@@ -321,18 +320,18 @@ begin
end;
// Custom GL "Print" Routine
-procedure glPrint(Text: PChar);
+procedure glPrint(const Text: string);
var
Pos: integer;
begin
// if there is no text do nothing
- if ((Text = nil) or (Text = '')) then
+ if (Text = '') then
Exit;
//Save the actual color and alpha (for reflection)
glGetFloatv(GL_CURRENT_COLOR, @TempColor);
- for Pos := 0 to Length(Text) - 1 do
+ for Pos := 1 to Length(Text) do
begin
glPrintLetter(Text[Pos]);
end;