diff --git a/Docs/Changelog_SSCformat.txt b/Docs/Changelog_SSCformat.txt index 4aa7024de4..5015f93a49 100644 --- a/Docs/Changelog_SSCformat.txt +++ b/Docs/Changelog_SSCformat.txt @@ -9,9 +9,12 @@ change to JSON, but it is unsure if this will be done. Implement .ssc at your own risk. ________________________________________________________________________________ -[v0.57] - Wolfman2000 +[v0.58] - Wolfman2000 * Implement #LABELS tag for easier Editor work/Rock Band section mimicry. +[v0.57] - AJ +* Add #ORIGIN tag to metadata. + [v0.56] - Wolfman2000 * Implement #WARPS tag to replace negative bpm/stop gimmicks. diff --git a/Docs/Changelog_sm-ssc.txt b/Docs/Changelog_sm-ssc.txt index f89a760601..58ac43d440 100644 --- a/Docs/Changelog_sm-ssc.txt +++ b/Docs/Changelog_sm-ssc.txt @@ -30,20 +30,66 @@ sm-ssc $SM5VERSION | 2011???? jump to different labels made. [Wolfman2000] ================================================================================ -sm-ssc v1.2.5 | 201104?? +sm-ssc v1.2.5 | 20110501 -------------------------------------------------------------------------------- +20110430 +-------- +* [ScreenOptions] Renamed "ScreenOptions LineHighlight" to "ScreenOptions + LineHighlight P#", making it load per-player. [AJ] +* [OptionRow] Added Text param to RefreshMessageCommand. [AJ] +* [ScreenOptions] Added SelectMultipleMessageCommand, ChangeValueMessageCommand. [AJ] +* [UnlockEntry] Added GetCourse, GetCode Lua bindings. [AJ] +* [UnlockManager] Added UnlockRequirement_NumUnlocked enum. [AJ] +* [Song] Added Origin (#ORIGIN tag in .ssc) [AJ] +* [UnlockManager] Added GetPoints(UnlockRequirement), + GetPointsForProfile(Profile,UnlockRequirement) Lua bindings. [AJ] +* [Course] Added #SCRIPTER tag and GetScripter Lua binding. [AJ] + +20110428 +-------- +* [BeginnerHelper] Various changes: [AJ] + * Changed Player_#X/Y metrics to Player#X/Y metrics for consistency. + * Converted the background to an AutoActor. +* [BPMDisplay] Added SetFromSong Lua binding. [AJ] + +20110423 +-------- +* [CourseLoaderCRS] Fixed loading of Player's Best/Most Played courses, + probably others too. [AJ] +* [ScreenGameplaySyncMachine] Fixed a crash when entering + ScreenGameplaySyncMachine as Player 2. (Fixes issue 127) [AJ] +* [ScreenOptionsEditCourse] Fixed a crash when going to the first row. + (Fixes issue 235) [AJ] +* [SongManager] Added GetCourseGroupNames Lua binding. [AJ] + +20110422 +-------- +* [Banner] Added ScrollSpeedDivisor metric; controls the scroll speed of + Random/Roulette banners. [AJ] +* [FadingBanner] Added BannerRoulette, BannerRandom, and Banner(Custom Item Name) commands. [AJ] + +20110421 +-------- +* [ScreenSelectMusic] Changed "Percent Frame p1" to "PercentFrame P1" for consistency. [AJ] +* [LifeMeterBattery] Convert Frame to an AutoActor. [AJ] +* [ScreenEvaluation] Added RollingNumbersClass metric, allowing for the ability + to change which RollingNumbers class is loaded. [AJ] +* [ScreenGameplay] Added SongNumberFormat metric. [AJ] + +20110420 +-------- +* [CourseContentsList] Fix a crash. [AJ] + 20110416 -------- -* [PlayerOptions] Added UsingReverse() Lua binding (automatically tests - GetReverse() == 1) [AJ] +* [PlayerOptions] Added UsingReverse() Lua binding (automatically tests GetReverse() == 1) [AJ] * [PlayerState] Added GetCurrentPlayerOptions() Lua binding [AJ] 20110413 -------- * [ScreenSelectMusic] Made score frame into an AutoActor, changed the filename - from "score frame p1" to "ScoreFrame P1" for consistency with other elements. - [AJ] + from "score frame p1" to "ScoreFrame P1" for consistency with other elements. [AJ] 20110405 -------- diff --git a/Themes/_fallback/BGAnimations/ScreenCredits overlay.lua b/Themes/_fallback/BGAnimations/ScreenCredits overlay.lua new file mode 100644 index 0000000000..94591c70b1 --- /dev/null +++ b/Themes/_fallback/BGAnimations/ScreenCredits overlay.lua @@ -0,0 +1,141 @@ +local function Fooled() + local phrases = { + "hornswaggled", + "bamboozled", + "hoodwinked", + "swindled", + "duped", + "hoaxed", + "fleeced", + "shafted", + "caboodled", + "beguiled", + "finagled", + "two-timed", + "suckered", + "flimflammed" + } + return phrases[math.random(#phrases)] +end + +local ssc = { + "AJ Kelly as freem", + "Jonathan Payne (Midiman)", + "Colby Klein (shakesoda)", +} + +local sm_ssc = { + "Jason Felds (wolfman2000)", + "Alberto Ramos (Daisuke Master)", + "Jack Walstrom (FSX)", +} + +local stepmania = { + "Chris Danford", + "Glenn Maynard", + "Steve Checkoway", + -- and various other contributors +} + +local contrib = { + "Aldo Fregoso (Aldo_MX)", -- delays + "Chris Eldridge (kurisu)", -- dance-threepanel + "cerbo", + "cesarmades", -- pump/cmd* noteskins + "corec", -- various fixes + "galopin", -- piu PlayStation2 usb mat support + "gholms", -- automake 1.11 support + "juanelote", -- SongManager:GetSongGroupByIndex, JumpToNext/PrevGroup logic mods + "Kaox", -- pump/default noteskin + "NitroX72", -- pump/frame noteskin + "sy567", -- beginner helper fix + "Thai Pangsakulyanont (theDtTvB)", + "v1toko", -- x-mode from StepNXA +} + +local thanks = { + "A Pseudonymous Coder", -- support + "Bill Shillito (DM Ashura)", -- Music (not yet though) + "cpubasic13", -- testing (a lot) + "Dreamwoods", + "Infamouspat", -- oitg bro + "Jason Bolt (LightningXCE)", + "Jousway", -- Noteskins + "Matt1360", -- Automake magic + oitg bro + "Mark Cannon (vyhd)", -- oitg bro + twirl/roll + "Petriform", -- Music + "Renard", + "Ryan McKanna (Plaguefox)", +} + +local shoutout = { + "The Lua team", -- lua project lead or some shit. super nerdy but oh hell. + "Mojang", -- minecraft forever -freem + "NAKET Coder", + "Ciera Boyd", -- you bet your ass I'm putting my girlfriend in the credits + --Image(), -- we should have some logos probably to look super pro + "You showed us... your ultimate dance", + -- "Can't stop crying... buckets of tears!" +} + +local copyright = { + "StepMania is released under the terms of the MIT license.", + "If you paid for the program you've been " .. Fooled() .. ".", + "All content is the sole property of their respectful owners." +} + +local sections = { + { "the spinal shark collective (project lead)", ssc }, + { "sm-ssc Team", sm_ssc }, + { "StepMania Team", stepmania }, + { "Other Contributors", contrib }, + { "Special Thanks", thanks }, + { "Shoutouts", shoutout }, + { "Copyright", copyright }, +} + +-- To add people or sections modify the above. + +local lineOn = cmd(zoom,0.875;strokecolor,color("#444444");shadowcolor,color("#444444");shadowlength,3) +local sectionOn = cmd(diffuse,color("#88DDFF");strokecolor,color("#446688");shadowcolor,color("#446688");shadowlength,3) +local item_padding_start = 4; + +local creditScroller = Def.ActorScroller { + SecondsPerItem = 0.5; + NumItemsToDraw = 40; + TransformFunction = function( self, offset, itemIndex, numItems) + self:y(30*offset) + end; + OnCommand = cmd(scrollwithpadding,item_padding_start,15); +} + +local function AddLine( text, command ) + local text = Def.ActorFrame{ + LoadFont("Common normal")..{ + Text = text or ""; + OnCommand = command or lineOn; + } + } + table.insert( creditScroller, text ) +end + +-- Add sections with padding. +for section in ivalues(sections) do + AddLine( section[1], sectionOn ) + for name in ivalues(section[2]) do + AddLine( name ) + end + AddLine() + AddLine() +end + +creditScroller.BeginCommand=function(self) + SCREENMAN:GetTopScreen():PostScreenMessage( "SM_BeginFadingOut", (t.SecondsPerItem * (#t + item_padding_start) + 5) ); +end; + + +return Def.ActorFrame{ + creditScroller..{ + InitCommand=cmd(CenterX;y,SCREEN_BOTTOM-64), + } +}; \ No newline at end of file diff --git a/Themes/_fallback/BGAnimations/ScreenSelectProfile overlay.lua b/Themes/_fallback/BGAnimations/ScreenSelectProfile overlay.lua index 8355b85580..d8d484d7b0 100644 --- a/Themes/_fallback/BGAnimations/ScreenSelectProfile overlay.lua +++ b/Themes/_fallback/BGAnimations/ScreenSelectProfile overlay.lua @@ -1,9 +1,9 @@ function GetLocalProfiles() - local ret = {}; + local t = {}; for p = 0,PROFILEMAN:GetNumLocalProfiles()-1 do local profile=PROFILEMAN:GetLocalProfileFromIndex(p); - local item = Def.ActorFrame { + local ProfileCard = Def.ActorFrame { --[[ Def.Quad { InitCommand=cmd(zoomto,200,1;y,40/2); OnCommand=cmd(diffuse,Color('Outline');); @@ -22,10 +22,10 @@ function GetLocalProfiles() end; }; }; - table.insert( ret, item ); + t[#t+1]=ProfileCard; end; - return ret; + return t; end; function LoadCard(cColor) @@ -38,14 +38,14 @@ function LoadCard(cColor) return t end function LoadPlayerStuff(Player) - local ret = {}; + local t = {}; local pn = (Player == PLAYER_1) and 1 or 2; --[[ local t = LoadActor(THEME:GetPathB('', '_frame 3x3'), 'metal', 200, 230) .. { Name = 'BigFrame'; }; --]] - local t = Def.ActorFrame { + t[#t+1] = Def.ActorFrame { Name = 'JoinFrame'; LoadCard(Color('Orange')); --[[ Def.Quad { @@ -62,23 +62,13 @@ function LoadPlayerStuff(Player) OnCommand=cmd(diffuseshift;effectcolor1,Color('White');effectcolor2,color("0.5,0.5,0.5")); }; }; - table.insert( ret, t ); - t = Def.ActorFrame { + t[#t+1] = Def.ActorFrame { Name = 'BigFrame'; LoadCard(PlayerColor(Player)); }; - table.insert( ret, t ); - ---[[ t = LoadActor(THEME:GetPathB('', '_frame 3x3'), 'metal', 170, 20) .. { + t[#t+1] = Def.ActorFrame { Name = 'SmallFrame'; - }; --]] - t = Def.ActorFrame { - Name = 'SmallFrame'; ---[[ Def.Quad { - InitCommand=cmd(zoomto,170+4,32+4); - OnCommand=cmd(shadowlength,1); - }; --]] InitCommand=cmd(y,-2); Def.Quad { InitCommand=cmd(zoomto,200-10,40+2); @@ -97,9 +87,8 @@ function LoadPlayerStuff(Player) OnCommand=cmd(diffuse,PlayerColor(Player);glow,color("1,1,1,0.25")); }; }; - table.insert( ret, t ); - t = Def.ActorScroller{ + t[#t+1] = Def.ActorScroller{ Name = 'Scroller'; NumItemsToDraw=6; -- InitCommand=cmd(y,-230/2+20;); @@ -114,34 +103,17 @@ function LoadPlayerStuff(Player) end; children = GetLocalProfiles(); }; - table.insert( ret, t ); - t = Def.ActorFrame { + t[#t+1] = Def.ActorFrame { Name = "EffectFrame"; - --[[ Def.Quad { - InitCommand=cmd(y,-230/2;vertalign,top;zoomto,200,8;fadebottom,1); - OnCommand=cmd(diffuse,Color("Black");diffusealpha,0.25); - }; - Def.Quad { - InitCommand=cmd(y,230/2;vertalign,bottom;zoomto,200,8;fadetop,1); - OnCommand=cmd(diffuse,Color("Black");diffusealpha,0.25); - }; --]] }; - table.insert( ret, t ); ---[[ t = Def.BitmapText { - OnCommand = cmd(y,160); - Name = 'SelectedProfileText'; - Font = "Common Normal"; - Text = 'No profile'; - }; --]] - t = LoadFont("Common Normal") .. { + t[#t+1] = LoadFont("Common Normal") .. { Name = 'SelectedProfileText'; --InitCommand=cmd(y,160;shadowlength,1;diffuse,PlayerColor(Player)); InitCommand=cmd(y,160;shadowlength,1;); }; - table.insert( ret, t ); - return ret; + return t; end; function UpdateInternal3(self, Player) diff --git a/Themes/_fallback/Fonts/_korean 24px [jamo 4-stroke] 8x8.png b/Themes/_fallback/Fonts/_korean 24px [jamo 4-stroke] 8x8.png index 529df808ef..0dccd4b664 100644 Binary files a/Themes/_fallback/Fonts/_korean 24px [jamo 4-stroke] 8x8.png and b/Themes/_fallback/Fonts/_korean 24px [jamo 4-stroke] 8x8.png differ diff --git a/Themes/_fallback/Fonts/_korean 24px [jamo 4] 8x8.png b/Themes/_fallback/Fonts/_korean 24px [jamo 4] 8x8.png index d7c9138b63..374671719a 100644 Binary files a/Themes/_fallback/Fonts/_korean 24px [jamo 4] 8x8.png and b/Themes/_fallback/Fonts/_korean 24px [jamo 4] 8x8.png differ diff --git a/Themes/_fallback/Fonts/_korean 24px.ini b/Themes/_fallback/Fonts/_korean 24px.ini index 1e8c45164f..788c68ac0c 100644 --- a/Themes/_fallback/Fonts/_korean 24px.ini +++ b/Themes/_fallback/Fonts/_korean 24px.ini @@ -1,4 +1,4 @@ -[common] +[common] Top=5 Baseline=26 LineSpacing=28 @@ -42,4 +42,5 @@ line 2=큰탑터투트티펌페 line 3=폼핑할함해행헤혀 line 4=환회휘태난터까시 line 5=간너샐러버문쳐달 -line 6=깡천림홍석 +line 6=깡천림홍석악전반 +line 7=채 diff --git a/Themes/_fallback/Graphics/ScreenEvaluation Percent Frame P1.redir b/Themes/_fallback/Graphics/ScreenEvaluation PercentFrame P1.redir similarity index 100% rename from Themes/_fallback/Graphics/ScreenEvaluation Percent Frame P1.redir rename to Themes/_fallback/Graphics/ScreenEvaluation PercentFrame P1.redir diff --git a/Themes/_fallback/Graphics/ScreenEvaluation Percent Frame P2.redir b/Themes/_fallback/Graphics/ScreenEvaluation PercentFrame P2.redir similarity index 100% rename from Themes/_fallback/Graphics/ScreenEvaluation Percent Frame P2.redir rename to Themes/_fallback/Graphics/ScreenEvaluation PercentFrame P2.redir diff --git a/Themes/_fallback/Graphics/ScreenOptions LineHighlight.redir b/Themes/_fallback/Graphics/ScreenOptions LineHighlight P1.redir similarity index 100% rename from Themes/_fallback/Graphics/ScreenOptions LineHighlight.redir rename to Themes/_fallback/Graphics/ScreenOptions LineHighlight P1.redir diff --git a/Themes/_fallback/Graphics/ScreenSelectmusic score frame p1.redir b/Themes/_fallback/Graphics/ScreenOptions LineHighlight P2.redir similarity index 100% rename from Themes/_fallback/Graphics/ScreenSelectmusic score frame p1.redir rename to Themes/_fallback/Graphics/ScreenOptions LineHighlight P2.redir diff --git a/Themes/_fallback/Graphics/ScreenSelectmusic score frame p2.redir b/Themes/_fallback/Graphics/ScreenSelectMusic ScoreFrame P1.redir similarity index 100% rename from Themes/_fallback/Graphics/ScreenSelectmusic score frame p2.redir rename to Themes/_fallback/Graphics/ScreenSelectMusic ScoreFrame P1.redir diff --git a/Themes/_fallback/Graphics/ScreenSelectMusic ScoreFrame P2.redir b/Themes/_fallback/Graphics/ScreenSelectMusic ScoreFrame P2.redir new file mode 100644 index 0000000000..04b2ead777 --- /dev/null +++ b/Themes/_fallback/Graphics/ScreenSelectMusic ScoreFrame P2.redir @@ -0,0 +1 @@ +_blank \ No newline at end of file diff --git a/Themes/_fallback/Languages/en.ini b/Themes/_fallback/Languages/en.ini index 8e8bb89063..edd7dca2a4 100644 --- a/Themes/_fallback/Languages/en.ini +++ b/Themes/_fallback/Languages/en.ini @@ -435,7 +435,7 @@ SoundResampleQuality=Advanced: Select the resampling quality to use. SoundVolume=Adjust the volume level during gameplay. SoundVolumeAttract=Adjust the volume level during attract mode. Speed=Speed -Stepmania Credits=The Stepmania Development Team +StepMania Credits=The StepMania Development Team. Steps=Steps Style= Test Input=Test the responsiveness of connected joysticks. @@ -995,7 +995,7 @@ ShowSongOptions=Show Song Options ShowStats=Show Stats SmoothLines=SmoothLines SoundEffect=Sound Effect -Stepmania Credits=Stepmania Credits +StepMania Credits=StepMania Credits Center1Player=Center 1 Player Song=Song Song Group=Song Group diff --git a/Themes/_fallback/Scripts/03 CustomSpeedMods.lua b/Themes/_fallback/Scripts/03 CustomSpeedMods.lua index af8806d129..48e23bd5ed 100644 --- a/Themes/_fallback/Scripts/03 CustomSpeedMods.lua +++ b/Themes/_fallback/Scripts/03 CustomSpeedMods.lua @@ -40,7 +40,7 @@ v1.1 * Cleaned up code some, I think. ________________________________________________________________________________ anticipated future changes: -* M-Mod support (when sm-ssc imntegrates it) +* M-Mod support (when sm-ssc integrates it) ]] -- ProfileDir(slot): gets the profile dir for slot, @@ -68,7 +68,7 @@ local function ParseSpeedModFile(path) return mods else -- error; write a fallback mod file and return it - local fallbackString = "0.5x,0.75x,1x,1.75x,2x,2.25x,2.5x,C150,C300" + local fallbackString = "0.5x,1x,1.5x,2x,3x,4x,8x,C200,C400" Trace("[CustomSpeedMods]: Could not read SpeedMods; writing fallback to "..path) file:Open(path, 2) file:Write(fallbackString) diff --git a/Themes/_fallback/Scripts/03 ProductivityHelpers.lua b/Themes/_fallback/Scripts/03 ProductivityHelpers.lua index 29f1addd20..efe523ddfa 100644 --- a/Themes/_fallback/Scripts/03 ProductivityHelpers.lua +++ b/Themes/_fallback/Scripts/03 ProductivityHelpers.lua @@ -141,6 +141,10 @@ function Actor:xy(actorX,actorY) self:y(actorY) end +function PositionPerPlayer(player, p1X, p2X) + return player == PLAYER_1 and p1X or p2X +end + -- MaskSource([clearzbuffer]) -- Sets an actor up as the source for a mask. Clears zBuffer by default. function Actor:MaskSource(noclear) diff --git a/Themes/_fallback/Sounds/_Music title (loop).ogg b/Themes/_fallback/Sounds/_Music title (loop).ogg index 5fb39c16f7..b61cd34099 100644 Binary files a/Themes/_fallback/Sounds/_Music title (loop).ogg and b/Themes/_fallback/Sounds/_Music title (loop).ogg differ diff --git a/Themes/_fallback/metrics.ini b/Themes/_fallback/metrics.ini index 3f9a5e0371..a6148ab7a9 100644 --- a/Themes/_fallback/metrics.ini +++ b/Themes/_fallback/metrics.ini @@ -123,11 +123,37 @@ UnlockColor=color("1,0.5,0,1") ExtraColor=color("#ff0000") -- red [UnlockManager] -# Unlock specific things. we'll go in-depth with this one day, but it really -# isnt what sm-ssc was designed for. +# Unlock specific things. AutoLockChallengeSteps=false UnlockNames="" +# useful commands: +# require,(UnlockRequirement),(value); +# where (UnlockRequirement) is one of the UnlockRequirement enums. + +# song,(Song Name); +# sets a Song to be unlocked + +# course,(Course Name); +# sets a Course to be unlocked + +# roulette; +# Song shows up in roulette (useful with Song only) + +# mod,(modifier); +# sets a modifier to be unlocked. + +# code,(code); +# assigns a code to the unlock + +# examples: +# 1) The song "Pledge" requires 500 AP. +# Unlock1Command=song,"Pledge";require,"UnlockRequirement_ArcadePoints",500 + +# 2) The song "ABC" can be unlocked via roulette; pick an arbitrary code +# to use to store the unlock. +# Unlock2Command=song,"ABC";code,"59183751";roulette + # 03 # [ArrowEffects] @@ -195,6 +221,8 @@ BottomEdge=SCREEN_BOTTOM # Scroll stuff when you roll over it, DDR Extreme style. ScrollRandom=false ScrollRoulette=false +# Control how fast the banner scrolls. Higher numbers mean slower. +ScrollSpeedDivisor=2 [BitmapText] # The colors in the 'roulette' text. you can have alot! @@ -467,6 +495,9 @@ BannerFadeOffCommand=diffusealpha,1;stoptweening;linear,0.25;diffusealpha,0 # ? BannerResetFadeCommand=diffusealpha,1 +BannerRouletteCommand= +BannerRandomCommand= + [Gameplay] # System Direction ComboIsPerRow=ComboPerRow() @@ -1731,7 +1762,7 @@ LoadEdits=true Fallback="ScreenWithMenuElements" Class="ScreenSelectProfile" # -ScreenOnCommand=lockinput,1 +ScreenOnCommand=%function(self) self:lockinput(3); end; # NextScreen=Branch.AfterSelectProfile() PrevScreen=Branch.TitleMenu() @@ -1744,7 +1775,8 @@ CodeUp="+MenuUp" CodeUp2="+Up" CodeDown="+MenuDown" CodeDown2="+Down" -CodeStart="Start" +# Holding Start let us skip ( annoying ) +CodeStart="~Start,+Start" CodeBack="Back" CodeCenter="Center" CodeDownLeft="DownLeft" @@ -1764,16 +1796,16 @@ DefaultChoice="Single" ChoiceNames=GameCompatibleModes() # OptionOrderAuto="1:2,2:1" -ChoiceSingle="name,Single;style,single;screen,"..Branch.AfterSelectPlayMode() -ChoiceDouble="name,Double;style,double;screen,"..Branch.AfterSelectPlayMode() -ChoiceSolo="name,Solo;style,solo;screen,"..Branch.AfterSelectPlayMode() -ChoiceVersus="name,Versus;style,versus;screen,"..Branch.AfterSelectPlayMode() -ChoiceCouple="name,Couple;style,couple;screen,"..Branch.AfterSelectPlayMode() -ChoiceHalfDouble="name,HalfDouble;style,halfdouble;screen,"..Branch.AfterSelectPlayMode() -Choice5Keys="name,5Keys;style,single5;;screen,"..Branch.AfterSelectPlayMode() -Choice7Keys="name,7Keys;style,single7;screen,"..Branch.AfterSelectPlayMode() -Choice10Keys="name,10Keys;style,double10;screen,"..Branch.AfterSelectPlayMode() -Choice14Keys="name,14Keys;style,double14;screen,"..Branch.AfterSelectPlayMode() +ChoiceSingle="name,Single;style,single;text,Single;screen,"..Branch.AfterSelectPlayMode() +ChoiceDouble="name,Double;style,double;text,Double;screen,"..Branch.AfterSelectPlayMode() +ChoiceSolo="name,Solo;style,solo;text,Solo;screen,"..Branch.AfterSelectPlayMode() +ChoiceVersus="name,Versus;style,versus;text,Versus;screen,"..Branch.AfterSelectPlayMode() +ChoiceCouple="name,Couple;style,couple;text,Couple;screen,"..Branch.AfterSelectPlayMode() +ChoiceHalfDouble="name,HalfDouble;style,halfdouble;text,HalfDouble;screen,"..Branch.AfterSelectPlayMode() +Choice5Keys="name,5Keys;style,single5;text,5Keys;screen,"..Branch.AfterSelectPlayMode() +Choice7Keys="name,7Keys;style,single7;text,7Keys;screen,"..Branch.AfterSelectPlayMode() +Choice10Keys="name,10Keys;style,double10;text,10Keys;screen,"..Branch.AfterSelectPlayMode() +Choice14Keys="name,14Keys;style,double14;text,14Keys;screen,"..Branch.AfterSelectPlayMode() ChoiceKB7="name,kb7;style,single;screen,"..Branch.AfterSelectPlayMode() # PerChoiceScrollElement=false @@ -1794,7 +1826,7 @@ PrevScreen=Branch.TitleMenu() # TimerSeconds=40 # -DefaultChoice="Easy" +DefaultChoice="Normal" ChoiceNames="Normal,Rave,Extended,Oni,Endless" # PerChoiceScrollElement=false @@ -1804,13 +1836,13 @@ ShowScroller=true WrapScroller=true ShowIcon=false # -ChoiceEasy="applydefaultoptions;name,Easy;playmode,regular;difficulty,easy;screen,ScreenSelectMusic;setenv,sMode,Normal" -ChoiceNormal="applydefaultoptions;name,Normal;playmode,regular;difficulty,easy;screen,ScreenSelectMusic;setenv,sMode,Normal" -ChoiceHard="applydefaultoptions;name,Hard;playmode,regular;difficulty,hard;screen,ScreenSelectMusic;setenv,sMode,Normal" -ChoiceRave="applydefaultoptions;name,Rave;playmode,rave;screen,ScreenSelectMusic;setenv,sMode,Rave" -ChoiceExtended="applydefaultoptions;name,Extended;playmode,nonstop;screen,ScreenSelectCourse;setenv,sMode,Extended" -ChoiceOni="applydefaultoptions;name,Oni;playmode,oni;screen,ScreenSelectCourse;setenv,sMode,Oni" -ChoiceEndless="applydefaultoptions;name,Endless;playmode,endless;screen,ScreenSelectCourse;setenv,sMode,Endless" +ChoiceEasy="applydefaultoptions;name,Easy;text,Easy;playmode,regular;difficulty,easy;screen,ScreenSelectMusic;setenv,sMode,Normal" +ChoiceNormal="applydefaultoptions;name,Normal;text,Normal;playmode,regular;difficulty,easy;screen,ScreenSelectMusic;setenv,sMode,Normal" +ChoiceHard="applydefaultoptions;name,Hard;text,Hard;playmode,regular;difficulty,hard;screen,ScreenSelectMusic;setenv,sMode,Normal" +ChoiceRave="applydefaultoptions;name,Rave;text,Rave;playmode,rave;screen,ScreenSelectMusic;setenv,sMode,Rave" +ChoiceExtended="applydefaultoptions;name,Extended;text,Extended;playmode,nonstop;screen,ScreenSelectCourse;setenv,sMode,Extended" +ChoiceOni="applydefaultoptions;name,Oni;text,Oni;playmode,oni;screen,ScreenSelectCourse;setenv,sMode,Oni" +ChoiceEndless="applydefaultoptions;name,Endless;text,Endless;playmode,endless;screen,ScreenSelectCourse;setenv,sMode,Endless" [ScreenSelectCharacter] Class="ScreenSelectMaster" @@ -2052,9 +2084,12 @@ PageOnCommand= ContainerOnCommand= ContainerOffCommand= CursorOnCommand= -LineHighlightOnCommand= -LineHighlightChangeCommand= -LineHighlightChangeToExitCommand= +LineHighlightP1OnCommand= +LineHighlightP1ChangeCommand= +LineHighlightP1ChangeToExitCommand= +LineHighlightP2OnCommand= +LineHighlightP2ChangeCommand= +LineHighlightP2ChangeToExitCommand= ShowScrollBar=false ScrollBarHeight=0 ScrollBarTime=0 @@ -2442,9 +2477,13 @@ Fallback="ScreenOptionsSimple" OptionRowNormalMetricsGroup="OptionRowService" -LineHighlightOnCommand=visible,false -LineHighlightChangeCommand= -LineHighlightChangeToExitCommand= +LineHighlightP1OnCommand=visible,false +LineHighlightP1ChangeCommand= +LineHighlightP1ChangeToExitCommand= + +LineHighlightP2OnCommand=visible,false +LineHighlightP2ChangeCommand= +LineHighlightP2ChangeToExitCommand= CursorOnCommand=visible,false @@ -2455,7 +2494,7 @@ Fallback="ScreenOptionsSimpleService" NextScreen=Branch.Init() PrevScreen=Branch.Init() -LineNames="SystemDirection,KeyConfig,GameType,6,8,Reload,MoreOptions" +LineNames="SystemDirection,KeyConfig,GameType,6,8,Reload,Credits,MoreOptions" # LineNames="SystemDirection,1,2,Sync,13,3,10,11,4,12,6,5,Theme,8,9" Line1="gamecommand;screen,ScreenMapControllers;name,Key Joy Mappings" Line2="gamecommand;screen,ScreenTestInput;name,Test Input" @@ -2476,6 +2515,7 @@ LineKeyConfig="gamecommand;screen,ScreenMapControllers;name,Key Joy Mappings" LineGameType="gamecommand;screen,ScreenSelectGame;name,Select Game" LineSync="gamecommand;screen,ScreenGameplaySyncMachine;name,Calibrate Machine Sync" LineReload="gamecommand;screen,ScreenReloadSongs;name,Reload Songs" +LineCredits="gamecommand;screen,ScreenCredits;name,StepMania Credits" LineMoreOptions="gamecommand;screen,ScreenOptionsExtended;name,More Options" [ScreenOptionsExtended] @@ -2500,9 +2540,13 @@ PrevScreen="ScreenOptionsService" NextScreen="ScreenOptionsService" HelpText=Screen.String("HelpTextOptionsAndBack") -LineHighlightOnCommand=visible,false -LineHighlightChangeCommand= -LineHighlightChangeToExitCommand= +LineHighlightP1OnCommand=visible,false +LineHighlightP1ChangeCommand= +LineHighlightP1ChangeToExitCommand= + +LineHighlightP2OnCommand=visible,false +LineHighlightP2ChangeCommand= +LineHighlightP2ChangeToExitCommand= # ExplanationTogetherX=SCREEN_CENTER_X ExplanationTogetherY=SCREEN_CENTER_Y+174 @@ -3168,6 +3212,7 @@ DebugX=SCREEN_CENTER_X DebugY=SCREEN_BOTTOM-72 DebugOnCommand=zoom,0.75 # +SongNumberFormat="%d" SongNumberP1X=THEME:GetMetric(Var "LoadingScreen","PlayerP1OnePlayerOneSideX") - 60 SongNumberP1Y=SCREEN_TOP+24+7 SongNumberP1OnCommand=visible,false @@ -3219,6 +3264,7 @@ PlayerOptionsHideFailType=false MaxComboNumDigits=4 # ShowBannerArea=true +RollingNumbersClass="RollingNumbersJudgment" ShowSharedJudgmentLineLabels=false ShowJudgmentLineW1=false ShowJudgmentLineW2=false @@ -3782,7 +3828,7 @@ NextScreen="ScreenOptionsExtended" PlayerType="PlayerSyncMachine" AllowCenter1Player=false -SyncInfoOnCommand=x,SCREEN_CENTER_X+160;y,SCREEN_CENTER_Y;zoom,0;decelerate,0.5;zoom,0.6 +SyncInfoOnCommand=x,PositionPerPlayer(GAMESTATE:GetMasterPlayerNumber(),SCREEN_CENTER_X+160,SCREEN_CENTER_X-160);y,SCREEN_CENTER_Y;zoom,0;decelerate,0.5;zoom,0.6 # hidden by default: LifeP1OnCommand=visible,false @@ -4167,3 +4213,15 @@ StartScreen="ScreenTitleMenu" LightsMode="LightsMode_Demonstration" ShowCourseModifiersProbability=0 AllowAdvancedModifiers=true + +[ScreenCredits] +Class="ScreenSplash" +Fallback="ScreenSplash" +AllowStartToSkip=true +NextScreen=Branch.TitleMenu() +PrevScreen=Branch.TitleMenu() +TimerSeconds=40 +TimerStealth=true +ForceTimer=true +TimerMetricsGroup="MenuTimerNoSound" +TimerOnCommand=visible,false \ No newline at end of file diff --git a/Themes/default/BGAnimations/ScreenCredits background/_grid.png b/Themes/default/BGAnimations/ScreenCredits background/_grid.png new file mode 100644 index 0000000000..c2e0a20e6d Binary files /dev/null and b/Themes/default/BGAnimations/ScreenCredits background/_grid.png differ diff --git a/Themes/default/BGAnimations/ScreenCredits background/_space.png b/Themes/default/BGAnimations/ScreenCredits background/_space.png new file mode 100644 index 0000000000..c95cb4c478 Binary files /dev/null and b/Themes/default/BGAnimations/ScreenCredits background/_space.png differ diff --git a/Themes/default/BGAnimations/ScreenCredits background/default.lua b/Themes/default/BGAnimations/ScreenCredits background/default.lua new file mode 100644 index 0000000000..47e9237339 --- /dev/null +++ b/Themes/default/BGAnimations/ScreenCredits background/default.lua @@ -0,0 +1,20 @@ +local scrolltime = 95; + +local t = Def.ActorFrame { + InitCommand=cmd(Center); + LoadActor("_space")..{ + InitCommand=cmd(y,-SCREEN_HEIGHT*1.5;fadebottom,0.125;fadetop,0.25); + OnCommand=cmd(linear,scrolltime;addy,SCREEN_HEIGHT*1.5825); + }; + Def.Quad { + InitCommand=cmd(scaletoclipped,SCREEN_WIDTH+1,SCREEN_HEIGHT); + OnCommand=cmd(diffusecolor,color("#FFCB05");diffusebottomedge,color("#F0BA00");diffusealpha,0.45); + }; + LoadActor("_grid")..{ + InitCommand=cmd(customtexturerect,0,0,(SCREEN_WIDTH+1)/4,SCREEN_HEIGHT/4;SetTextureFiltering,true); + OnCommand=cmd(zoomto,SCREEN_WIDTH+1,SCREEN_HEIGHT;diffuse,Color("Black");diffuseshift;effecttiming,(1/8)*4,0,(7/8)*4,0;effectclock,'beatnooffset'; + effectcolor2,Color("Black");effectcolor1,Colors.Alpha(Color("Black"),0.45);fadebottom,0.25;fadetop,0.25;croptop,48/480;cropbottom,48/480;diffusealpha,0.345); + }; +}; + +return t \ No newline at end of file diff --git a/Themes/default/BGAnimations/ScreenCredits overlay.lua b/Themes/default/BGAnimations/ScreenCredits overlay.lua new file mode 100644 index 0000000000..49bef89970 --- /dev/null +++ b/Themes/default/BGAnimations/ScreenCredits overlay.lua @@ -0,0 +1,144 @@ +local function Fooled() + local phrases = { + "hornswaggled", + "bamboozled", + "hoodwinked", + "swindled", + "duped", + "hoaxed", + "fleeced", + "shafted", + "caboodled", + "beguiled", + "finagled", + "two-timed", + "suckered", + "flimflammed" + } + return phrases[math.random(#phrases)] +end + +local ssc = { + "AJ Kelly as freem", + "Jonathan Payne (Midiman)", + "Colby Klein (shakesoda)", +} + +local sm_ssc = { + "Jason Felds (wolfman2000)", + "Alberto Ramos (Daisuke Master)", + "Jack Walstrom (FSX)", +} + +local stepmania = { + "Chris Danford", + "Glenn Maynard", + "Steve Checkoway", + -- and various other contributors +} + +local contrib = { + "Aldo Fregoso (Aldo_MX)", -- delays + "Chris Eldridge (kurisu)", -- dance-threepanel + "cerbo", + "cesarmades", -- pump/cmd* noteskins + "corec", -- various fixes + "galopin", -- piu PlayStation2 usb mat support + "gholms", -- automake 1.11 support + "juanelote", -- SongManager:GetSongGroupByIndex, JumpToNext/PrevGroup logic mods + "Kaox", -- pump/default noteskin + "NitroX72", -- pump/frame noteskin + "sy567", -- beginner helper fix + "Thai Pangsakulyanont (theDtTvB)", + "v1toko", -- x-mode from StepNXA +} + +local thanks = { + "A Pseudonymous Coder", -- support + "Bill Shillito (DM Ashura)", -- Music (not yet though) + "cpubasic13", -- testing (a lot) + "Dreamwoods", + "Infamouspat", -- oitg bro + "Jason Bolt (LightningXCE)", + "Jousway", -- Noteskins + "Matt1360", -- Automake magic + oitg bro + "Mark Cannon (vyhd)", -- oitg bro + twirl/roll + "Petriform", -- Music + "Renard", + "Ryan McKanna (Plaguefox)", +} + +local shoutout = { + "The Lua team", -- lua project lead or some shit. super nerdy but oh hell. + "Mojang", -- minecraft forever -freem + "NAKET Coder", + "Ciera Boyd", -- you bet your ass I'm putting my girlfriend in the credits + --Image(), -- we should have some logos probably to look super pro + "You showed us... your ultimate dance", + -- "Can't stop crying... buckets of tears!" +} + +local copyright = { + "StepMania is released under the terms of the MIT license.", + "If you paid for the program you've been " .. Fooled() .. ".", + "All content is the sole property of their respectful owners." +} + +local sections = { + { "the spinal shark collective (project lead)", ssc }, + { "sm-ssc Team", sm_ssc }, + { "StepMania Team", stepmania }, + { "Other Contributors", contrib }, + { "Special Thanks", thanks }, + { "Shoutouts", shoutout }, + { "Copyright", copyright }, +} + +-- To add people or sections modify the above. + +local lineOn = cmd(zoom,0.875;strokecolor,color("#444444");shadowcolor,color("#444444");shadowlength,3) +local sectionOn = cmd(diffuse,color("#88DDFF");strokecolor,color("#446688");shadowcolor,color("#446688");shadowlength,3) +local item_padding_start = 4; + +local creditScroller = Def.ActorScroller { + SecondsPerItem = 1.25; + NumItemsToDraw = 40; + TransformFunction = function( self, offset, itemIndex, numItems) + self:y(30*offset) + end; + OnCommand = cmd(scrollwithpadding,item_padding_start,15); +} + +local function AddLine( text, command ) + local text = Def.ActorFrame{ + LoadFont("Common normal")..{ + Text = text or ""; + OnCommand = command or lineOn; + } + } + table.insert( creditScroller, text ) +end + +-- Add sections with padding. +for section in ivalues(sections) do + AddLine( section[1], sectionOn ) + for name in ivalues(section[2]) do + AddLine( name ) + end + AddLine() + AddLine() +end + +creditScroller.BeginCommand=function(self) + SCREENMAN:GetTopScreen():PostScreenMessage( "SM_BeginFadingOut", (t.SecondsPerItem * (#t + item_padding_start) + 5) ); +end; + + +return Def.ActorFrame{ + creditScroller..{ + InitCommand=cmd(CenterX;y,SCREEN_BOTTOM-64), + }, + LoadActor(THEME:GetPathB("ScreenWithMenuElements","background/_bg top"))..{ + InitCommand=cmd(Center), + }, +}; \ No newline at end of file diff --git a/Themes/default/metrics.ini b/Themes/default/metrics.ini index 36fb28f584..71636f5de9 100644 --- a/Themes/default/metrics.ini +++ b/Themes/default/metrics.ini @@ -2109,3 +2109,6 @@ ShowBPMDisplay=false [ScreenJukeboxMenu] [ScreenJukebox] + +[ScreenCredits] +TimerSeconds=96 \ No newline at end of file diff --git a/Themes/themekit/BGAnimations/ScreenSelectMusic decorations.lua b/Themes/themekit/BGAnimations/ScreenSelectMusic decorations.lua new file mode 100644 index 0000000000..f5a37674cd --- /dev/null +++ b/Themes/themekit/BGAnimations/ScreenSelectMusic decorations.lua @@ -0,0 +1,47 @@ +-- Loads up a slew of objects to load into the screen, like how 3.9 does. +-- I prefer to keep these optional, incase another screen wants to hide +-- these elements. +local t = LoadFallbackB(); + +-- Legacy StepMania 4 Function +local function CreateStepDisplay(pn) + local function set(self, player) + self:SetFromGameState( player ); + end + + local t = Def.StepsDisplay { + InitCommand=cmd(Load,"StepsDisplay",GAMESTATE:GetPlayerState(pn);); + }; + + if pn == PLAYER_1 then + t.CurrentStepsP1ChangedMessageCommand=function(self) set(self, pn); end; + t.CurrentTrailP1ChangedMessageCommand=function(self) set(self, pn); end; + else + t.CurrentStepsP2ChangedMessageCommand=function(self) set(self, pn); end; + t.CurrentTrailP2ChangedMessageCommand=function(self) set(self, pn); end; + end + + return t; +end + + + +for pn in ivalues(PlayerNumber) do + local MetricsName = "StepsDisplay" .. PlayerNumberToString(pn); + t[#t+1] = CreateStepDisplay(pn) .. { + InitCommand=function(self) self:player(pn); self:name(MetricsName); ActorUtil.LoadAllCommandsAndSetXY(self,Var "LoadingScreen"); end; + PlayerJoinedMessageCommand=function(self, params) + if params.Player == pn then + self:visible(true); + (cmd(zoom,0;bounceend,0.3;zoom,1))(self); + end; + end; + PlayerUnjoinedMessageCommand=function(self, params) + if params.Player == pn then + self:visible(true); + (cmd(bouncebegin,0.3;zoom,0))(self); + end; + end; + }; +end +return t \ No newline at end of file diff --git a/Themes/themekit/BGAnimations/ScreenWithMenuElements decorations.lua b/Themes/themekit/BGAnimations/ScreenWithMenuElements decorations - Copy.lua similarity index 100% rename from Themes/themekit/BGAnimations/ScreenWithMenuElements decorations.lua rename to Themes/themekit/BGAnimations/ScreenWithMenuElements decorations - Copy.lua diff --git a/Themes/themekit/Graphics/MusicWheel highlight.png b/Themes/themekit/Graphics/MusicWheel highlight.png new file mode 100644 index 0000000000..d147847ad7 Binary files /dev/null and b/Themes/themekit/Graphics/MusicWheel highlight.png differ diff --git a/Themes/themekit/Graphics/MusicWheelItem SectionCollapsed ColorPart.png b/Themes/themekit/Graphics/MusicWheelItem SectionCollapsed ColorPart.png new file mode 100644 index 0000000000..46c195c686 Binary files /dev/null and b/Themes/themekit/Graphics/MusicWheelItem SectionCollapsed ColorPart.png differ diff --git a/Themes/themekit/Graphics/MusicWheelItem SectionExpanded ColorPart.png b/Themes/themekit/Graphics/MusicWheelItem SectionExpanded ColorPart.png new file mode 100644 index 0000000000..c169cf6f07 Binary files /dev/null and b/Themes/themekit/Graphics/MusicWheelItem SectionExpanded ColorPart.png differ diff --git a/Themes/themekit/Graphics/MusicWheelItem Song NormalPart.png b/Themes/themekit/Graphics/MusicWheelItem Song NormalPart.png new file mode 100644 index 0000000000..88c8ae0756 Binary files /dev/null and b/Themes/themekit/Graphics/MusicWheelItem Song NormalPart.png differ diff --git a/Themes/themekit/Graphics/PlayMode Endless.png b/Themes/themekit/Graphics/PlayMode Endless.png new file mode 100644 index 0000000000..e215c9d8ea Binary files /dev/null and b/Themes/themekit/Graphics/PlayMode Endless.png differ diff --git a/Themes/themekit/Graphics/PlayMode Extended.png b/Themes/themekit/Graphics/PlayMode Extended.png new file mode 100644 index 0000000000..249e938335 Binary files /dev/null and b/Themes/themekit/Graphics/PlayMode Extended.png differ diff --git a/Themes/themekit/Graphics/PlayMode Normal.png b/Themes/themekit/Graphics/PlayMode Normal.png new file mode 100644 index 0000000000..f88293648b Binary files /dev/null and b/Themes/themekit/Graphics/PlayMode Normal.png differ diff --git a/Themes/themekit/Graphics/PlayMode Oni.png b/Themes/themekit/Graphics/PlayMode Oni.png new file mode 100644 index 0000000000..b51d7a3354 Binary files /dev/null and b/Themes/themekit/Graphics/PlayMode Oni.png differ diff --git a/Themes/themekit/Graphics/PlayMode Rave.png b/Themes/themekit/Graphics/PlayMode Rave.png new file mode 100644 index 0000000000..ca7d14b753 Binary files /dev/null and b/Themes/themekit/Graphics/PlayMode Rave.png differ diff --git a/Themes/themekit/Graphics/ScreenSelectPlayMode Icon ChoiceEndless.png b/Themes/themekit/Graphics/ScreenSelectPlayMode Icon ChoiceEndless.png new file mode 100644 index 0000000000..aa5165a584 Binary files /dev/null and b/Themes/themekit/Graphics/ScreenSelectPlayMode Icon ChoiceEndless.png differ diff --git a/Themes/themekit/Graphics/ScreenSelectPlayMode Icon ChoiceExtended.png b/Themes/themekit/Graphics/ScreenSelectPlayMode Icon ChoiceExtended.png new file mode 100644 index 0000000000..1000ebbdbb Binary files /dev/null and b/Themes/themekit/Graphics/ScreenSelectPlayMode Icon ChoiceExtended.png differ diff --git a/Themes/themekit/Graphics/ScreenSelectPlayMode Icon ChoiceHard.png b/Themes/themekit/Graphics/ScreenSelectPlayMode Icon ChoiceHard.png new file mode 100644 index 0000000000..936a81dfea Binary files /dev/null and b/Themes/themekit/Graphics/ScreenSelectPlayMode Icon ChoiceHard.png differ diff --git a/Themes/themekit/Graphics/ScreenSelectPlayMode Icon ChoiceNormal.png b/Themes/themekit/Graphics/ScreenSelectPlayMode Icon ChoiceNormal.png new file mode 100644 index 0000000000..6c26d3f468 Binary files /dev/null and b/Themes/themekit/Graphics/ScreenSelectPlayMode Icon ChoiceNormal.png differ diff --git a/Themes/themekit/Graphics/ScreenSelectPlayMode Icon ChoiceOni.png b/Themes/themekit/Graphics/ScreenSelectPlayMode Icon ChoiceOni.png new file mode 100644 index 0000000000..8e41efa3ce Binary files /dev/null and b/Themes/themekit/Graphics/ScreenSelectPlayMode Icon ChoiceOni.png differ diff --git a/Themes/themekit/Graphics/ScreenSelectPlayMode Icon ChoiceRave.png b/Themes/themekit/Graphics/ScreenSelectPlayMode Icon ChoiceRave.png new file mode 100644 index 0000000000..fe8a7293c6 Binary files /dev/null and b/Themes/themekit/Graphics/ScreenSelectPlayMode Icon ChoiceRave.png differ diff --git a/Themes/themekit/Graphics/ScreenSelectPlayMode scroll.lua b/Themes/themekit/Graphics/ScreenSelectPlayMode scroll.lua new file mode 100644 index 0000000000..5c75c954e7 --- /dev/null +++ b/Themes/themekit/Graphics/ScreenSelectPlayMode scroll.lua @@ -0,0 +1,12 @@ +local gc = Var("GameCommand"); + +local t = Def.ActorFrame { + LoadActor("PlayMode " .. gc:GetText() ); +}; + +t[1].OnCommand=Screen.Metric("ScrollerItemOnCommand"); +t[1].GainFocusCommand=Screen.Metric("ScrollerItemGainFocusCommand"); +t[1].LoseFocusCommand=Screen.Metric("ScrollerItemLoseFocusCommand"); +t[1].OffFocusedCommand=Screen.Metric("ScrollerItemOffFocusedCommand"); +t[1].OffUnfocusedCommand=Screen.Metric("ScrollerItemOffUnfocusedCommand"); +return t; \ No newline at end of file diff --git a/Themes/themekit/Graphics/ScreenSelectStyle Icon Choice10Keys.png b/Themes/themekit/Graphics/ScreenSelectStyle Icon Choice10Keys.png new file mode 100644 index 0000000000..87255c9ebd Binary files /dev/null and b/Themes/themekit/Graphics/ScreenSelectStyle Icon Choice10Keys.png differ diff --git a/Themes/themekit/Graphics/ScreenSelectStyle Icon Choice14Keys.png b/Themes/themekit/Graphics/ScreenSelectStyle Icon Choice14Keys.png new file mode 100644 index 0000000000..2aeb544a25 Binary files /dev/null and b/Themes/themekit/Graphics/ScreenSelectStyle Icon Choice14Keys.png differ diff --git a/Themes/themekit/Graphics/ScreenSelectStyle Icon Choice5Keys.png b/Themes/themekit/Graphics/ScreenSelectStyle Icon Choice5Keys.png new file mode 100644 index 0000000000..bb0cec0b02 Binary files /dev/null and b/Themes/themekit/Graphics/ScreenSelectStyle Icon Choice5Keys.png differ diff --git a/Themes/themekit/Graphics/ScreenSelectStyle Icon Choice7Keys.png b/Themes/themekit/Graphics/ScreenSelectStyle Icon Choice7Keys.png new file mode 100644 index 0000000000..3a7b5cebef Binary files /dev/null and b/Themes/themekit/Graphics/ScreenSelectStyle Icon Choice7Keys.png differ diff --git a/Themes/themekit/Graphics/ScreenSelectStyle Icon ChoiceCouple.png b/Themes/themekit/Graphics/ScreenSelectStyle Icon ChoiceCouple.png new file mode 100644 index 0000000000..ee241ff74c Binary files /dev/null and b/Themes/themekit/Graphics/ScreenSelectStyle Icon ChoiceCouple.png differ diff --git a/Themes/themekit/Graphics/ScreenSelectStyle Icon ChoiceDouble.png b/Themes/themekit/Graphics/ScreenSelectStyle Icon ChoiceDouble.png new file mode 100644 index 0000000000..419db18572 Binary files /dev/null and b/Themes/themekit/Graphics/ScreenSelectStyle Icon ChoiceDouble.png differ diff --git a/Themes/themekit/Graphics/ScreenSelectStyle Icon ChoiceHalfDouble.png b/Themes/themekit/Graphics/ScreenSelectStyle Icon ChoiceHalfDouble.png new file mode 100644 index 0000000000..c13642b105 Binary files /dev/null and b/Themes/themekit/Graphics/ScreenSelectStyle Icon ChoiceHalfDouble.png differ diff --git a/Themes/themekit/Graphics/ScreenSelectStyle Icon ChoiceKB7.png b/Themes/themekit/Graphics/ScreenSelectStyle Icon ChoiceKB7.png new file mode 100644 index 0000000000..c6785ff8c6 Binary files /dev/null and b/Themes/themekit/Graphics/ScreenSelectStyle Icon ChoiceKB7.png differ diff --git a/Themes/themekit/Graphics/ScreenSelectStyle Icon ChoiceSingle.png b/Themes/themekit/Graphics/ScreenSelectStyle Icon ChoiceSingle.png new file mode 100644 index 0000000000..5f667a4c1e Binary files /dev/null and b/Themes/themekit/Graphics/ScreenSelectStyle Icon ChoiceSingle.png differ diff --git a/Themes/themekit/Graphics/ScreenSelectStyle Icon ChoiceSolo.png b/Themes/themekit/Graphics/ScreenSelectStyle Icon ChoiceSolo.png new file mode 100644 index 0000000000..05e289ba54 Binary files /dev/null and b/Themes/themekit/Graphics/ScreenSelectStyle Icon ChoiceSolo.png differ diff --git a/Themes/themekit/Graphics/ScreenSelectStyle Icon ChoiceVersus.png b/Themes/themekit/Graphics/ScreenSelectStyle Icon ChoiceVersus.png new file mode 100644 index 0000000000..23f90f887f Binary files /dev/null and b/Themes/themekit/Graphics/ScreenSelectStyle Icon ChoiceVersus.png differ diff --git a/Themes/themekit/Graphics/ScreenSelectStyle scroll.lua b/Themes/themekit/Graphics/ScreenSelectStyle scroll.lua new file mode 100644 index 0000000000..f839f3f013 --- /dev/null +++ b/Themes/themekit/Graphics/ScreenSelectStyle scroll.lua @@ -0,0 +1,12 @@ +local gc = Var("GameCommand"); + +local t = Def.ActorFrame { + LoadActor("Style " .. gc:GetText() ); +}; +-- This works. +t[1].OnCommand=Screen.Metric("ScrollerItemOnCommand"); +t[1].GainFocusCommand=Screen.Metric("ScrollerItemGainFocusCommand"); +t[1].LoseFocusCommand=Screen.Metric("ScrollerItemLoseFocusCommand"); +t[1].OffFocusedCommand=Screen.Metric("ScrollerItemOffFocusedCommand"); +t[1].OffUnfocusedCommand=Screen.Metric("ScrollerItemOffUnfocusedCommand"); +return t; \ No newline at end of file diff --git a/Themes/themekit/Graphics/StepsDisplay frame.png b/Themes/themekit/Graphics/StepsDisplay frame.png new file mode 100644 index 0000000000..a1994514fc Binary files /dev/null and b/Themes/themekit/Graphics/StepsDisplay frame.png differ diff --git a/Themes/themekit/Graphics/Style 10Keys.png b/Themes/themekit/Graphics/Style 10Keys.png new file mode 100644 index 0000000000..3c2fd3b864 Binary files /dev/null and b/Themes/themekit/Graphics/Style 10Keys.png differ diff --git a/Themes/themekit/Graphics/Style 14Keys.png b/Themes/themekit/Graphics/Style 14Keys.png new file mode 100644 index 0000000000..768440b941 Binary files /dev/null and b/Themes/themekit/Graphics/Style 14Keys.png differ diff --git a/Themes/themekit/Graphics/Style 5Keys.png b/Themes/themekit/Graphics/Style 5Keys.png new file mode 100644 index 0000000000..f57e8101f8 Binary files /dev/null and b/Themes/themekit/Graphics/Style 5Keys.png differ diff --git a/Themes/themekit/Graphics/Style 7Keys.png b/Themes/themekit/Graphics/Style 7Keys.png new file mode 100644 index 0000000000..eb012a02de Binary files /dev/null and b/Themes/themekit/Graphics/Style 7Keys.png differ diff --git a/Themes/themekit/Graphics/Style Couple.png b/Themes/themekit/Graphics/Style Couple.png new file mode 100644 index 0000000000..ba78b81d4d Binary files /dev/null and b/Themes/themekit/Graphics/Style Couple.png differ diff --git a/Themes/themekit/Graphics/Style Double.png b/Themes/themekit/Graphics/Style Double.png new file mode 100644 index 0000000000..58617e146e Binary files /dev/null and b/Themes/themekit/Graphics/Style Double.png differ diff --git a/Themes/themekit/Graphics/Style HalfDouble.png b/Themes/themekit/Graphics/Style HalfDouble.png new file mode 100644 index 0000000000..8b77fe2fe8 Binary files /dev/null and b/Themes/themekit/Graphics/Style HalfDouble.png differ diff --git a/Themes/themekit/Graphics/Style KB7.png b/Themes/themekit/Graphics/Style KB7.png new file mode 100644 index 0000000000..473c29b075 Binary files /dev/null and b/Themes/themekit/Graphics/Style KB7.png differ diff --git a/Themes/themekit/Graphics/Style Single.png b/Themes/themekit/Graphics/Style Single.png new file mode 100644 index 0000000000..d1bfa058b3 Binary files /dev/null and b/Themes/themekit/Graphics/Style Single.png differ diff --git a/Themes/themekit/Graphics/Style Solo.png b/Themes/themekit/Graphics/Style Solo.png new file mode 100644 index 0000000000..b9807126df Binary files /dev/null and b/Themes/themekit/Graphics/Style Solo.png differ diff --git a/Themes/themekit/Graphics/Style Versus.png b/Themes/themekit/Graphics/Style Versus.png new file mode 100644 index 0000000000..0f16c82637 Binary files /dev/null and b/Themes/themekit/Graphics/Style Versus.png differ diff --git a/Themes/themekit/Scripts/02 TextBanner.lua b/Themes/themekit/Scripts/02 TextBanner.lua new file mode 100644 index 0000000000..b70206dea8 --- /dev/null +++ b/Themes/themekit/Scripts/02 TextBanner.lua @@ -0,0 +1,19 @@ +local mainMaxWidth = 228; -- zoom w/subtitle is 0.75 (multiply by 1.25) +local subMaxWidth = 420; -- zoom is 0.6 (multiply zoom,1 value by 1.4) +local artistMaxWidth = 300/0.8; + +function TextBannerAfterSet(self,param) + local Title=self:GetChild("Title"); + local Subtitle=self:GetChild("Subtitle"); + local Artist=self:GetChild("Artist"); + if Subtitle:GetText() == "" then + (cmd(maxwidth,mainMaxWidth;y,-8;zoom,1;))(Title); + (cmd(visible,false))(Subtitle); + (cmd(zoom,0.66;maxwidth,artistMaxWidth;y,8))(Artist); + else + -- subtitle below + (cmd(maxwidth,mainMaxWidth*1.25;y,-11;zoom,0.75;))(Title); + (cmd(visible,true;zoom,0.6;y,0;maxwidth,subMaxWidth))(Subtitle); + (cmd(zoom,0.6;maxwidth,artistMaxWidth;y,10))(Artist); + end +end \ No newline at end of file diff --git a/Themes/themekit/Sounds/_Music title (loop).ogg b/Themes/themekit/Sounds/_Music title (loop).ogg index d1ff738f07..d2b3d47cd7 100644 Binary files a/Themes/themekit/Sounds/_Music title (loop).ogg and b/Themes/themekit/Sounds/_Music title (loop).ogg differ diff --git a/Themes/themekit/Sounds/_Music title (loop).sm b/Themes/themekit/Sounds/_Music title (loop).sm index 960f7c3767..9fabf3b246 100644 --- a/Themes/themekit/Sounds/_Music title (loop).sm +++ b/Themes/themekit/Sounds/_Music title (loop).sm @@ -1,5 +1,5 @@ -#TITLE:Break The Sabbath; +#TITLE:Technotris; #OFFSET:0.000; -#BPMS:0.000=140.000; +#BPMS:0.000=148.000; #STOPS:; diff --git a/Themes/themekit/_Resources/MusicWheelItem.psd b/Themes/themekit/_Resources/MusicWheelItem.psd new file mode 100644 index 0000000000..0d98cf39bc Binary files /dev/null and b/Themes/themekit/_Resources/MusicWheelItem.psd differ diff --git a/Themes/themekit/_Resources/ScreenSelectStyle Icon.psd b/Themes/themekit/_Resources/ScreenSelectStyle Icon.psd new file mode 100644 index 0000000000..9721d6d12d Binary files /dev/null and b/Themes/themekit/_Resources/ScreenSelectStyle Icon.psd differ diff --git a/Themes/themekit/_Resources/ScreenSelectStyle Scroll.psd b/Themes/themekit/_Resources/ScreenSelectStyle Scroll.psd new file mode 100644 index 0000000000..924ff48912 Binary files /dev/null and b/Themes/themekit/_Resources/ScreenSelectStyle Scroll.psd differ diff --git a/Themes/themekit/_Resources/StepsDisplay items.psd b/Themes/themekit/_Resources/StepsDisplay items.psd new file mode 100644 index 0000000000..e22284be56 Binary files /dev/null and b/Themes/themekit/_Resources/StepsDisplay items.psd differ diff --git a/Themes/themekit/metrics.ini b/Themes/themekit/metrics.ini index 71ad351513..3489476bb4 100644 --- a/Themes/themekit/metrics.ini +++ b/Themes/themekit/metrics.ini @@ -3,43 +3,46 @@ FallbackTheme=_fallback [ScreenSystemLayer] CreditsP1X=SCREEN_CENTER_X-256-32 CreditsP1Y=SCREEN_BOTTOM-4 -CreditsP1OnCommand=horizalign,left;vertalign,bottom;zoom,0.675;shadowlength,1;diffusebottomedge,PlayerColor(PLAYER_1); +# ColorLightTone & ColorDarkTone make colors 50% brighter or darker, where ColorMidTone makes them 25% darker +# ColorLightTone( color here ); example: ColorLightTone( PlayerColor(PLAYER_1) ); +CreditsP1OnCommand=horizalign,left;vertalign,bottom;zoom,0.675;shadowlength,1;diffusebottomedge,ColorLightTone( PlayerColor(PLAYER_1) );strokecolor,Color("Black"); # CreditsP2X=SCREEN_CENTER_X+256+32 CreditsP2Y=SCREEN_BOTTOM-4 -CreditsP2OnCommand=horizalign,right;vertalign,bottom;zoom,0.675;shadowlength,1;diffusebottomedge,PlayerColor(PLAYER_2); +CreditsP2OnCommand=horizalign,right;vertalign,bottom;zoom,0.675;shadowlength,1;diffusebottomedge,ColorLightTone( PlayerColor(PLAYER_2) );strokecolor,Color("Black"); [ScreenWithMenuElements] # Header ( Top of Screen ) ShowHeader=true HeaderX=SCREEN_CENTER_X HeaderY=SCREEN_TOP -HeaderOnCommand=vertalign,top +HeaderOnCommand=vertalign,top;addy,-64;decelerate,0.35;addy,64; HeaderOffCommand= # Text Header ( Text displayed at top of screen on top of header ) ShowTextHeader=true TextHeaderX=SCREEN_CENTER_X-256-32 TextHeaderY=SCREEN_TOP+32+8-1.5 -TextHeaderOnCommand=horizalign,left;vertalign,bottom; +TextHeaderOnCommand=horizalign,left;vertalign,bottom;skewx,-0.125;shadowlength,1;diffusealpha,0;addx,-16;sleep,0.35;decelerate,0.125;diffusealpha,1;addx,16; TextHeaderOffCommand= # Footer ( Bottom Of Screen ) ShowFooter=true FooterX=SCREEN_CENTER_X FooterY=SCREEN_BOTTOM -FooterOnCommand=vertalign,bottom +FooterOnCommand=vertalign,bottom;addy,48;decelerate,0.35;addy,-48 FooterOffCommand= # Menu Timer TimerX=SCREEN_CENTER_X+256+32 TimerY=SCREEN_TOP+32+8-1.5 +# We animate the timer in [MenuTimer], since diffusion doesn't work here. TimerOnCommand= TimerOffCommand= [MenuTimer] -# Text -Text1OnCommand=stopeffect;stoptweening;horizalign,right;vertalign,bottom; +# Text associated with the menutimer +Text1OnCommand=stopeffect;stoptweening;horizalign,right;vertalign,bottom;shadowlength,1;diffusealpha,0;x,16;sleep,0.35;decelerate,0.125;diffusealpha,1;x,0; Text1FormatFunction=function(fSeconds) \ return string.format("%0.1f", fSeconds); \ end FrameOnCommand= -# Warning +# Warning10Command=diffuseshift;effectperiod,1;effectcolor2,Color("Red");effectcolor1,color("0.5,0,0,1"); [ScreenTitleMenu] # Don't show these @@ -66,9 +69,274 @@ ScrollerItemLoseFocusCommand=stoptweening;linear,0.125;zoom,0.75; ScrollerItemOffFocusedCommand=sleep,0.35;linear,0.15;zoom,0; # OffUnfocused is for items that were not selected and the screen is exiting. ScrollerItemOffUnfocusedCommand=linear,0.15;zoom,0; +[ScreenSelectStyle] +# Let items do OffCommand +WaitForChildrenBeforeTweening=true +# Explanatory +ShowIcon=true +ShowScroller=true +# Force theme to load image for each style type, instead of a lua file +PerChoiceIconElement=true +PerChoiceScrollElement=false +# +ScrollerX=SCREEN_CENTER_X +ScrollerY=SCREEN_CENTER_Y-16 +# Menu Items [ThemeKit Only] +ScrollerItemOnCommand= +ScrollerItemOnFocusedCommand=visible,true +# GainFocus is when an item is selected. +ScrollerItemGainFocusCommand=visible,true;finishtweening;zoom,1.25;linear,0.125;zoom,1; +# LoseFocus is when an item is deselected. +ScrollerItemLoseFocusCommand=finishtweening;visible,false; +# OffFocused is for items you have selected and the screen is exiting. +ScrollerItemOffFocusedCommand=sleep,0.35;linear,0.15;zoom,0; +# OffUnfocused is for items that were not selected and the screen is exiting. +ScrollerItemOffUnfocusedCommand=linear,0.15;zoom,0; +# Need this so that icons animate from metrics +UseIconMetrics=true +# Positions of all da 'cons +IconChoiceSingleX=SCREEN_CENTER_X-256 +IconChoiceSingleY=SCREEN_BOTTOM-64 +IconChoiceSingleOnCommand=zoom,0;bounceend,0.35;zoom,1 +IconChoiceSingleGainFocusCommand=stoptweening;zoom,1;pulse;effectmagnitude,1,1.125,1; +IconChoiceSingleLoseFocusCommand=stoptweening;stopeffect;zoom,0.75; +IconChoiceSingleEnabledCommand=diffuse,color("1,1,1,1"); +IconChoiceSingleDisabledCommand=diffuse,color("1,0,0,0.5"); +IconChoiceSingleOffUnfocusedCommand=linear,0.1175;zoomx,0 +IconChoiceSingleOffFocusedCommand=stopeffect;sleep,0.1175;linear,0.25;zoom,1.1;sleep,0.25;decelerate,0.3;zoom,0; +# +IconChoiceSoloX=SCREEN_CENTER_X-128 +IconChoiceSoloY=SCREEN_BOTTOM-64 +IconChoiceSoloOnCommand=zoom,0;bounceend,0.35;zoom,1 +IconChoiceSoloGainFocusCommand=stoptweening;zoom,1;pulse;effectmagnitude,1,1.125,1; +IconChoiceSoloLoseFocusCommand=stoptweening;stopeffect;zoom,0.75; +IconChoiceSoloEnabledCommand=diffuse,color("1,1,1,1"); +IconChoiceSoloDisabledCommand=diffuse,color("1,0,0,0.5"); +IconChoiceSoloOffUnfocusedCommand=linear,0.1175;zoomx,0 +IconChoiceSoloOffFocusedCommand=stopeffect;sleep,0.1175;linear,0.25;zoom,1.1;sleep,0.25;decelerate,0.3;zoom,0; +IconChoiceHalfDoubleX=SCREEN_CENTER_X-128 +IconChoiceHalfDoubleY=SCREEN_BOTTOM-64 +IconChoiceHalfDoubleOnCommand=zoom,0;bounceend,0.35;zoom,1 +IconChoiceHalfDoubleGainFocusCommand=stoptweening;zoom,1;pulse;effectmagnitude,1,1.125,1; +IconChoiceHalfDoubleLoseFocusCommand=stoptweening;stopeffect;zoom,0.75; +IconChoiceHalfDoubleEnabledCommand=diffuse,color("1,1,1,1"); +IconChoiceHalfDoubleDisabledCommand=diffuse,color("1,0,0,0.5"); +IconChoiceHalfDoubleOffUnfocusedCommand=linear,0.1175;zoomx,0 +IconChoiceHalfDoubleOffFocusedCommand=stopeffect;sleep,0.1175;linear,0.25;zoom,1.1;sleep,0.25;decelerate,0.3;zoom,0; +# +IconChoiceDoubleX=SCREEN_CENTER_X +IconChoiceDoubleY=SCREEN_BOTTOM-64 +IconChoiceDoubleOnCommand=zoom,0;bounceend,0.35;zoom,1 +IconChoiceDoubleGainFocusCommand=stoptweening;zoom,1;pulse;effectmagnitude,1,1.125,1; +IconChoiceDoubleLoseFocusCommand=stoptweening;stopeffect;zoom,0.75; +IconChoiceDoubleEnabledCommand=diffuse,color("1,1,1,1"); +IconChoiceDoubleDisabledCommand=diffuse,color("1,0,0,0.5"); +IconChoiceDoubleOffUnfocusedCommand=linear,0.1175;zoomx,0 +IconChoiceDoubleOffFocusedCommand=stopeffect;sleep,0.1175;linear,0.25;zoom,1.1;sleep,0.25;decelerate,0.3;zoom,0; +# +IconChoiceVersusX=SCREEN_CENTER_X+128 +IconChoiceVersusY=SCREEN_BOTTOM-64 +IconChoiceVersusOnCommand=zoom,0;bounceend,0.35;zoom,1 +IconChoiceVersusGainFocusCommand=stoptweening;zoom,1;pulse;effectmagnitude,1,1.125,1; +IconChoiceVersusLoseFocusCommand=stoptweening;stopeffect;zoom,0.75; +IconChoiceVersusEnabledCommand=diffuse,color("1,1,1,1"); +IconChoiceVersusDisabledCommand=diffuse,color("1,0,0,0.5"); +IconChoiceVersusOffUnfocusedCommand=linear,0.1175;zoomx,0 +IconChoiceVersusOffFocusedCommand=stopeffect;sleep,0.1175;linear,0.25;zoom,1.1;sleep,0.25;decelerate,0.3;zoom,0; +# +IconChoiceCoupleX=SCREEN_CENTER_X+256 +IconChoiceCoupleY=SCREEN_BOTTOM-64 +IconChoiceCoupleOnCommand=zoom,0;bounceend,0.35;zoom,1 +IconChoiceCoupleGainFocusCommand=stoptweening;zoom,1;pulse;effectmagnitude,1,1.125,1; +IconChoiceCoupleLoseFocusCommand=stoptweening;stopeffect;zoom,0.75; +IconChoiceCoupleEnabledCommand=diffuse,color("1,1,1,1"); +IconChoiceCoupleDisabledCommand=diffuse,color("1,0,0,0.5"); +IconChoiceCoupleOffUnfocusedCommand=linear,0.1175;zoomx,0 +IconChoiceCoupleOffFocusedCommand=stopeffect;sleep,0.1175;linear,0.25;zoom,1.1;sleep,0.25;decelerate,0.3;zoom,0; +# +IconChoiceKB7X=SCREEN_CENTER_X +IconChoiceKB7Y=SCREEN_BOTTOM-64 +IconChoiceKB7OnCommand=zoom,0;bounceend,0.35;zoom,1 +IconChoiceKB7GainFocusCommand=stoptweening;zoom,1;pulse;effectmagnitude,1,1.125,1; +IconChoiceKB7LoseFocusCommand=stoptweening;stopeffect;zoom,0.75; +IconChoiceKB7EnabledCommand=diffuse,color("1,1,1,1"); +IconChoiceKB7DisabledCommand=diffuse,color("1,0,0,0.5"); +IconChoiceKB7OffUnfocusedCommand=linear,0.1175;zoomx,0 +IconChoiceKB7OffFocusedCommand=stopeffect;sleep,0.1175;linear,0.25;zoom,1.1;sleep,0.25;decelerate,0.3;zoom,0; +# +IconChoice5KeysX=SCREEN_CENTER_X-128 +IconChoice5KeysY=SCREEN_BOTTOM-64 +IconChoice5KeysOnCommand=zoom,0;bounceend,0.35;zoom,1 +IconChoice5KeysGainFocusCommand=stoptweening;zoom,1;pulse;effectmagnitude,1,1.125,1; +IconChoice5KeysLoseFocusCommand=stoptweening;stopeffect;zoom,0.75; +IconChoice5KeysEnabledCommand=diffuse,color("1,1,1,1"); +IconChoice5KeysDisabledCommand=diffuse,color("1,0,0,0.5"); +IconChoice5KeysOffUnfocusedCommand=linear,0.1175;zoomx,0 +IconChoice5KeysOffFocusedCommand=stopeffect;sleep,0.1175;linear,0.25;zoom,1.1;sleep,0.25;decelerate,0.3;zoom,0; +# +IconChoice7KeysX=SCREEN_CENTER_X-64 +IconChoice7KeysY=SCREEN_BOTTOM-64 +IconChoice7KeysOnCommand=zoom,0;bounceend,0.35;zoom,1 +IconChoice7KeysGainFocusCommand=stoptweening;zoom,1;pulse;effectmagnitude,1,1.125,1; +IconChoice7KeysLoseFocusCommand=stoptweening;stopeffect;zoom,0.75; +IconChoice7KeysEnabledCommand=diffuse,color("1,1,1,1"); +IconChoice7KeysDisabledCommand=diffuse,color("1,0,0,0.5"); +IconChoice7KeysOffUnfocusedCommand=linear,0.1175;zoomx,0 +IconChoice7KeysOffFocusedCommand=stopeffect;sleep,0.1175;linear,0.25;zoom,1.1;sleep,0.25;decelerate,0.3;zoom,0; +# +IconChoice10KeysX=SCREEN_CENTER_X+64 +IconChoice10KeysY=SCREEN_BOTTOM-64 +IconChoice10KeysOnCommand=zoom,0;bounceend,0.35;zoom,1 +IconChoice10KeysGainFocusCommand=stoptweening;zoom,1;pulse;effectmagnitude,1,1.125,1; +IconChoice10KeysLoseFocusCommand=stoptweening;stopeffect;zoom,0.75; +IconChoice10KeysEnabledCommand=diffuse,color("1,1,1,1"); +IconChoice10KeysDisabledCommand=diffuse,color("1,0,0,0.5"); +IconChoice10KeysOffUnfocusedCommand=linear,0.1175;zoomx,0 +IconChoice10KeysOffFocusedCommand=stopeffect;sleep,0.1175;linear,0.25;zoom,1.1;sleep,0.25;decelerate,0.3;zoom,0; +# +IconChoice14KeysX=SCREEN_CENTER_X+128 +IconChoice14KeysY=SCREEN_BOTTOM-64 +IconChoice14KeysOnCommand=zoom,0;bounceend,0.35;zoom,1 +IconChoice14KeysGainFocusCommand=stoptweening;zoom,1;pulse;effectmagnitude,1,1.125,1; +IconChoice14KeysLoseFocusCommand=stoptweening;stopeffect;zoom,0.75; +IconChoice14KeysEnabledCommand=diffuse,color("1,1,1,1"); +IconChoice14KeysDisabledCommand=diffuse,color("1,0,0,0.5"); +IconChoice14KeysOffUnfocusedCommand=linear,0.1175;zoomx,0 +IconChoice14KeysOffFocusedCommand=stopeffect;sleep,0.1175;linear,0.25;zoom,1.1;sleep,0.25;decelerate,0.3;zoom,0; +[ScreenSelectPlayMode] +# Let items do OffCommand +WaitForChildrenBeforeTweening=true +# Explanatory +ShowIcon=true +ShowScroller=true +# Force theme to load image for each style type, instead of a lua file +PerChoiceIconElement=true +PerChoiceScrollElement=false +# +ScrollerX=SCREEN_CENTER_X +ScrollerY=SCREEN_CENTER_Y-16 +# Menu Items [ThemeKit Only] +ScrollerItemOnCommand= +ScrollerItemOnFocusedCommand=visible,true +# GainFocus is when an item is selected. +ScrollerItemGainFocusCommand=visible,true;finishtweening;zoom,1.25;linear,0.125;zoom,1; +# LoseFocus is when an item is deselected. +ScrollerItemLoseFocusCommand=finishtweening;visible,false; +# OffFocused is for items you have selected and the screen is exiting. +ScrollerItemOffFocusedCommand=sleep,0.35;linear,0.15;zoom,0; +# OffUnfocused is for items that were not selected and the screen is exiting. +ScrollerItemOffUnfocusedCommand=linear,0.15;zoom,0; +# Need this so that icons animate from metrics +UseIconMetrics=true +# Positions of all da 'cons +IconChoiceNormalX=SCREEN_CENTER_X-256 +IconChoiceNormalY=SCREEN_BOTTOM-64 +IconChoiceNormalOnCommand=zoom,0;bounceend,0.35;zoom,1 +IconChoiceNormalGainFocusCommand=stoptweening;zoom,1;pulse;effectmagnitude,1,1.125,1; +IconChoiceNormalLoseFocusCommand=stoptweening;stopeffect;zoom,0.75; +IconChoiceNormalEnabledCommand=diffuse,color("1,1,1,1"); +IconChoiceNormalDisabledCommand=diffuse,color("1,0,0,0.5"); +IconChoiceNormalOffUnfocusedCommand=linear,0.1175;zoomx,0 +IconChoiceNormalOffFocusedCommand=stopeffect;sleep,0 +# +IconChoiceRaveX=SCREEN_CENTER_X-128 +IconChoiceRaveY=SCREEN_BOTTOM-64 +IconChoiceRaveOnCommand=zoom,0;bounceend,0.35;zoom,1 +IconChoiceRaveGainFocusCommand=stoptweening;zoom,1;pulse;effectmagnitude,1,1.125,1; +IconChoiceRaveLoseFocusCommand=stoptweening;stopeffect;zoom,0.75; +IconChoiceRaveEnabledCommand=diffuse,color("1,1,1,1"); +IconChoiceRaveDisabledCommand=diffuse,color("1,0,0,0.5"); +IconChoiceRaveOffUnfocusedCommand=linear,0.1175;zoomx,0 +IconChoiceRaveOffFocusedCommand=stopeffect;sleep,0 +# +IconChoiceExtendedX=SCREEN_CENTER_X +IconChoiceExtendedY=SCREEN_BOTTOM-64 +IconChoiceExtendedOnCommand=zoom,0;bounceend,0.35;zoom,1 +IconChoiceExtendedGainFocusCommand=stoptweening;zoom,1;pulse;effectmagnitude,1,1.125,1; +IconChoiceExtendedLoseFocusCommand=stoptweening;stopeffect;zoom,0.75; +IconChoiceExtendedEnabledCommand=diffuse,color("1,1,1,1"); +IconChoiceExtendedDisabledCommand=diffuse,color("1,0,0,0.5"); +IconChoiceExtendedOffUnfocusedCommand=linear,0.1175;zoomx,0 +IconChoiceExtendedOffFocusedCommand=stopeffect;sleep,0 +# +IconChoiceOniX=SCREEN_CENTER_X+128 +IconChoiceOniY=SCREEN_BOTTOM-64 +IconChoiceOniOnCommand=zoom,0;bounceend,0.35;zoom,1 +IconChoiceOniGainFocusCommand=stoptweening;zoom,1;pulse;effectmagnitude,1,1.125,1; +IconChoiceOniLoseFocusCommand=stoptweening;stopeffect;zoom,0.75; +IconChoiceOniEnabledCommand=diffuse,color("1,1,1,1"); +IconChoiceOniDisabledCommand=diffuse,color("1,0,0,0.5"); +IconChoiceOniOffUnfocusedCommand=linear,0.1175;zoomx,0 +IconChoiceOniOffFocusedCommand=stopeffect;sleep,0 +# +IconChoiceEndlessX=SCREEN_CENTER_X+256 +IconChoiceEndlessY=SCREEN_BOTTOM-64 +IconChoiceEndlessOnCommand=zoom,0;bounceend,0.35;zoom,1 +IconChoiceEndlessGainFocusCommand=stoptweening;zoom,1;pulse;effectmagnitude,1,1.125,1; +IconChoiceEndlessLoseFocusCommand=stoptweening;stopeffect;zoom,0.75; +IconChoiceEndlessEnabledCommand=diffuse,color("1,1,1,1"); +IconChoiceEndlessDisabledCommand=diffuse,color("1,0,0,0.5"); +IconChoiceEndlessOffUnfocusedCommand=linear,0.1175;zoomx,0 +IconChoiceEndlessOffFocusedCommand=stopeffect;sleep,0 [ScreenSelectMusic] +ShowStepsDisplayP1=true +StepsDisplayP1X=SCREEN_CENTER_X-192 +StepsDisplayP1Y=SCREEN_BOTTOM-64 +StepsDisplayP1OnCommand= +StepsDisplayP1OffCommand= +# +ShowStepsDisplayP2=true +StepsDisplayP2X=SCREEN_CENTER_X-192 +StepsDisplayP2Y=SCREEN_BOTTOM-64 +StepsDisplayP2OnCommand= +StepsDisplayP2OffCommand= +# MusicWheelX=SCREEN_RIGHT-128-18 MusicWheelOnCommand=draworder,-1 [MusicWheel] +HighlightOnCommand=blend,Blend.Add;diffuseramp;effectclock,'beatnooffset' +# ItemTransformFunction=function(self,offsetFromCenter,itemIndex,numItems) self:x( (1-math.cos(offsetFromCenter/math.pi))*0 ); self:y( offsetFromCenter*48 ); end -NumWheelItems=13 \ No newline at end of file +NumWheelItems=13 +[MusicWheelItem] +# Move Song all the way to the left, since it is left aligned +# see [TextBanner] +SongNameX=-124 +# +SectionExpandedX=-126 +SectionExpandedY=0 +SectionExpandedOnCommand=horizalign,left;maxwidth,252;shadowlength,1 +# +SectionCollapsedX=-126 +SectionCollapsedY=0 +SectionCollapsedOnCommand=horizalign,left;maxwidth,252;shadowlength,1 +# +SectionCountX=108 +SectionCountY=16 +SectionCountOnCommand=zoom,0.5;shadowlength,1; +[TextBanner] +TitleOnCommand=horizalign,left;shadowlength,1; +SubtitleOnCommand=horizalign,left;shadowlength,1; +ArtistOnCommand=horizalign,left;shadowlength,1;skewx,-0.2 +ArtistPrependString="" +[StepsDisplay] +ShowMeter=true +ZeroMeterString="?" +MeterX=92 +MeterY=0 +MeterOnCommand=horizalign,right;zoom,0.75;shadowlength,1 +MeterSetCommand=%function(self,param) \ + if param.CustomDifficulty then \ + self:diffuse(CustomDifficultyToLightColor(param.CustomDifficulty)); \ + end \ +end; +# +ShowDescription=true +DescriptionX=-92 +DescriptionY=0 +DescriptionOnCommand=horizalign,left;zoom,0.75;shadowlength,1;uppercase,true; +DescriptionSetCommand=%function(self,param) \ + if param.CustomDifficulty then \ + self:diffuse(CustomDifficultyToLightColor(param.CustomDifficulty)); \ + end \ +end; \ No newline at end of file diff --git a/src/BPMDisplay.cpp b/src/BPMDisplay.cpp index bd26e2c099..5bdcbd66f4 100644 --- a/src/BPMDisplay.cpp +++ b/src/BPMDisplay.cpp @@ -294,11 +294,22 @@ class LunaBPMDisplay: public Luna { public: static int SetFromGameState( T* p, lua_State *L ) { p->SetFromGameState(); return 0; } + static int SetFromSong( T* p, lua_State *L ) + { + if( lua_isnil(L,1) ) { p->NoBPM(); } + else + { + const Song* pSong = Luna::check( L, 1, true ); + p->SetBpmFromSong(pSong); + } + return 0; + } static int GetText( T* p, lua_State *L ) { lua_pushstring( L, p->GetText() ); return 1; } LunaBPMDisplay() { ADD_METHOD( SetFromGameState ); + ADD_METHOD( SetFromSong ); ADD_METHOD( GetText ); } }; diff --git a/src/Banner.cpp b/src/Banner.cpp index 3f8b7a8b09..b8d115e206 100644 --- a/src/Banner.cpp +++ b/src/Banner.cpp @@ -17,6 +17,9 @@ REGISTER_ACTOR_CLASS( Banner ); ThemeMetric SCROLL_RANDOM ("Banner","ScrollRandom"); ThemeMetric SCROLL_ROULETTE ("Banner","ScrollRoulette"); +//ThemeMetric SCROLL_MODE ("Banner","ScrollMode"); +//ThemeMetric SCROLL_SORT_ORDER ("Banner","ScrollSortOrder"); +ThemeMetric SCROLL_SPEED_DIVISOR ("Banner","ScrollSpeedDivisor"); Banner::Banner() { @@ -79,7 +82,7 @@ void Banner::Update( float fDeltaTime ) if( m_bScrolling ) { - m_fPercentScrolling += fDeltaTime/2; + m_fPercentScrolling += fDeltaTime/(float)SCROLL_SPEED_DIVISOR; m_fPercentScrolling -= (int)m_fPercentScrolling; const RectF *pTextureRect = GetCurrentTextureCoordRect(); diff --git a/src/BeginnerHelper.cpp b/src/BeginnerHelper.cpp index f696ad108c..3bf23107df 100644 --- a/src/BeginnerHelper.cpp +++ b/src/BeginnerHelper.cpp @@ -12,12 +12,12 @@ #include "ScreenDimensions.h" #include "ThemeManager.h" -// "PLAYER_X" offsets are relative to the pad.. ex: Setting this to 10, and the HELPER to 300, will put the dancer at 310 -#define PLAYER_X( px ) THEME->GetMetricF("BeginnerHelper",ssprintf("Player%d_X",px+1)) +// "PLAYER_X" offsets are relative to the pad. ex: Setting this to 10, and the HELPER to 300, will put the dancer at 310 +#define PLAYER_X( px ) THEME->GetMetricF("BeginnerHelper",ssprintf("Player%dX",px+1)) #define PLAYER_ANGLE THEME->GetMetricF("BeginnerHelper","PlayerAngle") #define DANCEPAD_ANGLE THEME->GetMetricF("BeginnerHelper","DancePadAngle") -// "HELPER" offsets effect the pad/dancer as a whole.. Their relative Y cooridinates are hard-coded for eachother. +// "HELPER" offsets effect the pad/dancer as a whole. Their relative Y cooridinates are hard-coded for each other. #define HELPER_X THEME->GetMetricF("BeginnerHelper","HelperX") #define HELPER_Y THEME->GetMetricF("BeginnerHelper","HelperY") @@ -75,6 +75,108 @@ BeginnerHelper::~BeginnerHelper() delete m_pDancePad; } +bool BeginnerHelper::Init( int iDancePadType ) +{ + ASSERT( !m_bInitialized ); + if( !CanUse() ) + return false; + + // If no players were successfully added, bail. + { + bool bAnyLoaded = false; + for( int pn=0; pnGetPathG("BeginnerHelper","background") ); + this->AddChild( m_sBackground ); + //m_sBackground.SetXY( 1, 1 ); + + m_sFlash.Load( THEME->GetPathG("BeginnerHelper","flash") ); + m_sFlash.SetXY( 0, 0 ); + m_sFlash.SetDiffuseAlpha( 0 ); + } + + // Load StepCircle graphics + for( int lsc=0; lscGetPathG("BeginnerHelper","stepcircle") ); + m_sStepCircle[lsc][lsce].SetZoom( 0 ); // Hide until needed. + this->AddChild(&m_sStepCircle[lsc][lsce]); + + // Set StepCircle coordinates + switch( lsce ) + { + case 0: m_sStepCircle[lsc][lsce].SetXY((HELPER_X+PLAYER_X(lsc)-80),HELPER_Y); break; // Left + case 1: m_sStepCircle[lsc][lsce].SetXY((HELPER_X+PLAYER_X(lsc)+80),HELPER_Y); break; // Right + case 2: m_sStepCircle[lsc][lsce].SetXY((HELPER_X+PLAYER_X(lsc)),(HELPER_Y-60)); break; // Up + case 3: m_sStepCircle[lsc][lsce].SetXY((HELPER_X+PLAYER_X(lsc)),(HELPER_Y+60)); break; // Down + } + } + } + + SHOW_DANCE_PAD.Load( "BeginnerHelper","ShowDancePad" ); + // Load the DancePad + if( SHOW_DANCE_PAD ) + { + switch( iDancePadType ) + { + case 0: break; // No pad + case 1: m_pDancePad->LoadMilkshapeAscii(GetAnimPath(ANIM_DANCE_PAD)); break; + case 2: m_pDancePad->LoadMilkshapeAscii(GetAnimPath(ANIM_DANCE_PADS)); break; + } + + m_pDancePad->SetHorizAlign( align_left ); // xxx: hardcoded -aj + m_pDancePad->SetRotationX( DANCEPAD_ANGLE ); + m_pDancePad->SetX( HELPER_X ); + m_pDancePad->SetY( HELPER_Y ); + // xxx: hardcoded -aj + m_pDancePad->SetZoom( 23 ); // Pad should always be 3 units bigger in zoom than the dancer. + } + + for( int pl=0; plm_pCurCharacters[pl]; + ASSERT( Character != NULL ); + + // Load textures + m_pDancer[pl]->SetHorizAlign( align_left ); + m_pDancer[pl]->LoadMilkshapeAscii( Character->GetModelPath() ); + + // Load needed animations + m_pDancer[pl]->LoadMilkshapeAsciiBones( "Step-LEFT", GetAnimPath(ANIM_LEFT) ); + m_pDancer[pl]->LoadMilkshapeAsciiBones( "Step-DOWN", GetAnimPath(ANIM_DOWN) ); + m_pDancer[pl]->LoadMilkshapeAsciiBones( "Step-UP", GetAnimPath(ANIM_UP) ); + m_pDancer[pl]->LoadMilkshapeAsciiBones( "Step-RIGHT", GetAnimPath(ANIM_RIGHT) ); + m_pDancer[pl]->LoadMilkshapeAsciiBones( "Step-JUMPLR", GetAnimPath(ANIM_JUMPLR) ); + m_pDancer[pl]->LoadMilkshapeAsciiBones( "rest", Character->GetRestAnimationPath() ); + m_pDancer[pl]->SetDefaultAnimation( "rest" ); // Stay bouncing after a step has finished animating + m_pDancer[pl]->PlayAnimation( "rest" ); + m_pDancer[pl]->SetRotationX( PLAYER_ANGLE ); + m_pDancer[pl]->SetX( HELPER_X+PLAYER_X(pl) ); + m_pDancer[pl]->SetY( HELPER_Y+10 ); + m_pDancer[pl]->SetZoom( 20 ); + m_pDancer[pl]->SetCullMode( CULL_NONE ); // many of the models floating around have the vertex order flipped + } + + m_bInitialized = true; + return true; +} + void BeginnerHelper::ShowStepCircle( PlayerNumber pn, int CSTEP ) { int isc=0; // Save OR issues within array boundries.. it's worth the extra few bytes of memory. @@ -120,102 +222,6 @@ bool BeginnerHelper::CanUse() return GAMESTATE->GetCurrentStyle()->m_bCanUseBeginnerHelper; } -bool BeginnerHelper::Initialize( int iDancePadType ) -{ - ASSERT( !m_bInitialized ); - if( !CanUse() ) - return false; - - // If no players were successfully added, bail. - { - bool bAnyLoaded = false; - for( int pn=0; pnGetPathG("BeginnerHelper","background") ); - this->AddChild( &m_sBackground ); - m_sBackground.SetXY( 1, 1 ); - m_sFlash.Load( THEME->GetPathG("BeginnerHelper","flash") ); - m_sFlash.SetXY( 0, 0 ); - m_sFlash.SetDiffuseAlpha( 0 ); - } - - // Load StepCircle graphics - for( int lsc=0; lscGetPathG("BeginnerHelper","stepcircle") ); - m_sStepCircle[lsc][lsce].SetZoom( 0 ); // Hide until needed. - this->AddChild(&m_sStepCircle[lsc][lsce]); - - // Set coordinates of StepCircle - switch( lsce ) - { - case 0: m_sStepCircle[lsc][lsce].SetXY((HELPER_X+PLAYER_X(lsc)-80),HELPER_Y); break; // Left - case 1: m_sStepCircle[lsc][lsce].SetXY((HELPER_X+PLAYER_X(lsc)+80),HELPER_Y); break; // Right - case 2: m_sStepCircle[lsc][lsce].SetXY((HELPER_X+PLAYER_X(lsc)),(HELPER_Y-60)); break; // Up - case 3: m_sStepCircle[lsc][lsce].SetXY((HELPER_X+PLAYER_X(lsc)),(HELPER_Y+60)); break; // Down - } - } - } - - // Load the DancePad - switch( iDancePadType ) - { - case 0: break; // No pad - case 1: m_pDancePad->LoadMilkshapeAscii(GetAnimPath(ANIM_DANCE_PAD)); break; - case 2: m_pDancePad->LoadMilkshapeAscii(GetAnimPath(ANIM_DANCE_PADS)); break; - } - - m_pDancePad->SetHorizAlign( align_left ); - m_pDancePad->SetRotationX( DANCEPAD_ANGLE ); - m_pDancePad->SetX( HELPER_X ); - m_pDancePad->SetY( HELPER_Y ); - m_pDancePad->SetZoom( 23 ); // Pad should always be 3 units bigger in zoom than the dancer. - - for( int pl=0; plm_pCurCharacters[pl]; - ASSERT( Character != NULL ); - - // Load textures - m_pDancer[pl]->SetHorizAlign( align_left ); - m_pDancer[pl]->LoadMilkshapeAscii( Character->GetModelPath() ); - - // Load needed animations - m_pDancer[pl]->LoadMilkshapeAsciiBones( "Step-LEFT", GetAnimPath(ANIM_LEFT) ); - m_pDancer[pl]->LoadMilkshapeAsciiBones( "Step-DOWN", GetAnimPath(ANIM_DOWN) ); - m_pDancer[pl]->LoadMilkshapeAsciiBones( "Step-UP", GetAnimPath(ANIM_UP) ); - m_pDancer[pl]->LoadMilkshapeAsciiBones( "Step-RIGHT", GetAnimPath(ANIM_RIGHT) ); - m_pDancer[pl]->LoadMilkshapeAsciiBones( "Step-JUMPLR", GetAnimPath(ANIM_JUMPLR) ); - m_pDancer[pl]->LoadMilkshapeAsciiBones( "rest", Character->GetRestAnimationPath() ); - m_pDancer[pl]->SetDefaultAnimation( "rest" ); // Stay bouncing after a step has finished animating - m_pDancer[pl]->PlayAnimation( "rest" ); - m_pDancer[pl]->SetRotationX( PLAYER_ANGLE ); - m_pDancer[pl]->SetX( HELPER_X+PLAYER_X(pl) ); - m_pDancer[pl]->SetY( HELPER_Y+10 ); - m_pDancer[pl]->SetZoom( 20 ); - m_pDancer[pl]->SetCullMode( CULL_NONE ); // many of the models floating around have the vertex order flipped - } - - m_bInitialized = true; - return true; -} - void BeginnerHelper::DrawPrimitives() { // If not initialized, don't bother with this @@ -226,32 +232,37 @@ void BeginnerHelper::DrawPrimitives() m_sFlash.Draw(); bool DrawCelShaded = PREFSMAN->m_bCelShadeModels; - if( DrawCelShaded ) - m_pDancePad->DrawCelShaded(); - else + // Draw Pad + if( SHOW_DANCE_PAD ) { - DISPLAY->SetLighting( true ); - DISPLAY->SetLightDirectional( - 0, - RageColor(0.5,0.5,0.5,1), - RageColor(1,1,1,1), - RageColor(0,0,0,1), - RageVector3(0, 0, 1) ); + if( DrawCelShaded ) + m_pDancePad->DrawCelShaded(); + else + { + DISPLAY->SetLighting( true ); + DISPLAY->SetLightDirectional( + 0, + RageColor(0.5,0.5,0.5,1), + RageColor(1,1,1,1), + RageColor(0,0,0,1), + RageVector3(0, 0, 1) ); - m_pDancePad->Draw(); - DISPLAY->ClearZBuffer(); // So character doesn't step "into" the dance pad. - DISPLAY->SetLightOff( 0 ); - DISPLAY->SetLighting( false ); + m_pDancePad->Draw(); + DISPLAY->ClearZBuffer(); // So character doesn't step "into" the dance pad. + DISPLAY->SetLightOff( 0 ); + DISPLAY->SetLighting( false ); + } } - + // Draw StepCircles for(int scd=0; scdIsHumanPlayer(pn) ) m_pDancer[pn]->DrawCelShaded(); } @@ -265,7 +276,7 @@ void BeginnerHelper::DrawPrimitives() RageColor(0,0,0,1), RageVector3(0, 0, 1) ); - FOREACH_PlayerNumber( pn ) // Draw each dancer + FOREACH_PlayerNumber( pn ) if( GAMESTATE->IsHumanPlayer(pn) ) m_pDancer[pn]->Draw(); @@ -314,7 +325,7 @@ void BeginnerHelper::Step( PlayerNumber pn, int CSTEP ) m_pDancer[pn]->SetRotationY( 0 ); break; } - + m_sFlash.StopEffect(); m_sFlash.StopTweening(); m_sFlash.Sleep( GAMESTATE->m_fCurBPS/16 ); @@ -337,22 +348,22 @@ void BeginnerHelper::Update( float fDeltaTime ) // Check if there are any notes at all on this row.. If not, save scanning. if( !m_NoteData[pn].IsThereATapAtRow(iRow) ) continue; - + // Find all steps on this row, in order to show the correct animations int iStep = 0; const int iNumTracks = m_NoteData[pn].GetNumTracks(); for( int t=0; tStep( pn, iStep ); } } - + // Make sure we don't accidentally scan a row 2x m_iLastRowChecked = iCurRow; - + // Update animations ActorFrame::Update( fDeltaTime ); m_pDancePad->Update( fDeltaTime ); diff --git a/src/BeginnerHelper.h b/src/BeginnerHelper.h index f188d0e739..a5941e7e85 100644 --- a/src/BeginnerHelper.h +++ b/src/BeginnerHelper.h @@ -4,8 +4,10 @@ #include "ActorFrame.h" #include "Character.h" #include "Sprite.h" +#include "AutoActor.h" #include "PlayerNumber.h" #include "NoteData.h" +#include "ThemeMetric.h" class Model; /** @brief A dancing character that follows the steps of the Song. */ class BeginnerHelper : public ActorFrame @@ -14,7 +16,7 @@ public: BeginnerHelper(); ~BeginnerHelper(); - bool Initialize( int iDancePadType ); + bool Init( int iDancePadType ); bool IsInitialized() { return m_bInitialized; } static bool CanUse(); void AddPlayer( PlayerNumber pn, const NoteData &nd ); @@ -32,12 +34,14 @@ protected: Model *m_pDancer[NUM_PLAYERS]; Model *m_pDancePad; Sprite m_sFlash; - Sprite m_sBackground; + AutoActor m_sBackground; Sprite m_sStepCircle[NUM_PLAYERS][4]; // More memory, but much easier to manage int m_iLastRowChecked; int m_iLastRowFlashed; bool m_bInitialized; + + ThemeMetric SHOW_DANCE_PAD; }; #endif diff --git a/src/Course.cpp b/src/Course.cpp index dd39fdaa86..dec0b75526 100644 --- a/src/Course.cpp +++ b/src/Course.cpp @@ -91,7 +91,7 @@ int CourseEntry::GetNumModChanges() const Course::Course(): m_bIsAutogen(false), m_sPath(""), m_sMainTitle(""), m_sMainTitleTranslit(""), m_sSubTitle(""), m_sSubTitleTranslit(""), m_sBannerPath(""), m_sBackgroundPath(""), m_sCDTitlePath(""), - m_sGroupName(""), m_bRepeat(false), m_fGoalSeconds(0), + m_sGroupName(""), m_sScripter(""), m_bRepeat(false), m_fGoalSeconds(0), m_bShuffle(false), m_iLives(-1), m_bSortByMeter(false), m_bIncomplete(false), m_vEntries(), m_SortOrder_TotalDifficulty(0), m_SortOrder_Ranking(0), m_LoadedFromProfile(ProfileSlot_Invalid), @@ -175,6 +175,7 @@ void Course::Init() m_sMainTitleTranslit = ""; m_sSubTitle = ""; m_sSubTitleTranslit = ""; + m_sScripter = ""; m_sBannerPath = ""; m_sBackgroundPath = ""; @@ -1091,6 +1092,7 @@ public: static int GetGroupName( T* p, lua_State *L ) { lua_pushstring(L, p->m_sGroupName ); return 1; } static int IsAutogen( T* p, lua_State *L ) { lua_pushboolean(L, p->m_bIsAutogen ); return 1; } static int GetEstimatedNumStages( T* p, lua_State *L ) { lua_pushnumber(L, p->GetEstimatedNumStages() ); return 1; } + static int GetScripter( T* p, lua_State *L ) { lua_pushstring(L, p->m_sScripter ); return 1; } static int GetTotalSeconds( T* p, lua_State *L ) { StepsType st = Enum::Check(L, 1); @@ -1111,28 +1113,29 @@ public: LunaCourse() { - ADD_METHOD( GetPlayMode ); // [sm-ssc] returns PlayMode enum now + ADD_METHOD( GetPlayMode ); ADD_METHOD( GetDisplayFullTitle ); ADD_METHOD( GetTranslitFullTitle ); ADD_METHOD( HasMods ); ADD_METHOD( HasTimedMods ); - ADD_METHOD( GetCourseType ); // [sm-ssc] returns CourseType enum now + ADD_METHOD( GetCourseType ); ADD_METHOD( GetCourseEntry ); ADD_METHOD( GetCourseEntries ); ADD_METHOD( GetAllTrails ); ADD_METHOD( GetBannerPath ); - ADD_METHOD( GetBackgroundPath ); // sm-ssc addition - ADD_METHOD( GetCourseDir ); // sm-ssc addition + ADD_METHOD( GetBackgroundPath ); + ADD_METHOD( GetCourseDir ); ADD_METHOD( GetGroupName ); ADD_METHOD( IsAutogen ); ADD_METHOD( GetEstimatedNumStages ); + ADD_METHOD( GetScripter ); ADD_METHOD( GetTotalSeconds ); ADD_METHOD( IsEndless ); - ADD_METHOD( IsNonstop ); // sm-ssc addition - ADD_METHOD( IsOni ); // sm-ssc addition + ADD_METHOD( IsNonstop ); + ADD_METHOD( IsOni ); ADD_METHOD( GetGoalSeconds ); - ADD_METHOD( HasBanner ); // sm-ssc addition - ADD_METHOD( HasBackground ); // sm-ssc addition + ADD_METHOD( HasBanner ); + ADD_METHOD( HasBackground ); ADD_METHOD( IsAnEdit ); } }; diff --git a/src/Course.h b/src/Course.h index 23c91e5630..b6326833f2 100644 --- a/src/Course.h +++ b/src/Course.h @@ -161,9 +161,10 @@ public: RString m_sMainTitle, m_sMainTitleTranslit; RString m_sSubTitle, m_sSubTitleTranslit; + RString m_sScripter; RString m_sBannerPath; - RString m_sBackgroundPath; // after 9 years yes finally -aj + RString m_sBackgroundPath; RString m_sCDTitlePath; RString m_sGroupName; diff --git a/src/CourseContentsList.cpp b/src/CourseContentsList.cpp index a4e09474c5..ee4b99cb2f 100644 --- a/src/CourseContentsList.cpp +++ b/src/CourseContentsList.cpp @@ -78,7 +78,9 @@ void CourseContentsList::SetItemFromGameState( Actor *pActor, int iCourseEntryIn FOREACH_HumanPlayer(pn) { const Trail *pTrail = GAMESTATE->m_pCurTrail[pn]; - if( pTrail == NULL || iCourseEntryIndex >= (int) pTrail->m_vEntries.size() ) + if( pTrail == NULL + || iCourseEntryIndex >= (int) pTrail->m_vEntries.size() + || iCourseEntryIndex >= (int) pCourse->m_vEntries.size() ) continue; const TrailEntry *te = &pTrail->m_vEntries[iCourseEntryIndex]; diff --git a/src/CourseLoaderCRS.cpp b/src/CourseLoaderCRS.cpp index d0bd999294..e2bd6a59a4 100644 --- a/src/CourseLoaderCRS.cpp +++ b/src/CourseLoaderCRS.cpp @@ -65,6 +65,8 @@ bool CourseLoaderCRS::LoadFromMsd( const RString &sPath, const MsdFile &msd, Cou out.m_sMainTitle = sParams[1]; else if( 0 == stricmp(sValueName, "COURSETRANSLIT") ) out.m_sMainTitleTranslit = sParams[1]; + else if( 0 == stricmp(sValueName, "SCRIPTER") ) + out.m_sScripter = sParams[1]; else if( 0 == stricmp(sValueName, "REPEAT") ) { RString str = sParams[1]; @@ -161,6 +163,7 @@ bool CourseLoaderCRS::LoadFromMsd( const RString &sPath, const MsdFile &msd, Cou // infer entry::Type from the first param // todo: make sure these aren't generating bogus entries due // to a lack of songs. -aj + LOG->Trace("[CourseLoaderCRS] sParams[1] = %s",sParams[1].c_str()); // most played if( sParams[1].Left(strlen("BEST")) == "BEST" ) { @@ -176,7 +179,7 @@ bool CourseLoaderCRS::LoadFromMsd( const RString &sPath, const MsdFile &msd, Cou new_entry.songSort = SongSort_FewestPlays; } // best grades - if( sParams[1].Left(strlen("GRADEBEST")) == "GRADEBEST" ) + else if( sParams[1].Left(strlen("GRADEBEST")) == "GRADEBEST" ) { new_entry.iChooseIndex = atoi( sParams[1].Right(sParams[1].size()-strlen("GRADEBEST")) ) - 1; CLAMP( new_entry.iChooseIndex, 0, 500 ); diff --git a/src/CourseWriterCRS.cpp b/src/CourseWriterCRS.cpp index 582653847c..8a52095667 100644 --- a/src/CourseWriterCRS.cpp +++ b/src/CourseWriterCRS.cpp @@ -46,6 +46,8 @@ bool CourseWriterCRS::Write( const Course &course, RageFileBasic &f, bool bSavin f.PutLine( ssprintf("#COURSE:%s;", course.m_sMainTitle.c_str()) ); if( course.m_sMainTitleTranslit != "" ) f.PutLine( ssprintf("#COURSETRANSLIT:%s;", course.m_sMainTitleTranslit.c_str()) ); + if( course.m_sScripter != "" ) + f.PutLine( ssprintf("#SCRIPTER:%s;", course.m_sScripter.c_str()) ); if( course.m_bRepeat ) f.PutLine( "#REPEAT:YES;" ); if( course.m_iLives != -1 ) diff --git a/src/FadingBanner.cpp b/src/FadingBanner.cpp index e8e536e911..b64b8850d3 100644 --- a/src/FadingBanner.cpp +++ b/src/FadingBanner.cpp @@ -226,12 +226,14 @@ void FadingBanner::LoadRoulette() { BeforeChange(); m_Banner[m_iIndexLatest].LoadRoulette(); + m_Banner[m_iIndexLatest].PlayCommand( "Roulette" ); } void FadingBanner::LoadRandom() { BeforeChange(); m_Banner[m_iIndexLatest].LoadRandom(); + m_Banner[m_iIndexLatest].PlayCommand( "Random" ); } void FadingBanner::LoadFromSortOrder( SortOrder so ) @@ -252,6 +254,13 @@ void FadingBanner::LoadCourseFallback() m_Banner[m_iIndexLatest].LoadCourseFallback(); } +void FadingBanner::LoadCustom( RString sBanner ) +{ + BeforeChange(); + m_Banner[m_iIndexLatest].Load( THEME->GetPathG( "Banner", sBanner ) ); + m_Banner[m_iIndexLatest].PlayCommand( sBanner ); +} + // lua start #include "LuaBinding.h" diff --git a/src/FadingBanner.h b/src/FadingBanner.h index 33cafbfac9..4770eefd24 100644 --- a/src/FadingBanner.h +++ b/src/FadingBanner.h @@ -29,6 +29,7 @@ public: void LoadFromSortOrder( SortOrder so ); void LoadFallback(); void LoadCourseFallback(); + void LoadCustom( RString sBanner ); bool LoadFromCachedBanner( const RString &path ); bool LoadFromCachedBackground( const RString &path ); diff --git a/src/Font.cpp b/src/Font.cpp index 4534f76d09..a012906df5 100644 --- a/src/Font.cpp +++ b/src/Font.cpp @@ -157,11 +157,6 @@ void FontPage::SetTextureCoords( const vector &widths, int iAdvanceExtraPix void FontPage::SetExtraPixels( int iDrawExtraPixelsLeft, int iDrawExtraPixelsRight ) { - /* Hack: do one more than we were asked to; I think a lot of fonts are one - * too low. - glenn */ - iDrawExtraPixelsRight++; - iDrawExtraPixelsLeft++; - if( (iDrawExtraPixelsLeft % 2) == 1 ) ++iDrawExtraPixelsLeft; diff --git a/src/LifeMeterBattery.cpp b/src/LifeMeterBattery.cpp index 558b2e2029..00fb586848 100644 --- a/src/LifeMeterBattery.cpp +++ b/src/LifeMeterBattery.cpp @@ -31,7 +31,7 @@ void LifeMeterBattery::Load( const PlayerState *pPlayerState, PlayerStageStats * bool bPlayerEnabled = GAMESTATE->IsPlayerEnabled( pPlayerState ); m_sprFrame.Load( THEME->GetPathG(sType,"frame") ); - this->AddChild( &m_sprFrame ); + this->AddChild( m_sprFrame ); m_sprBattery.Load( THEME->GetPathG(sType,"lives 1x4") ); m_sprBattery.SetName( ssprintf("BatteryP%i",int(pn+1)) ); @@ -87,7 +87,7 @@ void LifeMeterBattery::OnSongEnded() m_iTrailingLivesLeft = m_iLivesLeft; PlayerNumber pn = m_pPlayerState->m_PlayerNumber; const Course *pCourse = GAMESTATE->m_pCurCourse; - + if( pCourse && pCourse->m_vEntries[GAMESTATE->GetCourseSongIndex()].iGainLives > -1 ) m_iLivesLeft += pCourse->m_vEntries[GAMESTATE->GetCourseSongIndex()].iGainLives; else @@ -101,14 +101,12 @@ void LifeMeterBattery::OnSongEnded() Refresh(); } - void LifeMeterBattery::ChangeLife( TapNoteScore score ) { if( m_iLivesLeft == 0 ) return; - // xxx: this is hardcoded; we should use metrics for this. -aj - // How to: have a TapNote reference similar to LifeMeterBattery + // xxx: This is hardcoded; we should use metrics for this. -aj switch( score ) { case TNS_W1: diff --git a/src/LifeMeterBattery.h b/src/LifeMeterBattery.h index d1d39473fc..08d72233db 100644 --- a/src/LifeMeterBattery.h +++ b/src/LifeMeterBattery.h @@ -7,6 +7,7 @@ #include "RageSound.h" #include "PercentageDisplay.h" #include "ThemeMetric.h" +#include "AutoActor.h" /** @brief Battery life meter used in Oni mode. */ class LifeMeterBattery : public LifeMeter @@ -45,7 +46,7 @@ private: //ThemeMetric<> METRIC_NAME; ThemeMetric BATTERY_BLINK_TIME; - Sprite m_sprFrame; + AutoActor m_sprFrame; Sprite m_sprBattery; BitmapText m_textNumLives; diff --git a/src/ModIcon.cpp b/src/ModIcon.cpp index 14e1e2c651..dcbbf310b8 100644 --- a/src/ModIcon.cpp +++ b/src/ModIcon.cpp @@ -24,9 +24,13 @@ ModIcon::ModIcon( const ModIcon &cpy ): void ModIcon::Load( RString sMetricsGroup ) { m_sprFilled.Load( THEME->GetPathG(sMetricsGroup,"Filled") ); + m_sprFilled->SetName("Filled"); + ActorUtil::LoadAllCommands( m_sprFilled, sMetricsGroup ); this->AddChild( m_sprFilled ); m_sprEmpty.Load( THEME->GetPathG(sMetricsGroup,"Empty") ); + m_sprEmpty->SetName("Empty"); + ActorUtil::LoadAllCommands( m_sprEmpty, sMetricsGroup ); this->AddChild( m_sprEmpty ); m_text.LoadFromFont( THEME->GetPathF(sMetricsGroup,"Text") ); @@ -70,7 +74,7 @@ void ModIcon::Set( const RString &_sText ) m_text.SetText( sText ); // This line makes Lua option rows crash: -aj - m_text.CropToWidth( CROP_TEXT_TO_WIDTH ); + //m_text.CropToWidth( CROP_TEXT_TO_WIDTH ); } /* diff --git a/src/MusicWheel.cpp b/src/MusicWheel.cpp index 0ee25ae52a..85dbc2000b 100644 --- a/src/MusicWheel.cpp +++ b/src/MusicWheel.cpp @@ -360,6 +360,8 @@ bool MusicWheel::SelectModeMenuItem() return true; } +// bool MusicWheel::SelectCustomItem() + void MusicWheel::GetSongList( vector &arraySongs, SortOrder so ) { vector apAllSongs; diff --git a/src/MusicWheel.h b/src/MusicWheel.h index 20c7cbf5c1..73e63deb0e 100644 --- a/src/MusicWheel.h +++ b/src/MusicWheel.h @@ -57,6 +57,7 @@ protected: bool SelectSongOrCourse(); bool SelectCourse( const Course *p ); bool SelectModeMenuItem(); + //bool SelectCustomItem(); virtual void UpdateSwitch(); diff --git a/src/NotesLoaderSSC.cpp b/src/NotesLoaderSSC.cpp index 70d8947079..9cc5fa6ae2 100644 --- a/src/NotesLoaderSSC.cpp +++ b/src/NotesLoaderSSC.cpp @@ -178,6 +178,11 @@ bool SSCLoader::LoadFromSSCFile( const RString &sPath, Song &out, bool bFromCach out.m_sGenre = sParams[1]; } + else if( sValueName=="ORIGIN" ) + { + out.m_sOrigin = sParams[1]; + } + else if( sValueName=="CREDIT" ) { out.m_sCredit = sParams[1]; diff --git a/src/NotesWriterSM.cpp b/src/NotesWriterSM.cpp index 920081509a..23f9a646ce 100644 --- a/src/NotesWriterSM.cpp +++ b/src/NotesWriterSM.cpp @@ -261,7 +261,7 @@ static RString GetSMNotesTag( const Song &song, const Steps &in ) RString desc = (USE_CREDIT ? in.GetCredit() : in.GetDescription()); lines.push_back( ssprintf( " %s:", SmEscape(desc).c_str() ) ); lines.push_back( ssprintf( " %s:", DifficultyToString(in.GetDifficulty()).c_str() ) ); - lines.push_back( ssprintf( " %d:", in.GetMeter() ) ); + lines.push_back( ssprintf( " %d:", clamp( in.GetMeter(), MIN_METER, MAX_METER ) ) ); vector asRadarValues; // SM files don't use fakes for radar data. Keep it that way. diff --git a/src/NotesWriterSSC.cpp b/src/NotesWriterSSC.cpp index a4ba5242a3..4ad8f89ee1 100644 --- a/src/NotesWriterSSC.cpp +++ b/src/NotesWriterSSC.cpp @@ -55,6 +55,7 @@ static void WriteGlobalTags( RageFile &f, const Song &out ) f.PutLine( ssprintf( "#SUBTITLETRANSLIT:%s;", SmEscape(out.m_sSubTitleTranslit).c_str() ) ); f.PutLine( ssprintf( "#ARTISTTRANSLIT:%s;", SmEscape(out.m_sArtistTranslit).c_str() ) ); f.PutLine( ssprintf( "#GENRE:%s;", SmEscape(out.m_sGenre).c_str() ) ); + f.PutLine( ssprintf( "#ORIGIN:%s;", SmEscape(out.m_sOrigin).c_str() ) ); f.PutLine( ssprintf( "#CREDIT:%s;", SmEscape(out.m_sCredit).c_str() ) ); f.PutLine( ssprintf( "#BANNER:%s;", SmEscape(out.m_sBannerFile).c_str() ) ); f.PutLine( ssprintf( "#BACKGROUND:%s;", SmEscape(out.m_sBackgroundFile).c_str() ) ); @@ -293,7 +294,7 @@ static RString GetSSCNoteData( const Song &song, const Steps &in, bool bSavingCa lines.push_back( ssprintf( "#DESCRIPTION:%s;", SmEscape(in.GetDescription()).c_str() ) ); lines.push_back( ssprintf( "#CHARTSTYLE:%s;", SmEscape(in.GetChartStyle()).c_str() ) ); lines.push_back( ssprintf( "#DIFFICULTY:%s;", DifficultyToString(in.GetDifficulty()).c_str() ) ); - lines.push_back( ssprintf( "#METER:%d;", in.GetMeter() ) ); + lines.push_back( ssprintf( "#METER:%d;", clamp( in.GetMeter(), MIN_METER, MAX_METER ) ) ); vector asRadarValues; FOREACH_PlayerNumber( pn ) diff --git a/src/OptionRow.cpp b/src/OptionRow.cpp index 4d645977ac..ee043f65df 100644 --- a/src/OptionRow.cpp +++ b/src/OptionRow.cpp @@ -168,7 +168,7 @@ void OptionRow::ChoicesChanged( RowType type ) vbSelected[0] = true; } - // TRICKY: Insert a down arrow as the first choice in the row. + // TRICKY: Insert a down arrow as the first choice in the row. if( m_bFirstItemGoesDown ) { m_pHand->m_Def.m_vsChoices.insert( m_pHand->m_Def.m_vsChoices.begin(), NEXT_ROW_NAME ); @@ -178,7 +178,7 @@ void OptionRow::ChoicesChanged( RowType type ) InitText( type ); - /* When choices change, the old focus position is meaningless; reset it. */ + // When choices change, the old focus position is meaningless; reset it. FOREACH_PlayerNumber( p ) SetChoiceInRowWithFocus( p, 0 ); @@ -260,7 +260,7 @@ void OptionRow::InitText( RowType type ) m_ModIcons[p] = new ModIcon( m_pParentType->m_ModIcon ); m_ModIcons[p]->SetDrawOrder(-1); // under title m_ModIcons[p]->PlayCommand( "On" ); - + m_Frame.AddChild( m_ModIcons[p] ); GameCommand gc; @@ -398,7 +398,7 @@ void OptionRow::InitText( RowType type ) this->SortByDrawOrder(); } -/* After importing options, choose which item is focused. */ +// After importing options, choose which item is focused. void OptionRow::AfterImportOptions( PlayerNumber pn ) { /* We load items for both players on start, since we don't know which players @@ -604,7 +604,7 @@ void OptionRow::UpdateEnabledDisabled() FOREACH_HumanPlayer( pn ) { bRowEnabled = m_pHand->m_Def.m_vEnabledForPlayers.find(pn) != m_pHand->m_Def.m_vEnabledForPlayers.end(); - + if( !m_pHand->m_Def.m_bOneChoiceForAllPlayers ) { if( m_bRowHasFocus[pn] ) color = m_pParentType->COLOR_SELECTED; @@ -645,6 +645,7 @@ void OptionRow::SetModIcon( PlayerNumber pn, const RString &sText, GameCommand & // update row frame Message msg( "Refresh" ); msg.SetParam( "GameCommand", &gc ); + msg.SetParam( "Text", sText ); m_sprFrame->HandleMessage( msg ); if( m_ModIcons[pn] != NULL ) m_ModIcons[pn]->Set( sText ); diff --git a/src/ProductInfo.h b/src/ProductInfo.h index dde19650c5..8916d00401 100644 --- a/src/ProductInfo.h +++ b/src/ProductInfo.h @@ -35,7 +35,7 @@ * */ #ifndef PRODUCT_VER_BARE -#define PRODUCT_VER_BARE v1.2.4 +#define PRODUCT_VER_BARE v1.2.5 #endif /** diff --git a/src/ProductInfo.inc b/src/ProductInfo.inc index d4aa01e1c2..29ee485bd9 100644 --- a/src/ProductInfo.inc +++ b/src/ProductInfo.inc @@ -5,7 +5,7 @@ ; see ProductInfo.h for use descriptions !define PRODUCT_ID "sm-ssc" -!define PRODUCT_VER "v1.2.4" +!define PRODUCT_VER "v1.2.5" !define PRODUCT_DISPLAY "${PRODUCT_ID} ${PRODUCT_VER}" !define PRODUCT_BITMAP "ssc" diff --git a/src/ProfileManager.cpp b/src/ProfileManager.cpp index bd84550431..041803238c 100644 --- a/src/ProfileManager.cpp +++ b/src/ProfileManager.cpp @@ -824,7 +824,7 @@ public: if( pProfile ) pProfile->PushSelf(L); else - lua_pushnil(L ); + lua_pushnil(L); return 1; } static int GetLocalProfileFromIndex( T* p, lua_State *L ) { Profile *pProfile = p->GetLocalProfileFromIndex(IArg(1)); ASSERT(pProfile); pProfile->PushSelf(L); return 1; } diff --git a/src/ScreenEdit.cpp b/src/ScreenEdit.cpp index 6b970750b4..35f8702dc4 100644 --- a/src/ScreenEdit.cpp +++ b/src/ScreenEdit.cpp @@ -519,8 +519,7 @@ static MenuDef g_AreaMenu( static MenuDef g_StepsInformation( "ScreenMiniMenuStepsInformation", MenuRowDef( ScreenEdit::difficulty, "Difficulty", true, EditMode_Practice, true, true, 0, NULL ), - // xxx: this giant list of numbers SUUUUUUUUUUCKS -aj - MenuRowDef( ScreenEdit::meter, "Meter", true, EditMode_Practice, true, false, 0, "1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25" ), + MenuRowDef( ScreenEdit::meter, "Meter", true, EditMode_Practice, true, false, 0, MIN_METER, MAX_METER ), MenuRowDef( ScreenEdit::description, "Description", true, EditMode_Practice, true, true, 0, NULL ), MenuRowDef( ScreenEdit::chartstyle, "Chart Style", true, EditMode_Practice, true, true, 0, NULL ), MenuRowDef( ScreenEdit::step_credit, "Step Author", true, EditMode_Practice, true, true, 0, NULL ), diff --git a/src/ScreenEvaluation.cpp b/src/ScreenEvaluation.cpp index b474d8b8cb..76c40f03a1 100644 --- a/src/ScreenEvaluation.cpp +++ b/src/ScreenEvaluation.cpp @@ -351,7 +351,7 @@ void ScreenEvaluation::Init() { FOREACH_EnabledPlayer( p ) { - m_sprPercentFrame[p].Load( THEME->GetPathG(m_sName,ssprintf("percent frame p%d",p+1)) ); + m_sprPercentFrame[p].Load( THEME->GetPathG(m_sName,ssprintf("PercentFrame p%d",p+1)) ); m_sprPercentFrame[p]->SetName( ssprintf("PercentFrameP%d",p+1) ); ActorUtil::LoadAllCommands( *m_sprPercentFrame[p], m_sName ); SET_XY( m_sprPercentFrame[p] ); @@ -452,6 +452,7 @@ void ScreenEvaluation::Init() } // init judgment area + ROLLING_NUMBERS_CLASS.Load( m_sName, "RollingNumbersClass" ); FOREACH_ENUM( JudgmentLine, l ) { if( l == JudgmentLine_W1 && !GAMESTATE->ShowW1() ) @@ -473,7 +474,7 @@ void ScreenEvaluation::Init() { m_textJudgmentLineNumber[l][p].LoadFromFont( THEME->GetPathF(m_sName, "JudgmentLineNumber") ); m_textJudgmentLineNumber[l][p].SetName( JudgmentLineToString(l)+ssprintf("NumberP%d",p+1) ); - m_textJudgmentLineNumber[l][p].Load( "RollingNumbersJudgment" ); + m_textJudgmentLineNumber[l][p].Load( ROLLING_NUMBERS_CLASS ); ActorUtil::LoadAllCommands( m_textJudgmentLineNumber[l][p], m_sName ); SET_XY( m_textJudgmentLineNumber[l][p] ); this->AddChild( &m_textJudgmentLineNumber[l][p] ); diff --git a/src/ScreenEvaluation.h b/src/ScreenEvaluation.h index e4565a194c..5e14e159f1 100644 --- a/src/ScreenEvaluation.h +++ b/src/ScreenEvaluation.h @@ -76,10 +76,9 @@ protected: // grade area AutoActor m_sprGradeFrame[NUM_PLAYERS]; - GradeDisplay m_Grades[NUM_PLAYERS]; + GradeDisplay m_Grades[NUM_PLAYERS]; // points area - bool m_bNewSongsUnlocked; PercentageDisplay m_Percent[NUM_PLAYERS]; AutoActor m_sprPercentFrame[NUM_PLAYERS]; @@ -115,6 +114,7 @@ protected: RageSound m_soundStart; // sound played if the player passes or fails ThemeMetric SUMMARY; + ThemeMetric ROLLING_NUMBERS_CLASS; /** @brief Did a player save a screenshot of their score? */ bool m_bSavedScreenshot[NUM_PLAYERS]; }; diff --git a/src/ScreenGameplay.cpp b/src/ScreenGameplay.cpp index e6b84cca04..814093883a 100644 --- a/src/ScreenGameplay.cpp +++ b/src/ScreenGameplay.cpp @@ -588,6 +588,7 @@ void ScreenGameplay::Init() if( GAMESTATE->IsCourseMode() ) { ASSERT( pi->m_ptextCourseSongNumber == NULL ); + SONG_NUMBER_FORMAT.Load( m_sName, "SongNumberFormat" ); pi->m_ptextCourseSongNumber = new BitmapText; pi->m_ptextCourseSongNumber->LoadFromFont( THEME->GetPathF(m_sName,"SongNum") ); pi->m_ptextCourseSongNumber->SetName( ssprintf("SongNumber%s",pi->GetName().c_str()) ); @@ -1011,7 +1012,7 @@ void ScreenGameplay::LoadNextSong() { pi->GetPlayerStageStats()->m_iSongsPlayed++; if( pi->m_ptextCourseSongNumber ) - pi->m_ptextCourseSongNumber->SetText( ssprintf("%d", pi->GetPlayerStageStats()->m_iSongsPassed+1) ); + pi->m_ptextCourseSongNumber->SetText( ssprintf(SONG_NUMBER_FORMAT.GetValue(), pi->GetPlayerStageStats()->m_iSongsPassed+1) ); } if( GAMESTATE->m_bMultiplayer ) @@ -1130,13 +1131,12 @@ void ScreenGameplay::LoadNextSong() m_LyricDisplay.PlayCommand( bAllReverse? "SetReverse": bAtLeastOneReverse? "SetOneReverse": "SetNoReverse" ); // Load lyrics - // XXX: don't load this here + // XXX: don't load this here (who and why? -aj) LyricsLoader LL; if( GAMESTATE->m_pCurSong->HasLyrics() ) LL.LoadFromLRCFile(GAMESTATE->m_pCurSong->GetLyricsPath(), *GAMESTATE->m_pCurSong); - - /* Set up song-specific graphics. */ + // Set up song-specific graphics. // Check to see if any players are in beginner mode. // Note: steps can be different if turn modifiers are used. @@ -1156,21 +1156,22 @@ void ScreenGameplay::LoadNextSong() if( m_pSongForeground ) m_pSongForeground->Unload(); - if( !PREFSMAN->m_bShowBeginnerHelper || !m_BeginnerHelper.Initialize(2) ) + if( !PREFSMAN->m_bShowBeginnerHelper || !m_BeginnerHelper.Init(2) ) { m_BeginnerHelper.SetVisible( false ); - /* BeginnerHelper disabled, or failed to load. */ + // BeginnerHelper disabled, or failed to load. if( m_pSongBackground ) m_pSongBackground->LoadFromSong( GAMESTATE->m_pCurSong ); if( !GAMESTATE->m_bDemonstrationOrJukebox ) { - /* This will fade from a preset brightness to the actual brightness (based - * on prefs and "cover"). The preset brightness may be 0 (to fade from - * black), or it might be 1, if the stage screen has the song BG and we're - * coming from it (like Pump). This used to be done in SM_PlayReady, but - * that means it's impossible to snap to the new brightness immediately. */ + /* This will fade from a preset brightness to the actual brightness + * (based on prefs and "cover"). The preset brightness may be 0 (to + * fade from black), or it might be 1, if the stage screen has the + * song BG and we're coming from it (like Pump). This used to be done + * in SM_PlayReady, but that means it's impossible to snap to the + * new brightness immediately. */ if( m_pSongBackground ) { m_pSongBackground->SetBrightness( INITIAL_BACKGROUND_BRIGHTNESS ); diff --git a/src/ScreenGameplay.h b/src/ScreenGameplay.h index f3d0d096aa..89c4cf60c8 100644 --- a/src/ScreenGameplay.h +++ b/src/ScreenGameplay.h @@ -193,6 +193,7 @@ protected: ThemeMetric FAIL_ON_MISS_COMBO; ThemeMetric ALLOW_CENTER_1_PLAYER; ThemeMetric UNPAUSE_WITH_START; + ThemeMetric SONG_NUMBER_FORMAT; bool IsLastSong(); void SetupSong( int iSongIndex ); diff --git a/src/ScreenGameplaySyncMachine.cpp b/src/ScreenGameplaySyncMachine.cpp index 008bb31585..325b3a2e87 100644 --- a/src/ScreenGameplaySyncMachine.cpp +++ b/src/ScreenGameplaySyncMachine.cpp @@ -35,8 +35,7 @@ void ScreenGameplaySyncMachine::Init() SongUtil::GetPlayableSteps( &m_Song, vpSteps ); ASSERT_M(vpSteps.size() > 0, "No playable steps for ScreenGameplaySyncMachine"); Steps *pSteps = vpSteps[0]; - // TODO: Either detect which player accessed this file, or FOREACH all of them. -Wolfman2000 - GAMESTATE->m_pCurSteps[0].Set( pSteps ); + GAMESTATE->m_pCurSteps[GAMESTATE->GetFirstHumanPlayer()].Set( pSteps ); GamePreferences::m_AutoPlay.Set( PC_HUMAN ); diff --git a/src/ScreenMiniMenu.h b/src/ScreenMiniMenu.h index 5bdd85ee2b..365ac90a24 100644 --- a/src/ScreenMiniMenu.h +++ b/src/ScreenMiniMenu.h @@ -4,6 +4,7 @@ #define SCREEN_MINI_MENU_H #include "ScreenOptions.h" +#include #include "GameConstantsAndTypes.h" typedef bool (*MenuRowUpdateEnabled)(); @@ -76,6 +77,20 @@ struct MenuRowDef PUSH(c23);PUSH(c23);PUSH(c24);PUSH(c25); #undef PUSH } + + MenuRowDef( int r, RString n, bool e, EditMode s, bool bTT, bool bTI, + int d, int low, int high ): + iRowCode(r), sName(n), bEnabled(e), pfnEnabled(NULL), + emShowIn(s), iDefaultChoice(d), choices(), + bThemeTitle(bTT), bThemeItems(bTI) + { + for ( int i = low; i <= high; i++ ) + { + std::stringstream ss; + ss << i; + choices.push_back(ss.str().c_str()); + } + } void SetOneUnthemedChoice( const RString &sChoice ) { diff --git a/src/ScreenOptions.cpp b/src/ScreenOptions.cpp index f41afe9dfd..4cf574d9b5 100644 --- a/src/ScreenOptions.cpp +++ b/src/ScreenOptions.cpp @@ -131,11 +131,11 @@ void ScreenOptions::Init() LOAD_ALL_COMMANDS_AND_SET_XY( m_sprPage ); m_frameContainer.AddChild( m_sprPage ); - // init line line highlights + // init line highlights FOREACH_PlayerNumber( p ) { - m_sprLineHighlight[p].Load( THEME->GetPathG(m_sName,"LineHighlight") ); - m_sprLineHighlight[p]->SetName( "LineHighlight" ); + m_sprLineHighlight[p].Load( THEME->GetPathG(m_sName, ssprintf("LineHighlight P%d",p+1)) ); + m_sprLineHighlight[p]->SetName( ssprintf("LineHighlightP%d",p+1) ); m_sprLineHighlight[p]->SetX( LINE_HIGHLIGHT_X ); LOAD_ALL_COMMANDS( m_sprLineHighlight[p] ); m_frameContainer.AddChild( m_sprLineHighlight[p] ); @@ -878,6 +878,13 @@ void ScreenOptions::ProcessMenuStart( const InputEventPlus &input ) m_pRows[iCurRow]->PositionUnderlines( pn ); RefreshIcons( iCurRow, pn ); + Message msg( "SelectMultiple" ); + msg.SetParam( "PlayerNumber", pn ); + msg.SetParam( "RowIndex", iCurRow ); + msg.SetParam( "ChoiceInRow", iChoiceInRow ); + msg.SetParam( "Selected", bSelected ); + MESSAGEMAN->Broadcast( msg ); + if( row.GetFirstItemGoesDown() ) { // move to the first choice in the row @@ -990,6 +997,11 @@ void ScreenOptions::ChangeValueInRowAbsolute( int iRow, PlayerNumber pn, int iCh int iCurrentChoiceWithFocus = row.GetChoiceInRowWithFocus(pn); int iDelta = iChoiceIndex - iCurrentChoiceWithFocus; + Message msg( "ChangeValue" ); + msg.SetParam( "PlayerNumber", pn ); + msg.SetParam( "RowIndex", iRow ); + MESSAGEMAN->Broadcast( msg ); + ChangeValueInRowRelative( iRow, pn, iDelta, bRepeat ); } diff --git a/src/ScreenOptionsEditCourse.cpp b/src/ScreenOptionsEditCourse.cpp index e9b0589b88..75e5317887 100644 --- a/src/ScreenOptionsEditCourse.cpp +++ b/src/ScreenOptionsEditCourse.cpp @@ -14,10 +14,11 @@ #include "Style.h" #include "Steps.h" - static void GetStepsForSong( Song *pSong, vector &vpStepsOut ) { SongUtil::GetSteps( pSong, vpStepsOut, GAMESTATE->GetCurrentStyle()->m_StepsType ); + // xxx: If the StepsType isn't valid for the current game, this will cause + // a crash when changing songs. -aj StepsUtil::RemoveLockedSteps( pSong, vpStepsOut ); StepsUtil::SortNotesArrayByDifficulty( vpStepsOut ); } @@ -334,7 +335,7 @@ void ScreenOptionsEditCourse::ExportOptions( int iRow, const vectorGetStepsForEntry( iEntryIndex ); - ASSERT( pSteps ); + ASSERT_M( pSteps, "No Steps for this Song!" ); CourseEntry ce; ce.songID.FromSong( pSong ); ce.stepsCriteria.m_difficulty = pSteps->GetDifficulty(); @@ -447,8 +448,13 @@ void ScreenOptionsEditCourse::AfterChangeRow( PlayerNumber pn ) { ScreenOptions::AfterChangeRow( pn ); - SetCurrentSong(); - SetCurrentSteps(); + const int iCurRow = m_iCurrentRow[pn]; + // only do this if it's not the first row. -aj + if( iCurRow > 0 ) + { + SetCurrentSong(); + SetCurrentSteps(); + } } void ScreenOptionsEditCourse::AfterChangeValueInRow( int iRow, PlayerNumber pn ) diff --git a/src/ScreenSelectMusic.cpp b/src/ScreenSelectMusic.cpp index 422487438c..a866cbfa91 100644 --- a/src/ScreenSelectMusic.cpp +++ b/src/ScreenSelectMusic.cpp @@ -1722,10 +1722,13 @@ void ScreenSelectMusic::AfterMusicChange() m_sSampleMusicToPlay = m_sRandomMusicPath; break; case TYPE_CUSTOM: - bWantBanner = false; // we load it ourself, or should - m_Banner.Load( THEME->GetPathG( "Banner", GetMusicWheel()->GetCurWheelItemData( GetMusicWheel()->GetCurrentIndex() )->m_pAction->m_sName.c_str() ) ); - if( SAMPLE_MUSIC_PREVIEW_MODE != SampleMusicPreviewMode_LastSong ) - m_sSampleMusicToPlay = m_sSectionMusicPath; + { + bWantBanner = false; // we load it ourself + RString sBannerName = GetMusicWheel()->GetCurWheelItemData( GetMusicWheel()->GetCurrentIndex() )->m_pAction->m_sName.c_str(); + m_Banner.LoadCustom(sBannerName); + if( SAMPLE_MUSIC_PREVIEW_MODE != SampleMusicPreviewMode_LastSong ) + m_sSampleMusicToPlay = m_sSectionMusicPath; + } break; default: ASSERT(0); @@ -1855,6 +1858,14 @@ void ScreenSelectMusic::AfterMusicChange() AfterStepsOrTrailChange( vpns ); } +void ScreenSelectMusic::OpenOptionsList(PlayerNumber pn) +{ + if( pn != PLAYER_INVALID ) + { + m_OptionsList[pn].Open(); + } +} + // lua start #include "LuaBinding.h" @@ -1867,11 +1878,13 @@ public: p->GetMusicWheel()->PushSelf(L); return 1; } + static int OpenOptionsList( T* p, lua_State *L ) { PlayerNumber pn = Enum::Check(L, 1); p->OpenOptionsList(pn); return 0; } LunaScreenSelectMusic() { ADD_METHOD( GetGoToOptions ); ADD_METHOD( GetMusicWheel ); + ADD_METHOD( OpenOptionsList ); } }; diff --git a/src/ScreenSelectMusic.h b/src/ScreenSelectMusic.h index 1531aa80c8..ad117bce74 100644 --- a/src/ScreenSelectMusic.h +++ b/src/ScreenSelectMusic.h @@ -47,6 +47,8 @@ public: bool GetGoToOptions() const { return m_bGoToOptions; } MusicWheel *GetMusicWheel() { return &m_MusicWheel; } + void OpenOptionsList( PlayerNumber pn ); + // Lua virtual void PushSelf( lua_State *L ); @@ -60,7 +62,7 @@ protected: void SwitchToPreferredDifficulty(); void AfterMusicChange(); - void CheckBackgroundRequests( bool bForce ); + void CheckBackgroundRequests( bool bForce ); bool DetectCodes( const InputEventPlus &input ); vector m_vpSteps; diff --git a/src/ScreenSystemLayer.cpp b/src/ScreenSystemLayer.cpp index 885f03bbe6..69cb90cc69 100644 --- a/src/ScreenSystemLayer.cpp +++ b/src/ScreenSystemLayer.cpp @@ -110,6 +110,7 @@ namespace int iCredits = GAMESTATE->m_iCoins / PREFSMAN->m_iCoinsPerCredit; int iCoins = GAMESTATE->m_iCoins % PREFSMAN->m_iCoinsPerCredit; RString sCredits = CREDITS_CREDITS; + // todo: allow themers to change these strings -aj if( iCredits > 0 || PREFSMAN->m_iCoinsPerCredit == 1 ) sCredits += ssprintf(" %d", iCredits); if( PREFSMAN->m_iCoinsPerCredit > 1 ) diff --git a/src/Song.cpp b/src/Song.cpp index aa8128bb5e..fc2e172238 100644 --- a/src/Song.cpp +++ b/src/Song.cpp @@ -41,7 +41,7 @@ * @brief The internal version of the cache for StepMania. * * Increment this value to invalidate the current cache. */ -const int FILE_CACHE_VERSION = 168; +const int FILE_CACHE_VERSION = 169; /** @brief How long does a song sample last by default? */ const float DEFAULT_MUSIC_SAMPLE_LENGTH = 12.f; @@ -799,9 +799,7 @@ void Song::TidyUpData() // Have a default combo segment of one just in case. if( m_Timing.m_ComboSegments.empty() ) { - ComboSegment seg; - seg.m_iStartRow = 0; - seg.m_iCombo = 1; + ComboSegment seg(0, 1); m_Timing.m_ComboSegments.push_back( seg ); } @@ -1504,6 +1502,7 @@ public: static int GetDisplayArtist( T* p, lua_State *L ) { lua_pushstring(L, p->GetDisplayArtist() ); return 1; } static int GetTranslitArtist( T* p, lua_State *L ) { lua_pushstring(L, p->GetTranslitArtist() ); return 1; } static int GetGenre( T* p, lua_State *L ) { lua_pushstring(L, p->m_sGenre ); return 1; } + static int GetOrigin( T* p, lua_State *L ) { lua_pushstring(L, p->m_sOrigin ); return 1; } static int GetAllSteps( T* p, lua_State *L ) { const vector &v = p->GetAllSteps(); @@ -1629,6 +1628,7 @@ public: ADD_METHOD( GetDisplayArtist ); ADD_METHOD( GetTranslitArtist ); ADD_METHOD( GetGenre ); + ADD_METHOD( GetOrigin ); ADD_METHOD( GetAllSteps ); ADD_METHOD( GetStepsByStepsType ); ADD_METHOD( GetSongDir ); diff --git a/src/Song.h b/src/Song.h index 75e5823c34..9a9df6cc27 100644 --- a/src/Song.h +++ b/src/Song.h @@ -17,7 +17,7 @@ struct lua_State; struct BackgroundChange; /** @brief The version of the .ssc file format. */ -const static float STEPFILE_VERSION_NUMBER = 0.57f; +const static float STEPFILE_VERSION_NUMBER = 0.58f; /** @brief How many edits for this song can each profile have? */ const int MAX_EDITS_PER_SONG_PER_PROFILE = 5; @@ -222,6 +222,8 @@ public: * This is read and saved, but never actually used. */ RString m_sCredit; + RString m_sOrigin; // song origin (for .ssc format) + RString m_sMusicFile; RString m_sInstrumentTrackFile[NUM_InstrumentTrack]; diff --git a/src/SongManager.cpp b/src/SongManager.cpp index 34e296be35..fe4bb51cd2 100644 --- a/src/SongManager.cpp +++ b/src/SongManager.cpp @@ -1890,6 +1890,14 @@ public: DEFINE_METHOD( ShortenGroupName, ShortenGroupName( SArg(1) ) ) + static int GetCourseGroupNames( T* p, lua_State *L ) + { + vector v; + p->GetCourseGroupNames( v ); + LuaHelpers::CreateTableFromArray( v, L ); + return 1; + } + LunaSongManager() { ADD_METHOD( GetAllSongs ); @@ -1898,6 +1906,7 @@ public: ADD_METHOD( FindCourse ); ADD_METHOD( GetRandomSong ); ADD_METHOD( GetRandomCourse ); + ADD_METHOD( GetCourseGroupNames ); ADD_METHOD( GetNumSongs ); ADD_METHOD( GetNumUnlockedSongs ); ADD_METHOD( GetNumSelectableAndUnlockedSongs ); diff --git a/src/TimingData.cpp b/src/TimingData.cpp index 7b96c6a9b1..c00a082468 100644 --- a/src/TimingData.cpp +++ b/src/TimingData.cpp @@ -806,6 +806,28 @@ void TimingData::ScaleRegion( float fScale, int iStartIndex, int iEndIndex, bool m_WarpSegments[i].m_iStartRow = lrintf((iSegStartRow - iStartIndex) * fScale) + iStartIndex; } + for ( unsigned i = 0; i < m_TickcountSegments.size(); i++ ) + { + const int iSegStart = m_TickcountSegments[i].m_iStartRow; + if( iSegStart < iStartIndex ) + continue; + else if( iSegStart > iEndIndex ) + m_TickcountSegments[i].m_iStartRow += lrintf( (iEndIndex - iStartIndex) * (fScale - 1) ); + else + m_TickcountSegments[i].m_iStartRow = lrintf( (iSegStart - iStartIndex) * fScale ) + iStartIndex; + } + + for ( unsigned i = 0; i < m_ComboSegments.size(); i++ ) + { + const int iSegStart = m_ComboSegments[i].m_iStartRow; + if( iSegStart < iStartIndex ) + continue; + else if( iSegStart > iEndIndex ) + m_ComboSegments[i].m_iStartRow += lrintf( (iEndIndex - iStartIndex) * (fScale - 1) ); + else + m_ComboSegments[i].m_iStartRow = lrintf( (iSegStart - iStartIndex) * fScale ) + iStartIndex; + } + // adjust BPM changes to preserve timing if( bAdjustBPM ) { diff --git a/src/UnlockManager.cpp b/src/UnlockManager.cpp index b85c908118..47af088551 100644 --- a/src/UnlockManager.cpp +++ b/src/UnlockManager.cpp @@ -33,7 +33,8 @@ static const char *UnlockRequirementNames[] = "ExtraCleared", "ExtraFailed", "Toasties", - "StagesCleared" + "StagesCleared", + "NumberUnlocked" }; XToString( UnlockRequirement ); StringToX( UnlockRequirement ); @@ -294,6 +295,7 @@ void UnlockManager::GetPoints( const Profile *pProfile, float fScores[NUM_Unlock fScores[UnlockRequirement_SongPoints] = GetSongPoints( pProfile ); fScores[UnlockRequirement_DancePoints] = (float) pProfile->m_iTotalDancePoints; fScores[UnlockRequirement_StagesCleared] = (float) pProfile->GetTotalNumSongsPassed(); + fScores[UnlockRequirement_NumUnlocked] = (float) GetNumUnlocked(); } /* Return true if all songs and/or courses referenced by an unlock are available. */ @@ -469,7 +471,7 @@ void UnlockManager::Load() } } - // Make sure that we don't have duplicate unlock IDs. This can cause problems + // Make sure that we don't have duplicate unlock IDs. This can cause problems // with UnlockCelebrate and with codes. FOREACH_CONST( UnlockEntry, m_UnlockEntries, ue ) FOREACH_CONST( UnlockEntry, m_UnlockEntries, ue2 ) @@ -514,9 +516,7 @@ void UnlockManager::Load() } } - // // Log unlocks - // FOREACH_CONST( UnlockEntry, m_UnlockEntries, e ) { RString str = ssprintf( "Unlock: %s; ", join("\n",e->m_cmd.m_vsArgs).c_str() ); @@ -558,7 +558,7 @@ float UnlockManager::PointsUntilNextUnlock( UnlockRequirement t ) const for( unsigned a=0; a fScores[t] ) fSmallestPoints = min( fSmallestPoints, m_UnlockEntries[a].m_fRequirement[t] ); - + if( fSmallestPoints == FLT_MAX ) return 0; // no match found return fSmallestPoints - fScores[t]; @@ -673,7 +673,19 @@ public: if( pSong ) { pSong->PushSelf(L); return 1; } return 0; } + static int GetCourse( T* p, lua_State *L ) + { + Course *pCourse = p->m_Course.ToCourse(); + if( pCourse ) { pCourse->PushSelf(L); return 1; } + return 0; + } + static int GetCode( T* p, lua_State *L ) + { + lua_pushstring( L, p->m_sEntryID ); + return 1; + } + // internal static int GetArgs( T* p, lua_State *L ) { Command cmd; @@ -701,11 +713,13 @@ public: LunaUnlockEntry() { ADD_METHOD( IsLocked ); + ADD_METHOD( GetCode ); ADD_METHOD( GetDescription ); ADD_METHOD( GetUnlockRewardType ); ADD_METHOD( GetRequirement ); ADD_METHOD( GetRequirePassHardSteps ); ADD_METHOD( GetSong ); + ADD_METHOD( GetCourse ); ADD_METHOD( song ); ADD_METHOD( steps ); ADD_METHOD( course ); @@ -748,7 +762,7 @@ public: static int GetStepsUnlockedByEntryID( T* p, lua_State *L ) { - // Return the song each steps are associated with, too. + // Return the Song each Steps are associated with, too. vector apSongs; vector apDifficulty; UNLOCKMAN->GetStepsUnlockedByEntryID( apSongs, apDifficulty, SArg(1) ); @@ -757,20 +771,36 @@ public: return 2; } + static int GetPoints( T* p, lua_State *L ) { + float fScores[NUM_UnlockRequirement]; + UNLOCKMAN->GetPoints( PROFILEMAN->GetMachineProfile(), fScores ); + lua_pushnumber( L, fScores[Enum::Check(L, 1)] ); + return 1; + } + + static int GetPointsForProfile( T* p, lua_State *L ) { + float fScores[NUM_UnlockRequirement]; + UNLOCKMAN->GetPoints( Luna::check(L,1), fScores ); + lua_pushnumber( L, fScores[Enum::Check(L, 2)] ); + return 1; + } + LunaUnlockManager() { - ADD_METHOD( GetPointsUntilNextUnlock ); + ADD_METHOD( AnyUnlocksToCelebrate ); ADD_METHOD( FindEntryID ); - ADD_METHOD( UnlockEntryID ); - ADD_METHOD( UnlockEntryIndex ); - ADD_METHOD( PreferUnlockEntryID ); ADD_METHOD( GetNumUnlocks ); ADD_METHOD( GetNumUnlocked ); - ADD_METHOD( GetUnlockEntryIndexToCelebrate ); - ADD_METHOD( AnyUnlocksToCelebrate ); - ADD_METHOD( GetUnlockEntry ); + ADD_METHOD( GetPoints ); + ADD_METHOD( GetPointsForProfile ); + ADD_METHOD( GetPointsUntilNextUnlock ); ADD_METHOD( GetSongsUnlockedByEntryID ); ADD_METHOD( GetStepsUnlockedByEntryID ); + ADD_METHOD( GetUnlockEntry ); + ADD_METHOD( GetUnlockEntryIndexToCelebrate ); + ADD_METHOD( PreferUnlockEntryID ); + ADD_METHOD( UnlockEntryID ); + ADD_METHOD( UnlockEntryIndex ); } }; diff --git a/src/UnlockManager.h b/src/UnlockManager.h index f042b60da2..6c085e6680 100644 --- a/src/UnlockManager.h +++ b/src/UnlockManager.h @@ -25,6 +25,7 @@ enum UnlockRequirement UnlockRequirement_ExtraFailed, UnlockRequirement_Toasties, UnlockRequirement_StagesCleared, + UnlockRequirement_NumUnlocked, NUM_UnlockRequirement, UnlockRequirement_Invalid, }; @@ -100,7 +101,7 @@ public: // Option is locked due to a #SELECTABLE tag. #define LOCKED_SELECTABLE 0x4 -// Option is disabled by the operator. (For courses, this means that a song in the +// Option is disabled by the operator. (For courses, this means that a song in the // course is disabled.) #define LOCKED_DISABLED 0x8