Changed BackgroundEffects files to apply the playback rate to videos. Added GetUpdateRate to ActorFrame and Get/SetDecodeMovie to Sprite. Hope nobody is caught off guard by checkerboard no longer playing videos back at 4x rate.
This commit is contained in:
@@ -2,7 +2,13 @@ local Color1 = color(Var "Color1");
|
|||||||
|
|
||||||
local t = Def.ActorFrame {
|
local t = Def.ActorFrame {
|
||||||
LoadActor(Var "File1") .. {
|
LoadActor(Var "File1") .. {
|
||||||
OnCommand=cmd(x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y;diffuse,Color1;effectclock,"music");
|
OnCommand= function(self)
|
||||||
|
self:xy(_screen.cx, _screen.cy):diffuse(Color1):effectclock("music")
|
||||||
|
-- Explanation in StretchNoLoop.lua.
|
||||||
|
if self.GetTexture then
|
||||||
|
self:GetTexture():rate(self:GetParent():GetUpdateRate())
|
||||||
|
end
|
||||||
|
end,
|
||||||
GainFocusCommand=cmd(play);
|
GainFocusCommand=cmd(play);
|
||||||
LoseFocusCommand=cmd(pause);
|
LoseFocusCommand=cmd(pause);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,16 +1,32 @@
|
|||||||
local Color1 = color(Var "Color1");
|
local Color1 = color(Var "Color1");
|
||||||
|
|
||||||
local a = LoadActor(Var "File1") .. {
|
local a = LoadActor(Var "File1") .. {
|
||||||
OnCommand=cmd(cropto,SCREEN_WIDTH/2,SCREEN_HEIGHT/2;diffuse,Color1;effectclock,"music");
|
OnCommand= function(self)
|
||||||
|
self:cropto(_screen.w/2, _screen.h/2):diffuse(Color1)
|
||||||
|
:effectclock("music")
|
||||||
|
-- Explanation in StretchNoLoop.lua.
|
||||||
|
if self.GetTexture then
|
||||||
|
self:GetTexture():rate(self:GetParent():GetUpdateRate())
|
||||||
|
end
|
||||||
|
end,
|
||||||
GainFocusCommand=cmd(play);
|
GainFocusCommand=cmd(play);
|
||||||
LoseFocusCommand=cmd(pause);
|
LoseFocusCommand=cmd(pause);
|
||||||
};
|
};
|
||||||
|
|
||||||
local t = Def.ActorFrame {
|
local t = Def.ActorFrame {
|
||||||
a .. { OnCommand=cmd(x,scale(1,0,4,SCREEN_LEFT,SCREEN_RIGHT);y,scale(1,0,4,SCREEN_TOP,SCREEN_BOTTOM)); };
|
a .. { OnCommand=cmd(x,scale(1,0,4,SCREEN_LEFT,SCREEN_RIGHT);y,scale(1,0,4,SCREEN_TOP,SCREEN_BOTTOM)); };
|
||||||
a .. { OnCommand=cmd(x,scale(3,0,4,SCREEN_LEFT,SCREEN_RIGHT);y,scale(1,0,4,SCREEN_TOP,SCREEN_BOTTOM)); };
|
a .. { OnCommand=function(self)
|
||||||
a .. { OnCommand=cmd(x,scale(1,0,4,SCREEN_LEFT,SCREEN_RIGHT);y,scale(3,0,4,SCREEN_TOP,SCREEN_BOTTOM)); };
|
self:x(scale(3,0,4,SCREEN_LEFT,SCREEN_RIGHT)):y(scale(1,0,4,SCREEN_TOP,SCREEN_BOTTOM))
|
||||||
a .. { OnCommand=cmd(x,scale(3,0,4,SCREEN_LEFT,SCREEN_RIGHT);y,scale(3,0,4,SCREEN_TOP,SCREEN_BOTTOM)); };
|
if self.SetDecodeMovie then self:SetDecodeMovie(false) end
|
||||||
|
end };
|
||||||
|
a .. { OnCommand=function(self)
|
||||||
|
self:x(scale(1,0,4,SCREEN_LEFT,SCREEN_RIGHT)):y(scale(3,0,4,SCREEN_TOP,SCREEN_BOTTOM))
|
||||||
|
if self.SetDecodeMovie then self:SetDecodeMovie(false) end
|
||||||
|
end };
|
||||||
|
a .. { OnCommand=function(self)
|
||||||
|
self:x(scale(3,0,4,SCREEN_LEFT,SCREEN_RIGHT)):y(scale(3,0,4,SCREEN_TOP,SCREEN_BOTTOM))
|
||||||
|
if self.SetDecodeMovie then self:SetDecodeMovie(false) end
|
||||||
|
end };
|
||||||
};
|
};
|
||||||
|
|
||||||
return t;
|
return t;
|
||||||
|
|||||||
@@ -2,12 +2,25 @@ local Color1 = color(Var "Color1");
|
|||||||
local Color2 = color(Var "Color2");
|
local Color2 = color(Var "Color2");
|
||||||
|
|
||||||
local a1 = LoadActor(Var "File1") .. {
|
local a1 = LoadActor(Var "File1") .. {
|
||||||
OnCommand=cmd(cropto,SCREEN_WIDTH/2,SCREEN_HEIGHT/2;diffuse,Color1;effectclock,"music");
|
OnCommand= function(self)
|
||||||
|
self:cropto(SCREEN_WIDTH/2,SCREEN_HEIGHT/2):diffuse(Color1)
|
||||||
|
:effectclock("music")
|
||||||
|
-- Explanation in StretchNoLoop.lua.
|
||||||
|
if self.GetTexture then
|
||||||
|
self:GetTexture():rate(self:GetParent():GetUpdateRate())
|
||||||
|
end
|
||||||
|
end,
|
||||||
GainFocusCommand=cmd(play);
|
GainFocusCommand=cmd(play);
|
||||||
LoseFocusCommand=cmd(pause);
|
LoseFocusCommand=cmd(pause);
|
||||||
};
|
};
|
||||||
local a2 = LoadActor(Var "File2") .. {
|
local a2 = LoadActor(Var "File2") .. {
|
||||||
OnCommand=cmd(cropto,SCREEN_WIDTH/2,SCREEN_HEIGHT/2;diffuse,Color2;effectclock,"music");
|
OnCommand= function(self)
|
||||||
|
self:cropto(SCREEN_WIDTH/2,SCREEN_HEIGHT/2):diffuse(Color2):effectclock("music")
|
||||||
|
-- Explanation in StretchNoLoop.lua.
|
||||||
|
if self.GetTexture then
|
||||||
|
self:GetTexture():rate(self:GetParent():GetUpdateRate())
|
||||||
|
end
|
||||||
|
end,
|
||||||
GainFocusCommand=cmd(play);
|
GainFocusCommand=cmd(play);
|
||||||
LoseFocusCommand=cmd(pause);
|
LoseFocusCommand=cmd(pause);
|
||||||
};
|
};
|
||||||
@@ -15,8 +28,14 @@ local a2 = LoadActor(Var "File2") .. {
|
|||||||
local t = Def.ActorFrame {
|
local t = Def.ActorFrame {
|
||||||
a1 .. { OnCommand=cmd(x,scale(1,0,4,SCREEN_LEFT,SCREEN_RIGHT);y,scale(1,0,4,SCREEN_TOP,SCREEN_BOTTOM)); };
|
a1 .. { OnCommand=cmd(x,scale(1,0,4,SCREEN_LEFT,SCREEN_RIGHT);y,scale(1,0,4,SCREEN_TOP,SCREEN_BOTTOM)); };
|
||||||
a2 .. { OnCommand=cmd(x,scale(3,0,4,SCREEN_LEFT,SCREEN_RIGHT);y,scale(1,0,4,SCREEN_TOP,SCREEN_BOTTOM)); };
|
a2 .. { OnCommand=cmd(x,scale(3,0,4,SCREEN_LEFT,SCREEN_RIGHT);y,scale(1,0,4,SCREEN_TOP,SCREEN_BOTTOM)); };
|
||||||
a2 .. { OnCommand=cmd(x,scale(1,0,4,SCREEN_LEFT,SCREEN_RIGHT);y,scale(3,0,4,SCREEN_TOP,SCREEN_BOTTOM)); };
|
a2 .. { OnCommand=function(self)
|
||||||
a1 .. { OnCommand=cmd(x,scale(3,0,4,SCREEN_LEFT,SCREEN_RIGHT);y,scale(3,0,4,SCREEN_TOP,SCREEN_BOTTOM)); };
|
self:x(scale(1,0,4,SCREEN_LEFT,SCREEN_RIGHT)):y(scale(3,0,4,SCREEN_TOP,SCREEN_BOTTOM))
|
||||||
|
if self.SetDecodeMovie then self:SetDecodeMovie(false) end
|
||||||
|
end };
|
||||||
|
a1 .. { OnCommand=function(self)
|
||||||
|
self:x(scale(3,0,4,SCREEN_LEFT,SCREEN_RIGHT)):y(scale(3,0,4,SCREEN_TOP,SCREEN_BOTTOM))
|
||||||
|
if self.SetDecodeMovie then self:SetDecodeMovie(false) end
|
||||||
|
end };
|
||||||
};
|
};
|
||||||
|
|
||||||
return t;
|
return t;
|
||||||
|
|||||||
@@ -3,10 +3,18 @@ local Color2 = color(Var "Color2");
|
|||||||
|
|
||||||
-- Alternating files being played back at once
|
-- Alternating files being played back at once
|
||||||
local t = Def.ActorFrame {
|
local t = Def.ActorFrame {
|
||||||
LoadActor(Var "File1") .. { OnCommand=cmd(x,scale(1,0,4,SCREEN_LEFT,SCREEN_RIGHT);y,scale(1,0,4,SCREEN_TOP,SCREEN_BOTTOM);cropto,SCREEN_WIDTH/2,SCREEN_HEIGHT/2;diffuse,Color1;rate,0.25) };
|
LoadActor(Var "File1") .. { OnCommand=cmd(x,scale(1,0,4,SCREEN_LEFT,SCREEN_RIGHT);y,scale(1,0,4,SCREEN_TOP,SCREEN_BOTTOM);cropto,SCREEN_WIDTH/2,SCREEN_HEIGHT/2;diffuse,Color1) };
|
||||||
LoadActor(Var "File2") .. { OnCommand=cmd(x,scale(3,0,4,SCREEN_LEFT,SCREEN_RIGHT);y,scale(1,0,4,SCREEN_TOP,SCREEN_BOTTOM);cropto,SCREEN_WIDTH/2,SCREEN_HEIGHT/2;diffuse,Color2;rate,0.25) };
|
LoadActor(Var "File2") .. { OnCommand=cmd(x,scale(3,0,4,SCREEN_LEFT,SCREEN_RIGHT);y,scale(1,0,4,SCREEN_TOP,SCREEN_BOTTOM);cropto,SCREEN_WIDTH/2,SCREEN_HEIGHT/2;diffuse,Color2) };
|
||||||
LoadActor(Var "File2") .. { OnCommand=cmd(x,scale(1,0,4,SCREEN_LEFT,SCREEN_RIGHT);y,scale(3,0,4,SCREEN_TOP,SCREEN_BOTTOM);cropto,SCREEN_WIDTH/2,SCREEN_HEIGHT/2;diffuse,Color1;rate,0.25) };
|
LoadActor(Var "File2") .. {
|
||||||
LoadActor(Var "File1") .. { OnCommand=cmd(x,scale(3,0,4,SCREEN_LEFT,SCREEN_RIGHT);y,scale(3,0,4,SCREEN_TOP,SCREEN_BOTTOM);cropto,SCREEN_WIDTH/2,SCREEN_HEIGHT/2;diffuse,Color2;rate,0.25) };
|
OnCommand=function(self)
|
||||||
|
self:x(scale(1,0,4,SCREEN_LEFT,SCREEN_RIGHT)):y(scale(3,0,4,SCREEN_TOP,SCREEN_BOTTOM)):cropto(SCREEN_WIDTH/2,SCREEN_HEIGHT/2):diffuse(Color1)
|
||||||
|
if self.SetDecodeMovie then self:SetDecodeMovie(false) end
|
||||||
|
end };
|
||||||
|
LoadActor(Var "File1") .. {
|
||||||
|
OnCommand=function(self)
|
||||||
|
self:x(scale(3,0,4,SCREEN_LEFT,SCREEN_RIGHT)):y(scale(3,0,4,SCREEN_TOP,SCREEN_BOTTOM)):cropto(SCREEN_WIDTH/2,SCREEN_HEIGHT/2):diffuse(Color2)
|
||||||
|
if self.SetDecodeMovie then self:SetDecodeMovie(false) end
|
||||||
|
end };
|
||||||
};
|
};
|
||||||
|
|
||||||
return t
|
return t
|
||||||
|
|||||||
@@ -4,14 +4,26 @@ local Color2 = color(Var "Color2");
|
|||||||
local t = Def.ActorFrame {};
|
local t = Def.ActorFrame {};
|
||||||
|
|
||||||
t[#t+1] = LoadActor(Var "File1") .. {
|
t[#t+1] = LoadActor(Var "File1") .. {
|
||||||
OnCommand=cmd(x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y;scale_or_crop_background;diffuse,Color1;effectclock,"music");
|
OnCommand=function(self)
|
||||||
|
self:x(SCREEN_CENTER_X):y(SCREEN_CENTER_Y):scale_or_crop_background():diffuse(Color1):effectclock("music")
|
||||||
|
-- Explanation in StretchNoLoop.lua.
|
||||||
|
if self.GetTexture then
|
||||||
|
self:GetTexture():rate(self:GetParent():GetUpdateRate())
|
||||||
|
end
|
||||||
|
end,
|
||||||
GainFocusCommand=cmd(play);
|
GainFocusCommand=cmd(play);
|
||||||
LoseFocusCommand=cmd(pause);
|
LoseFocusCommand=cmd(pause);
|
||||||
};
|
};
|
||||||
|
|
||||||
if Var("File2") ~= nil then
|
if Var("File2") ~= nil then
|
||||||
t[#t+1] = LoadActor(Var("File2")) .. {
|
t[#t+1] = LoadActor(Var("File2")) .. {
|
||||||
OnCommand=cmd(x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y;scale_or_crop_background;diffuse,Color2;effectclock,"music";linear,1;diffusealpha,0);
|
OnCommand=function(self)
|
||||||
|
self:x(SCREEN_CENTER_X):y(SCREEN_CENTER_Y):scale_or_crop_background():diffuse(Color2):effectclock("music"):linear(1):diffusealpha(0)
|
||||||
|
-- Explanation in StretchNoLoop.lua.
|
||||||
|
if self.GetTexture then
|
||||||
|
self:GetTexture():rate(self:GetParent():GetUpdateRate())
|
||||||
|
end
|
||||||
|
end,
|
||||||
GainFocusCommand=cmd(play);
|
GainFocusCommand=cmd(play);
|
||||||
LoseFocusCommand=cmd(pause);
|
LoseFocusCommand=cmd(pause);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -4,14 +4,26 @@ local Color2 = color(Var "Color2");
|
|||||||
local t = Def.ActorFrame {};
|
local t = Def.ActorFrame {};
|
||||||
|
|
||||||
t[#t+1] = LoadActor(Var "File1") .. {
|
t[#t+1] = LoadActor(Var "File1") .. {
|
||||||
OnCommand=cmd(x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y;scale_or_crop_background;diffuse,Color1;effectclock,"music");
|
OnCommand=function(self)
|
||||||
|
self:x(SCREEN_CENTER_X):y(SCREEN_CENTER_Y):scale_or_crop_background():diffuse(Color1):effectclock("music")
|
||||||
|
-- Explanation in StretchNoLoop.lua.
|
||||||
|
if self.GetTexture then
|
||||||
|
self:GetTexture():rate(self:GetParent():GetUpdateRate())
|
||||||
|
end
|
||||||
|
end,
|
||||||
GainFocusCommand=cmd(play);
|
GainFocusCommand=cmd(play);
|
||||||
LoseFocusCommand=cmd(pause);
|
LoseFocusCommand=cmd(pause);
|
||||||
};
|
};
|
||||||
|
|
||||||
if Var("File2") ~= nil then
|
if Var("File2") ~= nil then
|
||||||
t[#t+1] = LoadActor(Var("File2")) .. {
|
t[#t+1] = LoadActor(Var("File2")) .. {
|
||||||
OnCommand=cmd(x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y;scale_or_crop_background;diffuse,Color1;effectclock,"music");
|
OnCommand=function(self)
|
||||||
|
self:x(SCREEN_CENTER_X):y(SCREEN_CENTER_Y):scale_or_crop_background():diffuse(Color1):effectclock("music")
|
||||||
|
-- Explanation in StretchNoLoop.lua.
|
||||||
|
if self.GetTexture then
|
||||||
|
self:GetTexture():rate(self:GetParent():GetUpdateRate())
|
||||||
|
end
|
||||||
|
end,
|
||||||
GainFocusCommand=cmd(play);
|
GainFocusCommand=cmd(play);
|
||||||
LoseFocusCommand=cmd(pause);
|
LoseFocusCommand=cmd(pause);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,16 +1,31 @@
|
|||||||
local Color1 = color(Var "Color1");
|
local Color1 = color(Var "Color1");
|
||||||
|
|
||||||
local a = LoadActor(Var "File1") .. {
|
local a = LoadActor(Var "File1") .. {
|
||||||
OnCommand=cmd(cropto,SCREEN_WIDTH/2,SCREEN_HEIGHT/2;diffuse,Color1;zoomx,self:GetZoomX()*-1;zoomy,self:GetZoomY()*-1;effectclock,"music");
|
OnCommand= function(self)
|
||||||
|
self:cropto(SCREEN_WIDTH/2,SCREEN_HEIGHT/2):diffuse(Color1):zoomx(self:GetZoomX()*-1):zoomy(self:GetZoomY()*-1):effectclock("music")
|
||||||
|
-- Explanation in StretchNoLoop.lua.
|
||||||
|
if self.GetTexture then
|
||||||
|
self:GetTexture():rate(self:GetParent():GetUpdateRate())
|
||||||
|
end
|
||||||
|
end,
|
||||||
GainFocusCommand=cmd(play);
|
GainFocusCommand=cmd(play);
|
||||||
LoseFocusCommand=cmd(pause);
|
LoseFocusCommand=cmd(pause);
|
||||||
};
|
};
|
||||||
|
|
||||||
local t = Def.ActorFrame {
|
local t = Def.ActorFrame {
|
||||||
a .. { OnCommand=cmd(x,scale(1,0,4,SCREEN_LEFT,SCREEN_RIGHT);y,scale(1,0,4,SCREEN_TOP,SCREEN_BOTTOM)); };
|
a .. { OnCommand=cmd(x,scale(1,0,4,SCREEN_LEFT,SCREEN_RIGHT);y,scale(1,0,4,SCREEN_TOP,SCREEN_BOTTOM)); };
|
||||||
a .. { OnCommand=cmd(x,scale(3,0,4,SCREEN_LEFT,SCREEN_RIGHT);y,scale(1,0,4,SCREEN_TOP,SCREEN_BOTTOM)); };
|
a .. { OnCommand=function(self)
|
||||||
a .. { OnCommand=cmd(x,scale(1,0,4,SCREEN_LEFT,SCREEN_RIGHT);y,scale(3,0,4,SCREEN_TOP,SCREEN_BOTTOM)); };
|
self:x(scale(3,0,4,SCREEN_LEFT,SCREEN_RIGHT)):y(scale(1,0,4,SCREEN_TOP,SCREEN_BOTTOM))
|
||||||
a .. { OnCommand=cmd(x,scale(3,0,4,SCREEN_LEFT,SCREEN_RIGHT);y,scale(3,0,4,SCREEN_TOP,SCREEN_BOTTOM)); };
|
if self.SetDecodeMovie then self:SetDecodeMovie(false) end
|
||||||
|
end };
|
||||||
|
a .. { OnCommand=function(self)
|
||||||
|
self:x(scale(1,0,4,SCREEN_LEFT,SCREEN_RIGHT)):y(scale(3,0,4,SCREEN_TOP,SCREEN_BOTTOM))
|
||||||
|
if self.SetDecodeMovie then self:SetDecodeMovie(false) end
|
||||||
|
end };
|
||||||
|
a .. { OnCommand=function(self)
|
||||||
|
self:x(scale(3,0,4,SCREEN_LEFT,SCREEN_RIGHT)):y(scale(3,0,4,SCREEN_TOP,SCREEN_BOTTOM))
|
||||||
|
if self.SetDecodeMovie then self:SetDecodeMovie(false) end
|
||||||
|
end };
|
||||||
};
|
};
|
||||||
|
|
||||||
return t;
|
return t;
|
||||||
|
|||||||
@@ -9,11 +9,21 @@ local t = Def.ActorFrame {
|
|||||||
self:scale_or_crop_background();
|
self:scale_or_crop_background();
|
||||||
self:diffuse(Color1)
|
self:diffuse(Color1)
|
||||||
self:effectclock("music")
|
self:effectclock("music")
|
||||||
|
-- Explanation in StretchNoLoop.lua.
|
||||||
|
if self.GetTexture then
|
||||||
|
self:GetTexture():rate(self:GetParent():GetUpdateRate())
|
||||||
|
end
|
||||||
end;
|
end;
|
||||||
};
|
};
|
||||||
|
|
||||||
LoadActor(Var "File1") .. {
|
LoadActor(Var "File1") .. {
|
||||||
OnCommand=cmd(blend,"BlendMode_Add";x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y;scale_or_crop_background;diffuse,Color2;effectclock,"music");
|
OnCommand=function(self)
|
||||||
|
self:blend("BlendMode_Add"):x(SCREEN_CENTER_X):y(SCREEN_CENTER_Y):scale_or_crop_background():diffuse(Color2):effectclock("music")
|
||||||
|
-- Explanation in StretchNoLoop.lua.
|
||||||
|
if self.GetTexture then
|
||||||
|
self:GetTexture():rate(self:GetParent():GetUpdateRate())
|
||||||
|
end
|
||||||
|
end;
|
||||||
GainFocusCommand=cmd(play);
|
GainFocusCommand=cmd(play);
|
||||||
LoseFocusCommand=cmd(pause);
|
LoseFocusCommand=cmd(pause);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -6,7 +6,14 @@ local t = Def.ActorFrame {
|
|||||||
self:xy(SCREEN_CENTER_X,SCREEN_CENTER_Y)
|
self:xy(SCREEN_CENTER_X,SCREEN_CENTER_Y)
|
||||||
self:scale_or_crop_background()
|
self:scale_or_crop_background()
|
||||||
self:diffuse(Color1)
|
self:diffuse(Color1)
|
||||||
if self.loop ~= nil then
|
-- The playback rate in the simfile is used to set the update rate
|
||||||
|
-- on the ActorFrame, but effectclock("music") causes the sprite to
|
||||||
|
-- ignore the passed in delta time and use the music time instead.
|
||||||
|
-- So this passes the update rate in to the texture. -Kyz
|
||||||
|
if self.GetTexture then
|
||||||
|
self:GetTexture():rate(self:GetParent():GetUpdateRate())
|
||||||
|
end
|
||||||
|
if self.loop then
|
||||||
self:loop(false)
|
self:loop(false)
|
||||||
-- make videos start at beginning to prevent sticking on last frame
|
-- make videos start at beginning to prevent sticking on last frame
|
||||||
self:position(0)
|
self:position(0)
|
||||||
|
|||||||
@@ -7,6 +7,10 @@ local t = Def.ActorFrame {
|
|||||||
self:scale_or_crop_background();
|
self:scale_or_crop_background();
|
||||||
self:diffuse(Color1)
|
self:diffuse(Color1)
|
||||||
self:effectclock("music")
|
self:effectclock("music")
|
||||||
|
-- Explanation in StretchNoLoop.lua.
|
||||||
|
if self.GetTexture then
|
||||||
|
self:GetTexture():rate(self:GetParent():GetUpdateRate())
|
||||||
|
end
|
||||||
end;
|
end;
|
||||||
GainFocusCommand=cmd(play);
|
GainFocusCommand=cmd(play);
|
||||||
LoseFocusCommand=cmd(pause);
|
LoseFocusCommand=cmd(pause);
|
||||||
|
|||||||
@@ -3,7 +3,13 @@ local Color1 = color(Var "Color1");
|
|||||||
|
|
||||||
local t = Def.ActorFrame {
|
local t = Def.ActorFrame {
|
||||||
LoadActor(Var "File1") .. {
|
LoadActor(Var "File1") .. {
|
||||||
OnCommand=cmd(x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y;scale_or_crop_background;diffuse,Color1;effectclock,"music");
|
OnCommand=function(self)
|
||||||
|
self:x(SCREEN_CENTER_X):y(SCREEN_CENTER_Y):scale_or_crop_background():diffuse(Color1):effectclock("music")
|
||||||
|
-- Explanation in StretchNoLoop.lua.
|
||||||
|
if self.GetTexture then
|
||||||
|
self:GetTexture():rate(self:GetParent():GetUpdateRate())
|
||||||
|
end
|
||||||
|
end,
|
||||||
GainFocusCommand=cmd(play);
|
GainFocusCommand=cmd(play);
|
||||||
LoseFocusCommand=cmd(pause);
|
LoseFocusCommand=cmd(pause);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -3,7 +3,13 @@ local Color1 = color("0,0,1,1");
|
|||||||
|
|
||||||
local t = Def.ActorFrame {
|
local t = Def.ActorFrame {
|
||||||
LoadActor(Var "File1") .. {
|
LoadActor(Var "File1") .. {
|
||||||
OnCommand=cmd(x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y;scale_or_crop_background;diffuse,Color1;effectclock,"music");
|
OnCommand=function(self)
|
||||||
|
self:x(SCREEN_CENTER_X):y(SCREEN_CENTER_Y):scale_or_crop_background():diffuse(Color1):effectclock("music")
|
||||||
|
-- Explanation in StretchNoLoop.lua.
|
||||||
|
if self.GetTexture then
|
||||||
|
self:GetTexture():rate(self:GetParent():GetUpdateRate())
|
||||||
|
end
|
||||||
|
end,
|
||||||
GainFocusCommand=cmd(play);
|
GainFocusCommand=cmd(play);
|
||||||
LoseFocusCommand=cmd(pause);
|
LoseFocusCommand=cmd(pause);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -3,7 +3,13 @@ local Color1 = color("0,1,0,1");
|
|||||||
|
|
||||||
local t = Def.ActorFrame {
|
local t = Def.ActorFrame {
|
||||||
LoadActor(Var "File1") .. {
|
LoadActor(Var "File1") .. {
|
||||||
OnCommand=cmd(x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y;scale_or_crop_background;diffuse,Color1;effectclock,"music");
|
OnCommand=function(self)
|
||||||
|
self:x(SCREEN_CENTER_X):y(SCREEN_CENTER_Y):scale_or_crop_background():diffuse(Color1):effectclock("music")
|
||||||
|
-- Explanation in StretchNoLoop.lua.
|
||||||
|
if self.GetTexture then
|
||||||
|
self:GetTexture():rate(self:GetParent():GetUpdateRate())
|
||||||
|
end
|
||||||
|
end,
|
||||||
GainFocusCommand=cmd(play);
|
GainFocusCommand=cmd(play);
|
||||||
LoseFocusCommand=cmd(pause);
|
LoseFocusCommand=cmd(pause);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -3,7 +3,13 @@ local Color1 = color("1,0,0,1");
|
|||||||
|
|
||||||
local t = Def.ActorFrame {
|
local t = Def.ActorFrame {
|
||||||
LoadActor(Var "File1") .. {
|
LoadActor(Var "File1") .. {
|
||||||
OnCommand=cmd(x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y;scale_or_crop_background;diffuse,Color1;effectclock,"music");
|
OnCommand=function(self)
|
||||||
|
self:x(SCREEN_CENTER_X):y(SCREEN_CENTER_Y):scale_or_crop_background():diffuse(Color1):effectclock("music")
|
||||||
|
-- Explanation in StretchNoLoop.lua.
|
||||||
|
if self.GetTexture then
|
||||||
|
self:GetTexture():rate(self:GetParent():GetUpdateRate())
|
||||||
|
end
|
||||||
|
end,
|
||||||
GainFocusCommand=cmd(play);
|
GainFocusCommand=cmd(play);
|
||||||
LoseFocusCommand=cmd(pause);
|
LoseFocusCommand=cmd(pause);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -2,7 +2,13 @@ local Color1 = color(Var "Color1");
|
|||||||
|
|
||||||
local t = Def.ActorFrame {
|
local t = Def.ActorFrame {
|
||||||
LoadActor(Var "File1") .. {
|
LoadActor(Var "File1") .. {
|
||||||
OnCommand=cmd(x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y;scale_or_crop_background;diffuse,Color1;pause;effectclock,"music");
|
OnCommand=function(self)
|
||||||
|
self:x(SCREEN_CENTER_X):y(SCREEN_CENTER_Y):scale_or_crop_background():diffuse(Color1):pause():effectclock("music")
|
||||||
|
-- Explanation in StretchNoLoop.lua.
|
||||||
|
if self.GetTexture then
|
||||||
|
self:GetTexture():rate(self:GetParent():GetUpdateRate())
|
||||||
|
end
|
||||||
|
end,
|
||||||
GainFocusCommand=cmd(play);
|
GainFocusCommand=cmd(play);
|
||||||
LoseFocusCommand=cmd(pause);
|
LoseFocusCommand=cmd(pause);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -10,6 +10,10 @@ local t = Def.ActorFrame {
|
|||||||
self:position(0)
|
self:position(0)
|
||||||
end
|
end
|
||||||
self:effectclock("music")
|
self:effectclock("music")
|
||||||
|
-- Explanation in StretchNoLoop.lua.
|
||||||
|
if self.GetTexture then
|
||||||
|
self:GetTexture():rate(self:GetParent():GetUpdateRate())
|
||||||
|
end
|
||||||
end;
|
end;
|
||||||
GainFocusCommand=cmd(play);
|
GainFocusCommand=cmd(play);
|
||||||
LoseFocusCommand=cmd(pause);
|
LoseFocusCommand=cmd(pause);
|
||||||
|
|||||||
@@ -3,7 +3,13 @@ local Color1 = color(Var "Color1");
|
|||||||
|
|
||||||
local t = Def.ActorFrame {
|
local t = Def.ActorFrame {
|
||||||
LoadActor(Var "File1") .. {
|
LoadActor(Var "File1") .. {
|
||||||
OnCommand=cmd(diffuse,Color1;effectclock,"music");
|
OnCommand=function(self)
|
||||||
|
self:diffuse(Color1):effectclock("music")
|
||||||
|
-- Explanation in StretchNoLoop.lua.
|
||||||
|
if self.GetTexture then
|
||||||
|
self:GetTexture():rate(self:GetParent():GetUpdateRate())
|
||||||
|
end
|
||||||
|
end,
|
||||||
GainFocusCommand=cmd(play);
|
GainFocusCommand=cmd(play);
|
||||||
LoseFocusCommand=cmd(pause);
|
LoseFocusCommand=cmd(pause);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -3,13 +3,25 @@ local Color2 = color(Var "Color2");
|
|||||||
|
|
||||||
local t = Def.ActorFrame {
|
local t = Def.ActorFrame {
|
||||||
LoadActor(Var "File1") .. {
|
LoadActor(Var "File1") .. {
|
||||||
OnCommand=cmd(x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y;scale_or_crop_background;diffuse,Color1;effectclock,"music");
|
OnCommand=function(self)
|
||||||
|
self:x(SCREEN_CENTER_X):y(SCREEN_CENTER_Y):scale_or_crop_background():diffuse(Color1):effectclock("music")
|
||||||
|
-- Explanation in StretchNoLoop.lua.
|
||||||
|
if self.GetTexture then
|
||||||
|
self:GetTexture():rate(self:GetParent():GetUpdateRate())
|
||||||
|
end
|
||||||
|
end,
|
||||||
GainFocusCommand=cmd(play);
|
GainFocusCommand=cmd(play);
|
||||||
LoseFocusCommand=cmd(pause);
|
LoseFocusCommand=cmd(pause);
|
||||||
};
|
};
|
||||||
|
|
||||||
LoadActor(Var "File2") .. {
|
LoadActor(Var "File2") .. {
|
||||||
OnCommand=cmd(blend,"BlendMode_Add";x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y;scaletoclipped,SCREEN_WIDTH,SCREEN_HEIGHT;diffuse,Color2;effectclock,"music");
|
OnCommand=function(self)
|
||||||
|
self:blend("BlendMode_Add"):x(SCREEN_CENTER_X):y(SCREEN_CENTER_Y):scaletoclipped(SCREEN_WIDTH,SCREEN_HEIGHT):diffuse(Color2):effectclock("music")
|
||||||
|
-- Explanation in StretchNoLoop.lua.
|
||||||
|
if self.GetTexture then
|
||||||
|
self:GetTexture():rate(self:GetParent():GetUpdateRate())
|
||||||
|
end
|
||||||
|
end,
|
||||||
GainFocusCommand=cmd(play);
|
GainFocusCommand=cmd(play);
|
||||||
LoseFocusCommand=cmd(pause);
|
LoseFocusCommand=cmd(pause);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -4,14 +4,26 @@ local Color2 = color(Var "Color2");
|
|||||||
local t = Def.ActorFrame {};
|
local t = Def.ActorFrame {};
|
||||||
|
|
||||||
t[#t+1] = LoadActor(Var "File1") .. {
|
t[#t+1] = LoadActor(Var "File1") .. {
|
||||||
OnCommand=cmd(x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y;scale_or_crop_background;diffuse,Color1;effectclock,"music");
|
OnCommand=function(self)
|
||||||
GainFocusCommand=cmd(play);
|
self:x(SCREEN_CENTER_X):y(SCREEN_CENTER_Y):scale_or_crop_background():diffuse(Color1):effectclock("music")
|
||||||
LoseFocusCommand=cmd(pause);
|
-- Explanation in StretchNoLoop.lua.
|
||||||
|
if self.GetTexture then
|
||||||
|
self:GetTexture():rate(self:GetParent():GetUpdateRate())
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
GainFocusCommand=cmd(play);
|
||||||
|
LoseFocusCommand=cmd(pause);
|
||||||
};
|
};
|
||||||
|
|
||||||
if Var("File2") ~= nil then
|
if Var("File2") ~= nil then
|
||||||
t[#t+1] = LoadActor(Var("File2")) .. {
|
t[#t+1] = LoadActor(Var("File2")) .. {
|
||||||
OnCommand=cmd(blend,"BlendMode_Add";x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y;scale_or_crop_background;diffuse,Color2;effectclock,"music";linear,1;diffusealpha,0);
|
OnCommand=function(self)
|
||||||
|
self:blend("BlendMode_Add"):x(SCREEN_CENTER_X):y(SCREEN_CENTER_Y):scale_or_crop_background():diffuse(Color2):effectclock("music"):linear(1):diffusealpha(0)
|
||||||
|
-- Explanation in StretchNoLoop.lua.
|
||||||
|
if self.GetTexture then
|
||||||
|
self:GetTexture():rate(self:GetParent():GetUpdateRate())
|
||||||
|
end
|
||||||
|
end,
|
||||||
GainFocusCommand=cmd(play);
|
GainFocusCommand=cmd(play);
|
||||||
LoseFocusCommand=cmd(pause);
|
LoseFocusCommand=cmd(pause);
|
||||||
};
|
};
|
||||||
|
|||||||
+10
-1
@@ -4,9 +4,18 @@ The StepMania 5 Changelog covers all post-sm-ssc changes. For a list of changes
|
|||||||
from StepMania 4 alpha 5 to sm-ssc v1.2.5, see Changelog_sm-ssc.txt.
|
from StepMania 4 alpha 5 to sm-ssc v1.2.5, see Changelog_sm-ssc.txt.
|
||||||
________________________________________________________________________________
|
________________________________________________________________________________
|
||||||
|
|
||||||
|
2015/02/04
|
||||||
|
----------
|
||||||
|
* [ActorFrame] GetUpdateRate added. [kyzentun]
|
||||||
|
* [Background] Using the wrong transition name no longer crashes.
|
||||||
|
Playback rate is applied to videos.
|
||||||
|
Checkerboard and other BackgroundEffects that use the same file twice no
|
||||||
|
longer play videos back at multiplied speed. [kyzentun]
|
||||||
|
* [Sprite] Get/SetDecodeMovie added. [kyzentun]
|
||||||
|
|
||||||
2015/02/02
|
2015/02/02
|
||||||
----------
|
----------
|
||||||
* [ActorMultiVertex] ForceStateUpdate and SetDecodeMovie added. [kyzentun]
|
* [ActorMultiVertex] ForceStateUpdate and Get/SetDecodeMovie added. [kyzentun]
|
||||||
* [RageTexture] Get<thing>Width and Height functions added.
|
* [RageTexture] Get<thing>Width and Height functions added.
|
||||||
(<thing> means Source, Texture, or Image) [kyzentun]
|
(<thing> means Source, Texture, or Image) [kyzentun]
|
||||||
* [Scripts] find_missing_strings_in_theme_translations function added to
|
* [Scripts] find_missing_strings_in_theme_translations function added to
|
||||||
|
|||||||
@@ -454,6 +454,7 @@
|
|||||||
<Function name='GetChildren'/>
|
<Function name='GetChildren'/>
|
||||||
<Function name='GetDrawFunction'/>
|
<Function name='GetDrawFunction'/>
|
||||||
<Function name='GetNumChildren'/>
|
<Function name='GetNumChildren'/>
|
||||||
|
<Function name='GetUpdateRate'/>
|
||||||
<Function name='RemoveAllChildren'/>
|
<Function name='RemoveAllChildren'/>
|
||||||
<Function name='RemoveChild'/>
|
<Function name='RemoveChild'/>
|
||||||
<Function name='RunCommandsOnChildren'/>
|
<Function name='RunCommandsOnChildren'/>
|
||||||
@@ -499,6 +500,7 @@
|
|||||||
<Function name='GetCurrDrawMode'/>
|
<Function name='GetCurrDrawMode'/>
|
||||||
<Function name='GetCurrFirstToDraw'/>
|
<Function name='GetCurrFirstToDraw'/>
|
||||||
<Function name='GetCurrNumToDraw'/>
|
<Function name='GetCurrNumToDraw'/>
|
||||||
|
<Function name='GetDecodeMovie'/>
|
||||||
<Function name='GetDestDrawMode'/>
|
<Function name='GetDestDrawMode'/>
|
||||||
<Function name='GetDestFirstToDraw'/>
|
<Function name='GetDestFirstToDraw'/>
|
||||||
<Function name='GetDestNumToDraw'/>
|
<Function name='GetDestNumToDraw'/>
|
||||||
@@ -592,6 +594,7 @@
|
|||||||
<Function name='SetFromSteps'/>
|
<Function name='SetFromSteps'/>
|
||||||
</Class>
|
</Class>
|
||||||
<Class base='Sprite' name='Banner'>
|
<Class base='Sprite' name='Banner'>
|
||||||
|
<Function name='GetDecodeMovie'/>
|
||||||
<Function name='GetPercentScrolling'/>
|
<Function name='GetPercentScrolling'/>
|
||||||
<Function name='GetScrolling'/>
|
<Function name='GetScrolling'/>
|
||||||
<Function name='LoadBackgroundFromUnlockEntry'/>
|
<Function name='LoadBackgroundFromUnlockEntry'/>
|
||||||
@@ -604,6 +607,7 @@
|
|||||||
<Function name='LoadFromSortOrder'/>
|
<Function name='LoadFromSortOrder'/>
|
||||||
<Function name='LoadIconFromCharacter'/>
|
<Function name='LoadIconFromCharacter'/>
|
||||||
<Function name='ScaleToClipped'/>
|
<Function name='ScaleToClipped'/>
|
||||||
|
<Function name='SetDecodeMovie'/>
|
||||||
<Function name='SetScrolling'/>
|
<Function name='SetScrolling'/>
|
||||||
<Function name='scaletoclipped'/>
|
<Function name='scaletoclipped'/>
|
||||||
</Class>
|
</Class>
|
||||||
|
|||||||
@@ -1429,6 +1429,9 @@ save yourself some time, copy this for undocumented things:
|
|||||||
<Function name='GetNumChildren' return='int' arguments=''>
|
<Function name='GetNumChildren' return='int' arguments=''>
|
||||||
Returns the number of children in the ActorFrame.
|
Returns the number of children in the ActorFrame.
|
||||||
</Function>
|
</Function>
|
||||||
|
<Function name='GetUpdateRate' return='float' arguments=''>
|
||||||
|
Gets the update function's rate.
|
||||||
|
</Function>
|
||||||
<Function name='playcommandonchildren' return='void' arguments='string sCommandName'>
|
<Function name='playcommandonchildren' return='void' arguments='string sCommandName'>
|
||||||
Plays the <code>sCommandName</code> command on the ActorFrame's children.
|
Plays the <code>sCommandName</code> command on the ActorFrame's children.
|
||||||
</Function>
|
</Function>
|
||||||
@@ -1561,6 +1564,9 @@ save yourself some time, copy this for undocumented things:
|
|||||||
<Function name='GetState' return= 'int' arguments=''>
|
<Function name='GetState' return= 'int' arguments=''>
|
||||||
Returns the id of the current state.
|
Returns the id of the current state.
|
||||||
</Function>
|
</Function>
|
||||||
|
<Function name='GetDecodeMovie' return='bool' arguments=''>
|
||||||
|
Gets whether the AMV should call the decode function for its texture during updates.
|
||||||
|
</Function>
|
||||||
<Function name='SetDecodeMovie' return='' arguments='bool decode'>
|
<Function name='SetDecodeMovie' return='' arguments='bool decode'>
|
||||||
Sets whether the AMV should call the decode function for its texture during updates.
|
Sets whether the AMV should call the decode function for its texture during updates.
|
||||||
</Function>
|
</Function>
|
||||||
@@ -4753,6 +4759,9 @@ save yourself some time, copy this for undocumented things:
|
|||||||
<Function name='GetAnimationLengthSeconds' return='float' arguments=''>
|
<Function name='GetAnimationLengthSeconds' return='float' arguments=''>
|
||||||
Returns the length of the animation in seconds.
|
Returns the length of the animation in seconds.
|
||||||
</Function>
|
</Function>
|
||||||
|
<Function name='GetDecodeMovie' return='bool' arguments=''>
|
||||||
|
Gets whether the Sprite should call the decode function for its texture during updates.
|
||||||
|
</Function>
|
||||||
<Function name='GetNumStates' return='int' arguments=''>
|
<Function name='GetNumStates' return='int' arguments=''>
|
||||||
Return the number of states this Sprite has.
|
Return the number of states this Sprite has.
|
||||||
</Function>
|
</Function>
|
||||||
@@ -4793,6 +4802,9 @@ save yourself some time, copy this for undocumented things:
|
|||||||
<Function name='StopUsingCustomPosCoords' return='void' arguments=''>
|
<Function name='StopUsingCustomPosCoords' return='void' arguments=''>
|
||||||
Turns off the custom pos coords for the sprite.
|
Turns off the custom pos coords for the sprite.
|
||||||
</Function>
|
</Function>
|
||||||
|
<Function name='SetDecodeMovie' return='' arguments='bool decode'>
|
||||||
|
Sets whether the Sprite should call the decode function for its texture during updates.
|
||||||
|
</Function>
|
||||||
<Function name='SetEffectMode' return='void' arguments='EffectMode mode'>
|
<Function name='SetEffectMode' return='void' arguments='EffectMode mode'>
|
||||||
Set the <Link class='ENUM' function='EffectMode' /> to <code>mode</code>.
|
Set the <Link class='ENUM' function='EffectMode' /> to <code>mode</code>.
|
||||||
</Function>
|
</Function>
|
||||||
|
|||||||
@@ -609,6 +609,7 @@ public:
|
|||||||
virtual float GetAnimationLengthSeconds() const { return 0; }
|
virtual float GetAnimationLengthSeconds() const { return 0; }
|
||||||
virtual void SetSecondsIntoAnimation( float ) {}
|
virtual void SetSecondsIntoAnimation( float ) {}
|
||||||
virtual void SetUpdateRate( float ) {}
|
virtual void SetUpdateRate( float ) {}
|
||||||
|
virtual float GetUpdateRate() { return 1.0f; }
|
||||||
|
|
||||||
HiddenPtr<LuaClass> m_pLuaInstance;
|
HiddenPtr<LuaClass> m_pLuaInstance;
|
||||||
|
|
||||||
|
|||||||
@@ -625,6 +625,7 @@ public:
|
|||||||
static int propagate( T* p, lua_State *L ) { p->SetPropagateCommands( BIArg(1) ); COMMON_RETURN_SELF; }
|
static int propagate( T* p, lua_State *L ) { p->SetPropagateCommands( BIArg(1) ); COMMON_RETURN_SELF; }
|
||||||
static int fov( T* p, lua_State *L ) { p->SetFOV( FArg(1) ); COMMON_RETURN_SELF; }
|
static int fov( T* p, lua_State *L ) { p->SetFOV( FArg(1) ); COMMON_RETURN_SELF; }
|
||||||
static int SetUpdateRate( T* p, lua_State *L ) { p->SetUpdateRate( FArg(1) ); COMMON_RETURN_SELF; }
|
static int SetUpdateRate( T* p, lua_State *L ) { p->SetUpdateRate( FArg(1) ); COMMON_RETURN_SELF; }
|
||||||
|
DEFINE_METHOD(GetUpdateRate, GetUpdateRate());
|
||||||
static int SetFOV( T* p, lua_State *L ) { p->SetFOV( FArg(1) ); COMMON_RETURN_SELF; }
|
static int SetFOV( T* p, lua_State *L ) { p->SetFOV( FArg(1) ); COMMON_RETURN_SELF; }
|
||||||
static int vanishpoint( T* p, lua_State *L ) { p->SetVanishPoint( FArg(1), FArg(2) ); COMMON_RETURN_SELF; }
|
static int vanishpoint( T* p, lua_State *L ) { p->SetVanishPoint( FArg(1), FArg(2) ); COMMON_RETURN_SELF; }
|
||||||
static int GetChild( T* p, lua_State *L )
|
static int GetChild( T* p, lua_State *L )
|
||||||
@@ -738,6 +739,7 @@ public:
|
|||||||
ADD_METHOD( propagate ); // deprecated
|
ADD_METHOD( propagate ); // deprecated
|
||||||
ADD_METHOD( fov );
|
ADD_METHOD( fov );
|
||||||
ADD_METHOD( SetUpdateRate );
|
ADD_METHOD( SetUpdateRate );
|
||||||
|
ADD_METHOD( GetUpdateRate );
|
||||||
ADD_METHOD( SetFOV );
|
ADD_METHOD( SetFOV );
|
||||||
ADD_METHOD( vanishpoint );
|
ADD_METHOD( vanishpoint );
|
||||||
ADD_METHOD( GetChild );
|
ADD_METHOD( GetChild );
|
||||||
|
|||||||
@@ -76,6 +76,7 @@ public:
|
|||||||
virtual void HurryTweening( float factor );
|
virtual void HurryTweening( float factor );
|
||||||
|
|
||||||
void SetUpdateRate( float fUpdateRate ) { m_fUpdateRate = fUpdateRate; }
|
void SetUpdateRate( float fUpdateRate ) { m_fUpdateRate = fUpdateRate; }
|
||||||
|
float GetUpdateRate() { return m_fUpdateRate; }
|
||||||
void SetFOV( float fFOV ) { m_fFOV = fFOV; }
|
void SetFOV( float fFOV ) { m_fFOV = fFOV; }
|
||||||
void SetVanishPoint( float fX, float fY) { m_fVanishX = fX; m_fVanishY = fY; }
|
void SetVanishPoint( float fX, float fY) { m_fVanishX = fX; m_fVanishY = fY; }
|
||||||
|
|
||||||
|
|||||||
@@ -1114,6 +1114,7 @@ public:
|
|||||||
p->UpdateAnimationState(true);
|
p->UpdateAnimationState(true);
|
||||||
COMMON_RETURN_SELF;
|
COMMON_RETURN_SELF;
|
||||||
}
|
}
|
||||||
|
DEFINE_METHOD(GetDecodeMovie, _decode_movie);
|
||||||
static int SetDecodeMovie(T* p, lua_State *L)
|
static int SetDecodeMovie(T* p, lua_State *L)
|
||||||
{
|
{
|
||||||
p->_decode_movie= BArg(1);
|
p->_decode_movie= BArg(1);
|
||||||
@@ -1182,6 +1183,7 @@ public:
|
|||||||
ADD_METHOD(GetQuadState);
|
ADD_METHOD(GetQuadState);
|
||||||
ADD_METHOD(SetQuadState);
|
ADD_METHOD(SetQuadState);
|
||||||
ADD_METHOD(ForceStateUpdate);
|
ADD_METHOD(ForceStateUpdate);
|
||||||
|
ADD_METHOD(GetDecodeMovie);
|
||||||
ADD_METHOD(SetDecodeMovie);
|
ADD_METHOD(SetDecodeMovie);
|
||||||
|
|
||||||
// Copy from RageTexture
|
// Copy from RageTexture
|
||||||
|
|||||||
+10
-4
@@ -765,10 +765,16 @@ void BackgroundImpl::Layer::UpdateCurBGChange( const Song *pSong, float fLastMus
|
|||||||
if( !change.m_sTransition.empty() )
|
if( !change.m_sTransition.empty() )
|
||||||
{
|
{
|
||||||
map<RString,BackgroundTransition>::const_iterator lIter = mapNameToTransition.find( change.m_sTransition );
|
map<RString,BackgroundTransition>::const_iterator lIter = mapNameToTransition.find( change.m_sTransition );
|
||||||
ASSERT( lIter != mapNameToTransition.end() );
|
if(lIter == mapNameToTransition.end())
|
||||||
const BackgroundTransition &bt = lIter->second;
|
{
|
||||||
m_pFadingBGA->RunCommandsOnLeaves( *bt.cmdLeaves );
|
LuaHelpers::ReportScriptErrorFmt("'%s' is not the name of a BackgroundTransition file.", change.m_sTransition.c_str());
|
||||||
m_pFadingBGA->RunCommands( *bt.cmdRoot );
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
const BackgroundTransition &bt = lIter->second;
|
||||||
|
m_pFadingBGA->RunCommandsOnLeaves( *bt.cmdLeaves );
|
||||||
|
m_pFadingBGA->RunCommands( *bt.cmdRoot );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+11
-1
@@ -26,6 +26,7 @@ Sprite::Sprite()
|
|||||||
m_bUsingCustomTexCoords = false;
|
m_bUsingCustomTexCoords = false;
|
||||||
m_bUsingCustomPosCoords = false;
|
m_bUsingCustomPosCoords = false;
|
||||||
m_bSkipNextUpdate = true;
|
m_bSkipNextUpdate = true;
|
||||||
|
m_DecodeMovie= true;
|
||||||
m_EffectMode = EffectMode_Normal;
|
m_EffectMode = EffectMode_Normal;
|
||||||
|
|
||||||
m_fRememberedClipWidth = -1;
|
m_fRememberedClipWidth = -1;
|
||||||
@@ -62,6 +63,7 @@ Sprite::Sprite( const Sprite &cpy ):
|
|||||||
CPY( m_bUsingCustomTexCoords );
|
CPY( m_bUsingCustomTexCoords );
|
||||||
CPY( m_bUsingCustomPosCoords );
|
CPY( m_bUsingCustomPosCoords );
|
||||||
CPY( m_bSkipNextUpdate );
|
CPY( m_bSkipNextUpdate );
|
||||||
|
CPY( m_DecodeMovie );
|
||||||
CPY( m_EffectMode );
|
CPY( m_EffectMode );
|
||||||
memcpy( m_CustomTexCoords, cpy.m_CustomTexCoords, sizeof(m_CustomTexCoords) );
|
memcpy( m_CustomTexCoords, cpy.m_CustomTexCoords, sizeof(m_CustomTexCoords) );
|
||||||
memcpy( m_CustomPosCoords, cpy.m_CustomPosCoords, sizeof(m_CustomPosCoords) );
|
memcpy( m_CustomPosCoords, cpy.m_CustomPosCoords, sizeof(m_CustomPosCoords) );
|
||||||
@@ -408,7 +410,7 @@ void Sprite::Update( float fDelta )
|
|||||||
UpdateAnimationState();
|
UpdateAnimationState();
|
||||||
|
|
||||||
// If the texture is a movie, decode frames.
|
// If the texture is a movie, decode frames.
|
||||||
if( !bSkipThisMovieUpdate )
|
if(!bSkipThisMovieUpdate && m_DecodeMovie)
|
||||||
m_pTexture->DecodeSeconds( max(0, fTimePassed) );
|
m_pTexture->DecodeSeconds( max(0, fTimePassed) );
|
||||||
|
|
||||||
// update scrolling
|
// update scrolling
|
||||||
@@ -1210,6 +1212,12 @@ public:
|
|||||||
p->SetAllStateDelays(FArg(-1));
|
p->SetAllStateDelays(FArg(-1));
|
||||||
COMMON_RETURN_SELF;
|
COMMON_RETURN_SELF;
|
||||||
}
|
}
|
||||||
|
DEFINE_METHOD(GetDecodeMovie, m_DecodeMovie);
|
||||||
|
static int SetDecodeMovie(T* p, lua_State *L)
|
||||||
|
{
|
||||||
|
p->m_DecodeMovie= BArg(1);
|
||||||
|
COMMON_RETURN_SELF;
|
||||||
|
}
|
||||||
|
|
||||||
LunaSprite()
|
LunaSprite()
|
||||||
{
|
{
|
||||||
@@ -1235,6 +1243,8 @@ public:
|
|||||||
ADD_METHOD( SetEffectMode );
|
ADD_METHOD( SetEffectMode );
|
||||||
ADD_METHOD( GetNumStates );
|
ADD_METHOD( GetNumStates );
|
||||||
ADD_METHOD( SetAllStateDelays );
|
ADD_METHOD( SetAllStateDelays );
|
||||||
|
ADD_METHOD(GetDecodeMovie);
|
||||||
|
ADD_METHOD(SetDecodeMovie);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -90,6 +90,8 @@ public:
|
|||||||
|
|
||||||
void SetAllStateDelays(float fDelay);
|
void SetAllStateDelays(float fDelay);
|
||||||
|
|
||||||
|
bool m_DecodeMovie;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void LoadFromTexture( RageTextureID ID );
|
void LoadFromTexture( RageTextureID ID );
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user