Fixed the issue related to trigging holdheads before they reach the receptor, at least I think that, more tests to be done (issue 150)

This commit is contained in:
Alberto Ramos
2010-07-18 18:54:37 -06:00
parent 7ae0b82816
commit daa32fc3f8
11 changed files with 119 additions and 54 deletions
@@ -1 +1,3 @@
return NOTESKIN:LoadActor("DownLeft","Tap Note"); return NOTESKIN:LoadActor("DownLeft","Tap Note")..{
InitCommand=cmd(rotationy,180);
};
+22 -13
View File
@@ -1,17 +1,19 @@
local Noteskin = ... or {} local Noteskin = {}
--bBlanks: --bBlanks:
Noteskin.bBlanks = { Noteskin.bBlanks = {
--["element"] = true|false; --["element"] = true|false;
["Hold Tail Active"] = true; ["Hold Tail Active"] = true;
["Roll Tail Active"] = true; ["Hold Tail Active"] = true;
["Roll Tail Inactive"] = true;
["Roll Tail Inactive"] = true;
} }
Noteskin.ElementRedirs = { Noteskin.ElementRedirs = {
--["element"] = "redirected_element"; --["element"] = "redirected_element";
["Hold Head Active"] = "Tap Note"; ["Hold Head Active"] = "Tap Note";
["Hold Head Inactive"] = "Tap Note"; ["Hold Head Inactive"] = "Tap Note";
["Roll Head Active"] = "Tap Note"; ["Roll Head Active"] = "Roll Head Active";
["Roll Head Inactive"] = "Tap Note"; ["Roll Head Inactive"] = "Roll Head Active";
["Tap Fake"] = "Tap Note"; ["Tap Fake"] = "Tap Note";
-- --
["Hold Topcap Inactive"] = "Hold Topcap Active"; ["Hold Topcap Inactive"] = "Hold Topcap Active";
@@ -19,17 +21,22 @@ Noteskin.ElementRedirs = {
["Hold Bottomcap Inactive"] = "Hold Bottomcap Active"; ["Hold Bottomcap Inactive"] = "Hold Bottomcap Active";
["Hold Tail Inactive"] = "Hold Tail Active"; ["Hold Tail Inactive"] = "Hold Tail Active";
-- --
["Roll Topcap Inactive"] = "Roll Topcap Active"; ["Roll Topcap Active"] = "Hold Topcap Active";
["Roll Body Inactive"] = "Roll Body Active"; ["Roll Body Active"] = "Hold Body Active";
["Roll Bottomcap Inactive"] = "Roll Bottomcap Active"; ["Roll Bottomcap Active"] = "Hold Bottomcap Active";
["Roll Tail Inactive"] = "Roll Tail 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 = { Noteskin.ButtonRedirs = {
Center = "Center"; Center = "Center";
UpLeft = "UpLeft"; UpLeft = "UpLeft";
UpRight = "UpLeft"; UpRight = "UpRight";
DownLeft = "DownLeft"; DownLeft = "DownLeft";
DownRight = "DownLeft"; DownRight = "DownRight";
} }
Noteskin.BaseRotX = { Noteskin.BaseRotX = {
Center = 0; Center = 0;
@@ -41,9 +48,9 @@ Noteskin.BaseRotX = {
Noteskin.BaseRotY = { Noteskin.BaseRotY = {
Center = 0; Center = 0;
UpLeft = 0; UpLeft = 0;
UpRight = 180; UpRight = 0;
DownLeft = 0; DownLeft = 0;
DownRight = 180; DownRight = 0;
} }
local function func() local function func()
@@ -71,6 +78,8 @@ local function func()
local path = NOTESKIN:GetPath(Noteskin.ButtonRedirs[sButton],ElementToLoad) local path = NOTESKIN:GetPath(Noteskin.ButtonRedirs[sButton],ElementToLoad)
--Graficos separados para holds y rolls --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") 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) path = NOTESKIN:GetPath(sButton,ElementToLoad)
end end
+48 -2
View File
@@ -1,4 +1,5 @@
return Def.ActorFrame { return Def.ActorFrame {
--note graphic
NOTESKIN:LoadActor(Var "Button", "Tap Note") .. { NOTESKIN:LoadActor(Var "Button", "Tap Note") .. {
InitCommand=cmd(blend,"BlendMode_Add";playcommand,"Glow"); InitCommand=cmd(blend,"BlendMode_Add";playcommand,"Glow");
W1Command=cmd(playcommand,"Glow"); W1Command=cmd(playcommand,"Glow");
@@ -6,10 +7,55 @@ return Def.ActorFrame {
W3Command=cmd(playcommand,"Glow"); W3Command=cmd(playcommand,"Glow");
W4Command=cmd(); W4Command=cmd();
W5Command=cmd(); W5Command=cmd();
HoldingOnCommand=cmd(playcommand,"Glow"); --HoldingOnCommand=cmd(playcommand,"Glow");
HitMineCommand=cmd(playcommand,"Glow"); HitMineCommand=cmd(playcommand,"Glow");
HeldCommand=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 { Def.Quad {
InitCommand=cmd(diffuse,1,1,1,0;zoomto,SCREEN_WIDTH*100,SCREEN_HEIGHT*100;zoomz,SCREEN_WIDTH*SCREEN_HEIGHT); InitCommand=cmd(diffuse,1,1,1,0;zoomto,SCREEN_WIDTH*100,SCREEN_HEIGHT*100;zoomz,SCREEN_WIDTH*SCREEN_HEIGHT);
+26 -16
View File
@@ -1,39 +1,49 @@
local function Beat(self) local function Beat(self)
local this = self:GetChildren() 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 beat = GAMESTATE:GetSongBeat()
local part = beat%1 local part = beat%1
part = clamp(part,0,0.5)
local eff = scale(part,0,0.5,1,0) local eff = scale(part,0,0.5,1,0)
if beat >= 0 then if (GAMESTATE:GetSongDelay() or false) and part == 0 then eff = 0 end
this.Glow:diffusealpha(eff); if beat < 0 then
eff = 0
end end
this.Glow:diffusealpha(eff);
end end
return Def.ActorFrame { return Def.ActorFrame {
-- COMMANDS -- -- COMMANDS --
InitCommand=cmd(SetUpdateFunction,Beat); InitCommand=cmd(SetUpdateFunction,Beat);
-- LAYERS -- -- LAYERS --
NOTESKIN:LoadActor("Center", "Outline Receptor")..{
Name="Outline";
Condition=Var "Button" == "Center";
--InitCommand=cmd(x,96);
};
NOTESKIN:LoadActor(Var "Button", "Ready Receptor")..{ NOTESKIN:LoadActor(Var "Button", "Ready Receptor")..{
Name="Base"; 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")..{ NOTESKIN:LoadActor(Var "Button", "Ready Receptor")..{
Name="Glow"; 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")..{ NOTESKIN:LoadActor(Var "Button", "Ready Receptor")..{
Name="Tap"; Name="Tap";
InitCommand=NOTESKIN:GetMetricA(Var "Button" ,"ReceptorTapInitCommand"); Frames = { { Frame = 2 } };
PressCommand=NOTESKIN:GetMetricA(Var "Button" ,"ReceptorTapPressCommand"); 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");
--
}; };
--]]
} }
+3 -1
View File
@@ -1 +1,3 @@
return NOTESKIN:LoadActor("UpLeft","Tap Note"); return NOTESKIN:LoadActor("UpLeft","Tap Note")..{
InitCommand=cmd(rotationy,180);
};
+2 -15
View File
@@ -17,23 +17,10 @@ FlipHoldBodyWhenReverse=1
TopHoldAnchorWhenReverse=0 TopHoldAnchorWhenReverse=0
HoldActiveIsAddLayer=0 HoldActiveIsAddLayer=0
;Explosion commands TapInitCommand=zoom,1;diffusealpha,0;glow,1,1,1,0
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 TapHeldCommand=finishtweening;glow,1,1,1,1;zoom,1;linear,0.2;glow,1,1,1,0;zoom,1.2
;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
[Center] [Center]
TapNoteAnimationLengthInBeats=1
HoldHeadAnimationLengthInBeats=1
HoldTailAnimationLengthInBeats=1
[DownLeft] [DownLeft]
+2
View File
@@ -2837,6 +2837,8 @@ StopCourseEarly=false
ShowEvaluationOnFail=true ShowEvaluationOnFail=true
ShowScoreInRave=false ShowScoreInRave=false
# #
AllowUnpausingWithGameButtonStart=true
#
InitialBackgroundBrightness=1.0 InitialBackgroundBrightness=1.0
TimerSeconds=-1 TimerSeconds=-1
# #
+4 -1
View File
@@ -2005,7 +2005,10 @@ void Player::StepStrumHopo( int col, int row, const RageTimer &tm, bool bHeld, b
break; break;
case TapNote::hold_head: 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; score = TNS_W1;
break; break;
+5 -1
View File
@@ -353,6 +353,8 @@ void ScreenGameplay::Init()
FAIL_ON_MISS_COMBO.Load( m_sName, "FailOnMissCombo" ); FAIL_ON_MISS_COMBO.Load( m_sName, "FailOnMissCombo" );
ALLOW_CENTER_1_PLAYER.Load( m_sName, "AllowCenter1Player" ); ALLOW_CENTER_1_PLAYER.Load( m_sName, "AllowCenter1Player" );
USE_ALTERNATIVE_INPUT.Load( m_sName, "UseAlternativeInput"); USE_ALTERNATIVE_INPUT.Load( m_sName, "UseAlternativeInput");
//configurable
UNPAUSE_WITH_GAME_BUTTON_START.Load( m_sName, "AllowUnpausingWithGameButtonStart" );
if( UseSongBackgroundAndForeground() ) 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( GAMESTATE->IsHumanPlayer(input.pn) && input.MenuI == GAME_BUTTON_START && input.type == IET_FIRST_PRESS )
{ {
if( m_PauseController == GameController_Invalid || m_PauseController == input.GameI.controller ) 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; return;
} }
+1
View File
@@ -151,6 +151,7 @@ protected:
ThemeMetric<int> FAIL_ON_MISS_COMBO; ThemeMetric<int> FAIL_ON_MISS_COMBO;
ThemeMetric<bool> ALLOW_CENTER_1_PLAYER; ThemeMetric<bool> ALLOW_CENTER_1_PLAYER;
ThemeMetric<bool> USE_ALTERNATIVE_INPUT; ThemeMetric<bool> USE_ALTERNATIVE_INPUT;
ThemeMetric<bool> UNPAUSE_WITH_GAME_BUTTON_START;
vector<AlternateMapping> m_vAlterMap; vector<AlternateMapping> m_vAlterMap;
+3 -4
View File
@@ -732,18 +732,18 @@ void ScreenSelectMusic::Input( const InputEventPlus &input )
bool ScreenSelectMusic::DetectCodes( 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() ) if( GAMESTATE->IsAnExtraStageAndSelectionLocked() )
m_soundLocked.Play(); m_soundLocked.Play();
else else
ChangeSteps( input.pn, -1 ); 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() ) if( GAMESTATE->IsAnExtraStageAndSelectionLocked() )
m_soundLocked.Play(); m_soundLocked.Play();
else else
ChangeSteps( input.pn, +1 ); ChangeSteps( input.pn, +1 );
} }
else if( CodeDetector::EnteredModeMenu(input.GameI.controller) ) else if( CodeDetector::EnteredModeMenu(input.GameI.controller) )
@@ -792,7 +792,6 @@ bool ScreenSelectMusic::DetectCodes( const InputEventPlus &input )
m_MusicWheel.SelectSection(sNewGroup); m_MusicWheel.SelectSection(sNewGroup);
m_MusicWheel.SetOpenSection(sNewGroup); m_MusicWheel.SetOpenSection(sNewGroup);
AfterMusicChange(); AfterMusicChange();
//m_MusicWheel.
} }
} }
else if( CodeDetector::EnteredCloseFolder(input.GameI.controller) ) else if( CodeDetector::EnteredCloseFolder(input.GameI.controller) )