aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/Menu
diff options
context:
space:
mode:
authortobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-05-13 18:45:37 +0000
committertobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-05-13 18:45:37 +0000
commit7403bb1fc38a74c25a636666681a42d663d27512 (patch)
treefbf7774949687da7e1b87b3be8bf0d8cf6a811b3 /Game/Code/Menu
parent1e1849ae3ce2d5e78eb1d20681e385ad7b502092 (diff)
downloadusdx-7403bb1fc38a74c25a636666681a42d663d27512.tar.gz
usdx-7403bb1fc38a74c25a636666681a42d663d27512.tar.xz
usdx-7403bb1fc38a74c25a636666681a42d663d27512.zip
- fixed video-background
- 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
Diffstat (limited to 'Game/Code/Menu')
-rw-r--r--Game/Code/Menu/UDisplay.pas1
-rw-r--r--Game/Code/Menu/UMenu.pas32
2 files changed, 12 insertions, 21 deletions
diff --git a/Game/Code/Menu/UDisplay.pas b/Game/Code/Menu/UDisplay.pas
index 7d31e578..94a63ca9 100644
--- a/Game/Code/Menu/UDisplay.pas
+++ b/Game/Code/Menu/UDisplay.pas
@@ -165,7 +165,6 @@ begin
// if (Screens = 2) and (S = 2) then ScreenX := 1;
ScreenX := 0;
- if S = 2 then TimeSkip := 0 else;
glViewPort((S-1) * ScreenW div Screens, 0, ScreenW div Screens, ScreenH);
//popup hack
diff --git a/Game/Code/Menu/UMenu.pas b/Game/Code/Menu/UMenu.pas
index 7656c639..f33ae244 100644
--- a/Game/Code/Menu/UMenu.pas
+++ b/Game/Code/Menu/UMenu.pas
@@ -171,6 +171,7 @@ uses UCommon,
UGraphic,
UDisplay,
UCovers,
+ UTime,
USkins;
destructor TMenu.Destroy;
@@ -325,7 +326,10 @@ begin
if ( BackImg.TexNum = 0 ) then
begin
if VideoPlayback.Open( fFileName ) then
+ begin
+ VideoBGTimer.SetTime(0);
VideoPlayback.Play;
+ end;
end;
BackImg.W := 800;
@@ -740,7 +744,6 @@ var
PetX: integer;
PetY: integer;
begin
-
BackImg.ColR := 1;
BackImg.ColG := 1;
BackImg.ColB := 1;
@@ -748,34 +751,20 @@ begin
BackImg.TexY1 := 0;
BackImg.TexX2 := 1;
BackImg.TexY2 := 1;
+
if (BackImg.TexNum > 0) then
begin
- // does anyone know what these loops were for?
- {
- // draw texture with overlapping
- for PetY := 1 to BackH do
- for PetX := 1 to BackW do begin
- BackImg.X := (PetX-1)/BackW * 800; //640
- BackImg.Y := (PetY-1)/BackH * 600; //480
- DrawTexture(BackImg);
- end; // for PetX
- }
- {
- BackImg.X:=BackW;
- BackImg.Y:=BackW;
- }
BackImg.X := 0;
BackImg.Y := 0;
BackImg.Z := 0; // todo: eddie: to the opengl experts: please check this! On the mac z is not initialized???
BackImg.W := 800;
BackImg.H := 600;
DrawTexture(BackImg);
- end; // if
-
-
- //if assigned( VideoPlayback ) then
+ end
+ else if (VideoPlayback <> nil) then
begin
- VideoPlayback.GetFrame( now() );
+ VideoPlayback.GetFrame(VideoBGTimer.GetTime());
+ // FIXME: why do we draw on screen 2? Seems to be wrong.
VideoPlayback.DrawGL(2);
end;
@@ -1589,7 +1578,10 @@ begin
if fileexists( fFileName ) then
begin
if VideoPlayback.Open( fFileName ) then
+ begin
+ VideoBGTimer.SetTime(0);
VideoPlayback.Play;
+ end;
end;
end;
end;