Skip to content

Commit

Permalink
Bug fixes
Browse files Browse the repository at this point in the history
Set up title screen + Remove SRPG5 logos
More asset changes
Finish up SRPG Background and add more assets
Prompt user for auto switch for SRPG6
Add Died/Felled
Add SRPG6 Menu Music
Add Sound Effects
Change event overlay background
Update SRPG6 gameover audio
Lock Style
Clean up whitespace
Change date
  • Loading branch information
teejusb committed Jun 4, 2022
1 parent dfd2dfe commit 83ac9fa
Show file tree
Hide file tree
Showing 66 changed files with 396 additions and 140 deletions.
4 changes: 2 additions & 2 deletions BGAnimations/ScreenEvaluation common/Shared/EventOverlay.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ local borderWidth = 2
local SetRpgStyle = function(eventAf)
eventAf:GetChild("MainBorder"):diffuse(RpgYellow)
eventAf:GetChild("BackgroundImage"):visible(true)
eventAf:GetChild("BackgroundColor"):diffuse(color("0,0,0,0.3"))
eventAf:GetChild("BackgroundColor"):diffuse(color("0,0,0,0.8"))
eventAf:GetChild("HeaderBorder"):diffuse(RpgYellow)
eventAf:GetChild("HeaderBackground"):diffusetopedge(color("0.275,0.510,0.298,1")):diffusebottomedge(color("0.235,0.345,0.184,1"))
eventAf:GetChild("Header"):diffuse(RpgYellow)
Expand Down Expand Up @@ -504,7 +504,7 @@ for player in ivalues(PlayerNumber) do
-- Main Black cement background
Def.Sprite {
Name="BackgroundImage",
Texture=THEME:GetPathG("", "_VisualStyles/SRPG5/Overlay-BG.png"),
Texture=THEME:GetPathG("", "_VisualStyles/SRPG6/Overlay-BG.png"),
InitCommand=function(self)
self:CropTo(paneWidth, paneHeight)
end
Expand Down
75 changes: 64 additions & 11 deletions BGAnimations/ScreenEvaluationStage in/default.lua
Original file line number Diff line number Diff line change
@@ -1,22 +1,75 @@
-- assume that all human players failed
local img = "failed text.png"
local failed = true

-- loop through all available human players
for player in ivalues(GAMESTATE:GetHumanPlayers()) do
-- if any of them passed, we want to display the "cleared" graphic
if not STATSMAN:GetCurStageStats():GetPlayerStageStats(player):GetFailed() then
img = "cleared text.png"
failed = false
end
end

return Def.ActorFrame {
Def.Quad{
InitCommand=function(self) self:FullScreen():diffuse(Color.Black) end,
OnCommand=function(self) self:sleep(0.2):linear(0.5):diffusealpha(0) end,
},
if ThemePrefs.Get("VisualStyle") ~= "SRPG6" then
local img = failed and "failed text.png" or "cleared text.png"

LoadActor(img)..{
InitCommand=function(self) self:Center():zoom(0.8):diffusealpha(0) end,
OnCommand=function(self) self:accelerate(0.4):diffusealpha(1):sleep(0.6):decelerate(0.4):diffusealpha(0) end
return Def.ActorFrame {
Def.Quad{
InitCommand=function(self) self:FullScreen():diffuse(Color.Black) end,
OnCommand=function(self) self:sleep(0.2):linear(0.5):diffusealpha(0) end,
},

LoadActor(img)..{
InitCommand=function(self) self:Center():zoom(0.8):diffusealpha(0) end,
OnCommand=function(self) self:accelerate(0.4):diffusealpha(1):sleep(0.6):decelerate(0.4):diffusealpha(0) end
}
}
else
local af = Def.ActorFrame {
InitCommand=function(self)
self:xy(_screen.cx, _screen.cy)
end,
Def.Quad{
InitCommand=function(self)
self:zoomto(_screen.w, 100):diffuse(Color.Black):diffusealpha(0):fadetop(0.2):fadebottom(0.2)
end,
OnCommand=function(self)
self:linear(0.25):diffusealpha(0.7):sleep(2):linear(0.25):diffusealpha(0)
end,
},
}
}

if failed then
af[#af+1] = Def.Sprite {
Texture=THEME:GetPathG("", "_VisualStyles/SRPG6/YouDied.png"),
InitCommand=function(self) self:zoom(0.36):diffusealpha(0) end,
OnCommand=function(self)
self:linear(0.25):diffusealpha(1):linear(2):zoom(0.38):linear(0.25):diffusealpha(0):zoom(0.39)
SOUND:PlayOnce(THEME:GetPathS("", "SRPG6-YouDied.ogg"))
end
}
else
local image = THEME:GetPathG("", "_VisualStyles/SRPG6/EnemyFelled.png")
if not GAMESTATE:IsCourseMode() and GAMESTATE:GetCurrentSong():GetLastSecond() > 16 * 60 then
image = THEME:GetPathG("", "_VisualStyles/SRPG6/GreatEnemyFelled.png")
end

af[#af+1] = Def.Sprite {
Texture=image,
InitCommand=function(self) self:zoomx(0.4):zoomy(0.38):diffusealpha(0) end,
OnCommand=function(self)
self:linear(0.25):diffusealpha(0.15):decelerate(2):zoomx(0.44):linear(0.25):diffusealpha(0)
SOUND:PlayOnce(THEME:GetPathS("", "SRPG6-EnemyFelled.ogg"))
end
}

af[#af+1] = Def.Sprite {
Texture=image,
InitCommand=function(self) self:zoom(0.38):diffusealpha(0) end,
OnCommand=function(self)
self:linear(0.25):diffusealpha(1):linear(2):linear(0.25):diffusealpha(0)
end
}
end

return af
end
Original file line number Diff line number Diff line change
Expand Up @@ -259,10 +259,10 @@ local af = Def.ActorFrame{
},
-- SRPG Logo
Def.Sprite{
Texture=THEME:GetPathG("", "_VisualStyles/SRPG5/logo_small (doubleres).png"),
Name="SRPG5Logo",
Texture=THEME:GetPathG("", "_VisualStyles/SRPG6/logo_main (doubleres).png"),
Name="SRPG6Logo",
InitCommand=function(self)
self:diffusealpha(0.4):zoom(0.32):addy(3):diffusealpha(0)
self:diffusealpha(0.4):zoom(0.05):addy(3):diffusealpha(0)
end,
LoopScoreboxCommand=function(self)
if cur_style == 1 then
Expand Down
4 changes: 2 additions & 2 deletions BGAnimations/ScreenOptionsService overlay/Support.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ local a = Def.Actor{}

a.OnCommand=function(self) SCREENMAN:GetTopScreen():AddInputCallback( InputHandler ) end
a.BeginCommand=function(self)
-- In case we switched into SRPG5 and had Rainbow Mode enabled, disable it.
if ThemePrefs.Get("VisualStyle") == "SRPG5" and ThemePrefs.Get("RainbowMode") == true then
-- In case we switched into SRPG6 and had Rainbow Mode enabled, disable it.
if ThemePrefs.Get("VisualStyle") == "SRPG6" and ThemePrefs.Get("RainbowMode") == true then
ThemePrefs.Set("RainbowMode", false)
end

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_dark bg
103 changes: 103 additions & 0 deletions BGAnimations/ScreenPromptToSetSrpgVisualStyle overlay.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
local text_width = 420

local _zoom = {
active = WideScale(1.15,1.1),
inactive = WideScale(0.55,0.5)
}
local active_index = 0
local choice_actors = {}
local af

local InputHandler = function(event)
if not event.PlayerNumber or not event.button then return false end

if event.type == "InputEventType_FirstPress" then
if event.GameButton == "MenuRight" or event.GameButton == "MenuLeft" then
-- old active choice loses focus
choice_actors[active_index]:diffuse(1,1,1,1):finishtweening():linear(0.1):zoom(_zoom.inactive)
-- update active_index
active_index = (active_index + (event.GameButton=="MenuRight" and 1 or -1)) % 2
-- new active choice gains focus
choice_actors[active_index]:diffuse(PlayerColor(PLAYER_2)):finishtweening():linear(0.1):zoom(_zoom.active)
--play sound
af:queuecommand("DirectionButton")

elseif event.GameButton == "Start" then
-- if the player wants to change to the SRPG6 style.
if active_index == 0 then
SL.SRPG6:ActivateVisualStyle()
-- Set the event so that this screen doesn't show up again.
else
ThemePrefs.Set("LastActiveEvent", "SRPG6")
end

local top_screen = SCREENMAN:GetTopScreen()
top_screen:SetNextScreenName("ScreenTitleMenu"):StartTransitioningScreen("SM_GoToNextScreen")
end
end
end

local t = Def.ActorFrame{ OnCommand=function(self) af=self; SCREENMAN:GetTopScreen():AddInputCallback(InputHandler) end }

t[#t+1] = LoadFont("Common Normal")..{
Text=ScreenString("Paragraph1"),
InitCommand=function(self)
self:xy(_screen.cx, 90):_wrapwidthpixels(text_width):diffusealpha(0):zoom(WideScale(2.15,2))
end,
OnCommand=function(self) self:linear(0.15):diffusealpha(1) end
}

t[#t+1] = LoadFont("Common Normal")..{
Text=ScreenString("Paragraph2"),
InitCommand=function(self)
self:xy(_screen.cx, 350):_wrapwidthpixels(text_width):diffusealpha(0):zoom(WideScale(1.15,1))
end,
OnCommand=function(self) self:linear(0.15):diffusealpha(1) end
}

local choices_af = Def.ActorFrame{
InitCommand=function(self) self:diffusealpha(0):y(225) end,
OnCommand=function(self) self:sleep(0.333):linear(0.15):diffusealpha(1) end,
}

choices_af[#choices_af+1] = Def.ActorFrame{
InitCommand=function(self)
self:x(_screen.cx-80):diffuse( PlayerColor(PLAYER_2) ):zoom(_zoom.active)
choice_actors[0] = self
end,

LoadFont("Common Bold")..{
Text=THEME:GetString("ScreenPromptToResetPreferencesToStock","Yes"),
InitCommand=function(self) self:zoom(1.1) end
},
LoadFont("Common Normal")..{
Text=ScreenString("YesInfo"),
InitCommand=function(self) self:y(32) end,
}
}


choices_af[#choices_af+1] = Def.ActorFrame{
InitCommand=function(self)
self:x(_screen.cx+80):zoom(_zoom.inactive)
choice_actors[1] = self
end,

LoadFont("Common Bold")..{
Text=THEME:GetString("ScreenPromptToResetPreferencesToStock","No"),
InitCommand=function(self) self:zoom(1.1) end
},
LoadFont("Common Normal")..{
Text=ScreenString("NoInfo"),
InitCommand=function(self) self:y(32) end,
}
}

t[#t+1] = choices_af

-- sound effect
t[#t+1] = LoadActor( THEME:GetPathS("ScreenSelectMaster", "change") )..{
DirectionButtonCommand=function(self) self:play() end
}

return t
29 changes: 16 additions & 13 deletions BGAnimations/ScreenSelectColor underlay.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ local ColorSelected = false
local NumHeartsToDraw = IsUsingWideScreen() and 11 or 7

local style = ThemePrefs.Get("VisualStyle")
local colorTable = (style == "SRPG5") and SL.SRPG5.Colors or SL.DecorativeColors
local colorTable = (style == "SRPG6") and SL.SRPG6.Colors or SL.DecorativeColors
local factionBmt

local text
Expand All @@ -33,10 +33,12 @@ input = function(event)
if event.GameButton == "MenuRight" then
wheel:scroll_by_amount(1)
underlay:GetChild("change_sound"):play()
underlay:playcommand("Preview")

elseif event.GameButton == "MenuLeft" then
wheel:scroll_by_amount(-1)
underlay:GetChild("change_sound"):play()
underlay:playcommand("Preview")

elseif event.GameButton == "Start" then
ColorSelected = true
Expand Down Expand Up @@ -78,8 +80,9 @@ local wheel_item_mt = {
self.heart = subself
subself:diffusealpha(0)
subself:zoom(0.25)
if style == "SRPG5" then
subself:shadowlength(3)
if style == "SRPG6" then
subself:blend("BlendMode_Add")
subself:zoom(0.35)
end
end,
OnCommand=function(subself)
Expand Down Expand Up @@ -141,9 +144,9 @@ local wheel_item_mt = {
self.container:effectmagnitude(0,0,0)
end

if style == "SRPG5" and has_focus then
if style == "SRPG6" and has_focus then
local idx = self.color_index % #colorTable + 1
factionBmt:settext(SL.SRPG5.GetFactionName(idx))
factionBmt:settext(SL.SRPG6.GetFactionName(idx))
end
end,

Expand Down Expand Up @@ -183,30 +186,30 @@ local t = Def.ActorFrame{
CaptureCommand=function(self)
SCREENMAN:GetTopScreen():AddInputCallback(input)
end,
FinishCommand=function(self)
self:GetChild("start_sound"):play()

PreviewCommand=function(self)
SL.Global.ActiveColorIndex = FindInTable(wheel:get_info_at_focus_pos(), colorTable)
SL.Global.ActiveColorIndex = (SL.Global.ActiveColorIndex % #colorTable) + 1
ThemePrefs.Set("SimplyLoveColor", SL.Global.ActiveColorIndex)
ThemePrefs.Save()

MESSAGEMAN:Broadcast("ColorSelected")

end,
FinishCommand=function(self)
self:GetChild("start_sound"):play()
SCREENMAN:GetTopScreen():RemoveInputCallback(input)
SCREENMAN:GetTopScreen():StartTransitioningScreen("SM_GoToNextScreen")
end,
wheel:create_actors( "ColorWheel", NumHeartsToDraw, wheel_item_mt, _screen.cx, _screen.cy )
}

if style == "SRPG5" then
if style == "SRPG6" then
t[#t+1] = Def.BitmapText{
Font="Common Normal",
Text="Choose your faction!",
InitCommand=function(self)
self:xy(_screen.cx, 80)
self:zoom(1.5)
self:diffuse(color(SL.SRPG5.TextColor))
self:diffuse(color(SL.SRPG6.TextColor))
self:shadowlength(0.5)
end
}
Expand All @@ -219,7 +222,7 @@ if style == "SRPG5" then

self:xy(_screen.cx, _screen.h - 110)
self:zoom(2.0)
self:diffuse(color(SL.SRPG5.TextColor))
self:diffuse(color(SL.SRPG6.TextColor))
self:shadowlength(0.5)
self:wrapwidthpixels(150)
end
Expand Down
4 changes: 2 additions & 2 deletions BGAnimations/ScreenSelectMusic background.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
if not ThemePrefs.Get("RainbowMode") and ThemePrefs.Get("VisualStyle") ~= "SRPG5" then return Def.Actor{ InitCommand=function(self) self:visible(false) end } end
if not ThemePrefs.Get("RainbowMode") and ThemePrefs.Get("VisualStyle") ~= "SRPG6" then return Def.Actor{ InitCommand=function(self) self:visible(false) end } end

return Def.ActorFrame{
Def.Quad{
Expand All @@ -9,7 +9,7 @@ return Def.ActorFrame{

Def.Quad{
InitCommand=function(self)
self:diffuse(ThemePrefs.Get("VisualStyle") == "SRPG5" and Color.Black or Color.White):Center():FullScreen()
self:diffuse(ThemePrefs.Get("VisualStyle") == "SRPG6" and Color.Black or Color.White):Center():FullScreen()
:sleep(0.6):linear(0.5):diffusealpha(0)
:queuecommand("Hide")
end,
Expand Down
Loading

0 comments on commit 83ac9fa

Please sign in to comment.