no message

This commit is contained in:
Chris Danford
2002-01-20 23:29:03 +00:00
parent 5d04359a90
commit f2975d0688
9 changed files with 53 additions and 55 deletions
+2
View File
@@ -22,6 +22,8 @@ Background::Background()
{
m_bShowDanger = false;
m_sprDanger.SetZoom( 2 );
m_sprDanger.SetEffectWagging();
m_sprDanger.Load( THEME->GetPathTo(GRAPHIC_DANGER) );
m_sprDanger.SetXY( CENTER_X, CENTER_Y );
+8
View File
@@ -27,6 +27,14 @@ public:
virtual void Update( float fDeltaTime );
virtual void RenderPrimitives();
virtual void SetDiffuseColor( D3DXCOLOR c )
{
m_sprVisualizationOverlay.SetDiffuseColor( c );
m_sprSongBackground.SetDiffuseColor( c );
m_sprDanger.SetDiffuseColor( c );
m_sprDangerBackground.SetDiffuseColor( c );
};
virtual void TurnDangerOn() { m_bShowDanger = true; };
virtual void TurnDangerOff() { m_bShowDanger = false; };
+6 -4
View File
@@ -314,7 +314,7 @@ void MusicWheel::RebuildWheelItems()
float MusicWheel::GetBannerY( float fPosOffsetsFromMiddle )
{
return roundf( (fPosOffsetsFromMiddle)*43.2f );
return fPosOffsetsFromMiddle*43.2f;
}
float MusicWheel::GetBannerBrightness( float fPosOffsetsFromMiddle )
@@ -370,7 +370,7 @@ float MusicWheel::GetBannerX( float fPosOffsetsFromMiddle )
}
return roundf( fX );
return fX;
}
@@ -490,11 +490,13 @@ void MusicWheel::Update( float fDeltaTime )
// "rotate" wheel toward selected song
if( fabs(m_fPositionOffsetFromSelection) < 0.05f )
if( fabs(m_fPositionOffsetFromSelection) < 0.02f )
m_fPositionOffsetFromSelection = 0;
else
{
m_fPositionOffsetFromSelection -= fDeltaTime * m_fPositionOffsetFromSelection*4;
m_fPositionOffsetFromSelection -= fDeltaTime * m_fPositionOffsetFromSelection*4; // linear
float fSign = m_fPositionOffsetFromSelection / fabs(m_fPositionOffsetFromSelection);
m_fPositionOffsetFromSelection -= fDeltaTime * fSign; // constant
}
}
+4 -4
View File
@@ -18,11 +18,11 @@
const float LIFE_PERFECT = 0.015f;
const float LIFE_GREAT = 0.008f;
const float LIFE_PERFECT = 0.010f;
const float LIFE_GREAT = 0.005f;
const float LIFE_GOOD = 0.000f;
const float LIFE_BOO = -0.015f;
const float LIFE_MISS = -0.030f;
const float LIFE_BOO = -0.010f;
const float LIFE_MISS = -0.020f;
const int ARROW_SIZE = 64;
+18 -2
View File
@@ -23,6 +23,7 @@
#include "dxerr8.h"
#include "DXUtil.h"
#include "RageUtil.h"
#include "GameInfo.h"
//#include <stdio.h>
#include <assert.h>
@@ -61,6 +62,21 @@ void RageBitmapTexture::Create()
{
HRESULT hr;
D3DFORMAT fmtTexture;
if( !GAMEINFO )
{
fmtTexture = D3DFMT_A4R4G4B4;
}
else
{
switch( GAMEINFO->m_GameOptions.m_iTextureColor )
{
case 16: fmtTexture = D3DFMT_A4R4G4B4; break;
case 32: fmtTexture = D3DFMT_A8R8G8B8; break;
default: ASSERT( true ); // invalid iTextureColor value
}
}
D3DXIMAGE_INFO ddii;
// load texture
@@ -68,9 +84,9 @@ void RageBitmapTexture::Create()
m_pd3dDevice, // device
m_sFilePath, // soure file
D3DX_DEFAULT, D3DX_DEFAULT, // width, height
D3DX_DEFAULT, // mip map levels
3, // mip map levels
0, // usage (is a render target?)
D3DFMT_A4R4G4B4, // our preferred texture format
fmtTexture, // our preferred texture format
D3DPOOL_MANAGED, // which memory pool
D3DX_FILTER_BOX | D3DX_FILTER_DITHER, // filter
D3DX_FILTER_BOX | D3DX_FILTER_DITHER, // mip filter
-45
View File
@@ -78,8 +78,6 @@ void RageTexture::GetFrameDimensionsFromFileName( CString sPath, UINT* puFramesW
*puFramesWide = *puFramesHigh = 1; // initialize in case we don't find dimensions in the file name
sPath.MakeLower();
if( sPath.Find("max300.png") != -1 )
int kljds = 3;
CString sDir, sFName, sExt;
splitrelpath( sPath, sDir, sFName, sExt);
@@ -109,47 +107,4 @@ void RageTexture::GetFrameDimensionsFromFileName( CString sPath, UINT* puFramesW
return;
}
/*
//////////////////////////////////////////////////
// Parse m_sFilePath for the frame dimensions
//
// The file name must look like "name 4x15.gif". The the space is required.
//////////////////////////////////////////////////
CString sDimensionsString = sPath; // we will chop this down to the "4x15" part. Need regular... expressions... choke :-)
// chop off the extension
int index_of_last_period = sDimensionsString.ReverseFind( '.' );
if( index_of_last_period == -1 ) // this file name has no extension, but it the texture was loaded. I doubt this code will ever execute :-)
{
*puFramesWide = *puFramesHigh = 1;
return;
}
sDimensionsString = sDimensionsString.Left(index_of_last_period);
// chop off everything before and including the last space
int index_of_last_space = sDimensionsString.ReverseFind( ' ' );
if( index_of_last_space == -1 ) // this file name has space, so the dimensions tag cannot be read
{
*puFramesWide = *puFramesHigh = 1;
return;
}
sDimensionsString.Delete( 0, index_of_last_space+1 );
// now we are left with "4x15"
int index_of_x = sDimensionsString.Find( 'x' );
if( index_of_x == -1 ) // this file name doesn't have an x in the last token. So, this probably isn't a dimension tag.
{
*puFramesWide = *puFramesHigh = 1;
return;
}
*puFramesWide = (UINT) atoi( sDimensionsString.Left( index_of_x ) );
// chop off the frames wide part and read in the frames high
sDimensionsString.Delete( 0, index_of_x+1 );
*puFramesHigh = (UINT) atoi( sDimensionsString );
if( *puFramesWide == 0 ) *puFramesWide = 1;
if( *puFramesHigh == 0 ) *puFramesHigh = 1;
*/
}
+6
View File
@@ -76,6 +76,12 @@ Song::Song()
m_fOffsetInSeconds = 0;
m_iNumTimesPlayed = 0;
for( int i=0; i<6; i++ )
{
m_iMaxCombo[i] = 0;
m_iTopScore[i] = 0;
m_TopGrade[i].FromString( "N" );
}
}
+4
View File
@@ -460,6 +460,10 @@ SOURCE=.\StepMania.cpp
# End Source File
# Begin Source File
SOURCE=.\StepMania.h
# End Source File
# Begin Source File
SOURCE=.\StepMania.ICO
# End Source File
# Begin Source File
+5
View File
@@ -90,6 +90,11 @@ public:
public:
int m_iNumTimesPlayed;
// statistics for single-basic, single-another... double-basic... double-maniac:
Grade m_TopGrade[6];
int m_iTopScore[6];
int m_iMaxCombo[6];
private:
CString m_sSongFilePath;