diff --git a/Docs/Changelog_sm5.txt b/Docs/Changelog_sm5.txt index 2ed3ac9132..b88da6b204 100644 --- a/Docs/Changelog_sm5.txt +++ b/Docs/Changelog_sm5.txt @@ -8,10 +8,34 @@ ________________________________________________________________________________ StepMania 5.0 $next | 2011???? -------------------------------------------------------------------------------- +2011/09/24 +---------- +* [ScreenEdit] Disable shifting timing changes down one beat if starting on + beat 0. Important information must stay on that beat. [Wolfman2000] +* [ScreenEdit] Disable converting rows to a stop or beat starting on beat 0. + There should be no reason for this at this time. [Wolfman2000] + +2011/09/23 +---------- +* [ScreenEvaluation] Added RollingNumbersMaxComboClass metric. [AJ] +* [NotesLoaderSM] Fix loading .sm files with non standard difficulty names. + It should be Hard, not Heavy. [Wolfman2000] + +2011/09/22 +---------- +* [ScreenDebugOverlay] Replaced hardcoded toggle command with + ButtonTextToggledCommand metric. [AJ] +* [LoadingWindow_Win32] Make the StepMania window gain focus after the + loading window closes. Fixes issue 424. [AJ] + +2011/09/21 +---------- +* [FadingBanner] Added LoadRandom(), LoadRoulette(), LoadFallback(), + LoadCourseFallback(), and GetBanner(int) Lua bindings. [AJ] + 2011/09/18 ---------- -* [Song] Added GetSampleStart() and GetSampleLength() - Lua bindings. [Wolfman2000] +* [Song] Added GetSampleStart() and GetSampleLength() Lua bindings. [Wolfman2000] 2011/09/16 ---------- diff --git a/Docs/Luadoc/LuaDocumentation.xml b/Docs/Luadoc/LuaDocumentation.xml index cea772098f..a2e1c28d65 100644 --- a/Docs/Luadoc/LuaDocumentation.xml +++ b/Docs/Luadoc/LuaDocumentation.xml @@ -1972,8 +1972,8 @@ Returns the current Premium. - - Kind of does what it says on the tin. + + Returns the smallest number of stages left for any human player. [01 compat.lua] Returns the current beat of the song. diff --git a/Themes/_fallback/BGAnimations/ScreenNoise background/default.lua b/Themes/_fallback/BGAnimations/ScreenNoise background/default.lua new file mode 100644 index 0000000000..172373c4c1 --- /dev/null +++ b/Themes/_fallback/BGAnimations/ScreenNoise background/default.lua @@ -0,0 +1,17 @@ +local t = Def.ActorFrame{ + LoadActor("noise")..{ + Name="Noise"; + InitCommand=cmd(Center;texturewrapping,true;SetTextureFiltering,false;zoom,2;diffusealpha,0;); + OnCommand=cmd(linear,1;diffusealpha,1); + }; +}; + +local function Update(self) + local c = self:GetChild("Noise"); + local x = math.random(); + local y = math.random(); + c:customtexturerect(0+x,0+y,2+x,2+y); +end; +t.InitCommand = cmd(SetUpdateFunction,Update); + +return t; diff --git a/Themes/_fallback/BGAnimations/ScreenNoise background/noise.png b/Themes/_fallback/BGAnimations/ScreenNoise background/noise.png new file mode 100644 index 0000000000..dcf9a395af Binary files /dev/null and b/Themes/_fallback/BGAnimations/ScreenNoise background/noise.png differ diff --git a/Themes/_fallback/Graphics/MusicWheelItem Portal NormalPart.redir b/Themes/_fallback/Graphics/MusicWheelItem Portal NormalPart.redir index c94ae9b2f3..04b2ead777 100644 --- a/Themes/_fallback/Graphics/MusicWheelItem Portal NormalPart.redir +++ b/Themes/_fallback/Graphics/MusicWheelItem Portal NormalPart.redir @@ -1 +1 @@ -MusicWheelItem Roulette NormalPart \ No newline at end of file +_blank \ No newline at end of file diff --git a/Themes/_fallback/Graphics/MusicWheelItem Portal OverPart.redir b/Themes/_fallback/Graphics/MusicWheelItem Portal OverPart.redir index c94ae9b2f3..04b2ead777 100644 --- a/Themes/_fallback/Graphics/MusicWheelItem Portal OverPart.redir +++ b/Themes/_fallback/Graphics/MusicWheelItem Portal OverPart.redir @@ -1 +1 @@ -MusicWheelItem Roulette NormalPart \ No newline at end of file +_blank \ No newline at end of file diff --git a/Themes/_fallback/Graphics/MusicWheelItem Random NormalPart.redir b/Themes/_fallback/Graphics/MusicWheelItem Random NormalPart.redir index c94ae9b2f3..04b2ead777 100644 --- a/Themes/_fallback/Graphics/MusicWheelItem Random NormalPart.redir +++ b/Themes/_fallback/Graphics/MusicWheelItem Random NormalPart.redir @@ -1 +1 @@ -MusicWheelItem Roulette NormalPart \ No newline at end of file +_blank \ No newline at end of file diff --git a/Themes/_fallback/Graphics/MusicWheelItem Random OverPart.redir b/Themes/_fallback/Graphics/MusicWheelItem Random OverPart.redir index c94ae9b2f3..04b2ead777 100644 --- a/Themes/_fallback/Graphics/MusicWheelItem Random OverPart.redir +++ b/Themes/_fallback/Graphics/MusicWheelItem Random OverPart.redir @@ -1 +1 @@ -MusicWheelItem Roulette NormalPart \ No newline at end of file +_blank \ No newline at end of file diff --git a/Themes/_fallback/Scripts/02 Branches.lua b/Themes/_fallback/Scripts/02 Branches.lua index 05c7ebc05e..cc2a816ea8 100644 --- a/Themes/_fallback/Scripts/02 Branches.lua +++ b/Themes/_fallback/Scripts/02 Branches.lua @@ -40,6 +40,10 @@ Branch = { return "ScreenLogo" end end, + NoiseTrigger = function() + local hour = Hour() + return hour > 3 and hour < 6 and "ScreenNoise" or "ScreenInit" + end, TitleMenu = function() -- home mode is the most assumed use of sm-ssc. if GAMESTATE:GetCoinMode() == "CoinMode_Home" then diff --git a/Themes/_fallback/Scripts/03 Gameplay.lua b/Themes/_fallback/Scripts/03 Gameplay.lua index 12254b9632..ed245c2ec7 100644 --- a/Themes/_fallback/Scripts/03 Gameplay.lua +++ b/Themes/_fallback/Scripts/03 Gameplay.lua @@ -181,11 +181,13 @@ function HoldTiming() end function ShowHoldJudgments() - return not GAMESTATE:GetCurrentGame():GetName() == "pump" + local isPump = GAMESTATE:GetCurrentGame():GetName() == "pump" + return isPump and false or true end function HoldHeadStep() - return not GAMESTATE:GetCurrentGame():GetName() == "pump" + local isPump = GAMESTATE:GetCurrentGame():GetName() == "pump" + return isPump and false or true end function InitialHoldLife() diff --git a/Themes/_fallback/metrics.ini b/Themes/_fallback/metrics.ini index 65fed6206f..e03c8603e6 100644 --- a/Themes/_fallback/metrics.ini +++ b/Themes/_fallback/metrics.ini @@ -1085,6 +1085,9 @@ TextFormat="%04.0f" ApproachSeconds=1 Commify=false +[RollingNumbersMaxCombo] +Fallback="RollingNumbersJudgment" + [ScoreDisplayNormal] FrameX= FrameY= @@ -1355,6 +1358,7 @@ LineButtonX=SCREEN_CENTER_X-50 LineFunctionX=SCREEN_CENTER_X-30 ButtonTextOnCommand=NoStroke;zoom,0.8 +ButtonTextToggledCommand=accelerate,0.025;glow,color("1,0,0,1");sleep,0.125;decelerate,0.2;glow,color("1,0,0,0"); FunctionTextOnCommand=NoStroke;zoom,0.8 PageStartX=SCREEN_CENTER_X-100 @@ -1372,8 +1376,6 @@ HeaderTextX=SCREEN_LEFT+80 HeaderTextY=SCREEN_TOP+18 HeaderTextOnCommand=diffusebottomedge,color("0.5,0.5,0.5,1");strokecolor,color("0,0,0,0.5") HeaderTextOffCommand= - -LineOnCommand=zoom,0.75 # [ScreenSystemLayer] @@ -2916,7 +2918,7 @@ PageFadeSeconds=1.0 CoursesToShow=GetCoursesToShowRanking() SecondsPerPage=5 # -RankingType="Category" +RankingType="RankingType_Category" # RowSpacingX=0 RowSpacingY=60 @@ -3233,6 +3235,7 @@ MaxComboNumDigits=4 # ShowBannerArea=true RollingNumbersClass="RollingNumbersJudgment" +RollingNumbersMaxComboClass="RollingNumbersMaxCombo" # ShowSharedJudgmentLineLabels=false ShowJudgmentLineW1=false @@ -4128,11 +4131,13 @@ BodyHeight=38 [ComboGraph] BodyWidth=140 -# Arcade +# Arcade ################################# [ScreenLogo] Fallback="ScreenAttract" PrevScreen=Branch.Init() -NextScreen="ScreenHowToPlay" +# crashes! +#NextScreen="ScreenHowToPlay" +NextScreen="ScreenDemonstration" StartScreen=Branch.TitleMenu() TimerSeconds=5 ForceTimer=true @@ -4176,19 +4181,10 @@ SongBPM=100 NumW2s=4 NumMisses=6 -[ScreenTitleJoin] -Fallback="ScreenTitleMenu" -ChoiceNames="GameStart" - -# ScrollerOnCommand=visible,false -IdleCommentSeconds=-1 -IdleTimeoutSeconds=-1 -IdleTimeoutScreen=Branch.AfterInit() - [ScreenDemonstration] Fallback="ScreenGameplay" Class="ScreenDemonstration" -NextScreen="ScreenInit" +NextScreen=Branch.NoiseTrigger() StartScreen=Branch.TitleMenu() PlayMusic=false SecondsToShow=60 @@ -4202,6 +4198,24 @@ AllowStyleTypes="TwoPlayersTwoSides" MinSecondsToStep=0 MinSecondsToMusic=0 +[ScreenNoise] +Fallback="ScreenAttract" +Class="ScreenAttract" +NextScreen="ScreenInit" +PrevScreen="ScreenInit" +TimerSeconds=10800 +ShowCreditDisplay=false + +[ScreenTitleJoin] +Fallback="ScreenTitleMenu" +ChoiceNames="GameStart" + +# ScrollerOnCommand=visible,false +IdleCommentSeconds=-1 +IdleTimeoutSeconds=-1 +IdleTimeoutScreen=Branch.AfterInit() + +# Jukebox ################### [ScreenJukeboxMenu] Class="ScreenOptionsMaster" Fallback="ScreenPlayerOptions" diff --git a/Themes/default/Graphics/ScreenGameplay BPMDisplay.lua b/Themes/default/Graphics/ScreenGameplay BPMDisplay.lua index 4230191d44..f0fbe7818e 100644 --- a/Themes/default/Graphics/ScreenGameplay BPMDisplay.lua +++ b/Themes/default/Graphics/ScreenGameplay BPMDisplay.lua @@ -11,7 +11,7 @@ local function UpdateSingleBPM(self) end local displaySingle = Def.ActorFrame{ - -- manual bpm displays + -- manual bpm display LoadFont("BPMDisplay", "bpm")..{ Name="BPMDisplay"; InitCommand=cmd(zoom,0.675;shadowlength,1); diff --git a/Themes/default/metrics.ini b/Themes/default/metrics.ini index 4876a901d2..415c7bad86 100644 --- a/Themes/default/metrics.ini +++ b/Themes/default/metrics.ini @@ -940,24 +940,28 @@ PaneDisplayFrameP1X=SCREEN_CENTER_X-160 PaneDisplayFrameP1Y=SCREEN_BOTTOM-112-2 PaneDisplayFrameP1OnCommand=player,PLAYER_1;diffuse,Color("Orange");zoomy,0;sleep,0.5;decelerate,0.25;zoomy,1 PaneDisplayFrameP1OffCommand=bouncebegin,0.15;zoomx,0; +PaneDisplayFrameP1PlayerJoinedMessageCommand=%function(self,params) if params.Player == PLAYER_1 then self:playcommand("On") end end # ShowPaneDisplayTextP1=true PaneDisplayTextP1X=SCREEN_CENTER_X-160 PaneDisplayTextP1Y=SCREEN_BOTTOM-122-2 PaneDisplayTextP1OnCommand=player,PLAYER_1;zoomy,0;sleep,0.5;decelerate,0.25;zoomy,1 PaneDisplayTextP1OffCommand=bouncebegin,0.15;zoomx,0; +PaneDisplayTextP1PlayerJoinedMessageCommand=%function(self,params) if params.Player == PLAYER_1 then self:playcommand("On") end end # ShowPaneDisplayFrameP2=true PaneDisplayFrameP2X=SCREEN_CENTER_X+160 PaneDisplayFrameP2Y=SCREEN_BOTTOM-112-2 PaneDisplayFrameP2OnCommand=player,PLAYER_2;diffuse,Color("Orange");zoomy,0;sleep,0.5;decelerate,0.25;zoomy,1 PaneDisplayFrameP2OffCommand=bouncebegin,0.15;zoomx,0; +PaneDisplayFrameP2PlayerJoinedMessageCommand=%function(self,params) if params.Player == PLAYER_2 then self:playcommand("On") end end # ShowPaneDisplayTextP2=true PaneDisplayTextP2X=SCREEN_CENTER_X+160 PaneDisplayTextP2Y=SCREEN_BOTTOM-122-2 PaneDisplayTextP2OnCommand=player,PLAYER_2;zoomy,0;sleep,0.5;decelerate,0.25;zoomy,1 PaneDisplayTextP2OffCommand=bouncebegin,0.15;zoomx,0; +PaneDisplayTextP2PlayerJoinedMessageCommand=%function(self,params) if params.Player == PLAYER_2 then self:playcommand("On") end end # ShowCourseContentsList=false CourseContentsListX=SCREEN_CENTER_X-160 @@ -1336,7 +1340,7 @@ BPMDisplayY=SCREEN_BOTTOM-16 BPMDisplayOnCommand=draworder,101 BPMDisplayOffCommand=bounceend,0.25;zoom,0 # -ShowStageDisplay=true +ShowStageDisplay=not GAMESTATE:IsCourseMode() StageDisplayX=SCREEN_CENTER_X StageDisplayY=SCREEN_TOP+24 StageDisplayOnCommand=zoom,0.675; diff --git a/Xcode/stepmania.xcodeproj/project.pbxproj b/Xcode/stepmania.xcodeproj/project.pbxproj index 030389f833..62810e1c50 100644 --- a/Xcode/stepmania.xcodeproj/project.pbxproj +++ b/Xcode/stepmania.xcodeproj/project.pbxproj @@ -1996,8 +1996,8 @@ 36CA531B0F91564A0063D59D /* ScreenOptionsCourseOverview.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ScreenOptionsCourseOverview.h; path = ../src/ScreenOptionsCourseOverview.h; sourceTree = SOURCE_ROOT; }; 36CA531E0F9156860063D59D /* ScreenOptionsEditCourse.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ScreenOptionsEditCourse.cpp; path = ../src/ScreenOptionsEditCourse.cpp; sourceTree = SOURCE_ROOT; }; 36CA531F0F9156860063D59D /* ScreenOptionsEditCourse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ScreenOptionsEditCourse.h; path = ../src/ScreenOptionsEditCourse.h; sourceTree = SOURCE_ROOT; }; - AA059ABA0B8CCFB5006F8139 /* ActorMultiTexture.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ActorMultiTexture.cpp; path = ../src/ActorMultiTexture.cpp; sourceTree = ""; }; - AA059ABB0B8CCFB5006F8139 /* ActorMultiTexture.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ActorMultiTexture.h; path = ../src/ActorMultiTexture.h; sourceTree = ""; }; + AA059ABA0B8CCFB5006F8139 /* ActorMultiTexture.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ActorMultiTexture.cpp; path = ../src/Actors/ActorMultiTexture.cpp; sourceTree = ""; }; + AA059ABB0B8CCFB5006F8139 /* ActorMultiTexture.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ActorMultiTexture.h; path = ../src/Actors/ActorMultiTexture.h; sourceTree = ""; }; AA059E2A0B8F0C66006F8139 /* libz_link.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libz_link.a; sourceTree = ""; }; AA05A0AE0BA2EFF3006F8139 /* OptionsList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OptionsList.cpp; path = ../src/OptionsList.cpp; sourceTree = ""; }; AA05A0AF0BA2EFF3006F8139 /* OptionsList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OptionsList.h; path = ../src/OptionsList.h; sourceTree = ""; }; @@ -2141,8 +2141,8 @@ AA5C73FC0637A5F000AFB891 /* StepsUtil.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; name = StepsUtil.h; path = ../src/StepsUtil.h; sourceTree = ""; }; AA5D16550A79805C00F17E86 /* RageTextureRenderTarget.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = RageTextureRenderTarget.cpp; path = ../src/RageTextureRenderTarget.cpp; sourceTree = ""; }; AA5D16560A79805C00F17E86 /* RageTextureRenderTarget.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = RageTextureRenderTarget.h; path = ../src/RageTextureRenderTarget.h; sourceTree = ""; }; - AA5D166A0A798C0E00F17E86 /* ActorFrameTexture.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ActorFrameTexture.cpp; path = ../src/ActorFrameTexture.cpp; sourceTree = ""; }; - AA5D166B0A798C0E00F17E86 /* ActorFrameTexture.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ActorFrameTexture.h; path = ../src/ActorFrameTexture.h; sourceTree = ""; }; + AA5D166A0A798C0E00F17E86 /* ActorFrameTexture.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ActorFrameTexture.cpp; path = ../src/Actors/ActorFrameTexture.cpp; sourceTree = ""; }; + AA5D166B0A798C0E00F17E86 /* ActorFrameTexture.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ActorFrameTexture.h; path = ../src/Actors/ActorFrameTexture.h; sourceTree = ""; }; AA608EBF0B0F85E400B39AC4 /* DialogDriver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DialogDriver.cpp; sourceTree = ""; }; AA608FAC0B0F9A4E00B39AC4 /* RageSoundDriver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RageSoundDriver.cpp; sourceTree = ""; }; AA6090E40B141D1C00B39AC4 /* GamePreferences.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = GamePreferences.cpp; path = ../src/GamePreferences.cpp; sourceTree = ""; }; @@ -2426,12 +2426,12 @@ AA6EFF3004770F63005F316C /* ScoreKeeper.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; name = ScoreKeeper.h; path = ../src/ScoreKeeper.h; sourceTree = ""; }; AA6EFF7004770F86005F316C /* Transition.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; name = Transition.cpp; path = ../src/Transition.cpp; sourceTree = ""; }; AA6EFF7104770F86005F316C /* Transition.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; name = Transition.h; path = ../src/Transition.h; sourceTree = ""; }; - AA6EFF7504770FFD005F316C /* Actor.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; name = Actor.cpp; path = ../src/Actor.cpp; sourceTree = ""; }; - AA6EFF7604770FFD005F316C /* Actor.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; name = Actor.h; path = ../src/Actor.h; sourceTree = ""; }; - AA6EFF7704770FFD005F316C /* ActorFrame.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; name = ActorFrame.cpp; path = ../src/ActorFrame.cpp; sourceTree = ""; }; - AA6EFF7804770FFD005F316C /* ActorFrame.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; name = ActorFrame.h; path = ../src/ActorFrame.h; sourceTree = ""; }; - AA6EFF7904770FFD005F316C /* ActorScroller.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; name = ActorScroller.cpp; path = ../src/ActorScroller.cpp; sourceTree = ""; }; - AA6EFF7A04770FFD005F316C /* ActorScroller.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; name = ActorScroller.h; path = ../src/ActorScroller.h; sourceTree = ""; }; + AA6EFF7504770FFD005F316C /* Actor.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; name = Actor.cpp; path = ../src/Actors/Actor.cpp; sourceTree = ""; }; + AA6EFF7604770FFD005F316C /* Actor.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; name = Actor.h; path = ../src/Actors/Actor.h; sourceTree = ""; }; + AA6EFF7704770FFD005F316C /* ActorFrame.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; name = ActorFrame.cpp; path = ../src/Actors/ActorFrame.cpp; sourceTree = ""; }; + AA6EFF7804770FFD005F316C /* ActorFrame.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; name = ActorFrame.h; path = ../src/Actors/ActorFrame.h; sourceTree = ""; }; + AA6EFF7904770FFD005F316C /* ActorScroller.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; name = ActorScroller.cpp; path = ../src/Actors/ActorScroller.cpp; sourceTree = ""; }; + AA6EFF7A04770FFD005F316C /* ActorScroller.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; name = ActorScroller.h; path = ../src/Actors/ActorScroller.h; sourceTree = ""; }; AA6EFFB904770FFD005F316C /* BitmapText.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; name = BitmapText.cpp; path = ../src/BitmapText.cpp; sourceTree = ""; }; AA6EFFBA04770FFD005F316C /* BitmapText.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; name = BitmapText.h; path = ../src/BitmapText.h; sourceTree = ""; }; AA6EFFBD04770FFD005F316C /* Model.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; name = Model.cpp; path = ../src/Model.cpp; sourceTree = ""; }; @@ -2974,8 +2974,8 @@ AACA592C07B5E23400763545 /* RageUtil_AutoPtr.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; name = RageUtil_AutoPtr.h; path = ../src/RageUtil_AutoPtr.h; sourceTree = ""; }; AACA592D07B5E23400763545 /* RageUtil_WorkerThread.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; name = RageUtil_WorkerThread.cpp; path = ../src/RageUtil_WorkerThread.cpp; sourceTree = ""; }; AACA592E07B5E23400763545 /* RageUtil_WorkerThread.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; name = RageUtil_WorkerThread.h; path = ../src/RageUtil_WorkerThread.h; sourceTree = ""; }; - AACFBE2608E7D793005087FC /* ActorSound.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; name = ActorSound.cpp; path = ../src/ActorSound.cpp; sourceTree = ""; }; - AACFBE2708E7D793005087FC /* ActorSound.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; name = ActorSound.h; path = ../src/ActorSound.h; sourceTree = ""; }; + AACFBE2608E7D793005087FC /* ActorSound.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; name = ActorSound.cpp; path = ../src/Actors/ActorSound.cpp; sourceTree = ""; }; + AACFBE2708E7D793005087FC /* ActorSound.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; name = ActorSound.h; path = ../src/Actors/ActorSound.h; sourceTree = ""; }; AACFBE3908E7D832005087FC /* InputEventPlus.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; name = InputEventPlus.h; path = ../src/InputEventPlus.h; sourceTree = ""; }; AACFBE4908E7D893005087FC /* ScreenGameplayLesson.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; name = ScreenGameplayLesson.cpp; path = ../src/ScreenGameplayLesson.cpp; sourceTree = ""; }; AACFBE4A08E7D893005087FC /* ScreenGameplayLesson.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; name = ScreenGameplayLesson.h; path = ../src/ScreenGameplayLesson.h; sourceTree = ""; }; @@ -3094,8 +3094,8 @@ AAFC7FF00513A67700D02EE9 /* RageSoundReader_FileReader.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; name = RageSoundReader_FileReader.cpp; path = ../src/RageSoundReader_FileReader.cpp; sourceTree = ""; }; AAFC7FF10513A67700D02EE9 /* RageSoundReader_MP3.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; name = RageSoundReader_MP3.cpp; path = ../src/RageSoundReader_MP3.cpp; sourceTree = ""; }; AAFC7FF20513A67700D02EE9 /* RageSoundReader_MP3.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; name = RageSoundReader_MP3.h; path = ../src/RageSoundReader_MP3.h; sourceTree = ""; }; - AAFE71090A91ADE6005F2290 /* ActorProxy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ActorProxy.cpp; path = ../src/ActorProxy.cpp; sourceTree = ""; }; - AAFE710A0A91ADE6005F2290 /* ActorProxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ActorProxy.h; path = ../src/ActorProxy.h; sourceTree = ""; }; + AAFE71090A91ADE6005F2290 /* ActorProxy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ActorProxy.cpp; path = ../src/Actors/ActorProxy.cpp; sourceTree = ""; }; + AAFE710A0A91ADE6005F2290 /* ActorProxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ActorProxy.h; path = ../src/Actors/ActorProxy.h; sourceTree = ""; }; AAFE711C0A91B551005F2290 /* RageSurface_Save_PNG.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RageSurface_Save_PNG.cpp; path = ../src/RageSurface_Save_PNG.cpp; sourceTree = ""; }; AAFE711D0A91B551005F2290 /* RoomInfoDisplay.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RoomInfoDisplay.cpp; path = ../src/RoomInfoDisplay.cpp; sourceTree = ""; }; AAFE711E0A91B551005F2290 /* RoomInfoDisplay.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RoomInfoDisplay.h; path = ../src/RoomInfoDisplay.h; sourceTree = ""; }; diff --git a/src/Actor.cpp b/src/Actors/Actor.cpp similarity index 100% rename from src/Actor.cpp rename to src/Actors/Actor.cpp diff --git a/src/Actor.h b/src/Actors/Actor.h similarity index 100% rename from src/Actor.h rename to src/Actors/Actor.h diff --git a/src/ActorFrame.cpp b/src/Actors/ActorFrame.cpp similarity index 100% rename from src/ActorFrame.cpp rename to src/Actors/ActorFrame.cpp diff --git a/src/ActorFrame.h b/src/Actors/ActorFrame.h similarity index 100% rename from src/ActorFrame.h rename to src/Actors/ActorFrame.h diff --git a/src/ActorFrameTexture.cpp b/src/Actors/ActorFrameTexture.cpp similarity index 100% rename from src/ActorFrameTexture.cpp rename to src/Actors/ActorFrameTexture.cpp diff --git a/src/ActorFrameTexture.h b/src/Actors/ActorFrameTexture.h similarity index 100% rename from src/ActorFrameTexture.h rename to src/Actors/ActorFrameTexture.h diff --git a/src/ActorMultiTexture.cpp b/src/Actors/ActorMultiTexture.cpp similarity index 100% rename from src/ActorMultiTexture.cpp rename to src/Actors/ActorMultiTexture.cpp diff --git a/src/ActorMultiTexture.h b/src/Actors/ActorMultiTexture.h similarity index 100% rename from src/ActorMultiTexture.h rename to src/Actors/ActorMultiTexture.h diff --git a/src/ActorProxy.cpp b/src/Actors/ActorProxy.cpp similarity index 100% rename from src/ActorProxy.cpp rename to src/Actors/ActorProxy.cpp diff --git a/src/ActorProxy.h b/src/Actors/ActorProxy.h similarity index 100% rename from src/ActorProxy.h rename to src/Actors/ActorProxy.h diff --git a/src/ActorScroller.cpp b/src/Actors/ActorScroller.cpp similarity index 100% rename from src/ActorScroller.cpp rename to src/Actors/ActorScroller.cpp diff --git a/src/ActorScroller.h b/src/Actors/ActorScroller.h similarity index 100% rename from src/ActorScroller.h rename to src/Actors/ActorScroller.h diff --git a/src/ActorSound.cpp b/src/Actors/ActorSound.cpp similarity index 100% rename from src/ActorSound.cpp rename to src/Actors/ActorSound.cpp diff --git a/src/ActorSound.h b/src/Actors/ActorSound.h similarity index 100% rename from src/ActorSound.h rename to src/Actors/ActorSound.h diff --git a/src/CourseLoaderCRS.cpp b/src/CourseLoaderCRS.cpp index 76013b06be..92b3b190b6 100644 --- a/src/CourseLoaderCRS.cpp +++ b/src/CourseLoaderCRS.cpp @@ -165,7 +165,6 @@ bool CourseLoaderCRS::LoadFromMsd( const RString &sPath, const MsdFile &msd, Cou // todo: make sure these aren't generating bogus entries due // to a lack of songs. -aj int iNumSongs = SONGMAN->GetNumSongs(); - LOG->Trace("[CourseLoaderCRS] sParams[1] = %s",sParams[1].c_str()); // most played if( sParams[1].Left(strlen("BEST")) == "BEST" ) { diff --git a/src/FadingBanner.cpp b/src/FadingBanner.cpp index b64b8850d3..b2375eb293 100644 --- a/src/FadingBanner.cpp +++ b/src/FadingBanner.cpp @@ -295,6 +295,10 @@ public: return 0; } static int LoadFromSongGroup( T* p, lua_State *L ) { p->LoadFromSongGroup( SArg(1) ); return 0; } + static int LoadRandom( T* p, lua_State *L ) { p->LoadRandom(); return 0; } + static int LoadRoulette( T* p, lua_State *L ) { p->LoadRoulette(); return 0; } + static int LoadCourseFallback( T* p, lua_State *L ) { p->LoadCourseFallback(); return 0; } + static int LoadFallback( T* p, lua_State *L ) { p->LoadFallback(); return 0; } static int GetLatestIndex( T* p, lua_State *L ){ lua_pushnumber( L, p->GetLatestIndex() ); return 1; } LunaFadingBanner() @@ -306,7 +310,13 @@ public: ADD_METHOD( LoadFromCourse ); ADD_METHOD( LoadIconFromCharacter ); ADD_METHOD( LoadCardFromCharacter ); + ADD_METHOD( LoadRandom ); + ADD_METHOD( LoadRoulette ); + ADD_METHOD( LoadCourseFallback ); + ADD_METHOD( LoadFallback ); + //ADD_METHOD( LoadFromSortOrder ); ADD_METHOD( GetLatestIndex ); + //ADD_METHOD( GetBanner ); } }; diff --git a/src/FadingBanner.h b/src/FadingBanner.h index 4770eefd24..0389f42602 100644 --- a/src/FadingBanner.h +++ b/src/FadingBanner.h @@ -39,6 +39,7 @@ public: virtual void DrawPrimitives(); int GetLatestIndex(){ return m_iIndexLatest; } + Banner GetBanner(int i){ return m_Banner[i]; } // Lua void PushSelf( lua_State *L ); diff --git a/src/GameState.cpp b/src/GameState.cpp index d9caa4f9b6..22cea682f3 100644 --- a/src/GameState.cpp +++ b/src/GameState.cpp @@ -1459,6 +1459,12 @@ void GameState::RemoveAllActiveAttacks() // called on end of song m_pPlayerState[p]->RemoveActiveAttacks(); } +void GameState::AddStageToPlayer( PlayerNumber pn ) +{ + // Add one stage more to player (bonus) -cerbo + ++m_iPlayerStageTokens[pn]; +} + template void setmin( T &a, const T &b ) { @@ -2430,6 +2436,7 @@ public: lua_pushboolean(L, p->m_bDopefish); return 1; } + static int AddStageToPlayer( T* p, lua_State *L ) { p->AddStageToPlayer(Enum::Check(L, 1)); return 0; } LunaGameState() { @@ -2531,6 +2538,7 @@ public: ADD_METHOD( SetCharacter ); ADD_METHOD( GetExpandedSectionName ); ADD_METHOD( Dopefish ); + ADD_METHOD( AddStageToPlayer ); } }; diff --git a/src/GameState.h b/src/GameState.h index c78f4ce7f2..fadb709559 100644 --- a/src/GameState.h +++ b/src/GameState.h @@ -62,6 +62,7 @@ public: bool HaveProfileToLoad(); bool HaveProfileToSave(); void SaveLocalData(); + void AddStageToPlayer( PlayerNumber pn ); void LoadCurrentSettingsFromProfile( PlayerNumber pn ); /** * @brief Save the specified player's settings to his/her profile. diff --git a/src/Makefile.am b/src/Makefile.am index 8eb50d2100..17d251d7dc 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -454,12 +454,12 @@ RageUtil_AutoPtr.h \ RageUtil_WorkerThread.cpp RageUtil_WorkerThread.h Actors = \ -Actor.cpp Actor.h ActorFrame.cpp ActorFrame.h \ -ActorFrameTexture.cpp ActorFrameTexture.h \ -ActorMultiTexture.cpp ActorMultiTexture.h \ -ActorProxy.cpp ActorProxy.h \ -ActorScroller.cpp ActorScroller.h ActorUtil.cpp ActorUtil.h \ -ActorSound.cpp ActorSound.h \ +Actors/Actor.cpp Actors/Actor.h Actors/ActorFrame.cpp Actors/ActorFrame.h \ +Actors/ActorFrameTexture.cpp Actors/ActorFrameTexture.h \ +Actors/ActorMultiTexture.cpp Actors/ActorMultiTexture.h \ +Actors/ActorProxy.cpp Actors/ActorProxy.h \ +Actors/ActorScroller.cpp Actors/ActorScroller.h ActorUtil.cpp ActorUtil.h \ +Actors/ActorSound.cpp Actors/ActorSound.h \ AutoActor.cpp AutoActor.h \ BitmapText.cpp BitmapText.h Model.cpp Model.h \ DynamicActorScroller.cpp DynamicActorScroller.h \ diff --git a/src/NotesLoaderSM.cpp b/src/NotesLoaderSM.cpp index dd16e698e1..e32485ddca 100644 --- a/src/NotesLoaderSM.cpp +++ b/src/NotesLoaderSM.cpp @@ -88,7 +88,7 @@ void SMLoader::LoadFromTokens( out.SetDescription( sDescription ); out.SetCredit( sDescription ); // this is often used for both. out.SetChartName(sDescription); // yeah, one more for good measure. - out.SetDifficulty( StringToDifficulty(sDifficulty) ); + out.SetDifficulty( OldStyleStringToDifficulty(sDifficulty) ); // Handle hacks that originated back when StepMania didn't have // Difficulty_Challenge. (At least v1.64, possibly v3.0 final...) @@ -667,9 +667,23 @@ bool SMLoader::LoadNoteDataFromSimfile( const RString &path, Steps &out ) difficulty = "Challenge"; } + /* Handle hacks that originated back when StepMania didn't have + * Difficulty_Challenge. TODO: Remove the need for said hacks. */ + if( difficulty.CompareNoCase("hard") == 0 ) + { + /* HACK: Both SMANIAC and CHALLENGE used to be Difficulty_Hard. + * They were differentiated via aspecial description. + * Account for the rogue charts that do this. */ + // HACK: SMANIAC used to be Difficulty_Hard with a special description. + if (description.CompareNoCase("smaniac") == 0 || + description.CompareNoCase("challenge") == 0) + difficulty = "Challenge"; + } + if(!(out.m_StepsType == GAMEMAN->StringToStepsType( stepsType ) && out.GetDescription() == description && - out.GetDifficulty() == StringToDifficulty(difficulty))) + (out.GetDifficulty() == StringToDifficulty(difficulty) || + out.GetDifficulty() == OldStyleStringToDifficulty(difficulty)))) { continue; } diff --git a/src/NotesWriterSSC.cpp b/src/NotesWriterSSC.cpp index a86f2f4e6a..905fb91dda 100644 --- a/src/NotesWriterSSC.cpp +++ b/src/NotesWriterSSC.cpp @@ -180,27 +180,27 @@ static void GetTimingTags( vector &lines, const TimingData &timing, boo static void WriteTimingTags( RageFile &f, const TimingData &timing, bool bIsSong = false ) { f.PutLine(ssprintf("#BPMS:%s;", - join(",\r\n", timing.ToVectorString(SEGMENT_BPM)).c_str())); + join(",\r\n", timing.ToVectorString(SEGMENT_BPM, 3)).c_str())); f.PutLine(ssprintf("#STOPS:%s;", - join(",\r\n", timing.ToVectorString(SEGMENT_STOP)).c_str())); + join(",\r\n", timing.ToVectorString(SEGMENT_STOP, 3)).c_str())); f.PutLine(ssprintf("#DELAYS:%s;", - join(",\r\n", timing.ToVectorString(SEGMENT_DELAY)).c_str())); + join(",\r\n", timing.ToVectorString(SEGMENT_DELAY, 3)).c_str())); f.PutLine(ssprintf("#WARPS:%s;", - join(",\r\n", timing.ToVectorString(SEGMENT_WARP)).c_str())); + join(",\r\n", timing.ToVectorString(SEGMENT_WARP, 3)).c_str())); f.PutLine(ssprintf("#TIMESIGNATURES:%s;", - join(",\r\n", timing.ToVectorString(SEGMENT_TIME_SIG)).c_str())); + join(",\r\n", timing.ToVectorString(SEGMENT_TIME_SIG, 3)).c_str())); f.PutLine(ssprintf("#TICKCOUNTS:%s;", - join(",\r\n", timing.ToVectorString(SEGMENT_TICKCOUNT)).c_str())); + join(",\r\n", timing.ToVectorString(SEGMENT_TICKCOUNT, 3)).c_str())); f.PutLine(ssprintf("#COMBOS:%s;", - join(",\r\n", timing.ToVectorString(SEGMENT_COMBO)).c_str())); + join(",\r\n", timing.ToVectorString(SEGMENT_COMBO, 3)).c_str())); f.PutLine(ssprintf("#SPEEDS:%s;", - join(",\r\n", timing.ToVectorString(SEGMENT_SPEED)).c_str())); + join(",\r\n", timing.ToVectorString(SEGMENT_SPEED, 3)).c_str())); f.PutLine(ssprintf("#SCROLLS:%s;", - join(",\r\n", timing.ToVectorString(SEGMENT_SCROLL)).c_str())); + join(",\r\n", timing.ToVectorString(SEGMENT_SCROLL, 3)).c_str())); f.PutLine(ssprintf("#FAKES:%s;", - join(",\r\n", timing.ToVectorString(SEGMENT_FAKE)).c_str())); + join(",\r\n", timing.ToVectorString(SEGMENT_FAKE, 3)).c_str())); f.PutLine(ssprintf("#LABELS:%s;", - join(",\r\n", timing.ToVectorString(SEGMENT_LABEL)).c_str())); + join(",\r\n", timing.ToVectorString(SEGMENT_LABEL, 3)).c_str())); } diff --git a/src/ScreenDebugOverlay.cpp b/src/ScreenDebugOverlay.cpp index 4b698123b7..1ca2b3c179 100644 --- a/src/ScreenDebugOverlay.cpp +++ b/src/ScreenDebugOverlay.cpp @@ -496,18 +496,10 @@ bool ScreenDebugOverlay::OverlayInput( const InputEventPlus &input ) // update text to show the effect of what changed above UpdateText(); - // blink the text to show what changed + // show what changed BitmapText &bt = *m_vptextButton[i]; bt.FinishTweening(); - // blink 5 times instead of 8 - // TODO: make this all metrics instead -aj - for( i=0; i<5; i++ ) - { - bt.SetGlow( RageColor(1,0,0,1) ); - bt.Sleep(0.1f); - bt.SetGlow( RageColor(1,0,0,0) ); - bt.Sleep(0.1f); - } + bt.PlayCommand("Toggled"); return true; } diff --git a/src/ScreenEdit.cpp b/src/ScreenEdit.cpp index 6fe4859305..5b4b637ff8 100644 --- a/src/ScreenEdit.cpp +++ b/src/ScreenEdit.cpp @@ -1739,7 +1739,8 @@ void ScreenEdit::InputEdit( const InputEventPlus &input, EditButton EditB ) break; case EDIT_BUTTON_OPEN_AREA_MENU: { - // update enabled/disabled in g_AreaMenu + // TODO: Improve behavior if timing changes are shifted down on beat 0. + g_AreaMenu.rows[shift_pauses_forward].bEnabled = (GetBeat() != 0); g_AreaMenu.rows[paste_at_current_beat].bEnabled = !m_Clipboard.IsEmpty(); g_AreaMenu.rows[paste_at_begin_marker].bEnabled = !m_Clipboard.IsEmpty() != 0 && m_NoteFieldEdit.m_iBeginMarker!=-1; g_AreaMenu.rows[paste_partial_timing_at_beat].bEnabled = !this->clipboardTiming.empty(); @@ -1757,6 +1758,9 @@ void ScreenEdit::InputEdit( const InputEventPlus &input, EditButton EditB ) } else { + // TODO: Improve interaction when field is 0. + g_AlterMenu.rows[convert_to_delay].bEnabled = (m_NoteFieldEdit.m_iBeginMarker > 0); + g_AlterMenu.rows[convert_to_pause].bEnabled = (m_NoteFieldEdit.m_iBeginMarker > 0); bool isRoutine = (m_InputPlayerNumber != PLAYER_INVALID); g_AlterMenu.rows[routine_invert_notes].bEnabled = isRoutine; g_AlterMenu.rows[routine_mirror_1_to_2].bEnabled = isRoutine; diff --git a/src/ScreenEvaluation.cpp b/src/ScreenEvaluation.cpp index a75413fb9d..6ce6976bd3 100644 --- a/src/ScreenEvaluation.cpp +++ b/src/ScreenEvaluation.cpp @@ -66,7 +66,6 @@ XToString( DetailLine ); #define SHOW_SCORE_AREA THEME->GetMetricB(m_sName,"ShowScoreArea") #define SHOW_TIME_AREA THEME->GetMetricB(m_sName,"ShowTimeArea") #define SHOW_RECORDS_AREA THEME->GetMetricB(m_sName,"ShowRecordsArea") -#define MAX_COMBO_NUM_DIGITS THEME->GetMetricI(m_sName,"MaxComboNumDigits") #define PLAYER_OPTIONS_HIDE_FAIL_TYPE THEME->GetMetricB(m_sName,"PlayerOptionsHideFailType") #define PLAYER_OPTIONS_SEPARATOR THEME->GetMetric (m_sName,"PlayerOptionsSeparator") #define CHECKPOINTS_WITH_JUDGMENTS THEME->GetMetricB(m_sName,"CheckpointsWithJudgments") @@ -460,6 +459,7 @@ void ScreenEvaluation::Init() // init judgment area ROLLING_NUMBERS_CLASS.Load( m_sName, "RollingNumbersClass" ); + ROLLING_NUMBERS_MAX_COMBO_CLASS.Load( m_sName, "RollingNumbersMaxComboClass" ); FOREACH_ENUM( JudgmentLine, l ) { if( l == JudgmentLine_W1 && !GAMESTATE->ShowW1() ) @@ -481,7 +481,10 @@ 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( ROLLING_NUMBERS_CLASS ); + if( JudgmentLineToString(l) == "MaxCombo" ) + m_textJudgmentLineNumber[l][p].Load( ROLLING_NUMBERS_MAX_COMBO_CLASS ); + else + 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 5e14e159f1..454cb34b75 100644 --- a/src/ScreenEvaluation.h +++ b/src/ScreenEvaluation.h @@ -115,6 +115,7 @@ protected: ThemeMetric SUMMARY; ThemeMetric ROLLING_NUMBERS_CLASS; + ThemeMetric ROLLING_NUMBERS_MAX_COMBO_CLASS; /** @brief Did a player save a screenshot of their score? */ bool m_bSavedScreenshot[NUM_PLAYERS]; }; diff --git a/src/Song.cpp b/src/Song.cpp index 181f552d83..9ab0a661ac 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 = 205; +const int FILE_CACHE_VERSION = 207; /** @brief How long does a song sample last by default? */ const float DEFAULT_MUSIC_SAMPLE_LENGTH = 12.f; @@ -920,12 +920,6 @@ void Song::Save() ReCalculateRadarValuesAndLastSecond(); TranslateTitles(); - - // TODO: Figure out a better way to save to Song's timing data. - if( m_vpSteps.size() == 1 ) - { - m_SongTiming = m_vpSteps[0]->m_Timing; - } // Save the new files. These calls make backups on their own. if( !SaveToSSCFile(GetSongFilePath(), false) ) diff --git a/src/StepMania-net2003.vcproj b/src/StepMania-net2003.vcproj index d9228ee33f..e716c59613 100644 --- a/src/StepMania-net2003.vcproj +++ b/src/StepMania-net2003.vcproj @@ -2956,46 +2956,46 @@ cl /Zl /nologo /c verstub.cpp /Fo"$(IntDir)"\ Name="Actors" Filter=""> + RelativePath="Actors\Actor.cpp"> + RelativePath="Actors\Actor.h"> + RelativePath="Actors\ActorFrame.cpp"> + RelativePath="Actors\ActorFrame.h"> + RelativePath="Actors\ActorFrameTexture.cpp"> + RelativePath="Actors\ActorFrameTexture.h"> + RelativePath="Actors\ActorMultiTexture.cpp"> + RelativePath="Actors\ActorMultiTexture.h"> + RelativePath="Actors\ActorProxy.cpp"> + RelativePath="Actors\ActorProxy.h"> + RelativePath="Actors\ActorScroller.cpp"> + RelativePath="Actors\ActorScroller.h"> + RelativePath="Actors\ActorSound.cpp"> + RelativePath="Actors\ActorSound.h"> diff --git a/src/StepMania-net2005.vcproj b/src/StepMania-net2005.vcproj index fe091bd4a3..9f0042087e 100644 --- a/src/StepMania-net2005.vcproj +++ b/src/StepMania-net2005.vcproj @@ -4654,59 +4654,59 @@ Name="Actors" > - - - - - - - - + + + + + + + + @@ -2084,13 +2084,13 @@ cl /Zl /nologo /c verstub.cpp /Fo$(IntDir) - - - - - - - + + + + + + + diff --git a/src/StepMania-net2010.vcxproj.filters b/src/StepMania-net2010.vcxproj.filters index 23b5698cf5..1ce13dfe16 100644 --- a/src/StepMania-net2010.vcxproj.filters +++ b/src/StepMania-net2010.vcxproj.filters @@ -1242,25 +1242,25 @@ Rage - + Actors - + Actors - + Actors - + Actors - + Actors - + Actors - + Actors @@ -2777,25 +2777,25 @@ Rage - + Actors - + Actors - + Actors - + Actors - + Actors - + Actors - + Actors diff --git a/src/StepMania.cpp b/src/StepMania.cpp index ac059341b1..def1d4ff86 100644 --- a/src/StepMania.cpp +++ b/src/StepMania.cpp @@ -80,10 +80,14 @@ static Preference g_bAllowMultipleInstances( "AllowMultipleInstances", fal void StepMania::GetPreferredVideoModeParams( VideoModeParams ¶msOut ) { - // unsure if this is still going to cause first run issues. -aj - float fAspectRatio = PREFSMAN->m_fDisplayAspectRatio; - int iHeight = PREFSMAN->m_iDisplayHeight; - int iWidth = ceilf(iHeight * fAspectRatio); + // resolution handling code that probably needs fixing + int iWidth = PREFSMAN->m_iDisplayWidth; + if( PREFSMAN->m_bWindowed ) + { + //float fRatio = PREFSMAN->m_iDisplayHeight; + //iWidth = PREFSMAN->m_iDisplayHeight * fRatio; + iWidth = static_cast(ceilf(PREFSMAN->m_iDisplayHeight * PREFSMAN->m_fDisplayAspectRatio)); + } // todo: allow for PRODUCT_ID + "-" + CommonMetrics::WINDOW_TITLE as // a theme option (Midi requested it, AJ had the idea for making it optional) diff --git a/src/TimingData.cpp b/src/TimingData.cpp index 84f95877aa..fa4adf89d6 100644 --- a/src/TimingData.cpp +++ b/src/TimingData.cpp @@ -21,7 +21,7 @@ void TimingData::Copy( const TimingData& cpy ) FOREACH_TimingSegmentType( tst ) { - const vector vpSegs = cpy.m_avpTimingSegments[tst]; + const vector &vpSegs = cpy.m_avpTimingSegments[tst]; for( unsigned i = 0; i < vpSegs.size(); ++i ) AddSegment( vpSegs[i] ); @@ -36,7 +36,7 @@ void TimingData::Clear() vector &vSegs = m_avpTimingSegments[tst]; for( unsigned i = 0; i < vSegs.size(); ++i ) { - LOG->Trace( "deleting %p", vSegs[i] ); + //LOG->Trace( "deleting %p", vSegs[i] ); SAFE_DELETE( vSegs[i] ); } vSegs.clear(); @@ -323,7 +323,7 @@ static void EraseSegment( vector &vSegs, int index, TimingSegmen // so we must deep-copy it (with ::Copy) for new allocations. void TimingData::AddSegment( const TimingSegment *seg ) { - LOG->Trace( "AddSegment( %s )", TimingSegmentTypeToString(seg->GetType()).c_str() ); + //LOG->Trace( "AddSegment( %s )", TimingSegmentTypeToString(seg->GetType()).c_str() ); seg->DebugPrint(); TimingSegmentType tst = seg->GetType(); diff --git a/src/arch/LoadingWindow/LoadingWindow_Win32.cpp b/src/arch/LoadingWindow/LoadingWindow_Win32.cpp index 80aef89071..bbc4c05efe 100644 --- a/src/arch/LoadingWindow/LoadingWindow_Win32.cpp +++ b/src/arch/LoadingWindow/LoadingWindow_Win32.cpp @@ -19,9 +19,7 @@ #include "RageSurfaceUtils_Zoom.h" static HBITMAP g_hBitmap = NULL; -#pragma comment(linker,"\"/manifestdependency:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"") - -// Load a RageSurface into a GDI surface. +/* Load a RageSurface into a GDI surface. */ static HBITMAP LoadWin32Surface( RageSurface *&s ) { RageSurfaceUtils::ConvertSurface( s, s->w, s->h, 32, 0xFF000000, 0x00FF0000, 0x0000FF00, 0 ); @@ -35,14 +33,14 @@ static HBITMAP LoadWin32Surface( RageSurface *&s ) HDC BitmapDC = CreateCompatibleDC( hScreen ); SelectObject( BitmapDC, bitmap ); - // This is silly, but simple. We only do this once, on a small image. + /* This is silly, but simple. We only do this once, on a small image. */ for( int y = 0; y < s->h; ++y ) { unsigned const char *line = ((unsigned char *) s->pixels) + (y * s->pitch); for( int x = 0; x < s->w; ++x ) { unsigned const char *data = line + (x*s->format->BytesPerPixel); - + SetPixelV( BitmapDC, x, y, RGB( data[3], data[2], data[1] ) ); } } @@ -62,7 +60,7 @@ static HBITMAP LoadWin32Surface( RString sFile, HWND hWnd ) if( pSurface == NULL ) return NULL; - /* Resize the splash image to fit the dialog. Stretch to fit horizontally, + /* Resize the splash image to fit the dialog. Stretch to fit horizontally, * maintaining aspect ratio. */ { RECT r; @@ -80,43 +78,8 @@ static HBITMAP LoadWin32Surface( RString sFile, HWND hWnd ) return ret; } -INT_PTR CALLBACK LoadingWindow_Win32::DlgProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam ) +BOOL CALLBACK LoadingWindow_Win32::WndProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam ) { - LoadingWindow_Win32 *self; - - if(msg==WM_INITDIALOG) { - self=(LoadingWindow_Win32 *)lParam; - SetWindowLong(hWnd,DWL_USER,(LONG)self); - } else { - self=(LoadingWindow_Win32 *)GetWindowLong(hWnd,DWL_USER); - } - -/* -#if WINVER >= 0x0601 - if (self && msg == self->taskbarCreatedEvent && !self->pTaskbarList) { - HRESULT hr = CoCreateInstance(CLSID_TaskbarList, NULL, CLSCTX_INPROC_SERVER, IID_PPV_ARGS(&self->pTaskbarList)); - if (SUCCEEDED(hr)) { - self->pTaskbarList->HrInit(); - if (FAILED(hr)) { - self->pTaskbarList->Release(); - self->pTaskbarList = NULL; - } else { - - - if(self->m_indeterminate) { - self->pTaskbarList->SetProgressState(hWnd, TBPF_INDETERMINATE); - } else { - self->pTaskbarList->SetProgressState(hWnd, TBPF_NORMAL); - self->pTaskbarList->SetProgressValue(hWnd, self->m_progress, self->m_totalWork); - } - } - } - - - } -#endif -*/ - switch( msg ) { case WM_INITDIALOG: @@ -134,36 +97,11 @@ INT_PTR CALLBACK LoadingWindow_Win32::DlgProc( HWND hWnd, UINT msg, WPARAM wPara (WPARAM) IMAGE_BITMAP, (LPARAM) (HANDLE) g_hBitmap ); SetWindowTextA( hWnd, PRODUCT_ID ); - break; - case WM_CLOSE: - HOOKS->SetUserQuit(); - return FALSE; - case WM_DESTROY: - -/* -#if(WINVER >= 0x0601) - if (self->pTaskbarList) { - self->pTaskbarList->Release(); - self->pTaskbarList = NULL; - } -#endif -*/ - DeleteObject( g_hBitmap ); g_hBitmap = NULL; - self->runMessageLoop=false; - self->hwnd=NULL; - return TRUE; - break; - - case WM_APP: - DestroyWindow(hWnd); - self->runMessageLoop=false; - ExitThread(0); - return TRUE; break; } @@ -172,7 +110,7 @@ INT_PTR CALLBACK LoadingWindow_Win32::DlgProc( HWND hWnd, UINT msg, WPARAM wPara void LoadingWindow_Win32::SetIcon( const RageSurface *pIcon ) { - if( g_hBitmap != NULL ) + if( m_hIcon != NULL ) DestroyIcon( m_hIcon ); m_hIcon = IconFromSurface( pIcon ); @@ -201,64 +139,35 @@ void LoadingWindow_Win32::SetSplash( const RString sPath ) } LoadingWindow_Win32::LoadingWindow_Win32() -{ - - INITCOMMONCONTROLSEX cceData; - cceData.dwSize=sizeof(INITCOMMONCONTROLSEX); - cceData.dwICC=ICC_PROGRESS_CLASS; - InitCommonControlsEx(&cceData); - -/* -#if(WINVER >= 0x0601) - pTaskbarList=NULL; - - taskbarCreatedEvent=RegisterWindowMessage("TaskbarButtonCreated"); -#endif -*/ - +{ m_hIcon = NULL; - - runMessageLoop=true; - - guiReadyEvent=CreateEvent(NULL,FALSE,FALSE,NULL); - - pumpThread=CreateThread(NULL, NULL, MessagePump, (void *)this, 0, &pumpThreadId); - - WaitForSingleObject(guiReadyEvent,INFINITE); - + hwnd = CreateDialog( handle.Get(), MAKEINTRESOURCE(IDD_LOADING_DIALOG), NULL, WndProc ); for( unsigned i = 0; i < 3; ++i ) text[i] = "ABC"; /* always set on first call */ SetText( "" ); + Paint(); } LoadingWindow_Win32::~LoadingWindow_Win32() { - SendMessage(hwnd,WM_APP,0,0); - //SendMessage(hwnd,WM_NULL,0,0); - WaitForSingleObject(pumpThread,INFINITE); - if(guiReadyEvent) - CloseHandle(guiReadyEvent); + if( hwnd ) + DestroyWindow( hwnd ); if( m_hIcon != NULL ) DestroyIcon( m_hIcon ); } -DWORD WINAPI LoadingWindow_Win32::MessagePump(LPVOID thisAsVoidPtr) +void LoadingWindow_Win32::Paint() { - LoadingWindow_Win32 *self=(LoadingWindow_Win32 *)thisAsVoidPtr; + SendMessage( hwnd, WM_PAINT, 0, 0 ); - self->hwnd = CreateDialogParam( self->handle.Get(), MAKEINTRESOURCE(IDD_LOADING_DIALOG), NULL, DlgProc, (LPARAM)thisAsVoidPtr); - - SetEvent(self->guiReadyEvent); - - // Run the message loop in a separate thread to keep the gui responsive during the loading + /* Process all queued messages since the last paint. This allows the window to + * come back if it loses focus during load. */ MSG msg; - while(self->runMessageLoop && GetMessage(&msg, self->hwnd, 0, 0 ) ) + while( PeekMessage( &msg, hwnd, 0, 0, PM_NOREMOVE ) ) { - if(IsDialogMessage(self->hwnd,&msg)) continue; + GetMessage(&msg, hwnd, 0, 0 ); DispatchMessage( &msg ); } - - return msg.wParam; } void LoadingWindow_Win32::SetText( RString sText ) @@ -267,7 +176,7 @@ void LoadingWindow_Win32::SetText( RString sText ) split( sText, "\n", asMessageLines, false ); while( asMessageLines.size() < 3 ) asMessageLines.push_back( "" ); - + const int msgid[] = { IDC_STATIC_MESSAGE1, IDC_STATIC_MESSAGE2, IDC_STATIC_MESSAGE3 }; for( unsigned i = 0; i < 3; ++i ) { @@ -276,7 +185,6 @@ void LoadingWindow_Win32::SetText( RString sText ) text[i] = asMessageLines[i]; HWND hwndItem = ::GetDlgItem( hwnd, msgid[i] ); - ::SetWindowText( hwndItem, ConvertUTF8ToACP(asMessageLines[i]).c_str() ); } } @@ -286,13 +194,6 @@ void LoadingWindow_Win32::SetProgress(const int progress) m_progress=progress; HWND hwndItem = ::GetDlgItem( hwnd, IDC_PROGRESS ); ::SendMessage(hwndItem,PBM_SETPOS,progress,0); -/* -#if(WINVER >= 0x0601) - if(pTaskbarList) { - pTaskbarList->SetProgressValue(hwnd, m_progress, m_totalWork); - } -#endif -*/ } void LoadingWindow_Win32::SetTotalWork(const int totalWork) @@ -300,42 +201,21 @@ void LoadingWindow_Win32::SetTotalWork(const int totalWork) m_totalWork=totalWork; HWND hwndItem = ::GetDlgItem( hwnd, IDC_PROGRESS ); SendMessage(hwndItem,PBM_SETRANGE32,0,totalWork); -/* -#if(WINVER >= 0x0601) - if(pTaskbarList) { - pTaskbarList->SetProgressValue(hwnd, m_progress, m_totalWork); - } -#endif -*/ } -void LoadingWindow_Win32::SetIndeterminate(bool indeterminate) { +void LoadingWindow_Win32::SetIndeterminate(bool indeterminate) +{ m_indeterminate=indeterminate; HWND hwndItem = ::GetDlgItem( hwnd, IDC_PROGRESS ); if(indeterminate) { -/* -#if(WINVER >= 0x0601) - if(pTaskbarList) { - pTaskbarList->SetProgressState(hwnd, TBPF_INDETERMINATE); - } -#endif -*/ SetWindowLong(hwndItem,GWL_STYLE, PBS_MARQUEE | GetWindowLong(hwndItem,GWL_STYLE)); SendMessage(hwndItem,PBM_SETMARQUEE,1,0); } else { SendMessage(hwndItem,PBM_SETMARQUEE,0,0); SetWindowLong(hwndItem,GWL_STYLE, (~PBS_MARQUEE) & GetWindowLong(hwndItem,GWL_STYLE)); -/* -#if(WINVER >= 0x0601) - if(pTaskbarList) { - pTaskbarList->SetProgressState(hwnd, TBPF_NORMAL); - } -#endif -*/ } - } /* diff --git a/src/arch/LoadingWindow/LoadingWindow_Win32.h b/src/arch/LoadingWindow/LoadingWindow_Win32.h index cac230bfcb..f2131f1bf7 100644 --- a/src/arch/LoadingWindow/LoadingWindow_Win32.h +++ b/src/arch/LoadingWindow/LoadingWindow_Win32.h @@ -3,22 +3,17 @@ #ifndef LOADING_WINDOW_WIN32_H #define LOADING_WINDOW_WIN32_H -#include "global.h" - #include "LoadingWindow.h" #include #include "archutils/Win32/AppInstance.h" -#if(WINVER >= 0x0601) -#include "Shobjidl.h" -#endif - class LoadingWindow_Win32: public LoadingWindow { public: LoadingWindow_Win32(); ~LoadingWindow_Win32(); + void Paint(); void SetText( RString sText ); void SetIcon( const RageSurface *pIcon ); void SetSplash( const RString sPath ); @@ -31,22 +26,8 @@ private: HWND hwnd; RString text[3]; HICON m_hIcon; - HANDLE pumpThread; - DWORD pumpThreadId; - HANDLE guiReadyEvent; -/* -#if WINVER >= 0x0601 - UINT taskbarCreatedEvent; - ITaskbarList3 *pTaskbarList; -#endif -*/ - - volatile bool runMessageLoop; - - static DWORD WINAPI MessagePump(LPVOID thisAsVoidPtr); - - static INT_PTR CALLBACK DlgProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam ); + static BOOL CALLBACK WndProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam ); }; #define USE_LOADING_WINDOW_WIN32