From bbf6784e26b5f94c87c9deedb75711948d937f46 Mon Sep 17 00:00:00 2001 From: jaybinks Date: Wed, 26 Mar 2008 12:03:20 +0000 Subject: added "-debug" flag at run time and "CONSOLE" Define in switches.inc also the default is to run with no debug info sent to the console git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@973 b956fd51-792f-4845-bead-9b4dfca2ff2c --- Game/Code/Screens/UScreenCredits.pas | 2 +- Game/Code/Screens/UScreenSing.pas | 3 -- Game/Code/Screens/UScreenSong.pas | 81 +----------------------------------- 3 files changed, 3 insertions(+), 83 deletions(-) (limited to 'Game/Code/Screens') diff --git a/Game/Code/Screens/UScreenCredits.pas b/Game/Code/Screens/UScreenCredits.pas index ab883b84..2cf78d12 100644 --- a/Game/Code/Screens/UScreenCredits.pas +++ b/Game/Code/Screens/UScreenCredits.pas @@ -337,7 +337,7 @@ begin end else {$IFDEF FPC} - writeln( 'could not open file - test.png'); + debugWriteln( 'could not open file - test.png'); {$ELSE} showmessage('could not open file - test.png'); {$ENDIF} diff --git a/Game/Code/Screens/UScreenSing.pas b/Game/Code/Screens/UScreenSing.pas index bc6c0966..d75a3171 100644 --- a/Game/Code/Screens/UScreenSing.pas +++ b/Game/Code/Screens/UScreenSing.pas @@ -915,10 +915,7 @@ begin if CurrentSong.VideoLoaded then begin try - writeln( 'VideoPlayback.FFmpegGetFrame' ); fCurrentVideoPlaybackEngine.GetFrame(LineState.CurrentTime); - - writeln( 'VideoPlayback.FFmpegDrawGL' ); fCurrentVideoPlaybackEngine.DrawGL(ScreenAct); // PlaySmpeg; except diff --git a/Game/Code/Screens/UScreenSong.pas b/Game/Code/Screens/UScreenSong.pas index a3467bfe..7bc08148 100644 --- a/Game/Code/Screens/UScreenSong.pas +++ b/Game/Code/Screens/UScreenSong.pas @@ -775,83 +775,7 @@ begin CatSongs.Refresh; GenerateThumbnails(); -(* - if (length(CatSongs.Song) > 0) then - begin - //Set Length of Button Array one Time Instead of one time for every Song - SetButtonLength(Length(CatSongs.Song)); - - I := 0; - CreateSongButtons: - - try - for Pet := I to High(CatSongs.Song) do begin // creating all buttons - // new - Texture.Limit := 512;// 256 0.4.2 value, 512 in 0.5.0 - - if not FileExists(CatSongs.Song[Pet].Path + CatSongs.Song[Pet].Cover) then - CatSongs.Song[Pet].Cover := ''; // 0.5.0: if cover not found then show 'no cover' - - if CatSongs.Song[Pet].Cover = '' then - AddButton(300 + Pet*250, 140, 200, 200, Skin.GetTextureFileName('SongCover'), 'JPG', 'Plain', Theme.Song.Cover.Reflections) - else begin - // cache texture if there is a need to this - if not Covers.CoverExists(CatSongs.Song[Pet].Path + CatSongs.Song[Pet].Cover) then - begin - Texture.CreateCacheMipmap := true; - Texture.GetTexture(CatSongs.Song[Pet].Path + CatSongs.Song[Pet].Cover, 'Plain', true); // preloads textures and creates cache mipmap - Texture.CreateCacheMipmap := false; - - // puts this texture to the cache file - Covers.AddCover(CatSongs.Song[Pet].Path + CatSongs.Song[Pet].Cover); - - // unload full size texture - Texture.UnloadTexture(CatSongs.Song[Pet].Path + CatSongs.Song[Pet].Cover, false); - - // we should also add mipmap texture by calling createtexture and use mipmap cache as data source - end; - - // and now load it from cache file (small place for the optimization by eliminating reading it from file, but not here) - AddButton(300 + Pet*250, 140, 200, 200, CatSongs.Song[Pet].Path + CatSongs.Song[Pet].Cover, 'JPG', 'Plain', Theme.Song.Cover.Reflections); - end; - Texture.Limit := 1024*1024; - I := -1; - end; - except - //When Error is reported the First time for this Song - if (I <> Pet) then - begin - //Some Error reporting: - Log.LogError('Could not load Cover: ' + CatSongs.Song[Pet].Cover); - - //Change Cover to NoCover and Continue Loading - CatSongs.Song[Pet].Cover := ''; - I := Pet; - end - else //when Error occurs Multiple Times(NoSong Cover is damaged), then start loading next Song - begin - Log.LogError('NoCover Cover is damaged!'); - try - AddButton(300 + Pet*250, 140, 200, 200, '', 'JPG', 'Plain', Theme.Song.Cover.Reflections); - except - {$IFDEF MSWINDOWS} - Messagebox(0, PChar('No Cover Image is damage. Could not Workaround Song Loading, Ultrastar will exit now.'), PChar(Language.Translate('US_VERSION')), MB_ICONERROR or MB_OK); - {$ELSE} - // TODO : JB_linux - better handle this message and display to user.. - writeln( 'No Cover Image is damage. Could not Workaround Song Loading, Ultrastar will exit now.'); - Log.LogError( 'No Cover Image is damage. Could not Workaround Song Loading, Ultrastar will exit now.' ); - {$ENDIF} - Halt; - end; - I := Pet + 1; - end; - end; - if (I <> -1) then - GoTo CreateSongButtons; - - end; -*) // Randomize Patch Randomize; @@ -932,8 +856,9 @@ begin {$IFDEF MSWINDOWS} Messagebox(0, PChar('No Cover Image is damage. Could not Workaround Song Loading, Ultrastar will exit now.'), PChar(Language.Translate('US_VERSION')), MB_ICONERROR or MB_OK); {$ELSE} + // TODO : JB_linux - better handle this message and display to user.. - writeln( 'No Cover Image is damage. Could not Workaround Song Loading, Ultrastar will exit now.'); + writeln( 'Cover Image is damaged. Could not Workaround Song Loading, Ultrastar will exit now.'); Log.LogError( 'No Cover Image is damage. Could not Workaround Song Loading, Ultrastar will exit now.' ); {$ENDIF} Halt; @@ -1625,8 +1550,6 @@ begin dx := SongTarget-SongCurrent; dt := TimeSkip * 7; -// writeln( 'TScreenSong.Draw '+ inttostr(trunc(TimeSkip)) ); - if dt > 1 then dt := 1; -- cgit v1.2.3