diff options
Diffstat (limited to 'Game')
-rw-r--r-- | Game/Code/Classes/UCommon.pas | 2 | ||||
-rw-r--r-- | Game/Code/Classes/UConfig.pas | 37 | ||||
-rw-r--r-- | Game/Code/Classes/UDraw.pas | 38 | ||||
-rw-r--r-- | Game/Code/Classes/UGraphic.pas | 6 | ||||
-rw-r--r-- | Game/Code/Classes/UPlatformLinux.pas | 4 | ||||
-rw-r--r-- | Game/Code/Classes/UVisualizer.pas | 16 |
6 files changed, 69 insertions, 34 deletions
diff --git a/Game/Code/Classes/UCommon.pas b/Game/Code/Classes/UCommon.pas index fb74af0b..abff538f 100644 --- a/Game/Code/Classes/UCommon.pas +++ b/Game/Code/Classes/UCommon.pas @@ -152,6 +152,7 @@ end; {$ENDIF}
{$IFDEF FPC}
+// FIXME: already exists in FPC
function MaxValue(const Data: array of Double): Double;
var
I: Integer;
@@ -162,6 +163,7 @@ begin Result := Data[I];
end;
+// FIXME: already exists in FPC
function MinValue(const Data: array of Double): Double;
var
I: Integer;
diff --git a/Game/Code/Classes/UConfig.pas b/Game/Code/Classes/UConfig.pas index f850b00f..ee4685d3 100644 --- a/Game/Code/Classes/UConfig.pas +++ b/Game/Code/Classes/UConfig.pas @@ -78,7 +78,7 @@ const // with IncludeConstants undefined and in UConfig.pas with // IncludeConstants defined (see the note above). {$DEFINE IncludeConstants} - + // include config-file (defines + constants) {$IF Defined(MSWindows)} {$I ../config-win.inc} @@ -96,7 +96,16 @@ const VERSION_MINOR = 1000; VERSION_RELEASE = 1; - (* + (* + * Current version of UltraStar Deluxe + *) + USDX_VERSION_MAJOR = 1; + USDX_VERSION_MINOR = 1; + USDX_VERSION_RELEASE = 0; + USDX_VERSION_STATE = 'Alpha'; + USDX_STRING = 'UltraStar Deluxe'; + + (* * FPC_VERSION is already defined as a macro by FPC itself. * You should use the built-in macros * FPC_VERSION (=PPC_MAJOR) @@ -181,6 +190,30 @@ const (PORTAUDIO_VERSION_RELEASE * VERSION_RELEASE); {$ENDIF} +function USDXVersionStr(): string; +function USDXShortVersionStr(): string; + implementation +uses + StrUtils; + +function USDXShortVersionStr(): string; +begin + Result := + USDX_STRING + + IfThen(USDX_VERSION_STATE <> '', ' '+USDX_VERSION_STATE); +end; + +function USDXVersionStr(): string; +begin + Result := + USDX_STRING + ' V ' + + IntToStr(USDX_VERSION_MAJOR) + '.' + + IntToStr(USDX_VERSION_MINOR) + '.' + + IntToStr(USDX_VERSION_RELEASE) + + IfThen(USDX_VERSION_STATE <> '', ' '+USDX_VERSION_STATE) + + ' Build'; +end; + end. diff --git a/Game/Code/Classes/UDraw.pas b/Game/Code/Classes/UDraw.pas index a81aa93b..dc2f4dce 100644 --- a/Game/Code/Classes/UDraw.pas +++ b/Game/Code/Classes/UDraw.pas @@ -59,27 +59,23 @@ const implementation -uses {$IFDEF Win32} - windows, - {$ELSE} - lclintf, - {$ENDIF} - OpenGL12, - UGraphic, - SysUtils, - UMusic, - URecord, - ULog, - UScreenSing, - UScreenSingModi, - ULyrics, - UMain, - TextGL, - UTexture, - UDrawTexture, - UIni, - Math, - UDLLManager; +uses + OpenGL12, + UGraphic, + SysUtils, + UMusic, + URecord, + ULog, + UScreenSing, + UScreenSingModi, + ULyrics, + UMain, + TextGL, + UTexture, + UDrawTexture, + UIni, + Math, + UDLLManager; procedure SingDrawBackground; var diff --git a/Game/Code/Classes/UGraphic.pas b/Game/Code/Classes/UGraphic.pas index dfcec7cc..fecdb10f 100644 --- a/Game/Code/Classes/UGraphic.pas +++ b/Game/Code/Classes/UGraphic.pas @@ -525,7 +525,7 @@ begin //SDL_WaitThread(LoadingThread, I);
// SDL_DestroyMutex(Mutex);
- Display.ActualScreen^.FadeTo( @ScreenMain );
+ Display.CurrentScreen^.FadeTo( @ScreenMain );
Log.BenchmarkEnd(2);
Log.LogBenchmark('--> Loading Screens', 2);
@@ -644,7 +644,7 @@ begin ScreenLoading := TScreenLoading.Create;
ScreenLoading.onShow;
- Display.ActualScreen := @ScreenLoading;
+ Display.CurrentScreen := @ScreenLoading;
swapbuffers;
@@ -658,7 +658,7 @@ procedure LoadScreens; begin
{ ScreenLoading := TScreenLoading.Create;
ScreenLoading.onShow;
- Display.ActualScreen := @ScreenLoading;
+ Display.CurrentScreen := @ScreenLoading;
ScreenLoading.Draw;
Display.Draw;
SwapBuffers;
diff --git a/Game/Code/Classes/UPlatformLinux.pas b/Game/Code/Classes/UPlatformLinux.pas index 71a75a6b..ff4834fe 100644 --- a/Game/Code/Classes/UPlatformLinux.pas +++ b/Game/Code/Classes/UPlatformLinux.pas @@ -161,11 +161,13 @@ begin if FindCmdLineSwitch( cUseLocalPaths ) then result := ExtractFilePath(ParamStr(0)) else + begin {$IFDEF UseLocalDirs} result := ExtractFilePath(ParamStr(0)); {$ELSE} result := SharedPath+'/'; {$ENDIF} + end; end; function TPlatformLinux.GetGameUserPath : WideString; @@ -173,11 +175,13 @@ begin if FindCmdLineSwitch( cUseLocalPaths ) then result := ExtractFilePath(ParamStr(0)) else + begin {$IFDEF UseLocalDirs} result := ExtractFilePath(ParamStr(0)); {$ELSE} result := get_homedir()+'/.'+PathSuffix+'/'; {$ENDIF} + end; end; function TPlatformLinux.get_homedir(): string; diff --git a/Game/Code/Classes/UVisualizer.pas b/Game/Code/Classes/UVisualizer.pas index 2f584299..51ebee31 100644 --- a/Game/Code/Classes/UVisualizer.pas +++ b/Game/Code/Classes/UVisualizer.pas @@ -124,10 +124,10 @@ begin {$IFDEF UseTexture}
glGenTextures(1, PglUint(@VisualTex));
- glBindTexture(GL_TEXTURE_2D, VisualTex);
+ glBindTexture(GL_TEXTURE_2D, VisualTex);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
{$ENDIF}
end;
@@ -175,7 +175,7 @@ end; procedure TVideoPlayback_ProjectM.SaveOpenGLState();
begin
// save all OpenGL state-machine attributes
- glPushAttrib(GL_ALL_ATTRIB_BITS);
+ glPushAttrib(GL_ALL_ATTRIB_BITS);
// save projection-matrix
glMatrixMode(GL_PROJECTION);
@@ -237,8 +237,8 @@ begin presetsDir, fontsDir);
//initResult := projectM_initRenderToTexture(pm);
- SaveOpenGLState();
- pm.ResetGL(ScreenW, ScreenH);
+ SaveOpenGLState();
+ pm.ResetGL(ScreenW, ScreenH);
RestoreOpenGLState();
end;
@@ -272,8 +272,8 @@ begin pm.AddPCM16Data(PSmallint(@PcmData), nSamples);
// store OpenGL state (might be messed up otherwise)
- SaveOpenGLState();
- pm.ResetGL(ScreenW, ScreenH);
+ SaveOpenGLState();
+ pm.ResetGL(ScreenW, ScreenH);
//glGetIntegerv(GL_PROJECTION_STACK_DEPTH, @stackDepth);
//writeln('StackDepth0: ' + inttostr(stackDepth));
|