From e8ff96a8c44e152a2cb7b71579249c15a10f4168 Mon Sep 17 00:00:00 2001 From: whiteshark0 Date: Mon, 9 Jul 2007 14:00:16 +0000 Subject: Added missing UCommandLine.pas git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@282 b956fd51-792f-4845-bead-9b4dfca2ff2c --- Game/Code/Classes/UCommandLine.pas | 280 +++++++++++++++++++++++++++++++++++++ 1 file changed, 280 insertions(+) create mode 100644 Game/Code/Classes/UCommandLine.pas (limited to 'Game/Code/Classes/UCommandLine.pas') diff --git a/Game/Code/Classes/UCommandLine.pas b/Game/Code/Classes/UCommandLine.pas new file mode 100644 index 00000000..03229721 --- /dev/null +++ b/Game/Code/Classes/UCommandLine.pas @@ -0,0 +1,280 @@ +unit UCommandLine; + +interface + +type + //----------- + // TCMDParams - Class Reaads Infos from ParamStr and set some easy Interface Variables + //----------- + TCMDParams = class + private + sLanguage: String; + sResolution: String; + public + //Some Boolean Variables Set when Reading Infos + Debug: Boolean; + Benchmark: Boolean; + NoLog: Boolean; + FullScreen: Boolean; + Joypad: Boolean; + + //Some Value Variables Set when Reading Infos {-1: Not Set, others: Value} + Depth: Integer; + Screens: Integer; + + //Some Strings Set when Reading Infos {Length=0 Not Set} + SongPath: String; + ConfigFile: String; + ScoreFile: String; + + //Pseudo Integer Values + Function GetLanguage: Integer; + Property Language: Integer read GetLanguage; + + Function GetResolution: Integer; + Property Resolution: Integer read GetResolution; + + //Some Procedures for Reading Infos + Constructor Create; + + Procedure ResetVariables; + Procedure ReadParamInfo; + end; + +var + Params: TCMDParams; + +implementation +uses SysUtils, UIni; + +//------------- +// Constructor - Create class, Reset Variables and Read Infos +//------------- +Constructor TCMDParams.Create; +begin + ResetVariables; + ReadParamInfo; +end; + +//------------- +// ResetVariables - Reset Class Variables +//------------- +Procedure TCMDParams.ResetVariables; +begin + Debug := False; + Benchmark := False; + NoLog := False; + FullScreen := False; + Joypad := False; + + //Some Value Variables Set when Reading Infos {-1: Not Set, others: Value} + sResolution := ''; + sLanguage := ''; + Depth := -1; + Screens := -1; + + //Some Strings Set when Reading Infos {Length=0 Not Set} + SongPath := ''; + ConfigFile := ''; + ScoreFile := ''; +end; + +//------------- +// ReadParamInfo - Read Infos from Parameters +//------------- +Procedure TCMDParams.ReadParamInfo; +var + I: Integer; + PCount: Integer; + Command: String; +begin + PCount := ParamCount; + //Log.LogError('ParamCount: ' + Inttostr(PCount)); + + //Check all Parameters + For I := 1 to PCount do + begin + Command := Paramstr(I); + //Log.LogError('Start parsing Command: ' + Command); + //Is String Parameter ? + if (Length(Command) > 1) AND (Command[1] = '-') then + begin + //Remove - from Command + Command := Lowercase(Trim(Copy(Command, 2, Length(Command) - 1))); + //Log.LogError('Command prepared: ' + Command); + + //Check Command + + // Boolean Triggers: + if (Command = 'debug') then + Debug := True + else if (Command = 'benchmark') then + Benchmark := True + else if (Command = 'nolog') then + NoLog := True + else if (Command = 'fullscreen') then + Fullscreen := True + else if (Command = 'joypad') then + Joypad := True + + //Integer Variables + else if (Command = 'depth') then + begin + //Check if there is another Parameter to get the Value from + if (PCount > I) then + begin + Command := ParamStr(I + 1); + + //Check for valid Value + If (Command = '16') then + Depth := 0 + Else If (Command = '32') then + Depth := 1; + end; + end + + else if (Command = 'screens') then + begin + //Check if there is another Parameter to get the Value from + if (PCount > I) then + begin + Command := ParamStr(I + 1); + + //Check for valid Value + If (Command = '1') then + Screens := 0 + Else If (Command = '2') then + Screens := 1; + end; + end + + //Pseudo Integer Values + else if (Command = 'language') then + begin + //Check if there is another Parameter to get the Value from + if (PCount > I) then + begin + //Write Value to String + sLanguage := Lowercase(ParamStr(I + 1)); + end; + end + + else if (Command = 'resolution') then + begin + //Check if there is another Parameter to get the Value from + if (PCount > I) then + begin + //Write Value to String + sResolution := Lowercase(ParamStr(I + 1)); + end; + end + + //String Values + else if (Command = 'songpath') then + begin + //Check if there is another Parameter to get the Value from + if (PCount > I) then + begin + //Write Value to String + SongPath := ParamStr(I + 1); + end; + end + + else if (Command = 'configfile') then + begin + //Check if there is another Parameter to get the Value from + if (PCount > I) then + begin + //Write Value to String + ConfigFile := ParamStr(I + 1); + + //is this a relative PAth -> then add Gamepath + if Not ((Length(ConfigFile) > 2) AND (ConfigFile[2] = ':')) then + ConfigFile := ExtractFilePath(ParamStr(0)) + Configfile; + end; + end + + else if (Command = 'scorefile') then + begin + //Check if there is another Parameter to get the Value from + if (PCount > I) then + begin + //Write Value to String + ScoreFile := ParamStr(I + 1); + end; + end; + + end; + + end; + +{ Log.LogError('Values: '); + + if Debug then + Log.LogError('Debug'); + + if Benchmark then + Log.LogError('Benchmark'); + + if NoLog then + Log.LogError('NoLog'); + + if Fullscreen then + Log.LogError('FullScreen'); + + if JoyStick then + Log.LogError('Joystick'); + + + Log.LogError('Screens: ' + Inttostr(Screens)); + Log.LogError('Depth: ' + Inttostr(Depth)); + + Log.LogError('Resolution: ' + Inttostr(Resolution)); + Log.LogError('Resolution: ' + Inttostr(Language)); + + Log.LogError('sResolution: ' + sResolution); + Log.LogError('sLanguage: ' + sLanguage); + + Log.LogError('ConfigFile: ' + ConfigFile); + Log.LogError('SongPath: ' + SongPath); + Log.LogError('ScoreFile: ' + ScoreFile); } + +end; + +//------------- +// GetLanguage - Get Language ID from saved String Information +//------------- +Function TCMDParams.GetLanguage: Integer; +var + I: integer; +begin + Result := -1; + + //Search for Language + For I := 0 to high(ILanguage) do + if (LowerCase(ILanguage[I]) = sLanguage) then + begin + Result := I; + Break; + end; +end; + +//------------- +// GetResolution - Get Resolution ID from saved String Information +//------------- +Function TCMDParams.GetResolution: Integer; +var + I: integer; +begin + Result := -1; + + //Search for Resolution + For I := 0 to high(IResolution) do + if (LowerCase(IResolution[I]) = sResolution) then + begin + Result := I; + Break; + end; +end; + +end. \ No newline at end of file -- cgit v1.2.3 From 6e7b96ca3a7d47b0441bed904a9b8bb25c3223de Mon Sep 17 00:00:00 2001 From: jaybinks Date: Wed, 12 Sep 2007 12:43:38 +0000 Subject: * added missed dependency PNGImage. * moved FUNCTION InitializePaths(), from uFiles to uMain as this is a more sane location for it. * updated files that used UFiles to point to UMain, and removed uFiles where its not needed. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@385 b956fd51-792f-4845-bead-9b4dfca2ff2c --- Game/Code/Classes/UCommandLine.pas | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'Game/Code/Classes/UCommandLine.pas') diff --git a/Game/Code/Classes/UCommandLine.pas b/Game/Code/Classes/UCommandLine.pas index 03229721..259c6e16 100644 --- a/Game/Code/Classes/UCommandLine.pas +++ b/Game/Code/Classes/UCommandLine.pas @@ -45,7 +45,10 @@ var Params: TCMDParams; implementation -uses SysUtils, UIni; + +uses SysUtils; +// uINI -- Nasty requirement... ( removed with permission of blindy ) + //------------- // Constructor - Create class, Reset Variables and Read Infos @@ -249,6 +252,7 @@ var I: integer; begin Result := -1; +{* JB - 12sep07 to remove uINI dependency //Search for Language For I := 0 to high(ILanguage) do @@ -257,6 +261,7 @@ begin Result := I; Break; end; +*} end; //------------- @@ -267,6 +272,7 @@ var I: integer; begin Result := -1; +{* JB - 12sep07 to remove uINI dependency //Search for Resolution For I := 0 to high(IResolution) do @@ -275,6 +281,7 @@ begin Result := I; Break; end; +*} end; -end. \ No newline at end of file +end. -- cgit v1.2.3 From 391d30716d48dc709f6444b19c008e82311623b9 Mon Sep 17 00:00:00 2001 From: eddie-0815 Date: Thu, 1 Nov 2007 19:34:40 +0000 Subject: Mac OS X version compiles and links. I hope I didn't break too many files on windows/linux. Added switches.inc to all files. Changed many IFDEFs. For Windows-only code please use MSWINDOWS instead of WIN32 now. WIN32 is also used by the Mac port. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@546 b956fd51-792f-4845-bead-9b4dfca2ff2c --- Game/Code/Classes/UCommandLine.pas | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Game/Code/Classes/UCommandLine.pas') diff --git a/Game/Code/Classes/UCommandLine.pas b/Game/Code/Classes/UCommandLine.pas index 259c6e16..1539ffaf 100644 --- a/Game/Code/Classes/UCommandLine.pas +++ b/Game/Code/Classes/UCommandLine.pas @@ -2,6 +2,9 @@ unit UCommandLine; interface +{$I switches.inc} + + type //----------- // TCMDParams - Class Reaads Infos from ParamStr and set some easy Interface Variables -- cgit v1.2.3 From 6ca1db26350a589b5bcb3e2eac35a7965d5ab448 Mon Sep 17 00:00:00 2001 From: eddie-0815 Date: Thu, 8 Nov 2007 18:51:40 +0000 Subject: Mac OS X: Added PseudoThread for debugging, because debugging of threaded code causes problems with Xcode and FreePascal. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@594 b956fd51-792f-4845-bead-9b4dfca2ff2c --- Game/Code/Classes/UCommandLine.pas | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Game/Code/Classes/UCommandLine.pas') diff --git a/Game/Code/Classes/UCommandLine.pas b/Game/Code/Classes/UCommandLine.pas index 1539ffaf..01ece795 100644 --- a/Game/Code/Classes/UCommandLine.pas +++ b/Game/Code/Classes/UCommandLine.pas @@ -2,6 +2,10 @@ unit UCommandLine; interface +{$IFDEF FPC} + {$MODE Delphi} +{$ENDIF} + {$I switches.inc} -- cgit v1.2.3 From 425ff834dbc3933475ee8f783eea6167e92ec174 Mon Sep 17 00:00:00 2001 From: jaybinks Date: Fri, 7 Dec 2007 04:32:38 +0000 Subject: little bit of tidy up.. added command line switch, to see what media interfaces are being used. moved RandomPCM Data generation to Visualizer class. added Visualization preset change, on new line ( may be a little to much... maybe we should do ever 4 or 16 bars or something ?) git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@697 b956fd51-792f-4845-bead-9b4dfca2ff2c --- Game/Code/Classes/UCommandLine.pas | 622 +++++++++++++++++++------------------ 1 file changed, 328 insertions(+), 294 deletions(-) (limited to 'Game/Code/Classes/UCommandLine.pas') diff --git a/Game/Code/Classes/UCommandLine.pas b/Game/Code/Classes/UCommandLine.pas index 01ece795..6a5a4808 100644 --- a/Game/Code/Classes/UCommandLine.pas +++ b/Game/Code/Classes/UCommandLine.pas @@ -1,294 +1,328 @@ -unit UCommandLine; - -interface - -{$IFDEF FPC} - {$MODE Delphi} -{$ENDIF} - -{$I switches.inc} - - -type - //----------- - // TCMDParams - Class Reaads Infos from ParamStr and set some easy Interface Variables - //----------- - TCMDParams = class - private - sLanguage: String; - sResolution: String; - public - //Some Boolean Variables Set when Reading Infos - Debug: Boolean; - Benchmark: Boolean; - NoLog: Boolean; - FullScreen: Boolean; - Joypad: Boolean; - - //Some Value Variables Set when Reading Infos {-1: Not Set, others: Value} - Depth: Integer; - Screens: Integer; - - //Some Strings Set when Reading Infos {Length=0 Not Set} - SongPath: String; - ConfigFile: String; - ScoreFile: String; - - //Pseudo Integer Values - Function GetLanguage: Integer; - Property Language: Integer read GetLanguage; - - Function GetResolution: Integer; - Property Resolution: Integer read GetResolution; - - //Some Procedures for Reading Infos - Constructor Create; - - Procedure ResetVariables; - Procedure ReadParamInfo; - end; - -var - Params: TCMDParams; - -implementation - -uses SysUtils; -// uINI -- Nasty requirement... ( removed with permission of blindy ) - - -//------------- -// Constructor - Create class, Reset Variables and Read Infos -//------------- -Constructor TCMDParams.Create; -begin - ResetVariables; - ReadParamInfo; -end; - -//------------- -// ResetVariables - Reset Class Variables -//------------- -Procedure TCMDParams.ResetVariables; -begin - Debug := False; - Benchmark := False; - NoLog := False; - FullScreen := False; - Joypad := False; - - //Some Value Variables Set when Reading Infos {-1: Not Set, others: Value} - sResolution := ''; - sLanguage := ''; - Depth := -1; - Screens := -1; - - //Some Strings Set when Reading Infos {Length=0 Not Set} - SongPath := ''; - ConfigFile := ''; - ScoreFile := ''; -end; - -//------------- -// ReadParamInfo - Read Infos from Parameters -//------------- -Procedure TCMDParams.ReadParamInfo; -var - I: Integer; - PCount: Integer; - Command: String; -begin - PCount := ParamCount; - //Log.LogError('ParamCount: ' + Inttostr(PCount)); - - //Check all Parameters - For I := 1 to PCount do - begin - Command := Paramstr(I); - //Log.LogError('Start parsing Command: ' + Command); - //Is String Parameter ? - if (Length(Command) > 1) AND (Command[1] = '-') then - begin - //Remove - from Command - Command := Lowercase(Trim(Copy(Command, 2, Length(Command) - 1))); - //Log.LogError('Command prepared: ' + Command); - - //Check Command - - // Boolean Triggers: - if (Command = 'debug') then - Debug := True - else if (Command = 'benchmark') then - Benchmark := True - else if (Command = 'nolog') then - NoLog := True - else if (Command = 'fullscreen') then - Fullscreen := True - else if (Command = 'joypad') then - Joypad := True - - //Integer Variables - else if (Command = 'depth') then - begin - //Check if there is another Parameter to get the Value from - if (PCount > I) then - begin - Command := ParamStr(I + 1); - - //Check for valid Value - If (Command = '16') then - Depth := 0 - Else If (Command = '32') then - Depth := 1; - end; - end - - else if (Command = 'screens') then - begin - //Check if there is another Parameter to get the Value from - if (PCount > I) then - begin - Command := ParamStr(I + 1); - - //Check for valid Value - If (Command = '1') then - Screens := 0 - Else If (Command = '2') then - Screens := 1; - end; - end - - //Pseudo Integer Values - else if (Command = 'language') then - begin - //Check if there is another Parameter to get the Value from - if (PCount > I) then - begin - //Write Value to String - sLanguage := Lowercase(ParamStr(I + 1)); - end; - end - - else if (Command = 'resolution') then - begin - //Check if there is another Parameter to get the Value from - if (PCount > I) then - begin - //Write Value to String - sResolution := Lowercase(ParamStr(I + 1)); - end; - end - - //String Values - else if (Command = 'songpath') then - begin - //Check if there is another Parameter to get the Value from - if (PCount > I) then - begin - //Write Value to String - SongPath := ParamStr(I + 1); - end; - end - - else if (Command = 'configfile') then - begin - //Check if there is another Parameter to get the Value from - if (PCount > I) then - begin - //Write Value to String - ConfigFile := ParamStr(I + 1); - - //is this a relative PAth -> then add Gamepath - if Not ((Length(ConfigFile) > 2) AND (ConfigFile[2] = ':')) then - ConfigFile := ExtractFilePath(ParamStr(0)) + Configfile; - end; - end - - else if (Command = 'scorefile') then - begin - //Check if there is another Parameter to get the Value from - if (PCount > I) then - begin - //Write Value to String - ScoreFile := ParamStr(I + 1); - end; - end; - - end; - - end; - -{ Log.LogError('Values: '); - - if Debug then - Log.LogError('Debug'); - - if Benchmark then - Log.LogError('Benchmark'); - - if NoLog then - Log.LogError('NoLog'); - - if Fullscreen then - Log.LogError('FullScreen'); - - if JoyStick then - Log.LogError('Joystick'); - - - Log.LogError('Screens: ' + Inttostr(Screens)); - Log.LogError('Depth: ' + Inttostr(Depth)); - - Log.LogError('Resolution: ' + Inttostr(Resolution)); - Log.LogError('Resolution: ' + Inttostr(Language)); - - Log.LogError('sResolution: ' + sResolution); - Log.LogError('sLanguage: ' + sLanguage); - - Log.LogError('ConfigFile: ' + ConfigFile); - Log.LogError('SongPath: ' + SongPath); - Log.LogError('ScoreFile: ' + ScoreFile); } - -end; - -//------------- -// GetLanguage - Get Language ID from saved String Information -//------------- -Function TCMDParams.GetLanguage: Integer; -var - I: integer; -begin - Result := -1; -{* JB - 12sep07 to remove uINI dependency - - //Search for Language - For I := 0 to high(ILanguage) do - if (LowerCase(ILanguage[I]) = sLanguage) then - begin - Result := I; - Break; - end; -*} -end; - -//------------- -// GetResolution - Get Resolution ID from saved String Information -//------------- -Function TCMDParams.GetResolution: Integer; -var - I: integer; -begin - Result := -1; -{* JB - 12sep07 to remove uINI dependency - - //Search for Resolution - For I := 0 to high(IResolution) do - if (LowerCase(IResolution[I]) = sResolution) then - begin - Result := I; - Break; - end; -*} -end; - -end. +unit UCommandLine; + +interface + +{$IFDEF FPC} + {$MODE Delphi} +{$ENDIF} + +{$I switches.inc} + + +type + //----------- + // TCMDParams - Class Reaads Infos from ParamStr and set some easy Interface Variables + //----------- + TCMDParams = class + private + sLanguage: String; + sResolution: String; + public + //Some Boolean Variables Set when Reading Infos + Debug: Boolean; + Benchmark: Boolean; + NoLog: Boolean; + FullScreen: Boolean; + Joypad: Boolean; + + //Some Value Variables Set when Reading Infos {-1: Not Set, others: Value} + Depth: Integer; + Screens: Integer; + + //Some Strings Set when Reading Infos {Length=0 Not Set} + SongPath: String; + ConfigFile: String; + ScoreFile: String; + + procedure showhelp(); + + //Pseudo Integer Values + Function GetLanguage: Integer; + Property Language: Integer read GetLanguage; + + Function GetResolution: Integer; + Property Resolution: Integer read GetResolution; + + //Some Procedures for Reading Infos + Constructor Create; + + Procedure ResetVariables; + Procedure ReadParamInfo; + end; + +var + Params: TCMDParams; + +const + cHelp = 'help'; + cMediaInterfaces = 'showinterfaces'; + + +implementation + +uses SysUtils; +// uINI -- Nasty requirement... ( removed with permission of blindy ) + + +//------------- +// Constructor - Create class, Reset Variables and Read Infos +//------------- +Constructor TCMDParams.Create; +begin + + if FindCmdLineSwitch( cHelp ) then + showhelp(); + + ResetVariables; + ReadParamInfo; +end; + +procedure TCMDParams.showhelp(); + + function s( aString : String ) : string; + begin + result := aString + StringofChar( ' ', 15 - length( aString ) ); + end; + +begin + + writeln( '' ); + writeln( '**************************************************************' ); + writeln( ' UltraStar Deluxe - Command line switches ' ); + writeln( '**************************************************************' ); + writeln( '' ); + writeln( ' '+s( 'Switch' ) +' : Purpose' ); + writeln( ' ----------------------------------------------------------' ); + writeln( ' '+s( cMediaInterfaces ) + ' : Show in-use media interfaces' ); + writeln( '' ); + + halt(); +end; + +//------------- +// ResetVariables - Reset Class Variables +//------------- +Procedure TCMDParams.ResetVariables; +begin + Debug := False; + Benchmark := False; + NoLog := False; + FullScreen := False; + Joypad := False; + + //Some Value Variables Set when Reading Infos {-1: Not Set, others: Value} + sResolution := ''; + sLanguage := ''; + Depth := -1; + Screens := -1; + + //Some Strings Set when Reading Infos {Length=0 Not Set} + SongPath := ''; + ConfigFile := ''; + ScoreFile := ''; +end; + +//------------- +// ReadParamInfo - Read Infos from Parameters +//------------- +Procedure TCMDParams.ReadParamInfo; +var + I: Integer; + PCount: Integer; + Command: String; +begin + PCount := ParamCount; + //Log.LogError('ParamCount: ' + Inttostr(PCount)); + + + //Check all Parameters + For I := 1 to PCount do + begin + Command := Paramstr(I); + //Log.LogError('Start parsing Command: ' + Command); + //Is String Parameter ? + if (Length(Command) > 1) AND (Command[1] = '-') then + begin + //Remove - from Command + Command := Lowercase(Trim(Copy(Command, 2, Length(Command) - 1))); + //Log.LogError('Command prepared: ' + Command); + + //Check Command + + // Boolean Triggers: + if (Command = 'debug') then + Debug := True + else if (Command = 'benchmark') then + Benchmark := True + else if (Command = 'nolog') then + NoLog := True + else if (Command = 'fullscreen') then + Fullscreen := True + else if (Command = 'joypad') then + Joypad := True + + //Integer Variables + else if (Command = 'depth') then + begin + //Check if there is another Parameter to get the Value from + if (PCount > I) then + begin + Command := ParamStr(I + 1); + + //Check for valid Value + If (Command = '16') then + Depth := 0 + Else If (Command = '32') then + Depth := 1; + end; + end + + else if (Command = 'screens') then + begin + //Check if there is another Parameter to get the Value from + if (PCount > I) then + begin + Command := ParamStr(I + 1); + + //Check for valid Value + If (Command = '1') then + Screens := 0 + Else If (Command = '2') then + Screens := 1; + end; + end + + //Pseudo Integer Values + else if (Command = 'language') then + begin + //Check if there is another Parameter to get the Value from + if (PCount > I) then + begin + //Write Value to String + sLanguage := Lowercase(ParamStr(I + 1)); + end; + end + + else if (Command = 'resolution') then + begin + //Check if there is another Parameter to get the Value from + if (PCount > I) then + begin + //Write Value to String + sResolution := Lowercase(ParamStr(I + 1)); + end; + end + + //String Values + else if (Command = 'songpath') then + begin + //Check if there is another Parameter to get the Value from + if (PCount > I) then + begin + //Write Value to String + SongPath := ParamStr(I + 1); + end; + end + + else if (Command = 'configfile') then + begin + //Check if there is another Parameter to get the Value from + if (PCount > I) then + begin + //Write Value to String + ConfigFile := ParamStr(I + 1); + + //is this a relative PAth -> then add Gamepath + if Not ((Length(ConfigFile) > 2) AND (ConfigFile[2] = ':')) then + ConfigFile := ExtractFilePath(ParamStr(0)) + Configfile; + end; + end + + else if (Command = 'scorefile') then + begin + //Check if there is another Parameter to get the Value from + if (PCount > I) then + begin + //Write Value to String + ScoreFile := ParamStr(I + 1); + end; + end; + + end; + + end; + +{ Log.LogError('Values: '); + + if Debug then + Log.LogError('Debug'); + + if Benchmark then + Log.LogError('Benchmark'); + + if NoLog then + Log.LogError('NoLog'); + + if Fullscreen then + Log.LogError('FullScreen'); + + if JoyStick then + Log.LogError('Joystick'); + + + Log.LogError('Screens: ' + Inttostr(Screens)); + Log.LogError('Depth: ' + Inttostr(Depth)); + + Log.LogError('Resolution: ' + Inttostr(Resolution)); + Log.LogError('Resolution: ' + Inttostr(Language)); + + Log.LogError('sResolution: ' + sResolution); + Log.LogError('sLanguage: ' + sLanguage); + + Log.LogError('ConfigFile: ' + ConfigFile); + Log.LogError('SongPath: ' + SongPath); + Log.LogError('ScoreFile: ' + ScoreFile); } + +end; + +//------------- +// GetLanguage - Get Language ID from saved String Information +//------------- +Function TCMDParams.GetLanguage: Integer; +var + I: integer; +begin + Result := -1; +{* JB - 12sep07 to remove uINI dependency + + //Search for Language + For I := 0 to high(ILanguage) do + if (LowerCase(ILanguage[I]) = sLanguage) then + begin + Result := I; + Break; + end; +*} +end; + +//------------- +// GetResolution - Get Resolution ID from saved String Information +//------------- +Function TCMDParams.GetResolution: Integer; +var + I: integer; +begin + Result := -1; +{* JB - 12sep07 to remove uINI dependency + + //Search for Resolution + For I := 0 to high(IResolution) do + if (LowerCase(IResolution[I]) = sResolution) then + begin + Result := I; + Break; + end; +*} +end; + +end. -- cgit v1.2.3 From b88a17a87b2ccae7788ecce964bbb8d1b0e877da Mon Sep 17 00:00:00 2001 From: tobigun Date: Mon, 17 Dec 2007 11:16:51 +0000 Subject: lazarus (was it lazarus?) complained about missing parameters for halt. after removing the bracket it knew it should use the parameter-less version of halt. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@707 b956fd51-792f-4845-bead-9b4dfca2ff2c --- Game/Code/Classes/UCommandLine.pas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Game/Code/Classes/UCommandLine.pas') diff --git a/Game/Code/Classes/UCommandLine.pas b/Game/Code/Classes/UCommandLine.pas index 6a5a4808..e99ee37a 100644 --- a/Game/Code/Classes/UCommandLine.pas +++ b/Game/Code/Classes/UCommandLine.pas @@ -96,7 +96,7 @@ begin writeln( ' '+s( cMediaInterfaces ) + ' : Show in-use media interfaces' ); writeln( '' ); - halt(); + halt; end; //------------- -- cgit v1.2.3 From d808dde8310ecfd659d36bfe1ba77e76ea43b6c0 Mon Sep 17 00:00:00 2001 From: jaybinks Date: Thu, 20 Dec 2007 22:53:06 +0000 Subject: added -localpaths command line switch so we dont always have to use the packaged locations. ( profox ) git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@737 b956fd51-792f-4845-bead-9b4dfca2ff2c --- Game/Code/Classes/UCommandLine.pas | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Game/Code/Classes/UCommandLine.pas') diff --git a/Game/Code/Classes/UCommandLine.pas b/Game/Code/Classes/UCommandLine.pas index e99ee37a..86f822a4 100644 --- a/Game/Code/Classes/UCommandLine.pas +++ b/Game/Code/Classes/UCommandLine.pas @@ -56,6 +56,7 @@ var const cHelp = 'help'; cMediaInterfaces = 'showinterfaces'; + cUseLocalPaths = 'localpaths'; implementation @@ -93,7 +94,9 @@ begin writeln( '' ); writeln( ' '+s( 'Switch' ) +' : Purpose' ); writeln( ' ----------------------------------------------------------' ); - writeln( ' '+s( cMediaInterfaces ) + ' : Show in-use media interfaces' ); + writeln( ' '+s( cMediaInterfaces ) + #9 + ' : Show in-use media interfaces' ); + writeln( ' '+s( cUseLocalPaths ) + #9 + ' : Use relative paths' ); + writeln( '' ); halt; -- cgit v1.2.3 From e74bd57c12f470257111c1c0530fb38f0fd34414 Mon Sep 17 00:00:00 2001 From: jaybinks Date: Sat, 12 Jan 2008 12:31:43 +0000 Subject: bunch of smaller changes... some changes to song loading... Record global changed to singleton object started implementing mic volume display in Settings-Record hope this dosnt break anything.. :P git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@789 b956fd51-792f-4845-bead-9b4dfca2ff2c --- Game/Code/Classes/UCommandLine.pas | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Game/Code/Classes/UCommandLine.pas') diff --git a/Game/Code/Classes/UCommandLine.pas b/Game/Code/Classes/UCommandLine.pas index 86f822a4..55dfc6ce 100644 --- a/Game/Code/Classes/UCommandLine.pas +++ b/Game/Code/Classes/UCommandLine.pas @@ -61,7 +61,8 @@ const implementation -uses SysUtils; +uses SysUtils, + uPlatform; // uINI -- Nasty requirement... ( removed with permission of blindy ) @@ -99,7 +100,7 @@ begin writeln( '' ); - halt; + platform.halt; end; //------------- -- cgit v1.2.3