Scale the background here rather than in every piece of lua that loads them. This also fixes the last of the jerks between screens that load them separately.

This commit is contained in:
Steve Checkoway
2007-04-01 07:24:34 +00:00
parent 3817a695e1
commit dbff8560a7
5 changed files with 2 additions and 5 deletions
@@ -5,7 +5,6 @@ local children = {
Def.Actor { OnCommand=cmd(sleep,2); };
LoadSongBackground() .. {
Condition=not STATSMAN:GetCurStageStats():AllFailed();
InitCommand=cmd(scaletoclipped,SCREEN_WIDTH,SCREEN_HEIGHT;x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y);
OnCommand=cmd(diffusealpha,1;linear,0.4;diffusealpha,0);
};
LoadActor( "_black.png" ) .. {
@@ -1,7 +1,6 @@
local children = {
LoadSongBackground() .. {
Condition=not GAMESTATE:IsCourseMode();
InitCommand=cmd(x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y;scaletoclipped,SCREEN_WIDTH,SCREEN_HEIGHT;diffusealpha,0);
OnCommand=cmd(diffusealpha,1;sleep,.5;linear,.5;diffusealpha,0);
};
};
@@ -1,6 +1,5 @@
local children = {
LoadSongBackground() .. {
InitCommand=cmd(scaletoclipped,SCREEN_WIDTH,SCREEN_HEIGHT;x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y);
OnCommand=cmd(diffusealpha,0;sleep,0.5;linear,0.5;diffusealpha,1);
};
@@ -1,7 +1,6 @@
local children = {
LoadSongBackground() .. {
Condition=not GAMESTATE:IsCourseMode();
InitCommand=cmd(x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y;scaletoclipped,SCREEN_WIDTH,SCREEN_HEIGHT;diffusealpha,0);
OnCommand=cmd(zoom,0;rotationz,0;linear,.5;diffusealpha,1;zoom,1;rotationz,1080);
};
};
+2 -1
View File
@@ -18,7 +18,8 @@ end
function LoadSongBackground()
return Def.Sprite {
BeginCommand=cmd(LoadFromSongBackground,GAMESTATE:GetCurrentSong());
InitCommand=cmd(x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y);
BeginCommand=cmd(LoadFromSongBackground,GAMESTATE:GetCurrentSong();scale_or_crop_background);
};
end