aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/Classes/UGraphic.pas
diff options
context:
space:
mode:
authorwhiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-04-19 18:53:22 +0000
committerwhiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-04-19 18:53:22 +0000
commit6cdcfb402ce738dfc77b008fcb98fd1cda691eb5 (patch)
treeb63b2fee518644528b376692683ec00751f44581 /Game/Code/Classes/UGraphic.pas
parente7650e739e84b47ce6384767e39115adb5d3211a (diff)
downloadusdx-6cdcfb402ce738dfc77b008fcb98fd1cda691eb5.tar.gz
usdx-6cdcfb402ce738dfc77b008fcb98fd1cda691eb5.tar.xz
usdx-6cdcfb402ce738dfc77b008fcb98fd1cda691eb5.zip
Added Statistic Screens to C0de and to Theme
Moved some Translated Strings from UScreenPartyOptions to UTheme to use it with the Statistic Screens, too. Fixed use of /n Tag istead of the correct \n git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@118 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'Game/Code/Classes/UGraphic.pas')
-rw-r--r--Game/Code/Classes/UGraphic.pas36
1 files changed, 23 insertions, 13 deletions
diff --git a/Game/Code/Classes/UGraphic.pas b/Game/Code/Classes/UGraphic.pas
index b909e49f..342efe3c 100644
--- a/Game/Code/Classes/UGraphic.pas
+++ b/Game/Code/Classes/UGraphic.pas
@@ -7,7 +7,8 @@ uses
UScreenOptionsGraphics, UScreenOptionsSound, UScreenOptionsLyrics, UScreenOptionsThemes, UScreenOptionsRecord, UScreenOptionsAdvanced,
UScreenSong, UScreenSing, UScreenScore, UScreenTop5, UScreenEditSub,
UScreenEdit, UScreenEditConvert, UScreenEditHeader, UScreenOpen, UThemes, USkins, UScreenSongMenu, UScreenSongJumpto,
- {Party Screens} UScreenSingModi, UScreenPartyNewRound, UScreenPartyScore, UScreenPartyOptions, UScreenPartyWin, UScreenPartyPlayer;
+ {Party Screens} UScreenSingModi, UScreenPartyNewRound, UScreenPartyScore, UScreenPartyOptions, UScreenPartyWin, UScreenPartyPlayer,
+ {Stats Screens} UScreenStatMain, UScreenStatDetail;
type
TRecR = record
@@ -62,6 +63,10 @@ var
ScreenPartyOptions: TScreenPartyOptions;
ScreenPartyPlayer: TScreenPartyPlayer;
+ //StatsScreens
+ ScreenStatMain: TScreenStatMain;
+ ScreenStatDetail: TScreenStatDetail;
+
Tex_Left: array[0..6] of TTexture;
Tex_Mid: array[0..6] of TTexture;
@@ -221,20 +226,27 @@ var
Icon: TIcon;
Res: TResourceStream;
ISurface: PSDL_Surface;
+ Pixel: PByteArray;
begin
Log.LogStatus('LoadOpenGL', 'Initialize3D');
Log.BenchmarkStart(2);
LoadOpenGL;
- {//Load Icon
+ Log.LogStatus('SDL_Init', 'Initialize3D');
+ if ( SDL_Init(SDL_INIT_VIDEO or SDL_INIT_AUDIO)= -1 ) then begin
+ Log.LogError('SDL_Init Failed', 'Initialize3D');
+ exit;
+ end;
+
+ { //Load Icon
Res := TResourceStream.CreateFromID(HInstance, 3, RT_ICON);
Icon := TIcon.Create;
Icon.LoadFromStream(Res);
Res.Free;
-
+ Icon.
//Create icon Surface
- SDL_CreateRGBSurface (
+ SDL_CreateRGBSurfaceFrom (
SDL_SWSURFACE,
Icon.Width,
Icon.Height,
@@ -243,18 +255,12 @@ begin
32 or 16,
8 or 4,
2 or 1);
- SDL_BlitSurface( //}
-
+ //SDL_BlitSurface(
- SDL_WM_SetIcon(SDL_LoadBMP('us.ico'), 0); //}
- Log.LogStatus('SDL_Init', 'Initialize3D');
- if ( SDL_Init(SDL_INIT_VIDEO or SDL_INIT_AUDIO)= -1 ) then begin
- Log.LogError('SDL_Init Failed', 'Initialize3D');
- exit;
- end;
+ SDL_WM_SetIcon(SDL_LoadBMP('DEFAULT_WINDOW_ICON'), 0); //}
- SDL_WM_SetCaption(PChar(Title), 'WM_DEFAULT');
+ SDL_WM_SetCaption(PChar(Title), nil);
InitializeScreen;
@@ -433,6 +439,10 @@ begin
Log.BenchmarkEnd(3); Log.LogBenchmark('====> Screen PartyOptions', 3); Log.BenchmarkStart(3);
ScreenPartyPlayer := TScreenPartyPlayer.Create;
Log.BenchmarkEnd(3); Log.LogBenchmark('====> Screen PartyPlayer', 3); Log.BenchmarkStart(3);
+ ScreenStatMain := TScreenStatMain.Create;
+ Log.BenchmarkEnd(3); Log.LogBenchmark('====> Screen Stat Main', 3); Log.BenchmarkStart(3);
+ ScreenStatDetail := TScreenStatDetail.Create;
+ Log.BenchmarkEnd(3); Log.LogBenchmark('====> Screen Stat Detail', 3); Log.BenchmarkStart(3);
end;
end.