diff options
author | jaybinks <jaybinks@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2007-10-11 08:11:47 +0000 |
---|---|---|
committer | jaybinks <jaybinks@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2007-10-11 08:11:47 +0000 |
commit | d123263213fba448d5695df35660f7de4cbed433 (patch) | |
tree | ef0bb01727be4b38a44a84ef6bef8224ee38d9b2 /Game/Code/Screens/UScreenSong.pas | |
parent | 48676faa6c0da1eb77999512322896840ea13cb1 (diff) | |
download | usdx-d123263213fba448d5695df35660f7de4cbed433.tar.gz usdx-d123263213fba448d5695df35660f7de4cbed433.tar.xz usdx-d123263213fba448d5695df35660f7de4cbed433.zip |
modified UTime to utilise SDL timer...
this allows for reliable cross platform timers.
Tested working on linux.
Modified UVideo and screens to get
Video playback working on linux
currently only video stream... no audio..
but I Will be working towards this, for all audio playback ( at least for linux )
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@501 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to '')
-rw-r--r-- | Game/Code/Screens/UScreenSong.pas | 37 |
1 files changed, 20 insertions, 17 deletions
diff --git a/Game/Code/Screens/UScreenSong.pas b/Game/Code/Screens/UScreenSong.pas index 859d5026..b5a34f46 100644 --- a/Game/Code/Screens/UScreenSong.pas +++ b/Game/Code/Screens/UScreenSong.pas @@ -1509,8 +1509,13 @@ var I: Integer; begin dx := SongTarget-SongCurrent; - dt := TimeSkip*7; - if dt > 1 then dt := 1; + dt := TimeSkip * 7; + +// writeln( 'TScreenSong.Draw '+ inttostr(trunc(TimeSkip)) ); + + if dt > 1 then + dt := 1; + SongCurrent := SongCurrent + dx*dt; { if SongCurrent > Catsongs.VisibleSongs then begin @@ -1527,7 +1532,8 @@ begin If (CoverTime < 5) then begin // 0.5.0: cover fade - if (CoverTime < 1) and (CoverTime + TimeSkip >= 1) then begin + if (CoverTime < 1) and (CoverTime + TimeSkip >= 1) then + begin // load new texture Texture.GetTexture(Button[Interaction].Texture.Name, 'Plain', false); Button[Interaction].Texture.Alpha := 1; @@ -1756,27 +1762,24 @@ begin Data[i] := 0.9999999999999; try - if ( assigned( Theme ) ) AND - ( assigned( Theme.Song ) ) AND - ( i < length( Data ) ) THEN - begin - writeln( '!!!!!!!!! - '+ inttostr( i ) + ' - ' + inttostr( Theme.Song.Equalizer.Length ) ); - - if Single(Data[i]) > 0 then + if ( assigned( Theme ) ) AND + ( assigned( Theme.Song ) ) AND + ( i < length( Data ) ) THEN begin - lTmp := Single(Data[i]) * Theme.Song.Equalizer.Length; - if lTmp > Pos then - Pos := lTmp; + if single( Data[i] ) > single( 1 ) then + begin + lTmp := Single(Data[i]) * Theme.Song.Equalizer.Length; + if lTmp > Pos then + Pos := lTmp; + end; end; - end; except - // TODO: JB_Linux..... why does this happen ! on E:EInvalidOp do - writeln( 'UScreenSong - DOH !!!!' ); + writeln( 'UScreenSong - DOH !!!! ('+inttostr(i)+' '+ inttostr( integer( single( Data[i] ) ) )+' * '+ ')' ); end end; - + //Change Last Band if (EqualizerBands[B] <= Theme.Song.Equalizer.Length) then begin |