use scaled frame width instead of frame width

This commit is contained in:
AJ Kelly
2010-08-22 17:02:12 -05:00
parent 2e7bb5457c
commit de93972352
2 changed files with 14 additions and 15 deletions
+6 -6
View File
@@ -19,6 +19,7 @@
<Function name='ComboMaintain'/> <Function name='ComboMaintain'/>
<Function name='ComboPerRow'/> <Function name='ComboPerRow'/>
<Function name='ComboTransformCommand'/> <Function name='ComboTransformCommand'/>
<Function name='ComboUnderField'/>
<Function name='ConnectToServer'/> <Function name='ConnectToServer'/>
<Function name='CourseDifficultyToLocalizedString'/> <Function name='CourseDifficultyToLocalizedString'/>
<Function name='CourseTypeToLocalizedString'/> <Function name='CourseTypeToLocalizedString'/>
@@ -154,6 +155,7 @@
<Function name='UnlockRewardTypeToLocalizedString'/> <Function name='UnlockRewardTypeToLocalizedString'/>
<Function name='UserPrefAutoSetStyle'/> <Function name='UserPrefAutoSetStyle'/>
<Function name='UserPrefComboOnRolls'/> <Function name='UserPrefComboOnRolls'/>
<Function name='UserPrefComboUnderField'/>
<Function name='UserPrefFlashyCombo'/> <Function name='UserPrefFlashyCombo'/>
<Function name='UserPrefGameplayShowScore'/> <Function name='UserPrefGameplayShowScore'/>
<Function name='UserPrefGameplayShowStepsDisplay'/> <Function name='UserPrefGameplayShowStepsDisplay'/>
@@ -1225,6 +1227,7 @@
<Function name='GetPathInfoB'/> <Function name='GetPathInfoB'/>
<Function name='GetPathO'/> <Function name='GetPathO'/>
<Function name='GetPathS'/> <Function name='GetPathS'/>
<Function name='GetSelectableThemeNames'/>
<Function name='GetString'/> <Function name='GetString'/>
<Function name='GetThemeAuthor'/> <Function name='GetThemeAuthor'/>
<Function name='GetThemeDisplayName'/> <Function name='GetThemeDisplayName'/>
@@ -1683,8 +1686,6 @@
<EnumValue name='&apos;RadarCategory_Hands&apos;' value='9'/> <EnumValue name='&apos;RadarCategory_Hands&apos;' value='9'/>
<EnumValue name='&apos;RadarCategory_Rolls&apos;' value='10'/> <EnumValue name='&apos;RadarCategory_Rolls&apos;' value='10'/>
<EnumValue name='&apos;RadarCategory_Lifts&apos;' value='11'/> <EnumValue name='&apos;RadarCategory_Lifts&apos;' value='11'/>
<EnumValue name='&apos;RadarCategory_MinMidiNote&apos;' value='12'/>
<EnumValue name='&apos;RadarCategory_MaxMidiNote&apos;' value='13'/>
</Enum> </Enum>
<Enum name='RandomBackgroundMode'> <Enum name='RandomBackgroundMode'>
<EnumValue name='&apos;RandomBackgroundMode_Off&apos;' value='0'/> <EnumValue name='&apos;RandomBackgroundMode_Off&apos;' value='0'/>
@@ -1805,8 +1806,7 @@
<EnumValue name='&apos;StepsType_Pnm_Five&apos;' value='28'/> <EnumValue name='&apos;StepsType_Pnm_Five&apos;' value='28'/>
<EnumValue name='&apos;StepsType_Pnm_Nine&apos;' value='29'/> <EnumValue name='&apos;StepsType_Pnm_Nine&apos;' value='29'/>
<EnumValue name='&apos;StepsType_Guitar_Five&apos;' value='30'/> <EnumValue name='&apos;StepsType_Guitar_Five&apos;' value='30'/>
<EnumValue name='&apos;StepsType_Karaoke&apos;' value='31'/> <EnumValue name='&apos;StepsType_Lights_Cabinet&apos;' value='31'/>
<EnumValue name='&apos;StepsType_Lights_Cabinet&apos;' value='32'/>
</Enum> </Enum>
<Enum name='StyleType'> <Enum name='StyleType'>
<EnumValue name='&apos;StyleType_OnePlayerOneSide&apos;' value='0'/> <EnumValue name='&apos;StyleType_OnePlayerOneSide&apos;' value='0'/>
@@ -1896,6 +1896,6 @@
<Constant name='sGame' value='&apos;dance&apos;'/> <Constant name='sGame' value='&apos;dance&apos;'/>
<Constant name='top' value='&apos;VertAlign_Top&apos;'/> <Constant name='top' value='&apos;VertAlign_Top&apos;'/>
</Constants> </Constants>
<Version>sm-ssc v1.0 rc1.5</Version> <Version>sm-ssc v1.0 rc2</Version>
<Date>2010-08-10</Date> <Date>2010-08-22</Date>
</Lua> </Lua>
+8 -9
View File
@@ -449,8 +449,8 @@ void NoteDisplay::DrawHoldPart( vector<Sprite*> &vpSpr, int iCol, int fYStep, fl
const float fRotationY = ArrowEffects::GetRotationY( m_pPlayerState, fYOffset ) * PI/180; const float fRotationY = ArrowEffects::GetRotationY( m_pPlayerState, fYOffset ) * PI/180;
// if we're rotating, we need to modify the X and Z coords for the outer edges. // if we're rotating, we need to modify the X and Z coords for the outer edges.
const float fRotOffsetX = fFrameWidth/2 * RageFastCos(fRotationY); const float fRotOffsetX = (fScaledFrameWidth/2) * RageFastCos(fRotationY);
const float fRotOffsetZ = fFrameWidth/2 * RageFastSin(fRotationY); const float fRotOffsetZ = (fScaledFrameWidth/2) * RageFastSin(fRotationY);
//const float fXLeft = fX - (fScaledFrameWidth/2); //const float fXLeft = fX - (fScaledFrameWidth/2);
const float fXLeft = fX - fRotOffsetX; const float fXLeft = fX - fRotOffsetX;
@@ -458,6 +458,7 @@ void NoteDisplay::DrawHoldPart( vector<Sprite*> &vpSpr, int iCol, int fYStep, fl
//const float fXRight = fX + (fScaledFrameWidth/2); //const float fXRight = fX + (fScaledFrameWidth/2);
const float fXRight = fX + fRotOffsetX; const float fXRight = fX + fRotOffsetX;
const float fZLeft = fZ - fRotOffsetZ; const float fZLeft = fZ - fRotOffsetZ;
const float fZCenter = fZ;
const float fZRight = fZ + fRotOffsetZ; const float fZRight = fZ + fRotOffsetZ;
const float fDistFromTop = fY - fYTop; const float fDistFromTop = fY - fYTop;
@@ -471,7 +472,7 @@ void NoteDisplay::DrawHoldPart( vector<Sprite*> &vpSpr, int iCol, int fYStep, fl
bAllAreTransparent = false; bAllAreTransparent = false;
queue.v[0].p = RageVector3(fXLeft, fY, fZLeft); queue.v[0].c = color; queue.v[0].t = RageVector2(fTexCoordLeft, fTexCoordTop); queue.v[0].p = RageVector3(fXLeft, fY, fZLeft); queue.v[0].c = color; queue.v[0].t = RageVector2(fTexCoordLeft, fTexCoordTop);
queue.v[1].p = RageVector3(fXCenter, fY, fZ); queue.v[1].c = color; queue.v[1].t = RageVector2(fTexCoordCenter, fTexCoordTop); queue.v[1].p = RageVector3(fXCenter, fY, fZCenter); queue.v[1].c = color; queue.v[1].t = RageVector2(fTexCoordCenter, fTexCoordTop);
queue.v[2].p = RageVector3(fXRight, fY, fZRight); queue.v[2].c = color; queue.v[2].t = RageVector2(fTexCoordRight, fTexCoordTop); queue.v[2].p = RageVector3(fXRight, fY, fZRight); queue.v[2].c = color; queue.v[2].t = RageVector2(fTexCoordRight, fTexCoordTop);
queue.v+=3; queue.v+=3;
@@ -679,13 +680,11 @@ void NoteDisplay::DrawActor( const TapNote& tn, Actor* pActor, NotePart part, in
const float fGlow = ArrowEffects::GetGlow( m_pPlayerState, iCol, fYOffset, fPercentFadeToFail, m_fYReverseOffsetPixels, fDrawDistanceBeforeTargetsPixels, fFadeInPercentOfDrawFar ); const float fGlow = ArrowEffects::GetGlow( m_pPlayerState, iCol, fYOffset, fPercentFadeToFail, m_fYReverseOffsetPixels, fDrawDistanceBeforeTargetsPixels, fFadeInPercentOfDrawFar );
const RageColor diffuse = RageColor(fColorScale,fColorScale,fColorScale,fAlpha); const RageColor diffuse = RageColor(fColorScale,fColorScale,fColorScale,fAlpha);
const RageColor glow = RageColor(1,1,1,fGlow); const RageColor glow = RageColor(1,1,1,fGlow);
float fRotationX = 0; float fRotationX = 0, fRotationY = 0, fRotationZ = 0;
float fRotationY = 0;
float fRotationZ = 0;
fRotationX = ArrowEffects::GetRotationX( m_pPlayerState, fYOffset ); fRotationX = ArrowEffects::GetRotationX( m_pPlayerState, fYOffset );
fRotationY = ArrowEffects::GetRotationY( m_pPlayerState, fYOffset ); fRotationY = ArrowEffects::GetRotationY( m_pPlayerState, fYOffset );
fRotationZ = ArrowEffects::GetRotationZ( m_pPlayerState, fBeat, tn.type == tn.hold_head ); fRotationZ = ArrowEffects::GetRotationZ( m_pPlayerState, fBeat, tn.type == tn.hold_head );
if( tn.type != tn.hold_head ) if( tn.type != tn.hold_head )
fColorScale *= ArrowEffects::GetBrightness( m_pPlayerState, fBeat ); fColorScale *= ArrowEffects::GetBrightness( m_pPlayerState, fBeat );