various theme changes, mostly from midi
removes duplicate round() function in productivityhelpers
This commit is contained in:
@@ -32,11 +32,11 @@ function ScreenSelectMusic:setupmusicstagemods()
|
||||
local song, steps = SONGMAN:GetExtraStageInfo( bExtra2, style )
|
||||
local po, so
|
||||
if bExtra2 then
|
||||
po = THEME:GetMetric("SongManager","ExtraStagePlayerModifiers");
|
||||
so = THEME:GetMetric("SongManager","ExtraStageStageModifiers");
|
||||
else
|
||||
po = THEME:GetMetric("SongManager","OMESPlayerModifiers");
|
||||
so = THEME:GetMetric("SongManager","OMESStageModifiers");
|
||||
else
|
||||
po = THEME:GetMetric("SongManager","ExtraStagePlayerModifiers");
|
||||
so = THEME:GetMetric("SongManager","ExtraStageStageModifiers");
|
||||
end
|
||||
local difficulty = steps:GetDifficulty()
|
||||
local Reverse = PlayerNumber:Reverse()
|
||||
|
||||
@@ -11,8 +11,8 @@ end
|
||||
|
||||
function IsHome()
|
||||
local sPayMode = GAMESTATE:GetCoinMode();
|
||||
local bIsArcade = (sPayMode == 'CoinMode_Home');
|
||||
return bIsArcade;
|
||||
local bIsHome = (sPayMode == 'CoinMode_Home');
|
||||
return bIsHome;
|
||||
end
|
||||
|
||||
function IsFreePlay()
|
||||
@@ -51,30 +51,6 @@ Health = {
|
||||
uglyfying my code just to handle rare cases). -shake
|
||||
--]]
|
||||
|
||||
function Actor:Real()
|
||||
-- normal
|
||||
local theme = THEME:GetMetric("Common","ScreenHeight")
|
||||
local res = PREFSMAN:GetPreference("DisplayHeight")
|
||||
|
||||
-- scale back down to real pixels.
|
||||
self:basezoom(theme/res)
|
||||
|
||||
-- don't make this ugly
|
||||
self:SetTextureFiltering(false)
|
||||
end
|
||||
|
||||
-- Scale things back up after they have already been scaled down.
|
||||
function Actor:RealInverse()
|
||||
-- normal
|
||||
local theme = THEME:GetMetric("Common","ScreenHeight")
|
||||
local res = PREFSMAN:GetPreference("DisplayHeight")
|
||||
|
||||
-- scale back up to theme resolution
|
||||
self:basezoom(res/theme)
|
||||
|
||||
self:SetTextureFiltering(true)
|
||||
end
|
||||
|
||||
-- useful
|
||||
function GetReal()
|
||||
local theme = THEME:GetMetric("Common","ScreenHeight")
|
||||
@@ -88,6 +64,20 @@ function GetRealInverse()
|
||||
return res/theme
|
||||
end
|
||||
|
||||
function Actor:Real()
|
||||
-- scale back down to real pixels.
|
||||
self:basezoom(GetReal())
|
||||
-- don't make this ugly
|
||||
self:SetTextureFiltering(false)
|
||||
end
|
||||
|
||||
-- Scale things back up after they have already been scaled down.
|
||||
function Actor:RealInverse()
|
||||
-- scale back up to theme resolution
|
||||
self:basezoom(GetRealInverse())
|
||||
self:SetTextureFiltering(true)
|
||||
end
|
||||
|
||||
--[[ Actor commands ]]
|
||||
function Actor:CenterX()
|
||||
self:x(SCREEN_CENTER_X)
|
||||
@@ -204,10 +194,5 @@ function pname(pn)
|
||||
return ToEnumShortString(pn)
|
||||
end
|
||||
|
||||
-- from http://ardoris.wordpress.com/2008/11/07/rounding-to-a-certain-number-of-decimal-places-in-lua/
|
||||
function round(what, precision)
|
||||
return math.floor(what*math.pow(10,precision)+0.5) / math.pow(10,precision)
|
||||
end
|
||||
|
||||
--[[ end helper functions ]]
|
||||
-- this code is in the public domain.
|
||||
@@ -67,9 +67,9 @@ NumFixedProfiles=1
|
||||
[SongManager]
|
||||
# SSC: Determine what the ES/OMES Modifiers are
|
||||
ExtraStagePlayerModifiers="default,1.5x,reverse"
|
||||
ExtraStageStageModifiers="norecover"
|
||||
ExtraStageStageModifiers="failimmediatecontinue,norecover"
|
||||
OMESPlayerModifiers="default,1.5x,reverse"
|
||||
OMESStageModifiers="suddendeath"
|
||||
OMESStageModifiers="failimmediate,suddendeath"
|
||||
|
||||
# How many different colors you can have in the MusicWheel
|
||||
NumSongGroupColors=10
|
||||
@@ -2215,12 +2215,13 @@ BatLives,7="mod,7 lives;name,7"
|
||||
BatLives,8="mod,8 lives;name,8"
|
||||
BatLives,9="mod,9 lives;name,9"
|
||||
BatLives,10="mod,10 lives;name,10"
|
||||
Fail="4;together"
|
||||
FailDefault=""
|
||||
Fail,1="mod,failImmediate;name,Immediate"
|
||||
Fail,2="mod,FailImmediateContinue;name,ImmediateContinue"
|
||||
Fail,3="mod,FailAtEnd;name,FailAtEnd"
|
||||
Fail,4="mod,failoff;name,Off"
|
||||
Fail="5;together"
|
||||
FailDefault="mod,faildefault"
|
||||
Fail,1="mod,faildefault;name,Default"
|
||||
Fail,2="mod,failimmediate;name,Immediate"
|
||||
Fail,3="mod,failimmediatecontinue;name,ImmediateContinue"
|
||||
Fail,4="mod,failatend;name,FailAtEnd"
|
||||
Fail,5="mod,failoff;name,Off"
|
||||
Assist="4;together"
|
||||
AssistDefault=""
|
||||
Assist,1="mod,no clap,no metronome;name,Off"
|
||||
|
||||
@@ -157,6 +157,13 @@ end
|
||||
t[#t+1] = StandardDecorationFromFileOptional("LifeDifficulty","LifeDifficulty");
|
||||
t[#t+1] = StandardDecorationFromFileOptional("TimingDifficulty","TimingDifficulty");
|
||||
t[#t+1] = StandardDecorationFromFileOptional("GameType","GameType");
|
||||
|
||||
t[#t+1] = LoadActor( THEME:GetPathG("ScreenStageInformation","Stage extra1" ) ) .. {
|
||||
InitCommand=cmd(Center;draworder,105);
|
||||
OnCommand=cmd(visible,GAMESTATE:IsExtraStage() and not GAMESTATE:IsExtraStage2();linear,2;zoom,0;diffusealpha,1;);
|
||||
};
|
||||
t[#t+1] = LoadActor( THEME:GetPathG("ScreenStageInformation","Stage extra2" ) ) .. {
|
||||
InitCommand=cmd(Center;draworder,105);
|
||||
OnCommand=cmd(visible,not GAMESTATE:IsExtraStage() and GAMESTATE:IsExtraStage2();linear,2;zoom,0;diffusealpha,1;);
|
||||
};
|
||||
|
||||
return t
|
||||
@@ -83,16 +83,23 @@ t[#t+1] = Def.ActorFrame {
|
||||
end
|
||||
end
|
||||
|
||||
-- we're safe, you can push the values
|
||||
tTotalJudgments[#tTotalJudgments+1] = math.abs( param.TapNoteOffset );
|
||||
|
||||
local iTapNoteOffset = param.TapNoteOffset;
|
||||
|
||||
local fTapNoteOffset = param.TapNoteOffset;
|
||||
if param.HoldNoteScore then
|
||||
iTapNoteOffset = 1;
|
||||
fTapNoteOffset = 1;
|
||||
else
|
||||
iTapNoteOffset = param.TapNoteOFfset;
|
||||
fTapNoteOffset = param.TapNoteOffset;
|
||||
end
|
||||
|
||||
if param.TapNoteScore == 'TapNoteScore_Miss' then
|
||||
fTapNoteOffset = 1;
|
||||
else
|
||||
fTapNoteOffset = fTapNoteOffset;
|
||||
end;
|
||||
|
||||
-- we're safe, you can push the values
|
||||
tTotalJudgments[#tTotalJudgments+1] = math.abs( fTapNoteOffset );
|
||||
|
||||
self:playcommand("Reset");
|
||||
|
||||
c.Judgment:visible( not bShowProtiming );
|
||||
@@ -100,11 +107,11 @@ t[#t+1] = Def.ActorFrame {
|
||||
JudgeCmds[param.TapNoteScore](c.Judgment);
|
||||
|
||||
c.ProtimingDisplay:visible( bShowProtiming );
|
||||
c.ProtimingDisplay:settextf("%i%%",100 - math.floor(math.abs(param.TapNoteOffset * 1000)) );
|
||||
c.ProtimingDisplay:settextf("%i%%",clamp(100 - math.floor(math.abs(fTapNoteOffset * 1000)) ,0,100));
|
||||
ProtimingCmds[param.TapNoteScore](c.ProtimingDisplay);
|
||||
|
||||
c.ProtimingAverage:visible( bShowProtiming );
|
||||
c.ProtimingAverage:settextf("%.2f%%",100 - MakeAverage( tTotalJudgments ) * 1000 );
|
||||
c.ProtimingAverage:settextf("%.2f%%",clamp(100 - MakeAverage( tTotalJudgments ) * 1000 ,0,100));
|
||||
AverageCmds['Pulse'](c.ProtimingAverage);
|
||||
end;
|
||||
};
|
||||
|
||||
@@ -3,9 +3,11 @@ return Def.ActorFrame {
|
||||
local song = GAMESTATE:GetCurrentSong();
|
||||
if song then
|
||||
-- self:setaux(0);
|
||||
self:finishtweening();
|
||||
self:playcommand("TweenOn");
|
||||
elseif not song then
|
||||
elseif not song and self:GetZoomX() == 1 then
|
||||
-- self:setaux(1);
|
||||
self:finishtweening();
|
||||
self:playcommand("TweenOff");
|
||||
end;
|
||||
end;
|
||||
|
||||
Reference in New Issue
Block a user