Skip to content
This repository has been archived by the owner on Nov 26, 2022. It is now read-only.

Commit

Permalink
animate logo
Browse files Browse the repository at this point in the history
  • Loading branch information
ianklatzco committed Oct 7, 2018
1 parent c4d2998 commit a54f1cb
Show file tree
Hide file tree
Showing 12 changed files with 83 additions and 11 deletions.
52 changes: 45 additions & 7 deletions BGAnimations/ScreenLogo underlay.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ if game ~= "dance" and game ~= "pump" then
game = "techno"
end

local ddrillini_letters = { 'd_1', 'd_2', 'r', 'i_1', 'l_1', 'l_2', 'i_2', 'n', 'i_3' }

-- This file renders SIMPLY XXXX on the attract loop.
-- `ScreenTitleMenu underlay` renders SIMPLY XXXX when credits have been inserted.
local t = Def.ActorFrame{
InitCommand=function(self)
self:y( image == "Hearts" and _screen.cy or _screen.cy+10 )
Expand All @@ -19,16 +23,50 @@ local t = Def.ActorFrame{
-- },

-- LoadActor(THEME:GetPathB("ScreenTitleMenu","underlay/Simply".. image .." (doubleres).png"))..{
LoadActor(THEME:GetPathB("ScreenTitleMenu","underlay/ddrillini.png"))..{ -- DDRILLIN HACKS
InitCommand=function(self)
self:x(_screen.cx+2):diffusealpha(0):zoom(0.7)
:shadowlength(1)
end,
OnCommand=cmd(linear,0.5; diffusealpha, 1)
}
-- LoadActor(THEME:GetPathB("ScreenTitleMenu","underlay/ddrillini/ddrillini.png"))..{ -- DDRILLINI HACKS
-- InitCommand=function(self)
-- self:x(_screen.cx+2):diffusealpha(0):zoom(0.7)
-- :shadowlength(1)
-- end,
-- OnCommand=cmd(linear,0.5; diffusealpha, 1)
-- }
}

-- Draw DDRIllini letters
for i=1,9 do
t[#t+1] = Def.ActorFrame {
LoadActor("ScreenTitleMenu underlay/ddrillini/" .. ddrillini_letters[i] .. ".png") .. {
-- There appear to be two different syntaxes: `function(self)` and `cmd`.
InitCommand=function(self)
self
-- positioning, sizing, shadow
-- added :Center and :y(2) relative to the other instance of
-- this code in ScreenTitleMenu
:Center() :y(2) :zoom(0.7) :shadowlength(0.75)
-- fading in
:diffusealpha(0)
end,

OnCommand=function(self)
self
-- delay each letter by a bit more each time
:sleep(i*0.1 + 0.2)
:linear(.75)
:diffusealpha(1)
end,

OffCommand=function(self)
self
-- fading out
:linear(0.5)
:shadowlength(0)
end,

}
}
end

-- Check if coins have been inserted. Display corresponding elements appropriately.
local af = Def.ActorFrame{
OnCommand=cmd(queuecommand,"Refresh"),
CoinModeChangedMessageCommand=cmd(queuecommand,"Refresh"),
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
42 changes: 38 additions & 4 deletions BGAnimations/ScreenTitleMenu underlay/default.lua
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ if image == "Spooky" then --SSHHHH dont tell anyone ;)
image = (math.random(1,100) > 11 and "Spooky" or "Spoopy")
end

local ddrillini_letters = { 'd_1', 'd_2', 'r', 'i_1', 'l_1', 'l_2', 'i_2', 'n', 'i_3' }

local af = Def.ActorFrame{
InitCommand=function(self)
--see: ./Scripts/SL_Initialize.lua
Expand Down Expand Up @@ -67,13 +69,45 @@ local af = Def.ActorFrame{
-- },

-- SIMPLY XXXXX where XXXXX = love, arrows, spooky, etc
-- ScreenLogo underlay.lua also does this.
-- LoadActor("Simply".. image .." (doubleres).png") .. {
LoadActor("ddrillini.png") .. { -- DDRILLINI hacks
InitCommand=function(self) self:x(2):zoom(0.7):shadowlength(0.75) end,
OffCommand=function(self) self:linear(0.5):shadowlength(0) end
}
-- LoadActor("ddrillini/ddrillini.png") .. {
-- InitCommand=function(self) self:x(2):zoom(0.7):shadowlength(0.75) end,
-- OffCommand=function(self) self:linear(0.5):shadowlength(0) end
-- },
}

for i=1,9 do
af[#af+1] = Def.ActorFrame {
LoadActor("ddrillini/" .. ddrillini_letters[i] .. ".png") .. {
-- There appear to be two different syntaxes: `function(self)` and `cmd`.
InitCommand=function(self)
self
-- positioning, sizing, shadow
:x(2) :zoom(0.7) :shadowlength(0.75)
-- fading in
:diffusealpha(0)
end,

OnCommand=function(self)
self
-- delay each letter by a bit more each time
:sleep(i*0.1 + 0.2)
:linear(.75)
:diffusealpha(1)
end,

OffCommand=function(self)
self
-- fading out
:linear(0.5)
:shadowlength(0)
end,

}
}
end

-- the best way to spread holiday cheer is singing loud for all to hear
if PREFSMAN:GetPreference("EasterEggs") and MonthOfYear()==11 then
af[#af+1] = Def.Sprite{
Expand Down

0 comments on commit a54f1cb

Please sign in to comment.