diff --git a/Docs/Changelog_sm-ssc.txt b/Docs/Changelog_sm-ssc.txt index 3ba2b14ac2..cb417d24d0 100644 --- a/Docs/Changelog_sm-ssc.txt +++ b/Docs/Changelog_sm-ssc.txt @@ -9,7 +9,40 @@ Not all changes are documented, for various reasons. supported but exist anyways.) _____________________________________________________________________________ -sm-ssc v1.0 Public Beta 1 | 20100228 +20100309 +-------- +* [ScreenSelectMaster] Add GetSelectionIndex(pn) Lua binding. (You'll have to + call this one using GAMESTATE:GetTopScreen():GetSelectionIndex(PLAYER_1) or + something like that.) + +20100308 +-------- +* [PlayerStageStats] add GetPercentageOfTaps(TapNoteScore) Lua binding +* [PlayerState] add GetMultiPlayerNumber() Lua binding (untested) + +sm4svn catch up, all by Chris Danford: +* r28326: fix handling of noteskins with an uppercase letter +* r28327: track W4 full combo +* r28328: draw glow using stroke texture + +20100306 +-------- +* [ScreenEvaluation] New metric DetailLineFormat. Must contain two integer flags + (%d or %i should work.) + +20100305 +-------- +* [ScreenNetEvaluation] add GetNumActivePlayers() binding and UpdateNetEvalStats + message (one param, ActivePlayerIndex). This is currently untested. + +20100301 +-------- +* Re-add SM4SVN r28063 "Allow for 'confirmation only' double press mechanisms +as a choice for two part selection on ScreenSelectMusic" since + 1) It actually did have a use + 2) [AJ] was thinking of adding it anyways and forgot it was already made. + +sm-ssc v1.0 Public Beta 1 | 20100301 ------------------------------------ This represents the first public version of sm-ssc. The previously publicly available release was not the official public beta version, but was released diff --git a/Themes/_fallback/Scripts/03 Gameplay.lua b/Themes/_fallback/Scripts/03 Gameplay.lua index 8ddacdb460..48d3f79644 100644 --- a/Themes/_fallback/Scripts/03 Gameplay.lua +++ b/Themes/_fallback/Scripts/03 Gameplay.lua @@ -17,6 +17,22 @@ function GameCompatibleModes() return Modes[sGame]; end +-- ScoreKeeperClass: +-- [en] Determines the correct ScoreKeeper class to use. +function ScoreKeeperClass() + sGame = GAMESTATE:GetCurrentGame():GetName(); + local ScoreKeepers = { + -- xxx: allow for ScoreKeeperRave and ScoreKeeperShared when needed + dance = "ScoreKeeperNormal", + pump = "ScoreKeeperNormal", + beat = "ScoreKeeperNormal", + kb7 = "ScoreKeeperNormal", + para = "ScoreKeeperNormal", + guitar = "ScoreKeeperGuitar", + }; + return ScoreKeepers[sGame] +end; + -- ComboContinue: -- [en] function ComboContinue() @@ -61,6 +77,7 @@ function HitCombo() beat = 2, kb7 = 2, para = 2, + guitar = 2, }; return Combo[sGame] end; @@ -73,11 +90,14 @@ function MissCombo() beat = 0, kb7 = 0, para = 0, + guitar = 0, }; return Combo[sGame] end; -function FailCombo() -- The combo that causes game failure. +-- FailCombo: +-- [en] The combo that causes game failure. +function FailCombo() sGame = GAMESTATE:GetCurrentGame():GetName(); local Combo = { dance = 30, -- ITG/Pump Pro does it this way. @@ -85,6 +105,7 @@ function FailCombo() -- The combo that causes game failure. beat = -1, kb7 = -1, para = -1, + guitar = -1, }; return Combo[sGame] end; diff --git a/Themes/_fallback/metrics.ini b/Themes/_fallback/metrics.ini index 9dd2e84d43..f02d9b5977 100644 --- a/Themes/_fallback/metrics.ini +++ b/Themes/_fallback/metrics.ini @@ -1063,8 +1063,8 @@ Fallback="Screen" LineOnColor=color("1,1,1,1") LineOffColor=color("0.6,0.6,0.6,1") -PageNameGainFocusCommand=diffuse,color("1,1,1,1") -PageNameLoseFocusCommand=diffuse,color("0.6,0.6,0.6,1") +PageTextGainFocusCommand=diffuse,color("1,1,1,1") +PageTextLoseFocusCommand=diffuse,color("0.6,0.6,0.6,1") DebugMenuHeaderX=SCREEN_LEFT+80 DebugMenuHeaderY=SCREEN_TOP+18 @@ -2250,11 +2250,11 @@ MappedToP2S1Command=x,SCREEN_CENTER_X+120 MappedToP2S2Command=x,SCREEN_CENTER_X+195 MappedToP2S3Command=x,SCREEN_CENTER_X+270 # -MappedToOnCommand=diffuse,#808080;shadowlength,0;maxwidth,150;zoom,0.75 -MappedToWaitingCommand=diffuse,#FF8080;pulse;effectperiod,0.5;effectmagnitude,0.8,1.3,0 -MappedToMappedInputCommand=diffuse,#808080;diffuseshift;effectcolor2,#808080;effectcolor1,#FFFFFF -MappedToGainFocusCommand=diffuse,#808080;diffuseshift;effectcolor2,#808080;effectcolor1,#FFFFFF -MappedToLoseFocusCommand=diffuse,#808080;stopeffect +MappedToOnCommand=diffuse,color("#808080");shadowlength,0;maxwidth,150;zoom,0.75 +MappedToWaitingCommand=diffuse,color("#FF8080");pulse;effectperiod,0.5;effectmagnitude,0.8,1.3,0 +MappedToMappedInputCommand=diffuse,color("#808080");diffuseshift;effectcolor2,color("#808080");effectcolor1,color("#FFFFFF") +MappedToGainFocusCommand=diffuse,color("#808080");diffuseshift;effectcolor2,color("#808080");effectcolor1,color("#FFFFFF") +MappedToLoseFocusCommand=diffuse,color("#808080");stopeffect # LineScrollerOnCommand=%function(self) self:draworder(-1); self:y(64) self:setsecondsperitem(0.1) self:SetTransformFromHeight(24) end LineScrollerOffCommand= @@ -2264,7 +2264,7 @@ LineOffCommand=%function(self) local LeftToRight = math.mod(self.ItemIndex, 2) = # ErrorX=SCREEN_CENTER_X ErrorY=SCREEN_CENTER_Y -ErrorOnCommand=diffuse,#00FF00;zoom,0.8 +ErrorOnCommand=diffuse,color("#00FF00");zoom,0.8 LabelP1OnCommand=x,SCREEN_CENTER_X*0.4;zoom,0.7;shadowlength,1 LabelP1OffCommand=linear,0.5;diffusealpha,0 LabelP2OnCommand=x,SCREEN_CENTER_X*1.6;zoom,0.7;shadowlength,1 @@ -2681,7 +2681,7 @@ InitialBackgroundBrightness=1.0 TimerSeconds=-1 # SecondsBetweenComments=10.0 -ScoreKeeperClass="ScoreKeeperNormal" +ScoreKeeperClass=ScoreKeeperClass() # TickEarlySeconds=0 # @@ -2898,6 +2898,8 @@ DisqualifiedP2X= DisqualifiedP2Y= DisqualifiedP2OnCommand=visible,false DisqualifiedP2OffCommand= +# +DetailLineFormat="%3d/%3d" [ScreenEvaluationNormal] Fallback="ScreenEvaluation" @@ -3361,7 +3363,7 @@ DifficultyIconP1Y=SCREEN_BOTTOM-54 DifficultyIconP2X=SCREEN_CENTER_X+80 DifficultyIconP2Y=SCREEN_BOTTOM-50 -HelpText=ScreenString("HelpTextNetSelectMusic"); +HelpText=Screen.String("HelpTextNetSelectMusic"); [ScreenNetRoom] Class="ScreenNetRoom" @@ -3460,10 +3462,11 @@ Class="ScreenNetEvaluation" Fallback="ScreenEvaluationNormal" NextScreen="ScreenProfileSave" -## aaa +# these three commands are deprecated: UsersBGWidth=SCREEN_CENTER_X*0.75 UsersBGHeight=SCREEN_HEIGHT*0.7 UsersBGCommand=diffuse,color("0,0,0,0.25") + UsersBGOnCommand= UsersBGOffCommand= diff --git a/Themes/default/BGAnimations/ScreenPlayerOptions background.lua b/Themes/default/BGAnimations/ScreenPlayerOptions background.lua new file mode 100644 index 0000000000..17ba2fef77 --- /dev/null +++ b/Themes/default/BGAnimations/ScreenPlayerOptions background.lua @@ -0,0 +1 @@ +return GAMESTATE:IsCourseMode() and LoadActor( THEME:GetPathB( Var "LoadingScreen", "background" ) ) or LoadActor( THEME:GetPathB("ScreenEvaluation","background") ); \ No newline at end of file diff --git a/Themes/default/BGAnimations/ScreenSongOptions background.redir b/Themes/default/BGAnimations/ScreenSongOptions background.redir new file mode 100644 index 0000000000..cd6d8dc23f --- /dev/null +++ b/Themes/default/BGAnimations/ScreenSongOptions background.redir @@ -0,0 +1 @@ +ScreenPlayerOptions background \ No newline at end of file diff --git a/Themes/default/BGAnimations/ScreenWithMenuElements in.redir b/Themes/default/BGAnimations/ScreenWithMenuElements in.redir deleted file mode 100644 index 5b4fadc0d0..0000000000 --- a/Themes/default/BGAnimations/ScreenWithMenuElements in.redir +++ /dev/null @@ -1 +0,0 @@ -Screen in \ No newline at end of file diff --git a/Themes/default/BGAnimations/ScreenWithMenuElements in/default.lua b/Themes/default/BGAnimations/ScreenWithMenuElements in/default.lua new file mode 100644 index 0000000000..3f6b107cd3 --- /dev/null +++ b/Themes/default/BGAnimations/ScreenWithMenuElements in/default.lua @@ -0,0 +1,33 @@ +local fTileSize = 32; +local iTilesX = math.ceil( SCREEN_WIDTH/fTileSize ); +local iTilesY = math.ceil( SCREEN_HEIGHT/fTileSize ); +--[[ local function Actor:PositionTile(self,iX,iY) + self:x( scale(iX,1,iTilesX,-SCREEN_CENTER_X,SCREEN_CENTER_X) ); + self:y( scale(iY,1,iTilesY,-SCREEN_CENTER_Y,SCREEN_CENTER_Y) ); +end --]] +local t = Def.ActorFrame { + InitCommand=cmd(x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y); +}; +for indx=1,iTilesX do + for indy=1,iTilesY do + t[#t+1] = Def.Quad { + InitCommand=cmd(zoom,fTileSize-2; + x,math.floor( scale(indx,1,iTilesX,(iTilesX/2)*fTileSize*-1,(iTilesX/2)*fTileSize*1) ); + y,math.floor( scale(indy,1,iTilesY,(iTilesY/2)*fTileSize*-1,(iTilesY/2)*fTileSize*1) ); + ); + OnCommand=cmd(diffuse,Color("Black");diffusealpha,1;zoom,fTileSize-2;sleep,(iTilesX+iTilesY)*(1/60);linear,0.0325 + ( indx / 60 );diffusealpha,0;zoom,fTileSize*1.25); + }; + end +end +t[#t+1] = Def.Quad { + InitCommand=cmd(zoomto,SCREEN_WIDTH+1,SCREEN_HEIGHT); + OnCommand=cmd(diffuse,color("0,0,0,1");sleep,0.0325 + ( ( iTilesX/2 ) / 60 );linear,0.15;diffusealpha,0); +}; +--[[ return Def.ActorFrame { + Def.Quad { + InitCommand=cmd(Center;zoomto,SCREEN_WIDTH+1,SCREEN_HEIGHT); + OnCommand=cmd(diffuse,color("0,0,0,1");linear,0.15;diffusealpha,0); + }; +}; --]] + +return t \ No newline at end of file diff --git a/Themes/default/BGAnimations/ScreenWithMenuElements out.redir b/Themes/default/BGAnimations/ScreenWithMenuElements out.redir deleted file mode 100644 index 2c25a1042a..0000000000 --- a/Themes/default/BGAnimations/ScreenWithMenuElements out.redir +++ /dev/null @@ -1 +0,0 @@ -Screen out \ No newline at end of file diff --git a/Themes/default/BGAnimations/ScreenWithMenuElements out/default.lua b/Themes/default/BGAnimations/ScreenWithMenuElements out/default.lua new file mode 100644 index 0000000000..b4e6093a1e --- /dev/null +++ b/Themes/default/BGAnimations/ScreenWithMenuElements out/default.lua @@ -0,0 +1,33 @@ +local fTileSize = 32; +local iTilesX = math.ceil( SCREEN_WIDTH/fTileSize ); +local iTilesY = math.ceil( SCREEN_HEIGHT/fTileSize ); +--[[ local function Actor:PositionTile(self,iX,iY) + self:x( scale(iX,1,iTilesX,-SCREEN_CENTER_X,SCREEN_CENTER_X) ); + self:y( scale(iY,1,iTilesY,-SCREEN_CENTER_Y,SCREEN_CENTER_Y) ); +end --]] +local t = Def.ActorFrame { + InitCommand=cmd(x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y); +}; +for indx=1,iTilesX do + for indy=1,iTilesY do + t[#t+1] = Def.Quad { + InitCommand=cmd(zoom,fTileSize-2; + x,math.floor( scale(indx,1,iTilesX,(iTilesX/2)*fTileSize*-1,(iTilesX/2)*fTileSize*1) ); + y,math.floor( scale(indy,1,iTilesY,(iTilesY/2)*fTileSize*-1,(iTilesY/2)*fTileSize*1) ); + ); + OnCommand=cmd(diffuse,Color("Black");diffusealpha,0;zoom,fTileSize*1.25;linear,0.0325 + ( indx / 60 );diffusealpha,1;zoom,fTileSize-2); + }; + end +end +t[#t+1] = Def.Quad { + InitCommand=cmd(zoomto,SCREEN_WIDTH+1,SCREEN_HEIGHT); + OnCommand=cmd(diffuse,color("0,0,0,0");sleep,0.0325 + ( ( iTilesX/2 ) / 60 );linear,0.15;diffusealpha,1); +}; +--[[ return Def.ActorFrame { + Def.Quad { + InitCommand=cmd(Center;zoomto,SCREEN_WIDTH+1,SCREEN_HEIGHT); + OnCommand=cmd(diffuse,color("0,0,0,1");linear,0.15;diffusealpha,0); + }; +}; --]] + +return t \ No newline at end of file diff --git a/Themes/default/Graphics/Player combo/default.lua b/Themes/default/Graphics/Player combo/default.lua index 2676f80193..a51109f375 100644 --- a/Themes/default/Graphics/Player combo/default.lua +++ b/Themes/default/Graphics/Player combo/default.lua @@ -12,6 +12,7 @@ local LabelMinZoom = THEME:GetMetric("Combo", "LabelMinZoom"); local LabelMaxZoom = THEME:GetMetric("Combo", "LabelMaxZoom"); local t = Def.ActorFrame { + InitCommand=cmd(vertalign,bottom); LoadActor(THEME:GetPathG("Combo","100Milestone")) .. { Name="OneHundredMilestone"; FiftyMilestoneCommand=cmd(playcommand,"Milestone"); @@ -46,7 +47,7 @@ local t = Def.ActorFrame { return end; --]] TwentyFiveMilestoneCommand=function(self,parent) - (cmd(skewx,0.125;decelerate,0.325;skewx,1))(self); + (cmd(skewy,-0.125;decelerate,0.325;skewy,0))(self); end; ToastyAchievedMessageCommand=function(self,params) if params.PlayerNumber == player then @@ -74,7 +75,10 @@ local t = Def.ActorFrame { param.Zoom = scale( iCombo, 0, NumberMaxZoomAt, NumberMinZoom, NumberMaxZoom ); param.Zoom = clamp( param.Zoom, NumberMinZoom, NumberMaxZoom ); - + + param.LabelZoom = scale( iCombo, 0, NumberMaxZoomAt, LabelMinZoom, LabelMaxZoom ); + param.LabelZoom = clamp( param.LabelZoom, LabelMinZoom, LabelMaxZoom ); + c.Number:visible(true); c.Label:visible(true); c.Number:settext( string.format("%i", iCombo) ); @@ -89,7 +93,7 @@ local t = Def.ActorFrame { c.Number:diffuse(color("#a4ff00")); c.Number:stopeffect(); elseif param.Combo then - c.Number:diffuse(color("#ffffff")); + c.Number:diffuse(PlayerColor(player)); c.Number:stopeffect(); (cmd(diffuse,Color("White");diffusebottomedge,color("0.5,0.5,0.5,1")))(c.Label); else @@ -102,7 +106,7 @@ local t = Def.ActorFrame { PulseLabel( c.Label, param ); -- Milestone Logic end; - ScoreChangedMessageCommand=function(self,param) +--[[ ScoreChangedMessageCommand=function(self,param) local iToastyCombo = param.ToastyCombo; if iToastyCombo and (iToastyCombo > 0) then -- (cmd(thump;effectmagnitude,1,1.2,1;effectclock,'beat'))(c.Number) @@ -110,7 +114,7 @@ local t = Def.ActorFrame { else -- c.Number:stopeffect(); end; - end; + end; --]] }; return t; diff --git a/Themes/default/Scripts/03 ThemePrefs.lua b/Themes/default/Scripts/03 ThemePrefs.lua index 8508701277..8c89984bb8 100644 --- a/Themes/default/Scripts/03 ThemePrefs.lua +++ b/Themes/default/Scripts/03 ThemePrefs.lua @@ -175,7 +175,7 @@ function UserPrefShowLotsaOptions() return t; end - function GetDefaultOptionLines() +function GetDefaultOptionLines() local LineSets = { "1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17", "1,2,7,8,13,14,16,17", @@ -185,7 +185,7 @@ end else return LineSets[2]; -- Just make sure! end -end; +end; function UserPrefAutoSetStyle() local t = { diff --git a/Themes/default/metrics.ini b/Themes/default/metrics.ini index 920923896f..5e6776a120 100644 --- a/Themes/default/metrics.ini +++ b/Themes/default/metrics.ini @@ -36,12 +36,12 @@ ShowComboAt=2 NumberMinZoom=0.8 NumberMaxZoom=1 NumberMaxZoomAt=100 -LabelMinZoom=0.75*0.5 -LabelMaxZoom=0.75*0.8 +LabelMinZoom=0.75*0.75 +LabelMaxZoom=0.75*1 PulseCommand=%function(self,param) self:stoptweening(); self:zoom(1.125*param.Zoom); self:linear(0.05); self:zoom(param.Zoom); end -PulseLabelCommand=%function(self,param) self:stoptweening(); self:zoom(1.075*param.Zoom); self:linear(0.05); self:zoom(param.Zoom); end -NumberOnCommand=y,240-216-1.5;shadowlength,1;horizalign,right;vertalign,bottom; +PulseLabelCommand=%function(self,param) self:stoptweening(); self:zoom(1.075*param.LabelZoom); self:linear(0.05); self:zoom(param.LabelZoom); end +NumberOnCommand=y,240-216-1.5;shadowlength,1;horizalign,right;vertalign,bottom;skewx,-0.125; LabelOnCommand=x,6;y,22.5;shadowlength,1;zoom,0.75;diffusebottomedge,color("0.75,0.75,0.75,1");horizalign,left;vertalign,bottom [FadingBanner] diff --git a/src/GhostArrowRow.cpp b/src/GhostArrowRow.cpp index a23553d029..8a0c46cb48 100644 --- a/src/GhostArrowRow.cpp +++ b/src/GhostArrowRow.cpp @@ -101,7 +101,7 @@ void GhostArrowRow::DrawPrimitives() void GhostArrowRow::DidTapNote( int iCol, TapNoteScore tns, bool bBright ) { - ASSERT( iCol >= 0 && iCol < (int) m_Ghost.size() ); + ASSERT_M( iCol >= 0 && iCol < (int) m_Ghost.size(), ssprintf("assert(iCol %i >= 0 && iCol %i < (int)m_Ghost.size() %i) failed",iCol,iCol,(int)m_Ghost.size()) ); Message msg("ColumnJudgment"); msg.SetParam( "TapNoteScore", tns ); diff --git a/src/NoteData.cpp b/src/NoteData.cpp index dac5f0ea3d..f0759311fb 100644 --- a/src/NoteData.cpp +++ b/src/NoteData.cpp @@ -653,7 +653,7 @@ void NoteData::LoadTransformed( const NoteData& in, int iNewNumTracks, const int for( int t=0; t= %i (to %i)", + ASSERT_M( iOriginalTrack < in.GetNumTracks(), ssprintf("from OriginalTrack %i >= %i (#tracks) (taking from %i)", iOriginalTrack, in.GetNumTracks(), iOriginalTrackToTakeFrom[t])); if( iOriginalTrack == -1 ) @@ -672,19 +672,19 @@ void NoteData::MoveTapNoteTrack( int dest, int src ) void NoteData::SetTapNote( int track, int row, const TapNote& t ) { DEBUG_ASSERT( track>=0 && track(&f) = 12; @@ -157,8 +156,7 @@ ConvertValueHelper ConvertValue( FROM *pValue ) return ConvertValueHelper( pValue ); } -/* - * Safely add an integer to an enum. +/* Safely add an integer to an enum. * * This is illegal: * @@ -192,8 +190,7 @@ static inline T enum_cycle( T val, int iMax, int iAmt = 1 ) } -/* - * We only have unsigned swaps; byte swapping a signed value doesn't make sense. +/* We only have unsigned swaps; byte swapping a signed value doesn't make sense. * * Platform-specific, optimized versions are defined in arch_setup, with the names * ArchSwap32, ArchSwap24, and ArchSwap16; we define them to their real names here, diff --git a/src/Song.cpp b/src/Song.cpp index 486423dd2f..a092c1ffa8 100644 --- a/src/Song.cpp +++ b/src/Song.cpp @@ -487,21 +487,17 @@ void Song::TidyUpData() /* Some DWIs have lengths in ms when they meant seconds, eg. #SAMPLELENGTH:10;. * If the sample length is way too short, change it. */ - // oh also this means that if you try to have a sample length longer than - // 30 seconds, it doesn't mean shit. -aj + // oh also this means that if you try to have a sample length longer + // than 30 seconds, it won't work. -aj if( m_fMusicSampleLengthSeconds < 3 || m_fMusicSampleLengthSeconds > 30 ) m_fMusicSampleLengthSeconds = DEFAULT_MUSIC_SAMPLE_LENGTH; - // // Here's the problem: We have a directory full of images. We want to determine which // image is the banner, which is the background, and which is the CDTitle. - // CHECKPOINT_M( "Looking for images..." ); - // // First, check the file name for hints. - // if( !HasBanner() ) { /* If a nonexistant banner file is specified, and we can't find a replacement,