aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/Classes/UGraphic.pas
diff options
context:
space:
mode:
authorjaybinks <jaybinks@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-09-22 08:15:59 +0000
committerjaybinks <jaybinks@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-09-22 08:15:59 +0000
commitcf1102dac69a569279ae05dd95426d9e1c544ffc (patch)
tree48dbf78fa62ab1d86dbdbd23df83172181906880 /Game/Code/Classes/UGraphic.pas
parent217cd16e10ff809e7382e5447f1ccde60f3e8564 (diff)
downloadusdx-cf1102dac69a569279ae05dd95426d9e1c544ffc.tar.gz
usdx-cf1102dac69a569279ae05dd95426d9e1c544ffc.tar.xz
usdx-cf1102dac69a569279ae05dd95426d9e1c544ffc.zip
minor bug fixes to have lazarus build load resources into SDL_Image
correctly... ( lazarus Resources are weak compared to delphi :( ) also Laz build will now run, and main loop works properly. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@429 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to '')
-rw-r--r--Game/Code/Classes/UGraphic.pas26
1 files changed, 21 insertions, 5 deletions
diff --git a/Game/Code/Classes/UGraphic.pas b/Game/Code/Classes/UGraphic.pas
index 3f251be2..f350d0d2 100644
--- a/Game/Code/Classes/UGraphic.pas
+++ b/Game/Code/Classes/UGraphic.pas
@@ -266,6 +266,8 @@ begin
Tex_Mid[0] := Texture.LoadTexture(pchar(Skin.GetTextureFileName('GrayMid')), 'BMP', 'Plain', 0); //brauch man die noch?
Tex_Right[0] := Texture.LoadTexture(pchar(Skin.GetTextureFileName('GrayRight')), 'BMP', 'Transparent', 0); //brauch man die noch?
+ Log.LogStatus('Loading Textures - A', 'LoadTextures');
+
// P1-6
// TODO... do it once for each player... this is a bit crappy !!
// can we make it any better !?
@@ -287,6 +289,8 @@ begin
Tex_BG_Right[P] := Texture.LoadTexture(pchar(Skin.GetTextureFileName('NoteBGRight')), 'PNG', 'Colorized', Col);
end;
+ Log.LogStatus('Loading Textures - B', 'LoadTextures');
+
Tex_Note_Perfect_Star := Texture.LoadTexture(pchar(Skin.GetTextureFileName('NotePerfectStar')), 'JPG', 'Font Black', 0);
Tex_Note_Star := Texture.LoadTexture(pchar(Skin.GetTextureFileName('NoteStar')) , 'JPG', 'Alpha Black Colored', $FFFFFF);
Tex_Ball := Texture.LoadTexture(pchar(Skin.GetTextureFileName('Ball')), 'BMP', 'Transparent', $FF00FF);
@@ -303,17 +307,27 @@ begin
Tex_SingBar_Front := Texture.LoadTexture(pchar(Skin.GetTextureFileName('SingBarFront')), 'JPG', 'Font', 0);
//end Singbar Mod
+ Log.LogStatus('Loading Textures - C', 'LoadTextures');
+
+ {$IFNDEF FPC}
+ // TODO : jb_FPC why does this cause lazarus build, to have runtime error..
+ // TODO : jb_FPC - START HERE !!
//Line Bonus PopUp
for P := 0 to 8 do
begin
Tex_SingLineBonusBack[P] := Texture.LoadTexture(pchar(Skin.GetTextureFileName('LineBonusBack')), 'PNG', 'Colorized', $FFFFFF);
end;
+ {$ENDIF}
+
+
{//Set Texture to Font High
Tex_SingLineBonusL.H := 32; Tex_SingLineBonusL.W := 8;
Tex_SingLineBonusM.H := 32; //Tex_SingLineBonusM.TexW := Tex_SingLineBonusM.TexW/2;
Tex_SingLineBonusR.H := 32; Tex_SingLineBonusR.W := 8; }
//PhrasenBonus - Line Bonus Mod End
+ Log.LogStatus('Loading Textures - D', 'LoadTextures');
+
// tworzenie czcionek
// Log.LogStatus('Building Fonts', 'LoadTextures');
// BuildFont;
@@ -327,15 +341,15 @@ var
Pixel: PByteArray;
I: Integer;
begin
- Log.LogStatus('LoadOpenGL', 'Initialize3D');
+ Log.LogStatus('LoadOpenGL', 'UGraphic.Initialize3D');
// Log.BenchmarkStart(2);
LoadOpenGL;
- Log.LogStatus('SDL_Init', 'Initialize3D');
+ Log.LogStatus('SDL_Init', 'UGraphic.Initialize3D');
if ( SDL_Init(SDL_INIT_VIDEO or SDL_INIT_AUDIO)= -1 ) then
begin
- Log.LogError('SDL_Init Failed', 'Initialize3D');
+ Log.LogError('SDL_Init Failed', 'UGraphic.Initialize3D');
exit;
end;
@@ -390,15 +404,16 @@ begin
// Log.LogStatus('Loading Screens', 'Initialize3D');
// Log.BenchmarkStart(3);
+ Log.LogStatus('Loading Font Textures', 'UGraphic.Initialize3D');
LoadFontTextures();
// Show the Loading Screen -------------
+ Log.LogStatus('Loading Loading Screen', 'UGraphic.Initialize3D');
LoadLoadingScreen;
- Log.LogStatus('Loading Screens', 'Initialize3D');
+ Log.LogStatus(' Loading Textures', 'UGraphic.Initialize3D');
LoadTextures; // jb
- Log.LogStatus(' Loading Textures', '');
@@ -412,6 +427,7 @@ begin
//LoadingThread := SDL_CreateThread(@LoadingThread, nil);
// das hier würde dann im ladethread ausgeführt
+ Log.LogStatus(' Loading Screens', 'UGraphic.Initialize3D');
LoadScreens;