aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/Screens
diff options
context:
space:
mode:
authorwhiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-04-04 21:00:50 +0000
committerwhiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-04-04 21:00:50 +0000
commite7f714ccc3908b6b8f3fb11f82481780e223ee43 (patch)
treefedf099ff2675211de95a22824d839a633ae2817 /Game/Code/Screens
parent2bd6d1d2ea8d36eedac96053a7e4a818da22f654 (diff)
downloadusdx-e7f714ccc3908b6b8f3fb11f82481780e223ee43.tar.gz
usdx-e7f714ccc3908b6b8f3fb11f82481780e223ee43.tar.xz
usdx-e7f714ccc3908b6b8f3fb11f82481780e223ee43.zip
Covers Cache rewritten
New Cover.Cache fileformat covers texture loading still missing... git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1001 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'Game/Code/Screens')
-rw-r--r--Game/Code/Screens/UScreenSong.pas22
1 files changed, 11 insertions, 11 deletions
diff --git a/Game/Code/Screens/UScreenSong.pas b/Game/Code/Screens/UScreenSong.pas
index b26e1569..15c18a53 100644
--- a/Game/Code/Screens/UScreenSong.pas
+++ b/Game/Code/Screens/UScreenSong.pas
@@ -794,7 +794,7 @@ var
Pet: integer;
Label CreateSongButtons;
begin
- if (length(CatSongs.Song) > 0) then
+ {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));
@@ -807,30 +807,30 @@ begin
// 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
+ 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'
// to - do : new Song management
if CatSongs.Song[Pet].Cover = '' then
AddButton(300 + Pet*250, 140, 200, 200, Skin.GetTextureFileName('SongCover'), TEXTURE_TYPE_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
+ 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, TEXTURE_TYPE_PLAIN, true); // preloads textures and creates cache mipmap
+ Texture.GetTexture({CatSongs.Song[Pet].Path + }{CatSongs.Song[Pet].Cover, TEXTURE_TYPE_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);
+ Covers.AddCover({CatSongs.Song[Pet].Path + }{CatSongs.Song[Pet].Cover);
// unload full size texture
- Texture.UnloadTexture({CatSongs.Song[Pet].Path + }CatSongs.Song[Pet].Cover, TEXTURE_TYPE_PLAIN, false);
+ Texture.UnloadTexture({CatSongs.Song[Pet].Path + }{CatSongs.Song[Pet].Cover, TEXTURE_TYPE_PLAIN, 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, TEXTURE_TYPE_PLAIN, Theme.Song.Cover.Reflections);
+ AddButton(300 + Pet*250, 140, 200, 200,{ CatSongs.Song[Pet].Path + }{CatSongs.Song[Pet].Cover, TEXTURE_TYPE_PLAIN, Theme.Song.Cover.Reflections);
end;
Texture.Limit := 1024*1024;
I := -1;
@@ -852,14 +852,14 @@ begin
try
AddButton(300 + Pet*250, 140, 200, 200, '', TEXTURE_TYPE_PLAIN, Theme.Song.Cover.Reflections);
except
- {$IFDEF MSWINDOWS}
+ {$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}
+ {$ELSE} {
// TODO : JB_linux - better handle this message and display to user..
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}
+ {$ENDIF} {
Halt;
end;
I := Pet + 1;
@@ -869,7 +869,7 @@ begin
if (I <> -1) then
GoTo CreateSongButtons;
- end;
+ end; }
end;
procedure TScreenSong.SetScroll;