diff options
author | tobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2008-10-28 19:01:20 +0000 |
---|---|---|
committer | tobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2008-10-28 19:01:20 +0000 |
commit | cf4e5393ccee3af7d592c680ecf7c22f7bc4a4be (patch) | |
tree | 2e8a2aa03b00aa91bd6160e69dd8d097a739cb17 /src/base | |
parent | e8a388e32a4563ac9ea0895ca6c7cdf83cf9d3ec (diff) | |
download | usdx-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
Diffstat (limited to 'src/base')
-rw-r--r-- | src/base/TextGL.pas | 13 |
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; |