Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
nico-abram committed Sep 17, 2018
1 parent 0769a4e commit 3b8aff1
Show file tree
Hide file tree
Showing 1,600 changed files with 177,081 additions and 148,682 deletions.
4 changes: 4 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
BasedOnStyle: Mozilla
UseTab: Always
IndentWidth: 4
TabWidth: 4
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ before_install:
after_success:
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then cd ${TRAVIS_BUILD_DIR};
ruby uploadDmg.rb; fi
- format-check.sh

env:
global:
Expand Down
12 changes: 6 additions & 6 deletions BGAnimations/flash/default.lua
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
local flashColor = color(Var "Color1")
return Def.Quad {
InitCommand=function(self)
self:x(SCREEN_CENTER_X):y(SCREEN_CENTER_Y):scaletoclipped(SCREEN_WIDTH*2,SCREEN_HEIGHT*2):diffuse(flashColor)
end;
GainFocusCommand=function(self)
InitCommand = function(self)
self:x(SCREEN_CENTER_X):y(SCREEN_CENTER_Y):scaletoclipped(SCREEN_WIDTH * 2, SCREEN_HEIGHT * 2):diffuse(flashColor)
end,
GainFocusCommand = function(self)
self:finishtweening():diffusealpha(1):accelerate(0.6):diffusealpha(0)
end;
};
end
}
16 changes: 8 additions & 8 deletions BGAnimations/white flash/default.lua
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
return Def.Quad {
InitCommand=function(self)
self:x(SCREEN_CENTER_X):y(SCREEN_CENTER_Y):scaletoclipped(SCREEN_WIDTH*2,SCREEN_HEIGHT*2)
end;
GainFocusCommand=function(self)
self:finishtweening():diffusealpha(1):accelerate(0.6):diffusealpha(0)
end;
};
return Def.Quad {
InitCommand = function(self)
self:x(SCREEN_CENTER_X):y(SCREEN_CENTER_Y):scaletoclipped(SCREEN_WIDTH * 2, SCREEN_HEIGHT * 2)
end,
GainFocusCommand = function(self)
self:finishtweening():diffusealpha(1):accelerate(0.6):diffusealpha(0)
end
}
16 changes: 8 additions & 8 deletions BGAnimations/white reverse flash/default.lua
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
return Def.Quad {
InitCommand=function(self)
self:x(SCREEN_CENTER_X):y(SCREEN_CENTER_Y):scaletoclipped(SCREEN_WIDTH*2,SCREEN_HEIGHT*2)
end;
GainFocusCommand=function(self)
self:finishtweening():diffusealpha(0):accelerate(0.6):diffusealpha(1)
end;
};
return Def.Quad {
InitCommand = function(self)
self:x(SCREEN_CENTER_X):y(SCREEN_CENTER_Y):scaletoclipped(SCREEN_WIDTH * 2, SCREEN_HEIGHT * 2)
end,
GainFocusCommand = function(self)
self:finishtweening():diffusealpha(0):accelerate(0.6):diffusealpha(1)
end
}
14 changes: 7 additions & 7 deletions BGAnimations/yellow flash/default.lua
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
return Def.Quad {
InitCommand=function(self)
self:x(SCREEN_CENTER_X):y(SCREEN_CENTER_Y):scaletoclipped(SCREEN_WIDTH*2,SCREEN_HEIGHT*2)
end;
GainFocusCommand=function(self)
self:finishtweening():diffuse(color("#FFFFA0")):accelerate(0.6):diffusealpha(0)
end;
};
InitCommand = function(self)
self:x(SCREEN_CENTER_X):y(SCREEN_CENTER_Y):scaletoclipped(SCREEN_WIDTH * 2, SCREEN_HEIGHT * 2)
end,
GainFocusCommand = function(self)
self:finishtweening():diffuse(color("#FFFFA0")):accelerate(0.6):diffusealpha(0)
end
}
38 changes: 20 additions & 18 deletions BackgroundEffects/Centered.lua
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
local Color1 = color(Var "Color1");
local Color1 = color(Var "Color1")

local t = Def.ActorFrame {
LoadActor(Var "File1") .. {
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())
local t =
Def.ActorFrame {
LoadActor(Var "File1") ..
{
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 = function(self)
self:play()
end,
LoseFocusCommand = function(self)
self:pause()
end
end,
GainFocusCommand=function(self)
self:play()
end;
LoseFocusCommand=function(self)
self:pause()
end;
};
};
}
}

return t;
return t
88 changes: 54 additions & 34 deletions BackgroundEffects/Checkerboard1File2x2.lua
Original file line number Diff line number Diff line change
@@ -1,38 +1,58 @@
local Color1 = color(Var "Color1");
local Color1 = color(Var "Color1")

local a = LoadActor(Var "File1") .. {
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())
local a =
LoadActor(Var "File1") ..
{
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 = function(self)
self:play()
end,
LoseFocusCommand = function(self)
self:pause()
end
end,
GainFocusCommand=function(self)
self:play()
end;
LoseFocusCommand=function(self)
self:pause()
end;
};
}

local t = Def.ActorFrame {
a .. { OnCommand=function(self)
self:x(scale(1,0,4,SCREEN_LEFT,SCREEN_RIGHT)):y(scale(1,0,4,SCREEN_TOP,SCREEN_BOTTOM))
end };
a .. { OnCommand=function(self)
self:x(scale(3,0,4,SCREEN_LEFT,SCREEN_RIGHT)):y(scale(1,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 };
};
local t =
Def.ActorFrame {
a ..
{
OnCommand = function(self)
self:x(scale(1, 0, 4, SCREEN_LEFT, SCREEN_RIGHT)):y(scale(1, 0, 4, SCREEN_TOP, SCREEN_BOTTOM))
end
},
a ..
{
OnCommand = function(self)
self:x(scale(3, 0, 4, SCREEN_LEFT, SCREEN_RIGHT)):y(scale(1, 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
117 changes: 68 additions & 49 deletions BackgroundEffects/Checkerboard2File2x2.lua
Original file line number Diff line number Diff line change
@@ -1,54 +1,73 @@
local Color1 = color(Var "Color1");
local Color2 = color(Var "Color2");
local Color1 = color(Var "Color1")
local Color2 = color(Var "Color2")

local a1 = LoadActor(Var "File1") .. {
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())
local a1 =
LoadActor(Var "File1") ..
{
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 = function(self)
self:play()
end,
LoseFocusCommand = function(self)
self:pause()
end
end,
GainFocusCommand=function(self)
self:play()
end;
LoseFocusCommand=function(self)
self:pause()
end;
};
local a2 = LoadActor(Var "File2") .. {
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())
}
local a2 =
LoadActor(Var "File2") ..
{
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 = function(self)
self:play()
end,
LoseFocusCommand = function(self)
self:pause()
end
end,
GainFocusCommand=function(self)
self:play()
end;
LoseFocusCommand=function(self)
self:pause()
end;
};
}

local t = Def.ActorFrame {
a1 .. { OnCommand=function(self)
self:x(scale(1,0,4,SCREEN_LEFT,SCREEN_RIGHT)):y(scale(1,0,4,SCREEN_TOP,SCREEN_BOTTOM))
end };
a2 .. { OnCommand=function(self)
self:x(scale(3,0,4,SCREEN_LEFT,SCREEN_RIGHT)):y(scale(1,0,4,SCREEN_TOP,SCREEN_BOTTOM))
end };
a2 .. { 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 };
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;
local t =
Def.ActorFrame {
a1 ..
{
OnCommand = function(self)
self:x(scale(1, 0, 4, SCREEN_LEFT, SCREEN_RIGHT)):y(scale(1, 0, 4, SCREEN_TOP, SCREEN_BOTTOM))
end
},
a2 ..
{
OnCommand = function(self)
self:x(scale(3, 0, 4, SCREEN_LEFT, SCREEN_RIGHT)):y(scale(1, 0, 4, SCREEN_TOP, SCREEN_BOTTOM))
end
},
a2 ..
{
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
},
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
Loading

0 comments on commit 3b8aff1

Please sign in to comment.