add a SegmentDisplay that displays if certain things appear in the song timing (stops, delays, warps, fake segments, scroll segments, speed segments) and chart attacks
This commit is contained in:
@@ -5,7 +5,7 @@ from StepMania 4 alpha 5 to sm-ssc v1.2.5, see Changelog_sm-ssc.txt.
|
|||||||
________________________________________________________________________________
|
________________________________________________________________________________
|
||||||
|
|
||||||
================================================================================
|
================================================================================
|
||||||
StepMania 5.0 Preview 3 | 201108??
|
StepMania 5.0 Preview 3 | 2011081?
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
2011/08/13
|
2011/08/13
|
||||||
|
|||||||
@@ -119,6 +119,7 @@ t[#t+1] = StandardDecorationFromFileOptional("DifficultyList","DifficultyList");
|
|||||||
t[#t+1] = StandardDecorationFromFileOptional("CourseContentsList","CourseContentsList");
|
t[#t+1] = StandardDecorationFromFileOptional("CourseContentsList","CourseContentsList");
|
||||||
t[#t+1] = StandardDecorationFromFileOptional("BPMDisplay","BPMDisplay");
|
t[#t+1] = StandardDecorationFromFileOptional("BPMDisplay","BPMDisplay");
|
||||||
t[#t+1] = StandardDecorationFromFileOptional("BPMLabel","BPMLabel");
|
t[#t+1] = StandardDecorationFromFileOptional("BPMLabel","BPMLabel");
|
||||||
|
t[#t+1] = StandardDecorationFromFileOptional("SegmentDisplay","SegmentDisplay");
|
||||||
--[[ t[#t+1] = StandardDecorationFromFileOptional("NegativeDisplay","NegativeDisplay") .. {
|
--[[ t[#t+1] = StandardDecorationFromFileOptional("NegativeDisplay","NegativeDisplay") .. {
|
||||||
}; --]]
|
}; --]]
|
||||||
|
|
||||||
|
|||||||
@@ -2,18 +2,5 @@ return Def.ActorFrame {
|
|||||||
LoadFont("Common Normal") .. {
|
LoadFont("Common Normal") .. {
|
||||||
Text="BPM";
|
Text="BPM";
|
||||||
InitCommand=cmd(horizalign,right;zoom,0.75;strokecolor,Color("Outline"));
|
InitCommand=cmd(horizalign,right;zoom,0.75;strokecolor,Color("Outline"));
|
||||||
SetCommand=function(self)
|
|
||||||
local bIsFirst = false;
|
|
||||||
local song = GAMESTATE:GetCurrentSong();
|
|
||||||
self:stoptweening();
|
|
||||||
-- self:linear(0.25);
|
|
||||||
if song then
|
|
||||||
self:diffusebottomedge( song:GetTimingData():HasStops() and Color("Orange") or Color("White") );
|
|
||||||
else
|
|
||||||
self:diffusebottomedge( Color("White") );
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
CurrentSongChangedMessageCommand=cmd(playcommand,"Set");
|
|
||||||
CurrentCourseChangedMessageCommand=cmd(playcommand,"Set");
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
BIN
Binary file not shown.
|
After Width: | Height: | Size: 1.9 KiB |
@@ -0,0 +1,133 @@
|
|||||||
|
-- segment display: tells the player about various gimmicks used in the song timing.
|
||||||
|
local iconPath = "_timingicons"
|
||||||
|
local leftColX = -144
|
||||||
|
local rightColX = -leftColX
|
||||||
|
|
||||||
|
local showCmd = cmd(stoptweening;accelerate,0.125;diffusealpha,1)
|
||||||
|
local hideCmd = cmd(stoptweening;accelerate,0.125;diffusealpha,0)
|
||||||
|
|
||||||
|
local SegmentTypes = {
|
||||||
|
Stops = { Frame = 0, xPos = leftColX, yPos = 0 },
|
||||||
|
Warps = { Frame = 2, xPos = leftColX, yPos = -16 },
|
||||||
|
Delays = { Frame = 1, xPos = leftColX, yPos = -32 },
|
||||||
|
Attacks = { Frame = 6, xPos = leftColX, yPos = 16 },
|
||||||
|
Scrolls = { Frame = 3, xPos = rightColX, yPos = -32 },
|
||||||
|
Speeds = { Frame = 4, xPos = rightColX, yPos = -17 },
|
||||||
|
Fakes = { Frame = 5, xPos = rightColX, yPos = -2 },
|
||||||
|
};
|
||||||
|
|
||||||
|
local t = Def.ActorFrame{
|
||||||
|
BeginCommand=cmd(playcommand,"SetIcons";playcommand,"SetAttacksIconMessage");
|
||||||
|
OffCommand=cmd( RunCommandsOnChildren,cmd(playcommand,"Hide") );
|
||||||
|
|
||||||
|
SetIconsCommand=function(self)
|
||||||
|
local stops = self:GetChild("StopsIcon")
|
||||||
|
local delays = self:GetChild("DelaysIcon")
|
||||||
|
local warps = self:GetChild("WarpsIcon")
|
||||||
|
local scrolls = self:GetChild("ScrollsIcon")
|
||||||
|
local speeds = self:GetChild("SpeedsIcon")
|
||||||
|
local fakes = self:GetChild("FakesIcon")
|
||||||
|
|
||||||
|
-- hax
|
||||||
|
MESSAGEMAN:Broadcast("SetAttacksIcon",{Player = GAMESTATE:GetMasterPlayerNumber()})
|
||||||
|
|
||||||
|
local song = GAMESTATE:GetCurrentSong()
|
||||||
|
if song then
|
||||||
|
local timing = song:GetTimingData()
|
||||||
|
|
||||||
|
if timing:HasWarps() then warps:playcommand("Show")
|
||||||
|
else warps:playcommand("Hide")
|
||||||
|
end
|
||||||
|
|
||||||
|
if timing:HasStops() then stops:playcommand("Show")
|
||||||
|
else stops:playcommand("Hide")
|
||||||
|
end
|
||||||
|
|
||||||
|
if timing:HasDelays() then delays:playcommand("Show")
|
||||||
|
else delays:playcommand("Hide")
|
||||||
|
end
|
||||||
|
|
||||||
|
if timing:HasScrollChanges() then scrolls:playcommand("Show")
|
||||||
|
else scrolls:playcommand("Hide")
|
||||||
|
end
|
||||||
|
|
||||||
|
if timing:HasSpeedChanges() then speeds:playcommand("Show")
|
||||||
|
else speeds:playcommand("Hide")
|
||||||
|
end
|
||||||
|
|
||||||
|
if timing:HasFakes() then fakes:playcommand("Show")
|
||||||
|
else fakes:playcommand("Hide")
|
||||||
|
end
|
||||||
|
else
|
||||||
|
warps:playcommand("Hide")
|
||||||
|
stops:playcommand("Hide")
|
||||||
|
delays:playcommand("Hide")
|
||||||
|
scrolls:playcommand("Hide")
|
||||||
|
speeds:playcommand("Hide")
|
||||||
|
fakes:playcommand("Hide")
|
||||||
|
end
|
||||||
|
end;
|
||||||
|
SetAttacksIconMessageCommand=function(self,param)
|
||||||
|
local attacks = self:GetChild("AttacksIcon")
|
||||||
|
local song = GAMESTATE:GetCurrentSong()
|
||||||
|
if song then
|
||||||
|
local steps = GAMESTATE:GetCurrentSteps(param.Player)
|
||||||
|
if steps then
|
||||||
|
local hasAttacks = steps:HasAttacks()
|
||||||
|
attacks:playcommand(hasAttacks and "Show" or "Hide")
|
||||||
|
else
|
||||||
|
attacks:playcommand("Hide")
|
||||||
|
end
|
||||||
|
else
|
||||||
|
attacks:playcommand("Hide")
|
||||||
|
end
|
||||||
|
end;
|
||||||
|
|
||||||
|
LoadActor(iconPath)..{
|
||||||
|
Name="WarpsIcon";
|
||||||
|
InitCommand=cmd(animate,false;x,SegmentTypes.Warps.xPos;y,SegmentTypes.Warps.yPos;setstate,SegmentTypes.Warps.Frame;diffusealpha,0);
|
||||||
|
ShowCommand=showCmd;
|
||||||
|
HideCommand=hideCmd;
|
||||||
|
};
|
||||||
|
LoadActor(iconPath)..{
|
||||||
|
Name="StopsIcon";
|
||||||
|
InitCommand=cmd(animate,false;x,SegmentTypes.Stops.xPos;y,SegmentTypes.Stops.yPos;setstate,SegmentTypes.Stops.Frame;diffusealpha,0);
|
||||||
|
ShowCommand=showCmd;
|
||||||
|
HideCommand=hideCmd;
|
||||||
|
};
|
||||||
|
LoadActor(iconPath)..{
|
||||||
|
Name="DelaysIcon";
|
||||||
|
InitCommand=cmd(animate,false;x,SegmentTypes.Delays.xPos;y,SegmentTypes.Delays.yPos;setstate,SegmentTypes.Delays.Frame;diffusealpha,0);
|
||||||
|
ShowCommand=showCmd;
|
||||||
|
HideCommand=hideCmd;
|
||||||
|
};
|
||||||
|
LoadActor(iconPath)..{
|
||||||
|
Name="AttacksIcon";
|
||||||
|
InitCommand=cmd(animate,false;x,SegmentTypes.Attacks.xPos;y,SegmentTypes.Attacks.yPos;setstate,SegmentTypes.Attacks.Frame;diffusealpha,0);
|
||||||
|
ShowCommand=showCmd;
|
||||||
|
HideCommand=hideCmd;
|
||||||
|
};
|
||||||
|
LoadActor(iconPath)..{
|
||||||
|
Name="ScrollsIcon";
|
||||||
|
InitCommand=cmd(animate,false;x,SegmentTypes.Scrolls.xPos;y,SegmentTypes.Scrolls.yPos;setstate,SegmentTypes.Scrolls.Frame;diffusealpha,0);
|
||||||
|
ShowCommand=showCmd;
|
||||||
|
HideCommand=hideCmd;
|
||||||
|
};
|
||||||
|
LoadActor(iconPath)..{
|
||||||
|
Name="SpeedsIcon";
|
||||||
|
InitCommand=cmd(animate,false;x,SegmentTypes.Speeds.xPos;y,SegmentTypes.Speeds.yPos;setstate,SegmentTypes.Speeds.Frame;diffusealpha,0);
|
||||||
|
ShowCommand=showCmd;
|
||||||
|
HideCommand=hideCmd;
|
||||||
|
};
|
||||||
|
LoadActor(iconPath)..{
|
||||||
|
Name="FakesIcon";
|
||||||
|
InitCommand=cmd(animate,false;x,SegmentTypes.Fakes.xPos;y,SegmentTypes.Fakes.yPos;setstate,SegmentTypes.Fakes.Frame;diffusealpha,0);
|
||||||
|
ShowCommand=showCmd;
|
||||||
|
HideCommand=hideCmd;
|
||||||
|
};
|
||||||
|
CurrentSongChangedMessageCommand=cmd(playcommand,"SetIcons";);
|
||||||
|
CurrentStepsP1ChangedMessageCommand=function(self) MESSAGEMAN:Broadcast("SetAttacksIcon",{Player = PLAYER_1}) end;
|
||||||
|
CurrentStepsP2ChangedMessageCommand=function(self) MESSAGEMAN:Broadcast("SetAttacksIcon",{Player = PLAYER_2}) end;
|
||||||
|
};
|
||||||
|
|
||||||
|
return t;
|
||||||
@@ -38,11 +38,11 @@ NumRainbowColors=1
|
|||||||
RainbowColor1=Color("Black");
|
RainbowColor1=Color("Black");
|
||||||
|
|
||||||
[BPMDisplay]
|
[BPMDisplay]
|
||||||
SetNoBpmCommand=stoptweening;maxwidth,128;linear,0.2;diffuse,Color("White");diffusebottomedge,BoostColor(Color("White"),0.875);
|
SetNoBpmCommand=stoptweening;stopeffect;maxwidth,128;linear,0.2;diffuse,Color("White");diffusebottomedge,BoostColor(Color("White"),0.875);
|
||||||
SetNormalCommand=stoptweening;maxwidth,128;linear,0.2;diffuse,Color("White");diffusebottomedge,BoostColor(Color("White"),0.875);
|
SetNormalCommand=stoptweening;stopeffect;maxwidth,128;linear,0.2;diffuse,Color("White");diffusebottomedge,BoostColor(Color("White"),0.875);
|
||||||
SetChangeCommand=stoptweening;maxwidth,128;linear,0.2;diffuse,Color("Orange");diffusetopedge,BoostColor(Color("Orange"),1.5);
|
SetChangeCommand=stoptweening;stopeffect;maxwidth,128;linear,0.2;diffuse,Color("White");diffusebottomedge,BoostColor(Color("White"),0.875);
|
||||||
SetRandomCommand=stoptweening;maxwidth,128;linear,0.2;diffuse,Color("Blue");diffusetopedge,BoostColor(Color("Blue"),1.5);
|
SetRandomCommand=stoptweening;maxwidth,128;linear,0.2;diffuse,color("Green");textglowmode,'TextGlowMode_Inner';glowshift;effectcolor1,color("1,1,1,0.05");effectcolor2,color("1,1,1,0.325");
|
||||||
SetExtraCommand=stoptweening;maxwidth,128;linear,0.2;diffuse,Color("Red");diffusebottomedge,BoostColor(Color("Red"),0.5);
|
SetExtraCommand=stoptweening;maxwidth,128;linear,0.2;diffuse,Color("Red");diffusebottomedge,BoostColor(Color("Red"),0.5);diffuseshift;effectcolor1,color("1,1,1,1");effectcolor2,color("0.475,0.475,0.475,1");
|
||||||
RandomCycleSpeed=0.2 -- smaller numbers mean the bpm cycles faster
|
RandomCycleSpeed=0.2 -- smaller numbers mean the bpm cycles faster
|
||||||
|
|
||||||
[CodeDetector]
|
[CodeDetector]
|
||||||
@@ -924,6 +924,10 @@ BPMLabelY=SCREEN_TOP+160+(36/2)+6
|
|||||||
BPMLabelOnCommand=addx,-SCREEN_CENTER_X;decelerate,0.35;addx,SCREEN_CENTER_X
|
BPMLabelOnCommand=addx,-SCREEN_CENTER_X;decelerate,0.35;addx,SCREEN_CENTER_X
|
||||||
BPMLabelOffCommand=bouncebegin,0.15;zoomx,0;
|
BPMLabelOffCommand=bouncebegin,0.15;zoomx,0;
|
||||||
#
|
#
|
||||||
|
ShowSegmentDisplay=not GAMESTATE:IsCourseMode()
|
||||||
|
SegmentDisplayX=SCREEN_CENTER_X-160
|
||||||
|
SegmentDisplayY=SCREEN_TOP+160-36+4
|
||||||
|
#
|
||||||
ShowDifficultyList=not GAMESTATE:IsCourseMode();
|
ShowDifficultyList=not GAMESTATE:IsCourseMode();
|
||||||
DifficultyListX=SCREEN_CENTER_X-160
|
DifficultyListX=SCREEN_CENTER_X-160
|
||||||
DifficultyListY=SCREEN_TOP+216
|
DifficultyListY=SCREEN_TOP+216
|
||||||
|
|||||||
Reference in New Issue
Block a user