okay I'm not done with the commits yet but mercurial is not making it easy for me

to commit just a subsection of files so I have to dump everything in here. :|
This commit is contained in:
AJ Kelly
2010-03-09 03:36:44 -06:00
parent 8ba30b523c
commit 31c69f1d9c
17 changed files with 168 additions and 49 deletions
+34 -1
View File
@@ -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
+22 -1
View File
@@ -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;
+14 -11
View File
@@ -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=
@@ -0,0 +1 @@
return GAMESTATE:IsCourseMode() and LoadActor( THEME:GetPathB( Var "LoadingScreen", "background" ) ) or LoadActor( THEME:GetPathB("ScreenEvaluation","background") );
@@ -0,0 +1 @@
ScreenPlayerOptions background
@@ -1 +0,0 @@
Screen in
@@ -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
@@ -1 +0,0 @@
Screen out
@@ -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
@@ -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;
+2 -2
View File
@@ -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 = {
+4 -4
View File
@@ -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]
+1 -1
View File
@@ -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 );
+6 -6
View File
@@ -653,7 +653,7 @@ void NoteData::LoadTransformed( const NoteData& in, int iNewNumTracks, const int
for( int t=0; t<GetNumTracks(); t++ )
{
const int iOriginalTrack = iOriginalTrackToTakeFrom[t];
ASSERT_M( iOriginalTrack < in.GetNumTracks(), ssprintf("from %i >= %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<GetNumTracks() );
if( row < 0 )
return;
// There's no point in inserting empty notes into the map.
// Any blank space in the map is defined to be empty.
// If we're trying to insert an empty at a spot where
// another note already exists, then we're really deleting
// from the map.
// If we're trying to insert an empty at a spot where another note
// already exists, then we're really deleting from the map.
if( t == TAP_EMPTY )
{
TrackMap &trackMap = m_TapNotes[track];
// remove the element at this position (if any). This will return either 0 or 1.
// remove the element at this position (if any).
// This will return either 0 or 1.
trackMap.erase( row );
}
else
+3 -4
View File
@@ -1694,7 +1694,7 @@ void MakeLower( wchar_t *p, size_t iLen )
float StringToFloat( const RString &sString )
{
float ret = strtof( sString, NULL );
if( !isfinite(ret) )
ret = 0.0f;
return ret;
@@ -1703,12 +1703,11 @@ float StringToFloat( const RString &sString )
bool StringToFloat( const RString &sString, float &fOut )
{
char *endPtr;
fOut = strtof( sString, &endPtr );
return sString.size() && *endPtr == '\0' && isfinite( fOut );
}
const wchar_t INVALID_CHAR = 0xFFFD; /* U+FFFD REPLACEMENT CHARACTER */
wstring RStringToWstring( const RString &s )
+3 -6
View File
@@ -145,8 +145,7 @@ private:
TO m_ToValue;
};
/*
* Safely temporarily convert between types. For example,
/* Safely temporarily convert between types. For example,
*
* float f = 10.5;
* *ConvertValue<int>(&f) = 12;
@@ -157,8 +156,7 @@ ConvertValueHelper<TO, FROM> ConvertValue( FROM *pValue )
return ConvertValueHelper<TO, FROM>( 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,
+2 -6
View File
@@ -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,