From daa32fc3f8e193a85ccdca26fa12f3fa079142ee Mon Sep 17 00:00:00 2001 From: Alberto Ramos Date: Sun, 18 Jul 2010 18:54:37 -0600 Subject: [PATCH] Fixed the issue related to trigging holdheads before they reach the receptor, at least I think that, more tests to be done (issue 150) --- NoteSkins/pump/default/DownRight Tap Note.lua | 4 +- NoteSkins/pump/default/NoteSkin.lua | 35 ++++++++----- NoteSkins/pump/default/UpLeft Explosion.lua | 50 ++++++++++++++++++- NoteSkins/pump/default/UpLeft Receptor.lua | 42 ++++++++++------ NoteSkins/pump/default/UpRight Tap Note.lua | 4 +- NoteSkins/pump/default/metrics.ini | 17 +------ Themes/_fallback/metrics.ini | 2 + src/Player.cpp | 5 +- src/ScreenGameplay.cpp | 6 ++- src/ScreenGameplay.h | 1 + src/ScreenSelectMusic.cpp | 7 ++- 11 files changed, 119 insertions(+), 54 deletions(-) diff --git a/NoteSkins/pump/default/DownRight Tap Note.lua b/NoteSkins/pump/default/DownRight Tap Note.lua index bb9a4f77f7..04abf29c93 100644 --- a/NoteSkins/pump/default/DownRight Tap Note.lua +++ b/NoteSkins/pump/default/DownRight Tap Note.lua @@ -1 +1,3 @@ -return NOTESKIN:LoadActor("DownLeft","Tap Note"); \ No newline at end of file +return NOTESKIN:LoadActor("DownLeft","Tap Note")..{ + InitCommand=cmd(rotationy,180); +}; \ No newline at end of file diff --git a/NoteSkins/pump/default/NoteSkin.lua b/NoteSkins/pump/default/NoteSkin.lua index 8f2fe16c0d..39a83ab332 100644 --- a/NoteSkins/pump/default/NoteSkin.lua +++ b/NoteSkins/pump/default/NoteSkin.lua @@ -1,17 +1,19 @@ -local Noteskin = ... or {} +local Noteskin = {} ---bBlanks: +--bBlanks: Noteskin.bBlanks = { --["element"] = true|false; ["Hold Tail Active"] = true; - ["Roll Tail Active"] = true; + ["Hold Tail Active"] = true; + ["Roll Tail Inactive"] = true; + ["Roll Tail Inactive"] = true; } Noteskin.ElementRedirs = { --["element"] = "redirected_element"; ["Hold Head Active"] = "Tap Note"; ["Hold Head Inactive"] = "Tap Note"; - ["Roll Head Active"] = "Tap Note"; - ["Roll Head Inactive"] = "Tap Note"; + ["Roll Head Active"] = "Roll Head Active"; + ["Roll Head Inactive"] = "Roll Head Active"; ["Tap Fake"] = "Tap Note"; -- ["Hold Topcap Inactive"] = "Hold Topcap Active"; @@ -19,17 +21,22 @@ Noteskin.ElementRedirs = { ["Hold Bottomcap Inactive"] = "Hold Bottomcap Active"; ["Hold Tail Inactive"] = "Hold Tail Active"; -- - ["Roll Topcap Inactive"] = "Roll Topcap Active"; - ["Roll Body Inactive"] = "Roll Body Active"; - ["Roll Bottomcap Inactive"] = "Roll Bottomcap Active"; - ["Roll Tail Inactive"] = "Roll Tail Active"; + ["Roll Topcap Active"] = "Hold Topcap Active"; + ["Roll Body Active"] = "Hold Body Active"; + ["Roll Bottomcap Active"] = "Hold Bottomcap Active"; + ["Roll Tail Active"] = "Hold Tail Active"; + -- + ["Roll Topcap Inactive"] = "Hold Topcap Active"; + ["Roll Body Inactive"] = "Hold Body Active"; + ["Roll Bottomcap Inactive"] = "Hold Bottomcap Active"; + ["Roll Tail Inactive"] = "Hold Tail Active"; } Noteskin.ButtonRedirs = { Center = "Center"; UpLeft = "UpLeft"; - UpRight = "UpLeft"; + UpRight = "UpRight"; DownLeft = "DownLeft"; - DownRight = "DownLeft"; + DownRight = "DownRight"; } Noteskin.BaseRotX = { Center = 0; @@ -41,9 +48,9 @@ Noteskin.BaseRotX = { Noteskin.BaseRotY = { Center = 0; UpLeft = 0; - UpRight = 180; + UpRight = 0; DownLeft = 0; - DownRight = 180; + DownRight = 0; } local function func() @@ -71,6 +78,8 @@ local function func() local path = NOTESKIN:GetPath(Noteskin.ButtonRedirs[sButton],ElementToLoad) --Graficos separados para holds y rolls if string.find(sElement,"Hold") or string.find(sElement,"Roll") then + --if ( string.find(sElement,"Hold") or string.find(sElement,"Roll") ) and not ( string.find(sElement,"Head") or string.find(sElement,"Tail") ) then + --if ( string.find(sElement,"Hold") or string.find(sElement,"Roll") ) and ( string.find(sElement,"Body") ) then path = NOTESKIN:GetPath(sButton,ElementToLoad) end diff --git a/NoteSkins/pump/default/UpLeft Explosion.lua b/NoteSkins/pump/default/UpLeft Explosion.lua index 582bab2eb5..38188bdcd1 100644 --- a/NoteSkins/pump/default/UpLeft Explosion.lua +++ b/NoteSkins/pump/default/UpLeft Explosion.lua @@ -1,4 +1,5 @@ return Def.ActorFrame { + --note graphic NOTESKIN:LoadActor(Var "Button", "Tap Note") .. { InitCommand=cmd(blend,"BlendMode_Add";playcommand,"Glow"); W1Command=cmd(playcommand,"Glow"); @@ -6,10 +7,55 @@ return Def.ActorFrame { W3Command=cmd(playcommand,"Glow"); W4Command=cmd(); W5Command=cmd(); - HoldingOnCommand=cmd(playcommand,"Glow"); + --HoldingOnCommand=cmd(playcommand,"Glow"); HitMineCommand=cmd(playcommand,"Glow"); HeldCommand=cmd(playcommand,"Glow"); - GlowCommand=cmd(setstate,0;finishtweening;diffusealpha,1.0;zoom,1.0;linear,0.15;diffusealpha,0.9;zoom,1.1;linear,0.15;diffusealpha,0.0;zoom,1.2); + GlowCommand=cmd(setstate,0;finishtweening;diffusealpha,1.0;zoom,1.0;linear,0.15;diffusealpha,0.9;zoom,1.15;linear,0.15;diffusealpha,0.0;zoom,1.3); + }; + ---[[ + NOTESKIN:LoadActor(Var "Button", "Ready Receptor")..{ + Name="Tap"; + Frames = { { Frame = 2 } }; + InitCommand=cmd(zoom,1;diffusealpha,0); + --NOTESKIN:GetMetricA(Var "Button", "TapInitCommand"); + TapCommand=cmd(finishtweening;diffusealpha,1;zoom,1;linear,0.2;diffusealpha,0;zoom,1.2); + --NOTESKIN:GetMetricA(Var "Button", "TapHeldCommand"); + + W1Command=cmd(playcommand,"Tap"); + W2Command=cmd(playcommand,"Tap"); + W3Command=cmd(playcommand,"Tap"); + W4Command=cmd(playcommand,"Tap"); + W5Command=cmd(playcommand,"Tap"); + + HitMineCommand=cmd(playcommand,"Tap"); + HeldCommand=cmd(playcommand,"Tap"); + + --NONECommand=cmd(playcommand,"Tap"); + + --HeldCommand=NOTESKIN:GetMetricA(Var "Button", "TapHeldCommand"); + --NoneCommand=cmd(linear,0.1;zoom,2); + }; + --]] + --explosion + LoadActor("_stepfx")..{ + Frames = { + { Frame = 0 ; Delay = 0.05 }; + { Frame = 1 ; Delay = 0.05 }; + { Frame = 2 ; Delay = 0.05 }; + { Frame = 3 ; Delay = 0.05 }; + { Frame = 4 ; Delay = 0.05 }; + --WUT... + { Frame = 5 ; Delay = 99999 }; + }; + InitCommand=cmd(blend,"BlendMode_Add";setstate,0); + W1Command=cmd(setstate,0); + W2Command=cmd(setstate,0); + W3Command=cmd(setstate,0); + W4Command=cmd(); + W5Command=cmd(); + --HoldingOnCommand=cmd(setstate,0); + HitMineCommand=cmd(setstate,0); + HeldCommand=cmd(setstate,1); }; Def.Quad { InitCommand=cmd(diffuse,1,1,1,0;zoomto,SCREEN_WIDTH*100,SCREEN_HEIGHT*100;zoomz,SCREEN_WIDTH*SCREEN_HEIGHT); diff --git a/NoteSkins/pump/default/UpLeft Receptor.lua b/NoteSkins/pump/default/UpLeft Receptor.lua index 4094b8111e..a5d1e7e0f7 100644 --- a/NoteSkins/pump/default/UpLeft Receptor.lua +++ b/NoteSkins/pump/default/UpLeft Receptor.lua @@ -1,39 +1,49 @@ local function Beat(self) local this = self:GetChildren() - --Yes, why not? - this.Base:pause(); - this.Glow:pause(); - this.Tap:pause(); - this.Base:setstate(0); - this.Glow:setstate(1); - this.Tap:setstate(2); - this.Glow:blend('BlendMode_Add'); - - this.Glow:diffusealpha(0); local beat = GAMESTATE:GetSongBeat() + local part = beat%1 + part = clamp(part,0,0.5) local eff = scale(part,0,0.5,1,0) - if beat >= 0 then - this.Glow:diffusealpha(eff); + if (GAMESTATE:GetSongDelay() or false) and part == 0 then eff = 0 end + if beat < 0 then + eff = 0 end + this.Glow:diffusealpha(eff); end return Def.ActorFrame { -- COMMANDS -- InitCommand=cmd(SetUpdateFunction,Beat); + -- LAYERS -- + NOTESKIN:LoadActor("Center", "Outline Receptor")..{ + Name="Outline"; + Condition=Var "Button" == "Center"; + --InitCommand=cmd(x,96); + }; NOTESKIN:LoadActor(Var "Button", "Ready Receptor")..{ Name="Base"; - InitCommand=cmd(); + Frames = { { Frame = 0 } }; + --PressCommand=cmd(finishtweening;glow,1,1,1,1;linear,0.1;glow,1,1,1,0); }; NOTESKIN:LoadActor(Var "Button", "Ready Receptor")..{ Name="Glow"; - InitCommand=cmd(); + Frames = { { Frame = 1 } }; + InitCommand=cmd(blend,'BlendMode_Add'); + --PressCommand=cmd(finishtweening;linear,0.05;zoom,0.9;linear,0.1;zoom,1); }; + --[[ NOTESKIN:LoadActor(Var "Button", "Ready Receptor")..{ Name="Tap"; - InitCommand=NOTESKIN:GetMetricA(Var "Button" ,"ReceptorTapInitCommand"); - PressCommand=NOTESKIN:GetMetricA(Var "Button" ,"ReceptorTapPressCommand"); + Frames = { { Frame = 2 } }; + InitCommand=cmd(zoom,1;diffusealpha,0;glow,1,1,1,0); + --NOTESKIN:GetMetricA(Var "Button", "TapInitCommand"); + -- + PressCommand=cmd(finishtweening;glow,1,1,1,1;zoom,1;linear,0.2;glow,1,1,1,0;zoom,1.2); + --NOTESKIN:GetMetricA(Var "Button", "TapHeldCommand"); + -- }; + --]] } \ No newline at end of file diff --git a/NoteSkins/pump/default/UpRight Tap Note.lua b/NoteSkins/pump/default/UpRight Tap Note.lua index e3518c5f6f..a6060b7657 100644 --- a/NoteSkins/pump/default/UpRight Tap Note.lua +++ b/NoteSkins/pump/default/UpRight Tap Note.lua @@ -1 +1,3 @@ -return NOTESKIN:LoadActor("UpLeft","Tap Note"); \ No newline at end of file +return NOTESKIN:LoadActor("UpLeft","Tap Note")..{ + InitCommand=cmd(rotationy,180); +}; \ No newline at end of file diff --git a/NoteSkins/pump/default/metrics.ini b/NoteSkins/pump/default/metrics.ini index 740cd86a56..96aaacb55f 100644 --- a/NoteSkins/pump/default/metrics.ini +++ b/NoteSkins/pump/default/metrics.ini @@ -17,23 +17,10 @@ FlipHoldBodyWhenReverse=1 TopHoldAnchorWhenReverse=0 HoldActiveIsAddLayer=0 -;Explosion commands -ButtonTapCommand=setstate,0;finishtweening;diffusealpha,1.0;zoom,1.0;linear,0.15;diffusealpha,0.9;zoom,1.15;linear,0.15;diffusealpha,0.0;zoom,1.3 - -;you can go nuts now... -FlashTapCommand=finishtweening;diffusealpha,0.5;zoom,1.0;linear,0.15;diffusealpha,0.45;zoom,1.15;linear,0.15;diffusealpha,0.0;zoom,1.3 - -;if you want/need diferent commands for each button, write the previous commands -;under the correspondant button section in this metrics.ini - -;ReceptorTap commands -ReceptorTapInitCommand=zoom,1;diffusealpha,0;glow,1,1,1,0 -ReceptorTapPressCommand=finishtweening;glow,1,1,1,1;zoom,1;linear,0.2;glow,1,1,1,0;zoom,1.2 +TapInitCommand=zoom,1;diffusealpha,0;glow,1,1,1,0 +TapHeldCommand=finishtweening;glow,1,1,1,1;zoom,1;linear,0.2;glow,1,1,1,0;zoom,1.2 [Center] -TapNoteAnimationLengthInBeats=1 -HoldHeadAnimationLengthInBeats=1 -HoldTailAnimationLengthInBeats=1 [DownLeft] diff --git a/Themes/_fallback/metrics.ini b/Themes/_fallback/metrics.ini index a30fa5a004..8c712115d8 100644 --- a/Themes/_fallback/metrics.ini +++ b/Themes/_fallback/metrics.ini @@ -2837,6 +2837,8 @@ StopCourseEarly=false ShowEvaluationOnFail=true ShowScoreInRave=false # +AllowUnpausingWithGameButtonStart=true +# InitialBackgroundBrightness=1.0 TimerSeconds=-1 # diff --git a/src/Player.cpp b/src/Player.cpp index bc2f69f806..2e8534ad2a 100644 --- a/src/Player.cpp +++ b/src/Player.cpp @@ -2005,7 +2005,10 @@ void Player::StepStrumHopo( int col, int row, const RageTimer &tm, bool bHeld, b break; case TapNote::hold_head: - if( !REQUIRE_STEP_ON_HOLD_HEADS && fNoteOffset > 0.f ) + //oh wow, this was causing the trigger + //before the hold heads -DaisuMaster + //(It was >) + if( !REQUIRE_STEP_ON_HOLD_HEADS && fNoteOffset <= 0.f ) { score = TNS_W1; break; diff --git a/src/ScreenGameplay.cpp b/src/ScreenGameplay.cpp index 7256cd13e8..40eba390fa 100644 --- a/src/ScreenGameplay.cpp +++ b/src/ScreenGameplay.cpp @@ -353,6 +353,8 @@ void ScreenGameplay::Init() FAIL_ON_MISS_COMBO.Load( m_sName, "FailOnMissCombo" ); ALLOW_CENTER_1_PLAYER.Load( m_sName, "AllowCenter1Player" ); USE_ALTERNATIVE_INPUT.Load( m_sName, "UseAlternativeInput"); + //configurable + UNPAUSE_WITH_GAME_BUTTON_START.Load( m_sName, "AllowUnpausingWithGameButtonStart" ); if( UseSongBackgroundAndForeground() ) { @@ -2170,7 +2172,9 @@ void ScreenGameplay::Input( const InputEventPlus &input ) if( GAMESTATE->IsHumanPlayer(input.pn) && input.MenuI == GAME_BUTTON_START && input.type == IET_FIRST_PRESS ) { if( m_PauseController == GameController_Invalid || m_PauseController == input.GameI.controller ) - this->PauseGame( false ); + //IMO is better to have this configurable -DaisuMaster + if( UNPAUSE_WITH_GAME_BUTTON_START ) + this->PauseGame( false ); } return; } diff --git a/src/ScreenGameplay.h b/src/ScreenGameplay.h index 750292c5df..a2f85fc015 100644 --- a/src/ScreenGameplay.h +++ b/src/ScreenGameplay.h @@ -151,6 +151,7 @@ protected: ThemeMetric FAIL_ON_MISS_COMBO; ThemeMetric ALLOW_CENTER_1_PLAYER; ThemeMetric USE_ALTERNATIVE_INPUT; + ThemeMetric UNPAUSE_WITH_GAME_BUTTON_START; vector m_vAlterMap; diff --git a/src/ScreenSelectMusic.cpp b/src/ScreenSelectMusic.cpp index 601ff0902c..a8abff6dbd 100644 --- a/src/ScreenSelectMusic.cpp +++ b/src/ScreenSelectMusic.cpp @@ -732,18 +732,18 @@ void ScreenSelectMusic::Input( const InputEventPlus &input ) bool ScreenSelectMusic::DetectCodes( const InputEventPlus &input ) { - if( CodeDetector::EnteredPrevSteps(input.GameI.controller) ) + if( CodeDetector::EnteredPrevSteps(input.GameI.controller) && !CHANGE_STEPS_WITH_GAME_BUTTONS ) { if( GAMESTATE->IsAnExtraStageAndSelectionLocked() ) m_soundLocked.Play(); else ChangeSteps( input.pn, -1 ); } - else if( CodeDetector::EnteredNextSteps(input.GameI.controller) ) + else if( CodeDetector::EnteredNextSteps(input.GameI.controller) && !CHANGE_STEPS_WITH_GAME_BUTTONS ) { if( GAMESTATE->IsAnExtraStageAndSelectionLocked() ) m_soundLocked.Play(); - else + else ChangeSteps( input.pn, +1 ); } else if( CodeDetector::EnteredModeMenu(input.GameI.controller) ) @@ -792,7 +792,6 @@ bool ScreenSelectMusic::DetectCodes( const InputEventPlus &input ) m_MusicWheel.SelectSection(sNewGroup); m_MusicWheel.SetOpenSection(sNewGroup); AfterMusicChange(); - //m_MusicWheel. } } else if( CodeDetector::EnteredCloseFolder(input.GameI.controller) )