diff options
author | jaybinks <jaybinks@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2007-09-19 13:13:37 +0000 |
---|---|---|
committer | jaybinks <jaybinks@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2007-09-19 13:13:37 +0000 |
commit | 84beb7412eaca48cbf5c9915b83e5f8c79c9a0e7 (patch) | |
tree | 1356601393266644728a0ee1d1e3cc26dab4a135 /Game/Code/Classes | |
parent | 90bf63406cd1dbcc9c041a858ef2f030d58f1f25 (diff) | |
download | usdx-84beb7412eaca48cbf5c9915b83e5f8c79c9a0e7.tar.gz usdx-84beb7412eaca48cbf5c9915b83e5f8c79c9a0e7.tar.xz usdx-84beb7412eaca48cbf5c9915b83e5f8c79c9a0e7.zip |
fixes to get working in lazarus..
compiling, linking, starting to run.. just fixing stuff :)
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@397 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to '')
-rw-r--r-- | Game/Code/Classes/TextGL.pas | 51 | ||||
-rw-r--r-- | Game/Code/Classes/UFiles.pas | 2 | ||||
-rw-r--r-- | Game/Code/Classes/UTexture.pas | 5 |
3 files changed, 40 insertions, 18 deletions
diff --git a/Game/Code/Classes/TextGL.pas b/Game/Code/Classes/TextGL.pas index aa5fa18b..12a9a8dc 100644 --- a/Game/Code/Classes/TextGL.pas +++ b/Game/Code/Classes/TextGL.pas @@ -59,13 +59,31 @@ var implementation
-uses UMain, Windows, SysUtils, UGraphic;
+uses UMain,
+ Windows,
+ SysUtils,
+ {$IFDEF FPC}
+ LResources,
+ {$ENDIF}
+ UGraphic;
procedure BuildFont; // Build Our Bitmap Font
+
+ procedure loadfont( aID : integer; aType, aResourceName : String);
+ var
+ Rejestr: TResourceStream;
+ begin
+ Rejestr := TResourceStream.Create(HInstance, aResourceName , pchar( aType ) );
+ try
+ Rejestr.Read(Fonts[ aID ].Width, 256);
+ finally
+ Rejestr.Free;
+ end;
+ end;
+
var
font: HFONT; // Windows Font ID
h_dc: hdc;
- Rejestr: TResourceStream;
Pet: integer;
begin
ActFont := 0;
@@ -102,21 +120,21 @@ begin Fonts[4].Outline := 5;}
- Rejestr := TResourceStream.Create(HInstance, 'Font', 'FNT');
- Rejestr.Read(Fonts[0].Width, 256);
- Rejestr.Free;
- Rejestr := TResourceStream.Create(HInstance, 'FontB', 'FNT');
- Rejestr.Read(Fonts[1].Width, 256);
- Rejestr.Free;
+ {$IFDEF FPC}
+ loadfont( 0, 'DAT', 'eurostar_regular' );
+ loadfont( 1, 'DAT', 'eurostar_regular_bold' );
+ loadfont( 2, 'DAT', 'Outline 1' );
+ loadfont( 3, 'DAT', 'Outline 2' );
+ {$ELSE}
+ loadfont( 0, 'FNT', 'Font' );
+ loadfont( 1, 'FNT', 'FontB' );
+ loadfont( 2, 'FNT', 'Font0' );
+ loadfont( 3, 'FNT', 'FontO2' );
+ {$ENDIF}
+
- Rejestr := TResourceStream.Create(HInstance, 'FontO', 'FNT');
- Rejestr.Read(Fonts[2].Width, 256);
- Rejestr.Free;
- Rejestr := TResourceStream.Create(HInstance, 'FontO2', 'FNT');
- Rejestr.Read(Fonts[3].Width, 256);
- Rejestr.Free;
{ Rejestr := TResourceStream.Create(HInstance, 'FontO', 'FNT');
Rejestr.Read(Fonts[4].Width, 256);
@@ -351,4 +369,9 @@ begin Fonts[ActFont].AspectW := Aspect;
end;
+initialization
+ {$I UltraStar.lrs}
+
end.
+
+
diff --git a/Game/Code/Classes/UFiles.pas b/Game/Code/Classes/UFiles.pas index bbb22136..34342e26 100644 --- a/Game/Code/Classes/UFiles.pas +++ b/Game/Code/Classes/UFiles.pas @@ -113,7 +113,7 @@ begin //Required Information
Song.Mp3 := '';
{$IFDEF FPC}
- Song.BPM := NULL;
+ setlength( Song.BPM, 0 );
{$ELSE}
Song.BPM := 0;
{$ENDIF}
diff --git a/Game/Code/Classes/UTexture.pas b/Game/Code/Classes/UTexture.pas index 4eb00b4b..c1862828 100644 --- a/Game/Code/Classes/UTexture.pas +++ b/Game/Code/Classes/UTexture.pas @@ -21,11 +21,10 @@ uses OpenGL12, Math,
Classes,
SysUtils,
- Graphics,
-
{$IFDEF FPC}
- lazjpeg,
+ ulazjpeg,
{$ELSE}
+ Graphics,
JPEG,
PNGImage,
{$ENDIF}
|