aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/Screens (unfollow)
Commit message (Collapse)AuthorFilesLines
2008-08-30Removed outdated 1.1 branch contentstobigun34-14567/+0
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/1.1@1331 b956fd51-792f-4845-bead-9b4dfca2ff2c
2008-08-27Reordering of the directories[1]: moving Game/Code to srck-m_schindler34-14522/+0
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1302 b956fd51-792f-4845-bead-9b4dfca2ff2c
2008-08-25Added: Option for background music in sound options (affects UIni too)mogguh4-203/+195
Added: New language string SING_OPTIONS_SOUND_BACKGROUNDMUSIC Added: CC licensed music loop Improved: Options positions via Deluxe theme (first pass, next will follow) Improved: Code beautified in UScreenMain git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1290 b956fd51-792f-4845-bead-9b4dfca2ff2c
2008-08-23Visualization are now available and configurable via the options graphics screenmogguh2-18/+43
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1286 b956fd51-792f-4845-bead-9b4dfca2ff2c
2008-08-20preparing the commit if projectM option integrationmogguh1-1/+13
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1277 b956fd51-792f-4845-bead-9b4dfca2ff2c
2008-08-20applied: code of beautymogguh1-378/+394
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1276 b956fd51-792f-4845-bead-9b4dfca2ff2c
2008-08-15Deleted uncommented stuff (watch line count!)mogguh1-527/+4
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1272 b956fd51-792f-4845-bead-9b4dfca2ff2c
2008-08-15- Support for multiple song/cover paths.tobigun1-1/+1
- Add multiple Song-Paths to the Ini file: [Directories] SongDir1=C:\... SongDir2=D:\... SongDirA=D:\... - UIni.pas clean-up git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1266 b956fd51-792f-4845-bead-9b4dfca2ff2c
2008-08-15VoicePassthrough is now available at the options, turns playback from the ↵mogguh1-4/+5
microphone on/off git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1261 b956fd51-792f-4845-bead-9b4dfca2ff2c
2008-08-13cleanuptobigun1-187/+92
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1257 b956fd51-792f-4845-bead-9b4dfca2ff2c
2008-08-13- new cover-loading. Cover thumbnails are stored in an sqlite db (cover.db) ↵tobigun1-56/+40
now instead of the proprietary covers.cache. - covers are cached faster (-> start-up on first run will be considerably faster now if many covers exist). git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1256 b956fd51-792f-4845-bead-9b4dfca2ff2c
2008-08-13moved image (SDL-surface) manipulation functions from UTexture.pas to UImage.pastobigun1-2/+0
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1254 b956fd51-792f-4845-bead-9b4dfca2ff2c
2008-08-09check if video was successfully opened. Otherwise a seek might be performed ↵tobigun1-3/+5
on an uninitialized video. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1250 b956fd51-792f-4845-bead-9b4dfca2ff2c
2008-08-08some warnings removedtobigun1-37/+40
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1236 b956fd51-792f-4845-bead-9b4dfca2ff2c
2008-08-08result-values for TMenu.Draw() addedtobigun7-4/+9
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1232 b956fd51-792f-4845-bead-9b4dfca2ff2c
2008-08-08- TStatResult is an abstract class now.tobigun2-106/+152
- GetStats returns a TList of TStatResult now - Free the result-list with FreeStats git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1230 b956fd51-792f-4845-bead-9b4dfca2ff2c
2008-08-07- Reset-Timestamp changed from STRING to INTEGER (stored as UNIX-timestamp)tobigun1-1/+1
- Version-number for database-file added git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1229 b956fd51-792f-4845-bead-9b4dfca2ff2c
2008-08-07- Introduced TStatType.tobigun2-41/+43
- Replaced TSQLiteTable with the new TSQLiteUniTable. The ..UniTable-version does not retrieve data at once (this feature is not needed/wanted in most cases). The major advantage of this version is a better handling of datatypes. TSQLiteTable does not handle datatypes correctly (and even crashes) if the field-types are not one of the SQLite types (e.g. an INT(12) field will crash if it accessed by FieldAsInteger, the same applies to "integer" but the upper-case version "INTEGER" works). With TSQLiteUniTable those crashes should not occur. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1228 b956fd51-792f-4845-bead-9b4dfca2ff2c
2008-07-19Fixed a bug in UScreenTop5: instead of a lokal var a config value was ↵whiteshark01-1/+1
changed to a not existing value when there was a game w/ 6 Players. This causes Player 5's and 6's Scores not to apear in the highscores at the first song and may cause a crash when the config will be saved after singing. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1217 b956fd51-792f-4845-bead-9b4dfca2ff2c
2008-07-19renamed TLineState to TLyricsStatetobigun1-4/+4
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1215 b956fd51-792f-4845-bead-9b4dfca2ff2c
2008-07-19renamed TLineState to TLyricsStatetobigun2-12/+12
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1214 b956fd51-792f-4845-bead-9b4dfca2ff2c
2008-07-19lyric engine patches, solvestobigun2-63/+60
- pixeled/transparent fonts bug - some lines were erroneously marked active or disabled - state was not initialized correctly - negative gap problem (TLyricLine.Start was of type cardinal) - some more lyrics bugs git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1211 b956fd51-792f-4845-bead-9b4dfca2ff2c
2008-07-17Renamed the old ULyrics_bak.pas to UEditorLyrics.pas as it is used in the ↵tobigun1-9/+12
editor only. This might be replaced by ULyrics.pas later. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1204 b956fd51-792f-4845-bead-9b4dfca2ff2c
2008-07-12unit UDataBase;GogolNr11-31/+2
interface {$IFDEF FPC} {$MODE Delphi} {$ENDIF} {$I switches.inc} uses USongs, USong, SQLiteTable3; //-------------------- //DataBaseSystem - Class including all DB Methods //-------------------- type TStatResult = record Case Typ: Byte of 0: (Singer: ShortString; Score: Word; Difficulty: Byte; SongArtist: ShortString; SongTitle: ShortString); 1: (Player: ShortString; AverageScore: Word); 2: (Artist: ShortString; Title: ShortString; TimesSung: Word); 3: (ArtistName: ShortString; TimesSungtot: Word); end; AStatResult = Array of TStatResult; TDataBaseSystem = class private ScoreDB: TSqliteDatabase; sFilename: string; public property Filename: String read sFilename; Destructor Destroy; override; Procedure Init(const Filename: string); procedure ReadScore(Song: TSong); procedure AddScore(Song: TSong; Level: integer; Name: string; Score: integer); procedure WriteScore(Song: TSong); Function GetStats(var Stats: AStatResult; const Typ, Count: Byte; const Page: Cardinal; const Reversed: Boolean): Boolean; Function GetTotalEntrys(const Typ: Byte): Cardinal; Function GetStatReset: TDateTime; end; var DataBase: TDataBaseSystem; implementation uses IniFiles, ULog, StrUtils, SysUtils; const cUS_Scores = 'us_scores'; cUS_Songs = 'us_songs'; cUS_Statistics_Info = 'us_statistics_info'; //-------------------- //Create - Opens Database and Create Tables if not Exist //-------------------- Procedure TDataBaseSystem.Init(const Filename: string); begin Log.LogStatus('Initializing database: "'+Filename+'"', 'TDataBaseSystem.Init'); //Open Database ScoreDB := TSqliteDatabase.Create( Filename ); sFilename := Filename; try //Look for Tables => When not exist Create them if not ScoreDB.TableExists( cUS_Scores ) then begin ScoreDB.execsql('CREATE TABLE `'+cUS_Scores+'` (`SongID` INT( 11 ) NOT NULL , `Difficulty` INT( 1 ) NOT NULL , `Player` VARCHAR( 150 ) NOT NULL , `Score` INT( 5 ) NOT NULL );'); debugWriteln( 'TDataBaseSystem.Init - CREATED US_Scores' ); end; if not ScoreDB.TableExists( cUS_Songs ) then begin ScoreDB.execsql('CREATE TABLE `'+cUS_Songs+'` (`ID` INTEGER PRIMARY KEY, `Artist` VARCHAR( 255 ) NOT NULL , `Title` VARCHAR( 255 ) NOT NULL , `TimesPlayed` int(5) NOT NULL );'); debugWriteln( 'TDataBaseSystem.Init - CREATED US_Songs' ); end; if not ScoreDB.TableExists( cUS_Statistics_Info ) then begin ScoreDB.execsql('CREATE TABLE `'+cUS_Statistics_Info+'` (`ResetTime` VARCHAR(17) );'); ScoreDB.execsql('INSERT INTO `'+cUS_Statistics_Info+'` (`ResetTime`) VALUES ("'+datetimetostr(now)+'");'); debugWriteln( 'TDataBaseSystem.Init - CREATED US_Statistics_Info' ); end; //Not possible because of String Limitation to 255 Chars //Need to rewrite Wrapper {if not ScoreDB.TableExists('US_SongCache') then ScoreDB.ExecSQL('CREATE TABLE `US_SongCache` (`Path` VARCHAR( 255 ) NOT NULL , `Filename` VARCHAR( 255 ) NOT NULL , `Title` VARCHAR( 255 ) NOT NULL , `Artist` VARCHAR( 255 ) NOT NULL , `Folder` VARCHAR( 255 ) NOT NULL , `Genre` VARCHAR( 255 ) NOT NULL , `Edition` VARCHAR( 255 ) NOT NULL , `Language` VARCHAR( 255 ) NOT NULL , `Creator` VARCHAR( 255 ) NOT NULL , `Cover` VARCHAR( 255 ) NOT NULL , `Background` VARCHAR( 255 ) NOT NULL , `Video` VARCHAR( 255 ) NOT NULL , `VideoGap` FLOAT NOT NULL , `Gap` FLOAT NOT NULL , `Start` FLOAT NOT NULL , `Finish` INT( 11 ) NOT NULL , `BPM` INT( 5 ) NOT NULL , `Relative` BOOLEAN NOT NULL , `NotesGap` INT( 11 ) NOT NULL);');} finally Log.LogInfo( cUS_Songs +' exists: ' + IfThen(ScoreDB.TableExists(cUS_Songs), 'true', 'false'), 'TDataBaseSystem.Init'); Log.LogInfo( cUS_Scores +' exists: ' + IfThen(ScoreDB.TableExists(cUS_Scores), 'true', 'false'), 'TDataBaseSystem.Init'); //ScoreDB.Free; end; end; //-------------------- //Destroy - Frees Database //-------------------- Destructor TDataBaseSystem.Destroy; begin Log.LogInfo('TDataBaseSystem.Free', 'TDataBaseSystem.Destroy'); freeandnil( ScoreDB ); inherited; end; //-------------------- //ReadScore - Read Scores into SongArray //-------------------- procedure TDataBaseSystem.ReadScore(Song: TSong); var TableData: TSqliteTable; Difficulty: Integer; begin if not assigned( ScoreDB ) then exit; //ScoreDB := TSqliteDatabase.Create(sFilename); try try //Search Song in DB TableData := ScoreDB.GetTable('SELECT `Difficulty`, `Player`, `Score` FROM `'+cUS_Scores+'` WHERE `SongID` = (SELECT `ID` FROM `us_songs` WHERE `Artist` = "' + Song.Artist + '" AND `Title` = "' + Song.Title + '" LIMIT 1) ORDER BY `Score` DESC LIMIT 15'); //Empty Old Scores SetLength (Song.Score[0], 0); SetLength (Song.Score[1], 0); SetLength (Song.Score[2], 0); while not TableData.Eof do //Go through all Entrys begin //Add one Entry to Array Difficulty := StrToIntDef(TableData.FieldAsString(TableData.FieldIndex['Difficulty']), -1); if (Difficulty >= 0) AND (Difficulty <= 2) then begin SetLength(Song.Score[Difficulty], Length(Song.Score[Difficulty]) + 1); Song.Score[Difficulty, high(Song.Score[Difficulty])].Name := TableData.FieldAsString(TableData.FieldIndex['Player']); Song.Score[Difficulty, high(Song.Score[Difficulty])].Score := StrtoInt(TableData.FieldAsString(TableData.FieldIndex['Score'])); end; TableData.Next; end; // While not TableData.EOF except for Difficulty := 0 to 2 do begin SetLength(Song.Score[Difficulty], 1); Song.Score[Difficulty, 1].Name := 'Error Reading ScoreDB'; end; end; finally //ScoreDb.Free; end; end; //-------------------- //AddScore - Add one new Score to DB //-------------------- procedure TDataBaseSystem.AddScore(Song: TSong; Level: integer; Name: string; Score: integer); var ID: Integer; TableData: TSqliteTable; begin if not assigned( ScoreDB ) then exit; //ScoreDB := TSqliteDatabase.Create(sFilename); try //Prevent 0 Scores from being added if (Score > 0) then begin ID := ScoreDB.GetTableValue('SELECT `ID` FROM `'+cUS_Songs+'` WHERE `Artist` = "' + Song.Artist + '" AND `Title` = "' + Song.Title + '"'); if ID = 0 then //Song doesn't exist -> Create begin ScoreDB.ExecSQL ('INSERT INTO `'+cUS_Songs+'` ( `ID` , `Artist` , `Title` , `TimesPlayed` ) VALUES (NULL , "' + Song.Artist + '", "' + Song.Title + '", "0");'); ID := ScoreDB.GetTableValue('SELECT `ID` FROM `US_Songs` WHERE `Artist` = "' + Song.Artist + '" AND `Title` = "' + Song.Title + '"'); if ID = 0 then //Could not Create Table exit; end; //Create new Entry ScoreDB.ExecSQL('INSERT INTO `'+cUS_Scores+'` ( `SongID` , `Difficulty` , `Player` , `Score` ) VALUES ("' + InttoStr(ID) + '", "' + InttoStr(Level) + '", "' + Name + '", "' + InttoStr(Score) + '");'); //Delete Last Position when there are more than 5 Entrys if ScoreDB.GetTableValue('SELECT COUNT(`SongID`) FROM `'+cUS_Scores+'` WHERE `SongID` = "' + InttoStr(ID) + '" AND `Difficulty` = "' + InttoStr(Level) +'"') > 5 then begin TableData := ScoreDB.GetTable('SELECT `Player`, `Score` FROM `'+cUS_Scores+'` WHERE SongID = "' + InttoStr(ID) + '" AND `Difficulty` = "' + InttoStr(Level) +'" ORDER BY `Score` ASC LIMIT 1'); ScoreDB.ExecSQL('DELETE FROM `US_Scores` WHERE SongID = "' + InttoStr(ID) + '" AND `Difficulty` = "' + InttoStr(Level) +'" AND `Player` = "' + TableData.FieldAsString(TableData.FieldIndex['Player']) + '" AND `Score` = "' + TableData.FieldAsString(TableData.FieldIndex['Score']) + '"'); end; end; finally //ScoreDB.Free; end; end; //-------------------- //WriteScore - Not needed with new System; But used for Increment Played Count //-------------------- procedure TDataBaseSystem.WriteScore(Song: TSong); begin if not assigned( ScoreDB ) then exit; try //Increase TimesPlayed ScoreDB.ExecSQL ('UPDATE `'+cUS_Songs+'` SET `TimesPlayed` = `TimesPlayed` + "1" WHERE `Title` = "' + Song.Title + '" AND `Artist` = "' + Song.Artist + '";'); except end; end; //-------------------- //GetStats - Write some Stats to Array, Returns True if Chossen Page has Entrys //Case Typ of //0 - Best Scores //1 - Best Singers //2 - Most sung Songs //3 - Most popular Band //-------------------- Function TDataBaseSystem.GetStats(var Stats: AStatResult; const Typ, Count: Byte; const Page: Cardinal; const Reversed: Boolean): Boolean; var Query: String; TableData: TSqliteTable; begin Result := False; if not assigned( ScoreDB ) then exit; if (Length(Stats) < Count) then Exit; {Todo: Add Prevention that only Players with more than 5 Scores are Selected at Typ 2} //Create Query Case Typ of 0: Query := 'SELECT `Player` , `Difficulty` , `Score` , `Artist` , `Title` FROM `'+cUS_Scores+'` INNER JOIN `US_Songs` ON (`SongID` = `ID`) ORDER BY `Score`'; 1: Query := 'SELECT `Player` , ROUND (Sum(`Score`) / COUNT(`Score`)) FROM `'+cUS_Scores+'` GROUP BY `Player` ORDER BY (Sum(`Score`) / COUNT(`Score`))'; 2: Query := 'SELECT `Artist` , `Title` , `TimesPlayed` FROM `'+cUS_Songs+'` ORDER BY `TimesPlayed`'; 3: Query := 'SELECT `Artist` , Sum(`TimesPlayed`) FROM `'+cUS_Songs+'` GROUP BY `Artist` ORDER BY Sum(`TimesPlayed`)'; end; //Add Order Direction If Reversed then Query := Query + ' ASC' else Query := Query + ' DESC'; //Add Limit Query := Query + ' LIMIT ' + InttoStr(Count * Page) + ', ' + InttoStr(Count) + ';'; //Execute Query try TableData := ScoreDB.GetTable(Query); except exit; // this has a try except, because ( on linux at least ) it seems that doing a GetTable, that returns nothing // causes an exception. and in the case of a new Database file, with no scores stored yet... this seems to except here. end; //if Result empty -> Exit if (TableData.RowCount < 1) then exit; //Copy Result to Stats Array while not TableData.Eof do begin Stats[TableData.Row].Typ := Typ; Case Typ of 0:begin Stats[TableData.Row].Singer := TableData.Fields[0]; Stats[TableData.Row].Difficulty := StrtoIntDef(TableData.Fields[1], 0); Stats[TableData.Row].Score := StrtoIntDef(TableData.Fields[2], 0){TableData.FieldAsInteger(2)}; Stats[TableData.Row].SongArtist := TableData.Fields[3]; Stats[TableData.Row].SongTitle := TableData.Fields[4]; end; 1:begin Stats[TableData.Row].Player := TableData.Fields[0]; Stats[TableData.Row].AverageScore := StrtoIntDef(TableData.Fields[1], 0); end; 2:begin Stats[TableData.Row].Artist := TableData.Fields[0]; Stats[TableData.Row].Title := TableData.Fields[1]; Stats[TableData.Row].TimesSung := StrtoIntDef(TableData.Fields[2], 0); end; 3:begin Stats[TableData.Row].ArtistName := TableData.Fields[0]; Stats[TableData.Row].TimesSungtot := StrtoIntDef(TableData.Fields[1], 0); end; end; TableData.Next; end; Result := True; end; //-------------------- //GetTotalEntrys - Get Total Num of entrys for a Stats Query //-------------------- Function TDataBaseSystem.GetTotalEntrys(const Typ: Byte): Cardinal; var Query: String; begin Result := 0; if not assigned( ScoreDB ) then exit; try //Create Query Case Typ of 0: begin Query := 'SELECT COUNT(`SongID`) FROM `'+cUS_Scores+'`;'; if not ScoreDB.TableExists( cUS_Scores ) then exit; end; 1: begin Query := 'SELECT COUNT(DISTINCT `Player`) FROM `'+cUS_Scores+'`;'; if not ScoreDB.TableExists( cUS_Scores ) then exit; end; 2: begin Query := 'SELECT COUNT(`ID`) FROM `'+cUS_Songs+'`;'; if not ScoreDB.TableExists( cUS_Songs ) then exit; end; 3: begin Query := 'SELECT COUNT(DISTINCT `Artist`) FROM `'+cUS_Songs+'`;'; if not ScoreDB.TableExists( cUS_Songs ) then exit; end; end; Result := ScoreDB.GetTableValue(Query); except // TODO : JB_Linux - Why do we get these exceptions on linux !! -> should be solved! on E:ESQLiteException DO begin exit; end; end; end; //-------------------- //GetStatReset - Get reset date of statistic data //-------------------- Function TDataBaseSystem.GetStatReset: TDateTime; var Query: String; TableData: TSqliteTable; begin if not assigned( ScoreDB ) then exit; Query := 'SELECT `ResetTime` FROM `'+cUS_Statistics_Info+'`;'; TableData := ScoreDB.GetTable(Query); result:=StrToDateTime(TableData.Fields[0]); end; end. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1185 b956fd51-792f-4845-bead-9b4dfca2ff2c
2008-07-12Text has a new property -> Z (default is 0)mogguh7-43/+43
Selects on the options have been exchanged for SelectSlides (OptionsScreens are looking less broken (more to come)) Solmization has been banned from the options (it's still available via config.ini and is working) Uncommented poc ttf code [Back] button in OptionsRecord is skineable again git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1183 b956fd51-792f-4845-bead-9b4dfca2ff2c
2008-07-07Fix for Trac ticket #53 (Preview fading and volume problems) tobigun1-45/+46
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1168 b956fd51-792f-4845-bead-9b4dfca2ff2c
2008-07-04disabled screen-mode change after leaving the graphics options screen as it ↵tobigun1-1/+6
does not work on windows/macosx. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1166 b956fd51-792f-4845-bead-9b4dfca2ff2c
2008-07-02Fixed a conditional, that caused ratings not to show upmogguh1-1/+1
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1159 b956fd51-792f-4845-bead-9b4dfca2ff2c
2008-07-02Audio/Video engine update:tobigun1-68/+36
- lyrics<->audio synchronisation (TSyncSource) - better resampling (optional support for libsamplerate) - cleaner termination of audio/video streams/devices - improved decoders and decoder infrastructure - many other improvements/cleanups Currently just for testing (not enabled by default): - Background music - Voice-Passthrough (hear what you sing) - Video VSync git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1157 b956fd51-792f-4845-bead-9b4dfca2ff2c
2008-07-01EaseOut_MaxSteps increased for faster score counter in score-screentobigun1-1/+1
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1152 b956fd51-792f-4845-bead-9b4dfca2ff2c
2008-07-01nicer pitch-label in record-option screentobigun1-27/+53
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1151 b956fd51-792f-4845-bead-9b4dfca2ff2c
2008-06-08- set svn:eol-style to nativetobigun16-7229/+7229
- removed some svn:executable properties from non-executable files git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1144 b956fd51-792f-4845-bead-9b4dfca2ff2c
2008-06-08goto + labels removedtobigun1-54/+57
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1139 b956fd51-792f-4845-bead-9b4dfca2ff2c
2008-06-07just some cleanuptobigun8-504/+537
- replaced many German and Polish comments - replaced many cryptic var-names - IlNut replaced with LengthNote - renamed the global var "Filename" to "ConversionFilename" to prevent unintended use of it - more readable code (hopefully), especially NewNote and OnSentenceEnd - added some comments on elementary classes/records and their fields git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1137 b956fd51-792f-4845-bead-9b4dfca2ff2c
2008-05-13- fixed video-backgroundtobigun1-5/+7
- fixed buggy SkipTime (using TRelativeTimer now) - TLineState is a class now. TLineState.CurrentTime is now automatically updated using TRelativeTimer git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1088 b956fd51-792f-4845-bead-9b4dfca2ff2c
2008-05-12- removed useless for loops in UScreenSingf1fth_freed0m1-4/+2
- added cmdline switch "window" for windowmode git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1082 b956fd51-792f-4845-bead-9b4dfca2ff2c
2008-05-10Volumes are floating point values (single) now. The range changed from [0 .. ↵tobigun4-21/+30
100] to [0.0 .. 1.0] git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1081 b956fd51-792f-4845-bead-9b4dfca2ff2c
2008-05-09- input-source selection works now (with bass or portaudio with portmixer)tobigun3-191/+438
- audio-effects (DSP) interface for audio-playback plus a simple voice removal example (does not sound that good) - FFMpeg support for BASS - audio-clock for FFMpeg for GetPosition and synchronisation - more compatible seeking in FFMpeg - clean termination of the audio interfaces/streams (especially ffmpeg) - Audio output device enumeration (selection will be added later to the sounds option screen) - display of threshold and volume in the record-options screen - threshold and volume can be changed with the 'T' (threshold) and '+'/'-' (source volume) keys - added a FadeIn() method to the IAudioPlayback interface - some minor changes to the audio classes/screens - new base-class for audio-playback classes (used by bass, portaudio and sdl) git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1078 b956fd51-792f-4845-bead-9b4dfca2ff2c
2008-05-09BugFix: ScoreScreen works again, starting to simplify / tidy up the whole thingmogguh1-384/+226
Feature: Eight ratings instead of seven, rating for points reached changed (should be more fair now) git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1072 b956fd51-792f-4845-bead-9b4dfca2ff2c
2008-05-06Option screen has two rows of buttons, to select the row beneath press ↵mogguh1-4/+17
[cursor down] / [cursor up] for the row above Settings are not saved if you press [escape] (just for the "main" option screen atm) Long descriptions are used to explain what hides behind a option screen git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1063 b956fd51-792f-4845-bead-9b4dfca2ff2c
2008-05-02MacOSX patch for WideUpperChar. The cwstring Unicode manager is not ↵tobigun1-3/+4
supported at the moment because of some problems with the iconv linker dependencies. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1056 b956fd51-792f-4845-bead-9b4dfca2ff2c
2008-05-02replaced WideUpperCase with WideCharUpperCasetobigun1-2/+2
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1055 b956fd51-792f-4845-bead-9b4dfca2ff2c
2008-05-02Replaced OpenGL12 with SDL's gl/glu/glext units because OpenGL12 was removed ↵tobigun10-11/+10
from SDL (several years ago? Last update was done in 2004). In addition OpenGL12 was very buggy (see last commit). The new units support OpenGL up to version 2.0 (extensions must be loaded first, see UGraphic.LoadOpenGLExtensions). At the moment, only 1.2 extensions are loaded. Some constants, that were introduced in OpenGL 1.2 and above (like GL_BGR or GL_CLAMP_TO_EDGE) are in glext.pas, so check this file first for missing constants. The MacOS build depends on OpenGL12.pas but has its own file in the MacOSX/Wrapper folder instead of using the JEDI-SDL one. Sorry, that I broke MacOSX build for now but it should be no problem to get this working again. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1052 b956fd51-792f-4845-bead-9b4dfca2ff2c
2008-04-30Fixed some range-check errors. Explicitly disable range-checks {$R-} should ↵tobigun1-1430/+1430
not be necessary for the MacOSX build anymore. Note: Texture-numbers (e.g. texnum) are unsigned (GLuint) so do not init them to -1. Use 0 instead. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1040 b956fd51-792f-4845-bead-9b4dfca2ff2c
2008-04-24- reverted some stuff that was erroneously commited by one of the last commits.tobigun1-12/+0
- moved DEBUG define from config-*.inc back to switches.inc - APPTYPE is needed by FPC (for Windows) too. Fixed some crashes with Writeln in FPC (Win) if no console is available. - Moved thread-safe ULog.SafeWriteln() to UCommon.ConsoleWriteln(), this is used by DebugWriteln() now, so this is thread-safe too - Added log-levels (sorted by severity): DEBUG, INFO, STATUS, WARN, ERROR, CRITICAL. Default log-level is LOG_LEVEL_ERROR, so warnings and less important logs are not printed by default. You can change this by LOG_LEVEL_DEFAULT or Log.SetLogLevel(Level). Please use Log.LogError/Warn/Status/Info/Debug/... instead of DebugWriteln() to avoid spamming the console. See ULog.pas for further info. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1036 b956fd51-792f-4845-bead-9b4dfca2ff2c
2008-04-19tried to make songloading working with the old loader and keep all changes ↵s_alexander6-841/+838
that were made since starting to work on a new one *hope that worked* you may delete your existing cover.cache (the cover cache is still NOT working) git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1024 b956fd51-792f-4845-bead-9b4dfca2ff2c
2008-04-11translated some polish codef1fth_freed0m1-7/+6
AddCzesc -> AddLine NrCzesc -> NrLine NrCzesci -> NrLines Pet -> Count SingDrawCzesc -> SingDrawLine SingDrawPlayerCzesc -> SingDrawPlayerLine SingDrawPlayerBGCzesc -> SingDrawPlayerBGLine EditDrawCzesc -> EditDrawLine Tekst -> Text git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1020 b956fd51-792f-4845-bead-9b4dfca2ff2c
2008-04-10finally removed IlNut from Editor (*hope* it will work)s_alexander3-60/+42
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1019 b956fd51-792f-4845-bead-9b4dfca2ff2c
2008-04-10-Corrected some ifdefs in the Editor to make it useable on linuxf1fth_freed0m1-40/+44
-translated some polish code git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1018 b956fd51-792f-4845-bead-9b4dfca2ff2c
2008-04-10workaround for erroneously detection of 48000Hz-only devices as 44100Hz ↵tobigun1-1398/+1398
devices in portaudio git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1017 b956fd51-792f-4845-bead-9b4dfca2ff2c