From 4acf0389d2570a2405e775d38fb36fe291d004d7 Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Tue, 19 Mar 2002 07:09:49 +0000 Subject: [PATCH] moved some things around in preparation for new game types --- stepmania/src/ArrowEffects.cpp | 14 +- stepmania/src/ArrowEffects.h | 8 +- stepmania/src/Background.cpp | 1 + stepmania/src/Banner.cpp | 2 +- stepmania/src/DifficultyIcon.h | 2 +- stepmania/src/FootMeter.h | 2 +- stepmania/src/GameManager.cpp | 159 ++++++++++++++++ stepmania/src/GameManager.h | 40 ++++ stepmania/src/GhostArrow.cpp | 12 +- stepmania/src/GhostArrow.h | 4 +- stepmania/src/GhostArrowBright.cpp | 12 +- stepmania/src/GhostArrowBright.h | 4 +- stepmania/src/Grade.cpp | 7 +- stepmania/src/Grade.h | 7 +- stepmania/src/GrayArrow.h | 2 +- stepmania/src/HoldGhostArrow.h | 2 +- stepmania/src/HoldJudgement.cpp | 12 +- stepmania/src/HoldJudgement.h | 2 +- stepmania/src/Judgement.cpp | 14 +- stepmania/src/Judgement.h | 2 +- stepmania/src/MusicWheel.cpp | 25 +-- stepmania/src/Player.cpp | 259 +++++++++++++------------- stepmania/src/Player.h | 24 +-- stepmania/src/PrefsManager.cpp | 103 +++++----- stepmania/src/PrefsManager.h | 48 +---- stepmania/src/ScoreDisplayRolling.cpp | 58 +++++- stepmania/src/ScoreDisplayRolling.h | 2 +- stepmania/src/Song.cpp | 67 +++---- stepmania/src/SongManager.cpp | 56 +++--- stepmania/src/SongManager.h | 13 +- stepmania/src/StepMania.ICO | Bin 6006 -> 6006 bytes stepmania/src/StepMania.RC | 69 ++----- stepmania/src/StepMania.cpp | 34 ++-- stepmania/src/StepMania.dsp | 28 ++- stepmania/src/StyleDef.cpp | 14 ++ stepmania/src/{Style.h => StyleDef.h} | 17 +- stepmania/src/ThemeManager.cpp | 230 ++++++++++++++--------- stepmania/src/ThemeManager.h | 68 +------ stepmania/src/resource.h | 2 +- stepmania/src/smpackage/smpackage.dsp | 4 +- stepmania/src/song.h | 26 +-- stepmania/src/splash.bmp | Bin 10400 -> 10244 bytes 42 files changed, 833 insertions(+), 622 deletions(-) create mode 100644 stepmania/src/GameManager.cpp create mode 100644 stepmania/src/GameManager.h create mode 100644 stepmania/src/StyleDef.cpp rename stepmania/src/{Style.h => StyleDef.h} (68%) diff --git a/stepmania/src/ArrowEffects.cpp b/stepmania/src/ArrowEffects.cpp index 8692808d53..a8f0f4f4d6 100644 --- a/stepmania/src/ArrowEffects.cpp +++ b/stepmania/src/ArrowEffects.cpp @@ -3,21 +3,21 @@ ----------------------------------------------------------------------------- File: ArrowEffects.cpp - Desc: Functions that return properties of arrows based on Style and PlayerOptions + Desc: Functions that return properties of arrows based on StyleDef and PlayerOptions Copyright (c) 2001-2002 by the names listed below. All rights reserved. Chris Danford ----------------------------------------------------------------------------- */ #include "ArrowEffects.h" -#include "Steps.h" +#include "Pattern.h" #include "ColorArrow.h" #include "ScreenDimensions.h" float ArrowGetYOffset( const PlayerOptions& po, float fStepIndex, float fSongBeat ) { - float fBeatsUntilStep = StepIndexToBeat( fStepIndex ) - fSongBeat; + float fBeatsUntilStep = NoteIndexToBeat( fStepIndex ) - fSongBeat; float fYOffset = fBeatsUntilStep * ARROW_GAP; switch( po.m_EffectType ) { @@ -31,9 +31,9 @@ float ArrowGetYOffset( const PlayerOptions& po, float fStepIndex, float fSongBea return fYOffset; } -float ArrowGetXPos( const PlayerOptions& po, const Style &style, int iColNum, float fYOffset, float fSongBeat ) +float ArrowGetXPos( const PlayerOptions& po, const StyleDef &StyleDef, int iColNum, float fYOffset, float fSongBeat ) { - float fColOffsetFromCenter = iColNum - (style.m_iNumColumns-1)/2.0f; + float fColOffsetFromCenter = iColNum - (StyleDef.m_iNumColumns-1)/2.0f; float fPixelOffsetFromCenter = fColOffsetFromCenter * ARROW_SIZE; switch( po.m_EffectType ) @@ -45,9 +45,9 @@ float ArrowGetXPos( const PlayerOptions& po, const Style &style, int iColNum, fl return fPixelOffsetFromCenter; } -float ArrowGetRotation( const PlayerOptions& po, const Style &style, int iColNum, float fYOffset ) +float ArrowGetRotation( const PlayerOptions& po, const StyleDef &StyleDef, int iColNum, float fYOffset ) { - float fRotation = style.m_ColumnToRotation[iColNum]; + float fRotation = StyleDef.m_ColumnToRotation[iColNum]; switch( po.m_EffectType ) { diff --git a/stepmania/src/ArrowEffects.h b/stepmania/src/ArrowEffects.h index a7d6b5e348..c501ada84a 100644 --- a/stepmania/src/ArrowEffects.h +++ b/stepmania/src/ArrowEffects.h @@ -2,7 +2,7 @@ ----------------------------------------------------------------------------- File: ArrowEffects.h - Desc: Functions that return properties of arrows based on Style and PlayerOptions + Desc: Functions that return properties of arrows based on StyleDef and PlayerOptions Copyright (c) 2001-2002 by the names listed below. All rights reserved. Chris Danford @@ -14,7 +14,7 @@ #include "GameTypes.h" -#include "Style.h" +#include "StyleDef.h" // fYOffset is a vertical position in pixels relative to the center. @@ -26,13 +26,13 @@ float ArrowGetYOffset( const PlayerOptions& po, float fStepIndex, float fSongBea // fXPos is a horizontal position in pixels relative to the center of the field. // This depends on the column of the arrow and possibly the Arrow effect and // fYOffset (in the case of EFFECT_DRUNK). -float ArrowGetXPos( const PlayerOptions& po, const Style &style, int iCol, float fYOffset, float fSongBeat ); +float ArrowGetXPos( const PlayerOptions& po, const StyleDef &StyleDef, int iCol, float fYOffset, float fSongBeat ); // fRotation is Z rotation of an arrow. This will depend on the column of // the arrow and possibly the Arrow effect and the fYOffset (in the case of // EFFECT_DIZZY). -float ArrowGetRotation( const PlayerOptions& po, const Style &style, int iCol, float fYOffset ); +float ArrowGetRotation( const PlayerOptions& po, const StyleDef &StyleDef, int iCol, float fYOffset ); // fYPos is the position of the note in pixels relative to the center. diff --git a/stepmania/src/Background.cpp b/stepmania/src/Background.cpp index 09a740976e..41add195db 100644 --- a/stepmania/src/Background.cpp +++ b/stepmania/src/Background.cpp @@ -13,6 +13,7 @@ #include "RageUtil.h" #include "ScreenDimensions.h" #include "ThemeManager.h" +#include "PrefsManager.h" #include "RageBitmapTexture.h" diff --git a/stepmania/src/Banner.cpp b/stepmania/src/Banner.cpp index 35cf72a757..ab337e46ca 100644 --- a/stepmania/src/Banner.cpp +++ b/stepmania/src/Banner.cpp @@ -46,7 +46,7 @@ void Banner::CropToRightSize() float fOriginalX = GetX(); float fOriginalY = GetY(); - if( iImageWidth == iImageHeight ) // this is a SSR/DWI style banner + if( iImageWidth == iImageHeight ) // this is a SSR/DWI StyleDef banner { float fCustomImageCoords[8] = { 0.22f, 0.98f, // bottom left diff --git a/stepmania/src/DifficultyIcon.h b/stepmania/src/DifficultyIcon.h index 9edd91585f..13982b526a 100644 --- a/stepmania/src/DifficultyIcon.h +++ b/stepmania/src/DifficultyIcon.h @@ -30,7 +30,7 @@ public: SetFromDescription( "" ); }; - void SetFromSteps( Steps* pSteps ) + void SetFromSteps( Pattern* pSteps ) { if( pSteps != NULL ) { diff --git a/stepmania/src/FootMeter.h b/stepmania/src/FootMeter.h index a023db52a3..1509a6643c 100644 --- a/stepmania/src/FootMeter.h +++ b/stepmania/src/FootMeter.h @@ -29,7 +29,7 @@ public: SetNumFeet( 0, "" ); }; - void SetFromSteps( Steps* pSteps ) + void SetFromSteps( Pattern* pSteps ) { if( pSteps != NULL ) { diff --git a/stepmania/src/GameManager.cpp b/stepmania/src/GameManager.cpp new file mode 100644 index 0000000000..d82e7df687 --- /dev/null +++ b/stepmania/src/GameManager.cpp @@ -0,0 +1,159 @@ +#include "stdafx.h" +/* +----------------------------------------------------------------------------- + Class: GameManager + + Desc: See Header. + + Copyright (c) 2001-2002 by the names listed below. All rights reserved. + Chris Danford +----------------------------------------------------------------------------- +*/ + +#include "GameManager.h" +#include "D3DXmath.h" + + +GameManager* GAME = NULL; // global and accessable from anywhere in our program + + + +GameManager::GameManager() +{ + m_DanceStyle = STYLE_SINGLE; +} + +GameManager::~GameManager() +{ + +} + +bool GameManager::IsPlayerEnabled( PlayerNumber PlayerNo ) +{ + switch( m_DanceStyle ) + { + case STYLE_VERSUS: + case STYLE_COUPLE: + if( PlayerNo == PLAYER_1 ) + return true; + if( PlayerNo == PLAYER_2 ) + return true; + break; + case STYLE_SINGLE: + case STYLE_SOLO: + case STYLE_DOUBLE: + if( PlayerNo == PLAYER_1 ) + return true; + if( PlayerNo == PLAYER_2 ) + return false; + break; + default: + ASSERT( false ); // invalid StyleDef + } + return false; +} + + +StyleDef GameManager::GetStyleDef( DanceStyle mode ) +{ + StyleDef StyleDef; + + + CMap mapTapNoteToRotation; // arrow facing left is rotation 0 + mapTapNoteToRotation[NOTE_PAD1_LEFT] = 0; + mapTapNoteToRotation[NOTE_PAD1_UPLEFT] = D3DX_PI/4.0f; + mapTapNoteToRotation[NOTE_PAD1_DOWN] = -D3DX_PI/2.0f; + mapTapNoteToRotation[NOTE_PAD1_UP] = D3DX_PI/2.0f; + mapTapNoteToRotation[NOTE_PAD1_UPRIGHT] = D3DX_PI*3.0f/4.0f; + mapTapNoteToRotation[NOTE_PAD1_RIGHT] = D3DX_PI; + mapTapNoteToRotation[NOTE_PAD2_LEFT] = mapTapNoteToRotation[NOTE_PAD1_LEFT]; + mapTapNoteToRotation[NOTE_PAD2_UPLEFT] = mapTapNoteToRotation[NOTE_PAD1_UPLEFT]; + mapTapNoteToRotation[NOTE_PAD2_DOWN] = mapTapNoteToRotation[NOTE_PAD1_DOWN]; + mapTapNoteToRotation[NOTE_PAD2_UP] = mapTapNoteToRotation[NOTE_PAD1_UP]; + mapTapNoteToRotation[NOTE_PAD2_UPRIGHT] = mapTapNoteToRotation[NOTE_PAD1_UPRIGHT]; + mapTapNoteToRotation[NOTE_PAD2_RIGHT] = mapTapNoteToRotation[NOTE_PAD1_RIGHT]; + + + switch( mode ) + { + case STYLE_SINGLE: + case STYLE_DOUBLE: + case STYLE_SOLO: + StyleDef.m_iNumPlayers = 1; + break; + case STYLE_VERSUS: + case STYLE_COUPLE: + StyleDef.m_iNumPlayers = 2; + break; + default: + ASSERT( false ); // invalid GameMode + } + + + switch( mode ) + { + case STYLE_SINGLE: + case STYLE_VERSUS: + case STYLE_COUPLE: + StyleDef.m_iNumColumns = 4; // LEFT, DOWN, UP, RIGHT + StyleDef.m_ColumnToTapNote[0] = NOTE_PAD1_LEFT; + StyleDef.m_ColumnToTapNote[1] = NOTE_PAD1_DOWN; + StyleDef.m_ColumnToTapNote[2] = NOTE_PAD1_UP; + StyleDef.m_ColumnToTapNote[3] = NOTE_PAD1_RIGHT; + StyleDef.m_ColumnToTapNote[4] = NOTE_PAD1_UPLEFT; // Even though this isn't used, Need them here so + StyleDef.m_ColumnToTapNote[5] = NOTE_PAD1_UPRIGHT; // TapNoteToColumnNumber doesn't get confused by them + StyleDef.m_ColumnToRotation[0] = mapTapNoteToRotation[NOTE_PAD1_LEFT]; + StyleDef.m_ColumnToRotation[1] = mapTapNoteToRotation[NOTE_PAD1_DOWN]; + StyleDef.m_ColumnToRotation[2] = mapTapNoteToRotation[NOTE_PAD1_UP]; + StyleDef.m_ColumnToRotation[3] = mapTapNoteToRotation[NOTE_PAD1_RIGHT]; + StyleDef.m_ColumnToRotation[4] = mapTapNoteToRotation[NOTE_PAD1_UPLEFT]; + StyleDef.m_ColumnToRotation[5] = mapTapNoteToRotation[NOTE_PAD1_UPRIGHT]; + break; + case STYLE_SOLO: + StyleDef.m_iNumColumns = 6; // LEFT, UP+LEFT, DOWN, UP, UP+RIGHT, RIGHT + StyleDef.m_ColumnToTapNote[0] = NOTE_PAD1_LEFT; + StyleDef.m_ColumnToTapNote[1] = NOTE_PAD1_UPLEFT; + StyleDef.m_ColumnToTapNote[2] = NOTE_PAD1_DOWN; + StyleDef.m_ColumnToTapNote[3] = NOTE_PAD1_UP; + StyleDef.m_ColumnToTapNote[4] = NOTE_PAD1_UPRIGHT; + StyleDef.m_ColumnToTapNote[5] = NOTE_PAD1_RIGHT; + StyleDef.m_ColumnToRotation[0] = mapTapNoteToRotation[NOTE_PAD1_LEFT]; + StyleDef.m_ColumnToRotation[1] = mapTapNoteToRotation[NOTE_PAD1_UPLEFT]; + StyleDef.m_ColumnToRotation[2] = mapTapNoteToRotation[NOTE_PAD1_DOWN]; + StyleDef.m_ColumnToRotation[3] = mapTapNoteToRotation[NOTE_PAD1_UP]; + StyleDef.m_ColumnToRotation[4] = mapTapNoteToRotation[NOTE_PAD1_UPRIGHT]; + StyleDef.m_ColumnToRotation[5] = mapTapNoteToRotation[NOTE_PAD1_RIGHT]; + break; + case STYLE_DOUBLE: + StyleDef.m_iNumColumns = 8; // 1_LEFT, 1_DOWN, 1_UP, 1_RIGHT, 2_LEFT, 2_DOWN, 2_UP, 2_RIGHT + StyleDef.m_ColumnToTapNote[0] = NOTE_PAD1_LEFT; + StyleDef.m_ColumnToTapNote[1] = NOTE_PAD1_DOWN; + StyleDef.m_ColumnToTapNote[2] = NOTE_PAD1_UP; + StyleDef.m_ColumnToTapNote[3] = NOTE_PAD1_RIGHT; + StyleDef.m_ColumnToTapNote[4] = NOTE_PAD2_LEFT; + StyleDef.m_ColumnToTapNote[5] = NOTE_PAD2_DOWN; + StyleDef.m_ColumnToTapNote[6] = NOTE_PAD2_UP; + StyleDef.m_ColumnToTapNote[7] = NOTE_PAD2_RIGHT; + StyleDef.m_ColumnToTapNote[8] = NOTE_PAD1_UPLEFT;// Even though this isn't used, Need them here so + StyleDef.m_ColumnToTapNote[9] = NOTE_PAD1_UPRIGHT;// TapNoteToColumnNumber doesn't get confused by them + StyleDef.m_ColumnToTapNote[10] = NOTE_PAD2_UPLEFT; + StyleDef.m_ColumnToTapNote[11] = NOTE_PAD2_UPRIGHT; + StyleDef.m_ColumnToRotation[0] = mapTapNoteToRotation[NOTE_PAD1_LEFT]; + StyleDef.m_ColumnToRotation[1] = mapTapNoteToRotation[NOTE_PAD1_DOWN]; + StyleDef.m_ColumnToRotation[2] = mapTapNoteToRotation[NOTE_PAD1_UP]; + StyleDef.m_ColumnToRotation[3] = mapTapNoteToRotation[NOTE_PAD1_RIGHT]; + StyleDef.m_ColumnToRotation[4] = mapTapNoteToRotation[NOTE_PAD2_LEFT]; + StyleDef.m_ColumnToRotation[5] = mapTapNoteToRotation[NOTE_PAD2_DOWN]; + StyleDef.m_ColumnToRotation[6] = mapTapNoteToRotation[NOTE_PAD2_UP]; + StyleDef.m_ColumnToRotation[7] = mapTapNoteToRotation[NOTE_PAD2_RIGHT]; + StyleDef.m_ColumnToRotation[8] = mapTapNoteToRotation[NOTE_PAD1_UPLEFT]; + StyleDef.m_ColumnToRotation[9] = mapTapNoteToRotation[NOTE_PAD1_UPRIGHT]; + StyleDef.m_ColumnToRotation[10] = mapTapNoteToRotation[NOTE_PAD2_UPLEFT]; + StyleDef.m_ColumnToRotation[11] = mapTapNoteToRotation[NOTE_PAD2_UPRIGHT]; + break; + default: + ASSERT( false ); // invalid GameMode + } + + return StyleDef; +} \ No newline at end of file diff --git a/stepmania/src/GameManager.h b/stepmania/src/GameManager.h new file mode 100644 index 0000000000..5490e67e39 --- /dev/null +++ b/stepmania/src/GameManager.h @@ -0,0 +1,40 @@ +/* +----------------------------------------------------------------------------- + Class: GameManager + + Desc: Manages "Game" and "StyleDef", and "Instrument" definitions, which define + different ways of playing - like "dance" and "pump". + + Copyright (c) 2001-2002 by the names listed below. All rights reserved. + Chris Danford +----------------------------------------------------------------------------- +*/ + +#ifndef _GameManager_H_ +#define _GameManager_H_ + +#include "StyleDef.h" + +class GameManager +{ +public: + GameManager(); + ~GameManager(); + + DanceStyle m_DanceStyle; // the current style + + + bool IsPlayerEnabled( PlayerNumber PlayerNo ); + + StyleDef GetStyleDef( DanceStyle mode ); + StyleDef GetCurrentStyleDef() { return GetStyleDef(m_DanceStyle); }; + +protected: + +}; + + +extern GameManager* GAME; // global and accessable from anywhere in our program + + +#endif \ No newline at end of file diff --git a/stepmania/src/GhostArrow.cpp b/stepmania/src/GhostArrow.cpp index 8a0bbe4d10..46fd0cc49a 100644 --- a/stepmania/src/GhostArrow.cpp +++ b/stepmania/src/GhostArrow.cpp @@ -31,15 +31,15 @@ void GhostArrow::SetBeat( const float fSongBeat ) //SetState( fmodf(fSongBeat,1)<0.25 ? 1 : 0 ); } -void GhostArrow::Step( TapStepScore score ) +void GhostArrow::Step( TapNoteScore score ) { switch( score ) { - case TSS_PERFECT: SetDiffuseColor( D3DXCOLOR(1.0f,1.0f,0.3f,0.6f) ); break; // yellow - case TSS_GREAT: SetDiffuseColor( D3DXCOLOR(0.0f,1.0f,0.4f,0.6f) ); break; // green - case TSS_GOOD: SetDiffuseColor( D3DXCOLOR(0.3f,0.8f,1.0f,0.6f) ); break; - case TSS_BOO: SetDiffuseColor( D3DXCOLOR(0.8f,0.0f,0.6f,0.6f) ); break; - case TSS_MISS: ASSERT( false ); break; + case TNS_PERFECT: SetDiffuseColor( D3DXCOLOR(1.0f,1.0f,0.3f,0.6f) ); break; // yellow + case TNS_GREAT: SetDiffuseColor( D3DXCOLOR(0.0f,1.0f,0.4f,0.6f) ); break; // green + case TNS_GOOD: SetDiffuseColor( D3DXCOLOR(0.3f,0.8f,1.0f,0.6f) ); break; + case TNS_BOO: SetDiffuseColor( D3DXCOLOR(0.8f,0.0f,0.6f,0.6f) ); break; + case TNS_MISS: ASSERT( false ); break; } SetZoom( 1.0f ); BeginTweening( 0.3f ); diff --git a/stepmania/src/GhostArrow.h b/stepmania/src/GhostArrow.h index f5fb7889ed..a0e84a0cad 100644 --- a/stepmania/src/GhostArrow.h +++ b/stepmania/src/GhostArrow.h @@ -16,7 +16,7 @@ class GhostArrow; #include "Sprite.h" -#include "Steps.h" +#include "Pattern.h" class GhostArrow : public Sprite @@ -27,7 +27,7 @@ public: virtual void Update( float fDeltaTime ); void SetBeat( const float fSongBeat ); - void Step( TapStepScore score ); + void Step( TapNoteScore score ); float m_fVisibilityCountdown; }; diff --git a/stepmania/src/GhostArrowBright.cpp b/stepmania/src/GhostArrowBright.cpp index ff7d222f4c..30cf087bb1 100644 --- a/stepmania/src/GhostArrowBright.cpp +++ b/stepmania/src/GhostArrowBright.cpp @@ -27,15 +27,15 @@ void GhostArrowBright::SetBeat( const float fSongBeat ) //SetState( fmodf(fSongBeat,1)<0.25 ? 1 : 0 ); } -void GhostArrowBright::Step( TapStepScore score ) +void GhostArrowBright::Step( TapNoteScore score ) { switch( score ) { - case TSS_PERFECT: SetDiffuseColor( D3DXCOLOR(1.0f,1.0f,0.3f,1.0f) ); break; // yellow - case TSS_GREAT: SetDiffuseColor( D3DXCOLOR(0.0f,1.0f,0.4f,1.0f) ); break; // green - case TSS_GOOD: SetDiffuseColor( D3DXCOLOR(0.3f,0.8f,1.0f,1.0f) ); break; - case TSS_BOO: SetDiffuseColor( D3DXCOLOR(0.8f,0.0f,0.6f,1.0f) ); break; - case TSS_MISS: ASSERT( false ); break; + case TNS_PERFECT: SetDiffuseColor( D3DXCOLOR(1.0f,1.0f,0.3f,1.0f) ); break; // yellow + case TNS_GREAT: SetDiffuseColor( D3DXCOLOR(0.0f,1.0f,0.4f,1.0f) ); break; // green + case TNS_GOOD: SetDiffuseColor( D3DXCOLOR(0.3f,0.8f,1.0f,1.0f) ); break; + case TNS_BOO: SetDiffuseColor( D3DXCOLOR(0.8f,0.0f,0.6f,1.0f) ); break; + case TNS_MISS: ASSERT( false ); break; } SetState( 0 ); SetZoom( 1.2f ); diff --git a/stepmania/src/GhostArrowBright.h b/stepmania/src/GhostArrowBright.h index 53dd750862..94a56dfd24 100644 --- a/stepmania/src/GhostArrowBright.h +++ b/stepmania/src/GhostArrowBright.h @@ -16,7 +16,7 @@ class GhostArrowBright; #include "Sprite.h" -#include "Steps.h" +#include "Pattern.h" class GhostArrowBright : public Sprite @@ -25,7 +25,7 @@ public: GhostArrowBright(); void SetBeat( const float fSongBeat ); - void Step( TapStepScore score ); + void Step( TapNoteScore score ); float m_fVisibilityCountdown; }; diff --git a/stepmania/src/Grade.cpp b/stepmania/src/Grade.cpp index f8567cc15f..8351df03a4 100644 --- a/stepmania/src/Grade.cpp +++ b/stepmania/src/Grade.cpp @@ -1,11 +1,12 @@ #include "stdafx.h" /* ----------------------------------------------------------------------------- - File: Grade.cpp + Class: Grade - Desc: A graphic displayed in the Grade during Dancing. + Desc: See header. - Copyright (c) 2001 Chris Danford. All rights reserved. + Copyright (c) 2001-2002 by the names listed below. All rights reserved. + Chris Danford ----------------------------------------------------------------------------- */ diff --git a/stepmania/src/Grade.h b/stepmania/src/Grade.h index 0d773df9df..ff98e26d35 100644 --- a/stepmania/src/Grade.h +++ b/stepmania/src/Grade.h @@ -1,10 +1,11 @@ /* ----------------------------------------------------------------------------- - File: Grade.h + Class: Grade - Desc: A graphic displayed in the Grade during Dancing. + Desc: This a mark the player receives after clearing a song. - Copyright (c) 2001 Chris Danford. All rights reserved. + Copyright (c) 2001-2002 by the names listed below. All rights reserved. + Chris Danford ----------------------------------------------------------------------------- */ diff --git a/stepmania/src/GrayArrow.h b/stepmania/src/GrayArrow.h index d65adb3ea1..b90df95207 100644 --- a/stepmania/src/GrayArrow.h +++ b/stepmania/src/GrayArrow.h @@ -16,7 +16,7 @@ #include "Sprite.h" -#include "Steps.h" +#include "Pattern.h" class GrayArrow : public Sprite { diff --git a/stepmania/src/HoldGhostArrow.h b/stepmania/src/HoldGhostArrow.h index 820b3dffeb..0ffe090825 100644 --- a/stepmania/src/HoldGhostArrow.h +++ b/stepmania/src/HoldGhostArrow.h @@ -16,7 +16,7 @@ class HoldGhostArrow; #include "Sprite.h" -#include "Steps.h" +#include "Pattern.h" class HoldGhostArrow : public Sprite diff --git a/stepmania/src/HoldJudgement.cpp b/stepmania/src/HoldJudgement.cpp index b8314a6d2d..c9e33d4271 100644 --- a/stepmania/src/HoldJudgement.cpp +++ b/stepmania/src/HoldJudgement.cpp @@ -43,21 +43,21 @@ void HoldJudgement::RenderPrimitives() } } -void HoldJudgement::SetHoldJudgement( HoldStepResult result ) +void HoldJudgement::SetHoldJudgement( HoldNoteResult result ) { //RageLog( "Judgement::SetJudgement()" ); switch( result ) { - case HSR_NONE: m_sprJudgement.SetState( 0 ); break; - case HSR_OK: m_sprJudgement.SetState( 7 ); break; - case HSR_NG: m_sprJudgement.SetState( 8 ); break; + case HNR_NONE: m_sprJudgement.SetState( 0 ); break; + case HNR_OK: m_sprJudgement.SetState( 7 ); break; + case HNR_NG: m_sprJudgement.SetState( 8 ); break; default: ASSERT( false ); } m_fDisplayCountdown = JUDGEMENT_DISPLAY_TIME; - if( result == HSR_NG ) + if( result == HNR_NG ) { // falling down m_sprJudgement.SetY( -10 ); @@ -65,7 +65,7 @@ void HoldJudgement::SetHoldJudgement( HoldStepResult result ) m_sprJudgement.BeginTweening( JUDGEMENT_DISPLAY_TIME ); m_sprJudgement.SetTweenY( 10 ); } - else if( result == HSR_OK ) + else if( result == HNR_OK ) { // zooming out m_sprJudgement.SetZoom( 1.5f ); diff --git a/stepmania/src/HoldJudgement.h b/stepmania/src/HoldJudgement.h index 3a4f36d26c..46bf5bab83 100644 --- a/stepmania/src/HoldJudgement.h +++ b/stepmania/src/HoldJudgement.h @@ -24,7 +24,7 @@ class HoldJudgement : public ActorFrame { public: HoldJudgement(); - void SetHoldJudgement( HoldStepResult result ); + void SetHoldJudgement( HoldNoteResult result ); virtual void Update( float fDeltaTime ); virtual void RenderPrimitives(); diff --git a/stepmania/src/Judgement.cpp b/stepmania/src/Judgement.cpp index a81d65c7fa..130f26f40a 100644 --- a/stepmania/src/Judgement.cpp +++ b/stepmania/src/Judgement.cpp @@ -44,23 +44,23 @@ void Judgement::RenderPrimitives() } -void Judgement::SetJudgement( TapStepScore score ) +void Judgement::SetJudgement( TapNoteScore score ) { //RageLog( "Judgement::SetJudgement()" ); switch( score ) { - case TSS_PERFECT: m_sprJudgement.SetState( 0 ); break; - case TSS_GREAT: m_sprJudgement.SetState( 1 ); break; - case TSS_GOOD: m_sprJudgement.SetState( 2 ); break; - case TSS_BOO: m_sprJudgement.SetState( 3 ); break; - case TSS_MISS: m_sprJudgement.SetState( 4 ); break; + case TNS_PERFECT: m_sprJudgement.SetState( 0 ); break; + case TNS_GREAT: m_sprJudgement.SetState( 1 ); break; + case TNS_GOOD: m_sprJudgement.SetState( 2 ); break; + case TNS_BOO: m_sprJudgement.SetState( 3 ); break; + case TNS_MISS: m_sprJudgement.SetState( 4 ); break; default: ASSERT( false ); } m_fDisplayCountdown = JUDGEMENT_DISPLAY_TIME; - if( score == TSS_MISS ) + if( score == TNS_MISS ) { // falling down m_sprJudgement.SetY( -30 ); diff --git a/stepmania/src/Judgement.h b/stepmania/src/Judgement.h index 491995c306..1f1e9ddfc3 100644 --- a/stepmania/src/Judgement.h +++ b/stepmania/src/Judgement.h @@ -24,7 +24,7 @@ class Judgement : public ActorFrame { public: Judgement(); - void SetJudgement( TapStepScore score ); + void SetJudgement( TapNoteScore score ); virtual void Update( float fDeltaTime ); virtual void RenderPrimitives(); diff --git a/stepmania/src/MusicWheel.cpp b/stepmania/src/MusicWheel.cpp index d9678468f7..327cc795cd 100644 --- a/stepmania/src/MusicWheel.cpp +++ b/stepmania/src/MusicWheel.cpp @@ -12,6 +12,7 @@ #include "MusicWheel.h" #include "RageUtil.h" #include "SongManager.h" +#include "GameManager.h" #include "ScreenDimensions.h" #include "ThemeManager.h" #include "RageMusic.h" @@ -231,7 +232,7 @@ MusicWheel::MusicWheel() // init m_mapGroupNameToBannerColor CArray arraySongs; - arraySongs.Copy( SONGS->m_pSongs ); + arraySongs.Copy( SONG->m_pSongs ); SortSongPointerArrayByGroup( arraySongs ); int iNextGroupBannerColor = 0; @@ -271,10 +272,10 @@ MusicWheel::MusicWheel() BuildWheelItemDatas( m_WheelItemDatas[so], SongSortOrder(so) ); - if( SONGS->m_pCurSong == NULL && // if there is no currently selected song - SONGS->m_pSongs.GetSize() > 0 ) // and there is at least one song + if( SONG->m_pCurSong == NULL && // if there is no currently selected song + SONG->m_pSongs.GetSize() > 0 ) // and there is at least one song { - SONGS->m_pCurSong = SONGS->m_pSongs[0]; // select the first song + SONG->m_pCurSong = SONG->m_pSongs[0]; // select the first song } @@ -283,7 +284,7 @@ MusicWheel::MusicWheel() for( i=0; im_pCurSong ) + && GetCurWheelItemDatas()[i].m_pSong == SONG->m_pCurSong ) { m_iSelection = i; // select it m_sExpandedSectionName = GetCurWheelItemDatas()[m_iSelection].m_sSectionName; // make its group the currently expanded group @@ -309,20 +310,20 @@ void MusicWheel::BuildWheelItemDatas( CArray &arr /////////////////////////////////// CArray arraySongs; - // copy only song that have at least one Steps for the current GameMode - for( int i=0; im_pSongs.GetSize(); i++ ) + // copy only song that have at least one Pattern for the current GameMode + for( int i=0; im_pSongs.GetSize(); i++ ) { - Song* pSong = SONGS->m_pSongs[i]; + Song* pSong = SONG->m_pSongs[i]; - CArray arraySteps; - pSong->GetStepsThatMatchGameMode( PREFS->m_GameMode, arraySteps ); + CArray arraySteps; + pSong->GetPatternsThatMatchStyle( GAME->m_DanceStyle, arraySteps ); if( arraySteps.GetSize() > 0 ) arraySongs.Add( pSong ); } - // sort the songs + // sort the SONG switch( so ) { case SORT_GROUP: @@ -432,7 +433,7 @@ void MusicWheel::BuildWheelItemDatas( CArray &arr if( arrayWheelItemDatas.GetSize() == 0 ) { arrayWheelItemDatas.SetSize( 1 ); - arrayWheelItemDatas[0].LoadFromSectionName( "No Songs" ); + arrayWheelItemDatas[0].LoadFromSectionName( "No SONG" ); arrayWheelItemDatas[0].m_colorTint = D3DXCOLOR(0.5f,0.5f,0.5f,1); } } diff --git a/stepmania/src/Player.cpp b/stepmania/src/Player.cpp index be2eb62374..e455fd9387 100644 --- a/stepmania/src/Player.cpp +++ b/stepmania/src/Player.cpp @@ -1,10 +1,9 @@ #include "stdafx.h" /* ----------------------------------------------------------------------------- - File: Player.cpp + Class: Pattern - Desc: Object that accepts pad input, knocks down ColorArrows that were stepped on, - and keeps score for the player. + Desc: See header. Copyright (c) 2001 Chris Danford. All rights reserved. ----------------------------------------------------------------------------- @@ -36,13 +35,13 @@ Player::Player() m_PlayerNumber = PLAYER_NONE; // init step elements - for( int i=0; iAddActor( &m_GrayArrows ); @@ -57,39 +56,39 @@ Player::Player() } -void Player::Load( const Style& style, PlayerNumber player_no, const Steps& steps, const PlayerOptions& po ) +void Player::Load( const StyleDef& StyleDef, PlayerNumber player_no, const Pattern& pattern, const PlayerOptions& po ) { //RageLog( "Player::Load()", ); - m_Style = style; + m_Style = StyleDef; m_PlayerNumber = player_no; m_PlayerOptions = po; - Steps steps2 = steps; + Pattern pattern2 = pattern; if( !po.m_bAllowFreezeArrows ) - steps2.RemoveHoldSteps(); + pattern2.RemoveHoldNotes(); - steps2.Turn( po.m_TurnType ); + pattern2.Turn( po.m_TurnType ); if( po.m_bLittle ) - steps2.MakeLittle(); + pattern2.MakeLittle(); - m_ColorArrowField.Load( style, steps2, po, 2, 10 ); - m_GrayArrows.Load( po, style ); - m_GhostArrows.Load( po, style ); + m_ColorArrowField.Load( StyleDef, pattern2, po, 2, 10 ); + m_GrayArrows.Load( po, StyleDef ); + m_GhostArrows.Load( po, StyleDef ); // load step elements - for( int i=0; i 0 ) { - m_Judgement.SetJudgement( TSS_MISS ); + m_Judgement.SetJudgement( TNS_MISS ); m_Combo.EndCombo(); for( int i=0; iIsButtonDown( PlayerI ); if( bIsHoldingButton ) { - hss.m_fLife += fDeltaTime/HOLD_ARROW_NG_TIME; - hss.m_fLife = min( hss.m_fLife, 1 ); // clamp - int iCol = m_Style.TapStepToColumnNumber( hs.m_TapStep ); - m_GhostArrows.HoldStep( iCol ); // update the "electric ghost" effect + hns.m_fLife += fDeltaTime/HOLD_ARROW_NG_TIME; + hns.m_fLife = min( hns.m_fLife, 1 ); // clamp + int iCol = m_Style.TapNoteToColumnNumber( hn.m_TapNote ); + m_GhostArrows.HoldNote( iCol ); // update the "electric ghost" effect } else // !bIsHoldingButton { - hss.m_fLife -= fDeltaTime/HOLD_ARROW_NG_TIME; - hss.m_fLife = max( hss.m_fLife, 0 ); // clamp + hns.m_fLife -= fDeltaTime/HOLD_ARROW_NG_TIME; + hns.m_fLife = max( hns.m_fLife, 0 ); // clamp } - m_ColorArrowField.SetHoldStepLife( i, hss.m_fLife ); // update the ColorArrowField display + m_ColorArrowField.SetHoldNoteLife( i, hns.m_fLife ); // update the ColorArrowField display } // check for NG - if( hss.m_fLife == 0 ) // the player has not pressed the button for a long time! + if( hns.m_fLife == 0 ) // the player has not pressed the button for a long time! { - hss.m_Result = HSR_NG; - int iCol = m_Style.TapStepToColumnNumber( hs.m_TapStep ); - m_HoldJudgement[iCol].SetHoldJudgement( HSR_NG ); + hns.m_Result = HNR_NG; + int iCol = m_Style.TapNoteToColumnNumber( hn.m_TapNote ); + m_HoldJudgement[iCol].SetHoldJudgement( HNR_NG ); } // check for OK - if( m_fSongBeat > fEndBeat ) // if this HoldStep is in the past + if( m_fSongBeat > fEndBeat ) // if this HoldNote is in the past { - // this implies that hss.m_fLife > 0, or else we would have marked it NG above - hss.m_fLife = 1; - hss.m_Result = HSR_OK; - int iCol = m_Style.TapStepToColumnNumber( hs.m_TapStep ); - m_HoldJudgement[iCol].SetHoldJudgement( HSR_OK ); - m_ColorArrowField.SetHoldStepLife( i, hss.m_fLife ); // update the ColorArrowField display + // this implies that hns.m_fLife > 0, or else we would have marked it NG above + hns.m_fLife = 1; + hns.m_Result = HNR_OK; + int iCol = m_Style.TapNoteToColumnNumber( hn.m_TapNote ); + m_HoldJudgement[iCol].SetHoldJudgement( HNR_OK ); + m_ColorArrowField.SetHoldNoteLife( i, hns.m_fLife ); // update the ColorArrowField display } } @@ -249,12 +248,12 @@ void Player::RenderPrimitives() bool Player::IsThereANoteAtIndex( int iIndex ) { - if( m_TapStepsOriginal[iIndex] != STEP_NONE ) + if( m_TapNotesOriginal[iIndex] != NOTE_NONE ) return true; - for( int i=0; i 100 ); + int iColNum = m_Style.TapNoteToColumnNumber( player_step ); + m_GhostArrows.TapNote( iColNum, score, m_Combo.GetCurrentCombo() > 100 ); // update the combo display switch( score ) { - case TSS_PERFECT: - case TSS_GREAT: + case TNS_PERFECT: + case TNS_GREAT: m_Combo.ContinueCombo(); break; - case TSS_GOOD: - case TSS_BOO: + case TNS_GOOD: + case TNS_BOO: m_Combo.EndCombo(); break; } @@ -339,13 +338,13 @@ void Player::HandlePlayerStep( float fSongBeat, TapStep player_step, float fMaxB } -void Player::CheckForCompleteStep( float fSongBeat, TapStep player_step, float fMaxBeatDiff ) +void Player::CheckForCompleteStep( float fSongBeat, TapNote player_step, float fMaxBeatDiff ) { //RageLog( "Player::CheckForCompleteStep()" ); // look for the closest matching step - int iIndexStartLookingAt = BeatToStepIndex( fSongBeat ); - int iNumElementsToExamine = BeatToStepIndex( fMaxBeatDiff ); // number of elements to examine on either end of iIndexStartLookingAt + int iIndexStartLookingAt = BeatToNoteIndex( fSongBeat ); + int iNumElementsToExamine = BeatToNoteIndex( fMaxBeatDiff ); // number of elements to examine on either end of iIndexStartLookingAt //RageLog( "iIndexStartLookingAt = %d, iNumElementsToExamine = %d", iIndexStartLookingAt, iNumElementsToExamine ); @@ -356,17 +355,17 @@ void Player::CheckForCompleteStep( float fSongBeat, TapStep player_step, float f int iCurrentIndexLater = iIndexStartLookingAt + delta; // silly check to make sure we don't go out of bounds - iCurrentIndexEarlier = clamp( iCurrentIndexEarlier, 0, MAX_TAP_STEP_ELEMENTS-1 ); - iCurrentIndexLater = clamp( iCurrentIndexLater, 0, MAX_TAP_STEP_ELEMENTS-1 ); + iCurrentIndexEarlier = clamp( iCurrentIndexEarlier, 0, MAX_TAP_NOTE_ELEMENTS-1 ); + iCurrentIndexLater = clamp( iCurrentIndexLater, 0, MAX_TAP_NOTE_ELEMENTS-1 ); //////////////////////////// // check the step to the left of iIndexStartLookingAt //////////////////////////// - //RageLog( "Checking steps[%d]", iCurrentIndexEarlier ); - if( m_TapStepsRemaining[iCurrentIndexEarlier] & player_step ) // these steps overlap + //RageLog( "Checking Pattern[%d]", iCurrentIndexEarlier ); + if( m_TapNotesRemaining[iCurrentIndexEarlier] & player_step ) // these Pattern overlap { - m_TapStepsRemaining[iCurrentIndexEarlier] &= ~player_step; // subtract player_step - if( m_TapStepsRemaining[iCurrentIndexEarlier] == 0 ) { // did this complete the step? + m_TapNotesRemaining[iCurrentIndexEarlier] &= ~player_step; // subtract player_step + if( m_TapNotesRemaining[iCurrentIndexEarlier] == 0 ) { // did this complete the step? OnCompleteStep( fSongBeat, player_step, fMaxBeatDiff, iCurrentIndexEarlier ); return; } @@ -375,11 +374,11 @@ void Player::CheckForCompleteStep( float fSongBeat, TapStep player_step, float f //////////////////////////// // check the step to the right of iIndexStartLookingAt //////////////////////////// - //RageLog( "Checking steps[%d]", iCurrentIndexLater ); - if( m_TapStepsRemaining[iCurrentIndexLater] & player_step ) // these steps overlap + //RageLog( "Checking Pattern[%d]", iCurrentIndexLater ); + if( m_TapNotesRemaining[iCurrentIndexLater] & player_step ) // these Pattern overlap { - m_TapStepsRemaining[iCurrentIndexLater] &= ~player_step; // subtract player_step - if( m_TapStepsRemaining[iCurrentIndexLater] == 0 ) { // did this complete the step? + m_TapNotesRemaining[iCurrentIndexLater] &= ~player_step; // subtract player_step + if( m_TapNotesRemaining[iCurrentIndexLater] == 0 ) { // did this complete the step? OnCompleteStep( fSongBeat, player_step, fMaxBeatDiff, iCurrentIndexLater ); return; } @@ -387,9 +386,9 @@ void Player::CheckForCompleteStep( float fSongBeat, TapStep player_step, float f } } -void Player::OnCompleteStep( float fSongBeat, TapStep player_step, float fMaxBeatDiff, int iIndexThatWasSteppedOn ) +void Player::OnCompleteStep( float fSongBeat, TapNote player_step, float fMaxBeatDiff, int iIndexThatWasSteppedOn ) { - float fStepBeat = StepIndexToBeat( (float)iIndexThatWasSteppedOn ); + float fStepBeat = NoteIndexToBeat( (float)iIndexThatWasSteppedOn ); float fBeatsUntilStep = fStepBeat - fSongBeat; @@ -399,12 +398,12 @@ void Player::OnCompleteStep( float fSongBeat, TapStep player_step, float fMaxBea // fBeatsUntilStep, fPercentFromPerfect ); // compute what the score should be for the note we stepped on - TapStepScore &score = m_TapStepScores[iIndexThatWasSteppedOn]; + TapNoteScore &score = m_TapNoteScores[iIndexThatWasSteppedOn]; - if( fPercentFromPerfect < 0.25f ) score = TSS_PERFECT; - else if( fPercentFromPerfect < 0.50f ) score = TSS_GREAT; - else if( fPercentFromPerfect < 0.75f ) score = TSS_GOOD; - else score = TSS_BOO; + if( fPercentFromPerfect < 0.25f ) score = TNS_PERFECT; + else if( fPercentFromPerfect < 0.50f ) score = TNS_GREAT; + else if( fPercentFromPerfect < 0.75f ) score = TNS_GOOD; + else score = TNS_BOO; // update the judgement, score, and life m_Judgement.SetJudgement( score ); @@ -413,24 +412,24 @@ void Player::OnCompleteStep( float fSongBeat, TapStep player_step, float fMaxBea // remove this row from the ColorArrowField - m_ColorArrowField.RemoveTapStepRow( iIndexThatWasSteppedOn ); + m_ColorArrowField.RemoveTapNoteRow( iIndexThatWasSteppedOn ); // check to see if this completes a row of notes for( int c=0; c100 ); // show the ghost arrow for this column + if( m_TapNotesOriginal[iIndexThatWasSteppedOn] & m_Style.m_ColumnToTapNote[c] ) // if this colum was part of the original step + m_GhostArrows.TapNote( c, score, m_Combo.GetCurrentCombo()>100 ); // show the ghost arrow for this column } // update the combo display switch( score ) { - case TSS_PERFECT: - case TSS_GREAT: + case TNS_PERFECT: + case TNS_GREAT: m_Combo.ContinueCombo(); break; - case TSS_GOOD: - case TSS_BOO: + case TNS_GOOD: + case TNS_BOO: m_Combo.EndCombo(); break; } @@ -441,36 +440,36 @@ ScoreSummary Player::GetScoreSummary() { ScoreSummary scoreSummary; - for( int i=0; im_DanceStyle ) { - case MODE_SINGLE: - case MODE_SOLO: + case STYLE_SINGLE: + case STYLE_SOLO: if( PadI.pad_no == PAD_1 ) PlayerI.player_no = PLAYER_1; else PlayerI.player_no = PLAYER_NONE; - if ( PadI.button == BUTTON_LEFT ) PlayerI.step |= STEP_PAD1_LEFT; - if ( PadI.button == BUTTON_UPLEFT ) PlayerI.step |= STEP_PAD1_UPLEFT; - if ( PadI.button == BUTTON_DOWN ) PlayerI.step |= STEP_PAD1_DOWN; - if ( PadI.button == BUTTON_UP ) PlayerI.step |= STEP_PAD1_UP; - if ( PadI.button == BUTTON_UPRIGHT ) PlayerI.step |= STEP_PAD1_UPRIGHT; - if ( PadI.button == BUTTON_RIGHT ) PlayerI.step |= STEP_PAD1_RIGHT; + if ( PadI.button == BUTTON_LEFT ) PlayerI.note |= NOTE_PAD1_LEFT; + if ( PadI.button == BUTTON_UPLEFT ) PlayerI.note |= NOTE_PAD1_UPLEFT; + if ( PadI.button == BUTTON_DOWN ) PlayerI.note |= NOTE_PAD1_DOWN; + if ( PadI.button == BUTTON_UP ) PlayerI.note |= NOTE_PAD1_UP; + if ( PadI.button == BUTTON_UPRIGHT ) PlayerI.note |= NOTE_PAD1_UPRIGHT; + if ( PadI.button == BUTTON_RIGHT ) PlayerI.note |= NOTE_PAD1_RIGHT; break; - case MODE_VERSUS: - case MODE_COUPLE: + case STYLE_VERSUS: + case STYLE_COUPLE: if( PadI.pad_no == PAD_1 ) PlayerI.player_no = PLAYER_1; else if( PadI.pad_no == PAD_2 ) @@ -303,31 +302,31 @@ void PrefsManager::PadToPlayer( PadInput PadI, PlayerInput &PlayerI ) else PlayerI.player_no = PLAYER_NONE; - if ( PadI.button == BUTTON_LEFT ) PlayerI.step |= STEP_PAD1_LEFT; - if ( PadI.button == BUTTON_UPLEFT ) PlayerI.step |= STEP_PAD1_UPLEFT; - if ( PadI.button == BUTTON_DOWN ) PlayerI.step |= STEP_PAD1_DOWN; - if ( PadI.button == BUTTON_UP ) PlayerI.step |= STEP_PAD1_UP; - if ( PadI.button == BUTTON_UPRIGHT ) PlayerI.step |= STEP_PAD1_UPRIGHT; - if ( PadI.button == BUTTON_RIGHT ) PlayerI.step |= STEP_PAD1_RIGHT; + if ( PadI.button == BUTTON_LEFT ) PlayerI.note |= NOTE_PAD1_LEFT; + if ( PadI.button == BUTTON_UPLEFT ) PlayerI.note |= NOTE_PAD1_UPLEFT; + if ( PadI.button == BUTTON_DOWN ) PlayerI.note |= NOTE_PAD1_DOWN; + if ( PadI.button == BUTTON_UP ) PlayerI.note |= NOTE_PAD1_UP; + if ( PadI.button == BUTTON_UPRIGHT ) PlayerI.note |= NOTE_PAD1_UPRIGHT; + if ( PadI.button == BUTTON_RIGHT ) PlayerI.note |= NOTE_PAD1_RIGHT; break; - case MODE_DOUBLE: + case STYLE_DOUBLE: switch( PadI.pad_no ) { case PAD_1: PlayerI.player_no = PLAYER_1; - if ( PadI.button == BUTTON_LEFT ) PlayerI.step |= STEP_PAD1_LEFT; - if ( PadI.button == BUTTON_DOWN ) PlayerI.step |= STEP_PAD1_DOWN; - if ( PadI.button == BUTTON_UP ) PlayerI.step |= STEP_PAD1_UP; - if ( PadI.button == BUTTON_RIGHT ) PlayerI.step |= STEP_PAD1_RIGHT; + if ( PadI.button == BUTTON_LEFT ) PlayerI.note |= NOTE_PAD1_LEFT; + if ( PadI.button == BUTTON_DOWN ) PlayerI.note |= NOTE_PAD1_DOWN; + if ( PadI.button == BUTTON_UP ) PlayerI.note |= NOTE_PAD1_UP; + if ( PadI.button == BUTTON_RIGHT ) PlayerI.note |= NOTE_PAD1_RIGHT; break; case PAD_2: PlayerI.player_no = PLAYER_1; - if ( PadI.button == BUTTON_LEFT ) PlayerI.step |= STEP_PAD2_LEFT; - if ( PadI.button == BUTTON_DOWN ) PlayerI.step |= STEP_PAD2_DOWN; - if ( PadI.button == BUTTON_UP ) PlayerI.step |= STEP_PAD2_UP; - if ( PadI.button == BUTTON_RIGHT ) PlayerI.step |= STEP_PAD2_RIGHT; + if ( PadI.button == BUTTON_LEFT ) PlayerI.note |= NOTE_PAD2_LEFT; + if ( PadI.button == BUTTON_DOWN ) PlayerI.note |= NOTE_PAD2_DOWN; + if ( PadI.button == BUTTON_UP ) PlayerI.note |= NOTE_PAD2_UP; + if ( PadI.button == BUTTON_RIGHT ) PlayerI.note |= NOTE_PAD2_RIGHT; break; case PAD_NONE: PlayerI.player_no = PLAYER_NONE; @@ -336,7 +335,7 @@ void PrefsManager::PadToPlayer( PadInput PadI, PlayerInput &PlayerI ) break; default: - ASSERT( false ); // invalid GameMode + ASSERT( false ); // invalid DanceStyle } } @@ -345,38 +344,38 @@ void PrefsManager::PlayerToPad( PlayerInput PlayerI, PadInput &PadI ) PadI.pad_no = PAD_NONE; PadI.button = BUTTON_NONE; - switch( m_GameMode ) + switch( GAME->m_DanceStyle ) { - case MODE_SINGLE: - case MODE_SOLO: - case MODE_VERSUS: - case MODE_COUPLE: + case STYLE_SINGLE: + case STYLE_SOLO: + case STYLE_VERSUS: + case STYLE_COUPLE: PadI.pad_no = (PadNumber)PlayerI.player_no; - if ( PlayerI.step == STEP_PAD1_LEFT ) PadI.button = BUTTON_LEFT; - if ( PlayerI.step == STEP_PAD1_UPLEFT ) PadI.button = BUTTON_UPLEFT; - if ( PlayerI.step == STEP_PAD1_DOWN ) PadI.button = BUTTON_DOWN; - if ( PlayerI.step == STEP_PAD1_UP ) PadI.button = BUTTON_UP; - if ( PlayerI.step == STEP_PAD1_UPRIGHT ) PadI.button = BUTTON_UPRIGHT; - if ( PlayerI.step == STEP_PAD1_RIGHT ) PadI.button = BUTTON_RIGHT; + if ( PlayerI.note == NOTE_PAD1_LEFT ) PadI.button = BUTTON_LEFT; + if ( PlayerI.note == NOTE_PAD1_UPLEFT ) PadI.button = BUTTON_UPLEFT; + if ( PlayerI.note == NOTE_PAD1_DOWN ) PadI.button = BUTTON_DOWN; + if ( PlayerI.note == NOTE_PAD1_UP ) PadI.button = BUTTON_UP; + if ( PlayerI.note == NOTE_PAD1_UPRIGHT ) PadI.button = BUTTON_UPRIGHT; + if ( PlayerI.note == NOTE_PAD1_RIGHT ) PadI.button = BUTTON_RIGHT; break; - case MODE_DOUBLE: - switch( PlayerI.step ) + case STYLE_DOUBLE: + switch( PlayerI.note ) { - case STEP_PAD1_LEFT: PadI.pad_no = PAD_1; PadI.button = BUTTON_LEFT; break; - case STEP_PAD1_DOWN: PadI.pad_no = PAD_1; PadI.button = BUTTON_DOWN; break; - case STEP_PAD1_UP: PadI.pad_no = PAD_1; PadI.button = BUTTON_UP; break; - case STEP_PAD1_RIGHT: PadI.pad_no = PAD_1; PadI.button = BUTTON_RIGHT; break; - case STEP_PAD2_LEFT: PadI.pad_no = PAD_2; PadI.button = BUTTON_LEFT; break; - case STEP_PAD2_DOWN: PadI.pad_no = PAD_2; PadI.button = BUTTON_DOWN; break; - case STEP_PAD2_UP: PadI.pad_no = PAD_2; PadI.button = BUTTON_UP; break; - case STEP_PAD2_RIGHT: PadI.pad_no = PAD_2; PadI.button = BUTTON_RIGHT; break; + case NOTE_PAD1_LEFT: PadI.pad_no = PAD_1; PadI.button = BUTTON_LEFT; break; + case NOTE_PAD1_DOWN: PadI.pad_no = PAD_1; PadI.button = BUTTON_DOWN; break; + case NOTE_PAD1_UP: PadI.pad_no = PAD_1; PadI.button = BUTTON_UP; break; + case NOTE_PAD1_RIGHT: PadI.pad_no = PAD_1; PadI.button = BUTTON_RIGHT; break; + case NOTE_PAD2_LEFT: PadI.pad_no = PAD_2; PadI.button = BUTTON_LEFT; break; + case NOTE_PAD2_DOWN: PadI.pad_no = PAD_2; PadI.button = BUTTON_DOWN; break; + case NOTE_PAD2_UP: PadI.pad_no = PAD_2; PadI.button = BUTTON_UP; break; + case NOTE_PAD2_RIGHT: PadI.pad_no = PAD_2; PadI.button = BUTTON_RIGHT; break; } break; default: - ASSERT( false ); // invalid GameMode + ASSERT( false ); // invalid DanceStyle } } diff --git a/stepmania/src/PrefsManager.h b/stepmania/src/PrefsManager.h index 5da16590ad..c30459ef9b 100644 --- a/stepmania/src/PrefsManager.h +++ b/stepmania/src/PrefsManager.h @@ -2,8 +2,11 @@ ----------------------------------------------------------------------------- Class: PrefsManager - Desc: Manages input mapping, saves preferences, and holds data that is passed - between Windows. + Desc: Manages all other game data that isn't handled about SongManager, + GameManager, or ThemeManager. Some of this data is saved between sessions, + for example, input mapping settings and GameOptions. This class also has + temporary holders for information that passed between windows - e.g. + ScoreSummary. Copyright (c) 2001-2002 by the names listed below. All rights reserved. Chris Danford @@ -32,44 +35,16 @@ public: PrefsManager(); ~PrefsManager(); - GameMode m_GameMode; - - ScoreSummary scoreSummaryPlayer[NUM_PLAYERS]; - - SongSortOrder m_SongSortOrder; - - int m_iCurrentStage; + ScoreSummary m_ScoreSummary[NUM_PLAYERS]; // for passing from Dancing to Results + SongSortOrder m_SongSortOrder; // used by MusicWheel and should be saved until the app exits + int m_iCurrentStage; // number of stages played +1 GameOptions m_GameOptions; PlayerOptions m_PlayerOptions[NUM_PLAYERS]; SongOptions m_SongOptions; - bool IsPlayerEnabled( PlayerNumber PlayerNo ) - { - switch( m_GameMode ) - { - case MODE_VERSUS: - case MODE_COUPLE: - if( PlayerNo == PLAYER_1 ) - return true; - if( PlayerNo == PLAYER_2 ) - return true; - break; - case MODE_SINGLE: - case MODE_SOLO: - case MODE_DOUBLE: - if( PlayerNo == PLAYER_1 ) - return true; - if( PlayerNo == PLAYER_2 ) - return false; - break; - default: - ASSERT( false ); // invalid game mode - } - return false; - }; - // prefs file stuff + // read and write to disk void ReadPrefsFromDisk(); void SavePrefsToDisk(); @@ -91,11 +66,6 @@ public: bool IsButtonDown( PadInput pi ); bool IsButtonDown( PlayerInput PlayerI ); - // theme stuff - CString m_ThemeName; - - - protected: diff --git a/stepmania/src/ScoreDisplayRolling.cpp b/stepmania/src/ScoreDisplayRolling.cpp index 8bd7ff0183..135c5ea794 100644 --- a/stepmania/src/ScoreDisplayRolling.cpp +++ b/stepmania/src/ScoreDisplayRolling.cpp @@ -93,12 +93,12 @@ void ScoreDisplayRolling::Draw() -void ScoreDisplayRolling::AddToScore( TapStepScore stepscore, int iCurCombo ) +void ScoreDisplayRolling::AddToScore( TapNoteScore score, int iCurCombo ) { // The scoring system for DDR versions 1 and 2 (including the Plus remixes) is as follows: // For every step: // - // Multiplier (M) = (# of steps in your current combo / 4) rounded down + // Multiplier (M) = (# of Pattern in your current combo / 4) rounded down // "Good" step = M * 100 (and this ends your combo) // "Great" step = M * M * 100 // "Perfect" step = M * M * 300 @@ -117,17 +117,59 @@ void ScoreDisplayRolling::AddToScore( TapStepScore stepscore, int iCurCombo ) float M = iCurCombo/4.0f; float fScoreToAdd = 0; - switch( stepscore ) + switch( score ) { - case TSS_MISS: break; - case TSS_BOO: break; - case TSS_GOOD: fScoreToAdd = M * 100 + 100; break; - case TSS_GREAT: fScoreToAdd = M * M * 100 + 300; break; - case TSS_PERFECT: fScoreToAdd = M * M * 300 + 500; break; + case TNS_MISS: break; + case TNS_BOO: break; + case TNS_GOOD: fScoreToAdd = M * 100 + 100; break; + case TNS_GREAT: fScoreToAdd = M * M * 100 + 300; break; + case TNS_PERFECT: fScoreToAdd = M * M * 300 + 500; break; } m_fScore += fScoreToAdd; ASSERT( m_fScore >= 0 ); + /* Score implementation by Chris Gomez, February 6th, 2002 The + scoring system for 5th mix is much more complicated than the original + scoring system. We don't have bonuses yet, so they're not included in + this code. Max score is (feet + 1) * 5,000,000. Scores are clamped + to integers; this is fixed on the last step (if it's perfect) + + The base step value is the max score divided by 10, divided by + one-half of the max combo squared plus the max combo. This value is + multiplied by 10 for a perfect or 5 for a great, and further + multiplied by the number of Pattern currently in the combo. */ +/* + int iScoreToAdd = 0; int iBonus = 0; + + Pattern *pSteps = GAMEINFO->m_pStepsPlayer[m_PlayerNumber]; + int iNumFeet = pSteps->m_iNumFeet; + int iMaxCombo = pSteps->GetNumSteps(); + + int iScoreMax = (iNumFeet + 1) * 5000000; //magic numbers. int + iBaseScore = (iScoreMax / 10) / ((iMaxCombo * (iMaxCombo + 1)) / 2); + + iCurCombo++; // looks like the current combo counter starts at 0 when + iCurCombo++it should start at 1 + // this was messing with the scoring, so it had to be fixed. + + switch (score) + { + case miss: + case boo: + case good: + break; + case great: + iScoreToAdd = 5 * iBaseScore * iCurCombo; + break; + case perfect: + iScoreToAdd = 10 * iBaseScore * iCurCombo; + if(BeatToStepIndex(pSteps->GetLastBeat()) == iMaxCombo) + for(int i = 1; i <= iMaxCombo; i++) + iBonus += 10 * iBaseScore * i; + iScoreToAdd += iBonus; + break; + } +*/ this->SetScore( m_fScore ); } diff --git a/stepmania/src/ScoreDisplayRolling.h b/stepmania/src/ScoreDisplayRolling.h index 653470256e..1af2840a1e 100644 --- a/stepmania/src/ScoreDisplayRolling.h +++ b/stepmania/src/ScoreDisplayRolling.h @@ -29,7 +29,7 @@ public: void SetScore( float fNewScore ); float GetScore(); - void AddToScore( TapStepScore stepscore, int iCurCombo ); + void AddToScore( TapNoteScore score, int iCurCombo ); virtual void Update( float fDeltaTime ); virtual void Draw(); diff --git a/stepmania/src/Song.cpp b/stepmania/src/Song.cpp index 31a635f795..14fa080328 100644 --- a/stepmania/src/Song.cpp +++ b/stepmania/src/Song.cpp @@ -11,7 +11,7 @@ #include "Util.h" -#include "Steps.h" +#include "Pattern.h" #include "RageUtil.h" #include "Song.h" @@ -224,12 +224,12 @@ bool Song::LoadSongInfoFromBMSDir( CString sDir ) // is identical for every BMS file in the directory. m_sSongFilePath = m_sSongDir + arrayBMSFileNames[0]; - // load the Steps from the rest of the BMS files + // load the Pattern from the rest of the BMS files for( int i=0; i') + // strip Pattern type out of description leaving only song title (looks like 'B4U ') m_sTitle.Replace( "(ANOTHER)", "" ); m_sTitle.Replace( "(BASIC)", "" ); m_sTitle.Replace( "(MANIAC)", "" ); @@ -347,15 +347,15 @@ bool Song::LoadSongInfoFromBMSDir( CString sDir ) { case 01: // background music track float fBeatOffset; - fBeatOffset = StepIndexToBeat( (float)iStepIndex ); + fBeatOffset = NoteIndexToBeat( (float)iStepIndex ); float fBPS; fBPS = m_BPMSegments[0].m_fBPM/60.0f; m_fOffsetInSeconds = fBeatOffset / fBPS; - //RageLog( "Found offset to be index %d, beat %f", iStepIndex, StepIndexToBeat(iStepIndex) ); + //RageLog( "Found offset to be index %d, beat %f", iStepIndex, NoteIndexToBeat(iStepIndex) ); break; case 03: // bpm BPMSegment new_seg; - new_seg.m_fStartBeat = StepIndexToBeat( (float)iStepIndex ); + new_seg.m_fStartBeat = NoteIndexToBeat( (float)iStepIndex ); new_seg.m_fBPM = (float)arrayNotes[j]; m_BPMSegments.Add( new_seg ); // add to back for now (we'll sort later) @@ -488,7 +488,7 @@ bool Song::LoadSongInfoFromDWIFile( CString sPath ) CStringArray arrayFreezeValues; split( arrayFreezeExpressions[f], "=", arrayFreezeValues ); float fIndex = atoi( arrayFreezeValues[0] ) * ELEMENTS_PER_BEAT / 4.0f; - float fFreezeBeat = StepIndexToBeat( fIndex ); + float fFreezeBeat = NoteIndexToBeat( fIndex ); float fFreezeSeconds = (float)atof( arrayFreezeValues[1] ) / 1000.0f; FreezeSegment new_seg; @@ -513,7 +513,7 @@ bool Song::LoadSongInfoFromDWIFile( CString sPath ) CStringArray arrayBPMChangeValues; split( arrayBPMChangeExpressions[b], "=", arrayBPMChangeValues ); float fIndex = atoi( arrayBPMChangeValues[0] ) * ELEMENTS_PER_BEAT / 4.0f; - float fBeat = StepIndexToBeat( fIndex ); + float fBeat = NoteIndexToBeat( fIndex ); float fNewBPM = (float)atoi( arrayBPMChangeValues[1] ); BPMSegment new_seg; @@ -528,9 +528,10 @@ bool Song::LoadSongInfoFromDWIFile( CString sPath ) else if( sValueName == "#SINGLE" || sValueName == "#DOUBLE" || sValueName == "#COUPLE" ) { - arraySteps.SetSize( arraySteps.GetSize()+1 ); - Steps &new_steps = arraySteps[ arraySteps.GetSize()-1 ]; - new_steps.LoadFromDWIValueTokens( arrayValueTokens ); + m_arrayPatterns.SetSize( m_arrayPatterns.GetSize()+1, 1 ); + Pattern &new_pattern = m_arrayPatterns[ m_arrayPatterns.GetSize()-1 ]; + new_pattern.LoadFromDWIValueTokens( arrayValueTokens ); + int ksjfk = 0; } else // do nothing. We don't care about this value name @@ -639,26 +640,26 @@ void Song::TidyUpData() } -void Song::GetStepsThatMatchGameMode( GameMode gm, CArray& arrayAddTo ) +void Song::GetPatternsThatMatchStyle( DanceStyle s, CArray& arrayAddTo ) { - for( int i=0; im_GameMode // if the current GameModes matches the Steps's GameMode - || (gm == MODE_VERSUS && pCurrentSteps->m_GameMode == MODE_SINGLE) ) + if( s == pCurPattern->m_DanceStyle // if the current GameModes matches the Pattern's GameMode + || (s == STYLE_VERSUS && pCurPattern->m_DanceStyle == STYLE_SINGLE) ) { - arrayAddTo.Add( pCurrentSteps ); + arrayAddTo.Add( pCurPattern ); } } } -void Song::GetNumFeet( GameMode gm, int& iDiffEasyOut, int& iDiffMediumOut, int& iDiffHardOut ) +void Song::GetNumFeet( DanceStyle s, int& iDiffEasyOut, int& iDiffMediumOut, int& iDiffHardOut ) { iDiffEasyOut = iDiffMediumOut = iDiffHardOut = -1; // -1 means not found - CArray arrayMatchingSteps; - GetStepsThatMatchGameMode( gm, arrayMatchingSteps ); + CArray arrayMatchingSteps; + GetPatternsThatMatchStyle( s, arrayMatchingSteps ); for( int i=0; im_DifficultyClass ) { - case Steps::CLASS_EASY: + case Pattern::CLASS_EASY: iDiffEasyOut = iNumFeet; break; - case Steps::CLASS_MEDIUM: + case Pattern::CLASS_MEDIUM: iDiffMediumOut = iNumFeet; break; - case Steps::CLASS_HARD: + case Pattern::CLASS_HARD: iDiffHardOut = iNumFeet; break; - case Steps::CLASS_OTHER: + case Pattern::CLASS_OTHER: // should do something intelligent to fill in the missing spots... if( iDiffEasyOut < 0 && iNumFeet <= 4 ) iDiffEasyOut = iNumFeet; @@ -697,14 +698,14 @@ void Song::SaveOffsetChangeToDisk() if( sExt == "bms" ) { - for( int i=0; iarraySteps.GetSize(); i++ ) + // Search for the corresponding Pattern pointer. + Pattern* pPattern = NULL; + for( i=0; im_arrayPatterns.GetSize(); i++ ) { - if( pSong->arraySteps[i].m_sDescription == szStepsName ) // match! + if( pSong->m_arrayPatterns[i].m_sDescription == szStepsName ) // match! { - pSteps = &pSong->arraySteps[i]; + pPattern = &pSong->m_arrayPatterns[i]; break; } } - if( pSteps == NULL ) // didn't find a match + if( pPattern == NULL ) // didn't find a match continue; // skip this entry - // Parse the Steps statistics. + // Parse the Pattern statistics. char szGradeLetters[10]; // longest possible string is "AAA" iRetVal = sscanf( value_string, "%d::%[^:]::%d::%d", - &pSteps->m_iNumTimesPlayed, + &pPattern->m_iNumTimesPlayed, szGradeLetters, - &pSteps->m_iTopScore, - &pSteps->m_iMaxCombo + &pPattern->m_iTopScore, + &pPattern->m_iMaxCombo ); if( iRetVal != 4 ) continue; - pSteps->m_TopGrade = StringToGrade( szGradeLetters ); + pPattern->m_TopGrade = StringToGrade( szGradeLetters ); } } } @@ -246,32 +246,28 @@ void SongManager::SaveStatisticsToDisk() { IniFile ini; ini.SetPath( g_sStatisticsFileName ); - if( !ini.ReadFile() ) { - return; // load nothing - //RageError( "could not read config file" ); - } // save song statistics for( int i=0; iarraySteps.GetSize(); j++ ) // for each Steps + for( int j=0; jm_arrayPatterns.GetSize(); j++ ) // for each Pattern { - Steps* pSteps = &pSong->arraySteps[j]; + Pattern* pPattern = &pSong->m_arrayPatterns[j]; - if( pSteps->m_TopGrade == GRADE_NO_DATA ) - continue; + if( pPattern->m_TopGrade == GRADE_NO_DATA ) + continue; // skip - // Each value has the format "SongName::StepsName=TimesPlayed::TopGrade::TopScore::MaxCombo". + // Each value has the format "SongName::PatternName=TimesPlayed::TopGrade::TopScore::MaxCombo". - CString sName = ssprintf( "%s::%s", pSong->GetTitle(), pSteps->m_sDescription ); + CString sName = ssprintf( "%s::%s", pSong->GetTitle(), pPattern->m_sDescription ); CString sValue = ssprintf( "%d::%s::%d::%d", - pSteps->m_iNumTimesPlayed, - GradeToString( pSteps->m_TopGrade ), - pSteps->m_iTopScore, - pSteps->m_iMaxCombo + pPattern->m_iNumTimesPlayed, + GradeToString( pPattern->m_TopGrade ), + pPattern->m_iTopScore, + pPattern->m_iMaxCombo ); ini.SetValue( "Statistics", sName, sValue ); @@ -282,7 +278,7 @@ void SongManager::SaveStatisticsToDisk() } -CString SongManager::GetBannerPathFromGroup( CString sGroupName ) +CString SongManager::GetGroupBannerPath( CString sGroupName ) { CString sPath; diff --git a/stepmania/src/SongManager.h b/stepmania/src/SongManager.h index 87b0aab462..dce647b3b7 100644 --- a/stepmania/src/SongManager.h +++ b/stepmania/src/SongManager.h @@ -2,8 +2,8 @@ ----------------------------------------------------------------------------- Class: SongManager - Desc: Holder for all Songs and Steps. Also keeps track of the current - Song and Steps, and loads/saves statistics. + Desc: Holder for all Songs and Pattern. Also keeps track of the current + Song and Pattern, and loads/saves statistics. Copyright (c) 2001-2002 by the names listed below. All rights reserved. Chris Danford @@ -24,9 +24,10 @@ public: SongManager(); ~SongManager(); - CArray m_pSongs; Song* m_pCurSong; - Steps* m_pStepsPlayer[NUM_PLAYERS]; + Pattern* m_pCurPattern[NUM_PLAYERS]; + + CArray m_pSongs; // all songs that can be played void InitSongArrayFromDisk(); @@ -38,7 +39,7 @@ public: void SaveStatisticsToDisk(); - CString GetBannerPathFromGroup( CString sGroupName ); + CString GetGroupBannerPath( CString sGroupName ); protected: void LoadStepManiaSongDir( CString sDir ); @@ -48,7 +49,7 @@ protected: }; -extern SongManager* SONGS; // global and accessable from anywhere in our program +extern SongManager* SONG; // global and accessable from anywhere in our program #endif \ No newline at end of file diff --git a/stepmania/src/StepMania.ICO b/stepmania/src/StepMania.ICO index 2a574f29c9c559e9aa40e1983a1e3d3ce857c644..57d3e633ffb72b924b276c20c1384edc79fb1173 100644 GIT binary patch literal 6006 zcmeI0Jxn7<6o8*YB%%}?C*39C=Vb0@S#xK@;X{d%2uO;Pz!eS9MsAU4+__<^D?xHW ziLQvE$W$~Z=qw75Qc$@<6ep0V4Pj40IWhTWcGlQ{z25f3tY+Wr%=hN!&5z$$Bq3kP z>(^q!-#sG3q=ts<_ctO3rSku9peegB-WB4lk9{e_Z8NLi(f-l17;dAg= zcm=QE6}*C1@QVI0T}MpU4%4;HbQPGcxjB&<{4snLeh+>dz6{@D`N#?UKKv&98hinM z5x&Lpq28)&!LPzE!Oy@u@U09~RVVQK@SE^!@K{&*x=fVL@`aoJ>tkNj966;o)KF@9&qMo*t?Fr{vG~@7c#5`-OJ(R-%0)ckQ6@vbJ*Rg^xN!|Zvbp^Nm82%N15ZV+FpU#P8ib|1+3&wL@3aLQLtTtkE1Y_f{##W>QZM4>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`glC)n#$-)9fA*9nWWvi)Y-V10X-X2pWDhL z4OgZM=JW)JPn!^JgeTr`?c|;}S76(bwlF?67S-+5#oIjNt<6UwV^8qiJb^MH9CqEX z2_Y}l*aY3z%`G>k`&WmjZupb8XA+F-!Q{x>qz>MtDwS}#i+N$P!9RKVlRG!Dx4&rq z)2&Iki59nSa}S&9OqjtjtRJ>M!(Q*O?KymZ^^{=7&mH5TJ3-)hYbF?UJU0_~(<^ws zbR`I$kBtNa&-dE|gWpfQ1iEcnllad2RV%@O_d}gvsQax+U^>>65PU!HN)Y_K=twZg z^Qe_zz~@~nfxeIdo~P{z26|qb1jD=!=mfs+8$ORG-}jlG8~pu&|Fi}4IyFlCnb=&X ze#wu%A6TH)!FShL7uT$^Wsea2a);Ra;)c?aem08~mH##(b_3St!b8~Y(ukRYa zG%rx|J?XpyH~JADBl-YmA>zJJGrmBdf68jiA3Sqy-Uk47|03c%XaS41oBY0SB}WDY zukB_I*QU|DjU(|{uZY*l25`Kk%k=bu2`?#PhB`FC&G^{u(!=J;OyGPA+)RvfJ{)4b zVcYx>%tAru@SVAe3C@S~3gCtPjb0Nhc7tdW=%O_+Ylk0o4!XMo&flGXQ2m0gFQ|Qj z+P9-48y(ozKkermr+o%M!1!?P9$!J@GiZDV&5xk@#ebCo=BJoZ+TI}StNMGTKE6?^ zJf&3rG4Ubs0l!Cx+~z;Zd;UfD20BH2OngXukmt3c%#MzE{ffacqCTh1lul#P>O6E_ PI!}`~W$3bWnUwu6ppw;C diff --git a/stepmania/src/StepMania.RC b/stepmania/src/StepMania.RC index 0071035b22..612ae08a6b 100644 --- a/stepmania/src/StepMania.RC +++ b/stepmania/src/StepMania.RC @@ -124,71 +124,28 @@ END // Bitmap // -SPLASH BITMAP DISCARDABLE "splash.bmp" BITMAP_ERROR BITMAP DISCARDABLE "error.bmp" +BITMAP_SPLASH BITMAP DISCARDABLE "splash.bmp" ///////////////////////////////////////////////////////////////////////////// // // Dialog // -IDD_ERROR_DIALOG DIALOGEX 0, 0, 320, 202 -STYLE WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -EXSTYLE WS_EX_APPWINDOW +IDD_ERROR_DIALOG DIALOG DISCARDABLE 0, 0, 332, 234 +STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION +CAPTION "StepMania Error" FONT 8, "MS Sans Serif" BEGIN - CONTROL "",IDC_SHOCKWAVEFLASH1, - "{D27CDB6E-AE6D-11CF-96B8-444553540000}",WS_TABSTOP,0,0, - 319,201 -END - - -///////////////////////////////////////////////////////////////////////////// -// -// DESIGNINFO -// - -#ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO DISCARDABLE -BEGIN - IDD_ERROR_DIALOG, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 313 - TOPMARGIN, 7 - BOTTOMMARGIN, 195 - END -END -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// Dialog Info -// - -IDD_ERROR_DIALOG DLGINIT -BEGIN - IDC_SHOCKWAVEFLASH1, 0x376, 308, 0 -0x0000, 0x0000, 0x5567, 0x5566, 0x0300, 0x0000, 0x3182, 0x0000, 0x21cc, -0x0000, 0x0008, 0x004a, 0x0000, 0x0066, 0x0069, 0x006c, 0x0065, 0x003a, -0x002f, 0x002f, 0x002f, 0x0064, 0x003a, 0x005c, 0x0064, 0x0065, 0x0076, -0x005c, 0x0066, 0x006c, 0x0061, 0x0073, 0x0068, 0x0020, 0x0074, 0x0065, -0x0073, 0x0074, 0x005c, 0x0066, 0x0069, 0x0067, 0x0068, 0x0074, 0x0033, -0x002e, 0x0073, 0x0077, 0x0066, 0x0000, 0x0008, 0x004a, 0x0000, 0x0066, -0x0069, 0x006c, 0x0065, 0x003a, 0x002f, 0x002f, 0x002f, 0x0064, 0x003a, -0x005c, 0x0064, 0x0065, 0x0076, 0x005c, 0x0066, 0x006c, 0x0061, 0x0073, -0x0068, 0x0020, 0x0074, 0x0065, 0x0073, 0x0074, 0x005c, 0x0066, 0x0069, -0x0067, 0x0068, 0x0074, 0x0033, 0x002e, 0x0073, 0x0077, 0x0066, 0x0000, -0x0008, 0x000e, 0x0000, 0x0057, 0x0069, 0x006e, 0x0064, 0x006f, 0x0077, -0x0000, 0x000b, 0xffff, 0x000b, 0xffff, 0x0008, 0x000a, 0x0000, 0x0048, -0x0069, 0x0067, 0x0068, 0x0000, 0x0008, 0x0002, 0x0000, 0x0000, 0x000b, -0xffff, 0x0008, 0x0002, 0x0000, 0x0000, 0x0008, 0x0010, 0x0000, 0x0053, -0x0068, 0x006f, 0x0077, 0x0041, 0x006c, 0x006c, 0x0000, 0x000b, 0x0000, -0x000b, 0x0000, 0x0008, 0x0002, 0x0000, 0x0000, 0x0008, 0x0002, 0x0000, -0x0000, 0x0008, 0x000c, 0x0000, 0x0062, 0x0065, 0x006c, 0x006f, 0x0077, -0x0000, - 0 + EDITTEXT IDC_EDIT_ERROR,5,80,320,80,ES_CENTER | ES_MULTILINE | + ES_READONLY | WS_VSCROLL | NOT WS_TABSTOP + DEFPUSHBUTTON "Close",IDOK,265,215,60,15 + CONTROL 129,IDC_STATIC,"Static",SS_BITMAP,0,0,258,37 + LTEXT "We're sorry. An error has occurred while running StepMania.\r\n\r\nMore specific details about the error may be listeted in the box below:", + IDC_STATIC,7,47,298,28 + PUSHBUTTON "Restart StepMania",IDC_BUTTON_RESTART,175,215,80,15 + PUSHBUTTON "Report the Error",IDC_BUTTON_REPORT,120,190,80,15 + PUSHBUTTON "View Log",IDC_BUTTON_VIEW_LOG,120,170,80,15 END #endif // English (U.S.) resources diff --git a/stepmania/src/StepMania.cpp b/stepmania/src/StepMania.cpp index 301d42e56c..24dd95e6f4 100644 --- a/stepmania/src/StepMania.cpp +++ b/stepmania/src/StepMania.cpp @@ -24,6 +24,7 @@ #include "SongManager.h" #include "ThemeManager.h" #include "WindowManager.h" +#include "GameManager.h" #include "WindowSandbox.h" #include "WindowLoading.h" @@ -87,13 +88,16 @@ BOOL SwitchDisplayMode();// BOOL bWindowed, DWORD dwWidth, DWORD dwHeight, DWORD //----------------------------------------------------------------------------- int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE, LPSTR, int nCmdShow ) { - AfxEnableControlContainer(); + // Initialize ActiveX for Flash + //AfxEnableControlContainer(); #ifndef DEBUG // don't use error handler in Release mode try { #endif + // // Check to see if the app is already running. + // g_hMutex = CreateMutex( NULL, TRUE, g_sAppName ); if( GetLastError() == ERROR_ALREADY_EXISTS ) { @@ -101,7 +105,9 @@ int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE, LPSTR, int nCmdShow ) RageError( "StepMania is already running!" ); } + // // Make sure the current directory is the root program directory + // if( !DoesFileExist("Songs") ) { // change dir to path of the execuctable @@ -112,9 +118,13 @@ int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE, LPSTR, int nCmdShow ) LPSTR pLastBackslash = strrchr(szFullAppPath, '\\'); *pLastBackslash = '\0'; // terminate the string - SetCurrentDirectory(szFullAppPath); + RageLog( "Changing path to '%s'", szFullAppPath ); + SetCurrentDirectory( szFullAppPath ); } + + + CoInitialize (NULL); // Initialize COM @@ -144,7 +154,7 @@ int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE, LPSTR, int nCmdShow ) g_hWndMain = CreateWindow( g_sAppClassName,// pointer to registered class name g_sAppName, // pointer to window name - g_dwWindowStyle, // window style + g_dwWindowStyle, // window StyleDef CW_USEDEFAULT, // horizontal position of window CW_USEDEFAULT, // vertical position of window RECTWIDTH(rcWnd), // window width @@ -439,12 +449,12 @@ LRESULT CALLBACK WndProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam ) //----------------------------------------------------------------------------- HRESULT CreateObjects( HWND hWnd ) { - //////////////////////////////// + // // Draw a splash bitmap so the user isn't looking at a black screen - //////////////////////////////// + // HBITMAP hSplashBitmap = (HBITMAP)LoadImage( GetModuleHandle( NULL ), - TEXT("SPLASH"), + TEXT("BITMAP_SPLASH"), IMAGE_BITMAP, 0, 0, LR_CREATEDIBSECTION ); BITMAP bmp; @@ -467,9 +477,9 @@ HRESULT CreateObjects( HWND hWnd ) - ///////////////////////////////// + // // Create game objects - ///////////////////////////////// + // srand( (unsigned)time(NULL) ); // seed number generator RageLogStart(); @@ -477,8 +487,8 @@ HRESULT CreateObjects( HWND hWnd ) MUSIC = new RageSoundStream; INPUT = new RageInput( hWnd ); PREFS = new PrefsManager; - SONGS = new SongManager; SCREEN = new RageScreen( hWnd ); + SONG = new SongManager; BringWindowToTop( hWnd ); SetForegroundWindow( hWnd ); @@ -489,12 +499,13 @@ HRESULT CreateObjects( HWND hWnd ) TM = new RageTextureManager( SCREEN ); THEME = new ThemeManager; WM = new WindowManager; + GAME = new GameManager; // Ugly... Switch the screen resolution again so that the system message will display SwitchDisplayMode(); - WM->SystemMessage( ssprintf("Found %d songs.", SONGS->m_pSongs.GetSize()) ); + WM->SystemMessage( ssprintf("Found %d songs.", SONG->m_pSongs.GetSize()) ); //WM->SetNewWindow( new WindowLoading ); @@ -520,7 +531,8 @@ void DestroyObjects() SAFE_DELETE( WM ); SAFE_DELETE( PREFS ); - SAFE_DELETE( SONGS ); + SAFE_DELETE( SONG ); + SAFE_DELETE( GAME ); SAFE_DELETE( INPUT ); SAFE_DELETE( MUSIC ); diff --git a/stepmania/src/StepMania.dsp b/stepmania/src/StepMania.dsp index ee30566d05..79f9c14b65 100644 --- a/stepmania/src/StepMania.dsp +++ b/stepmania/src/StepMania.dsp @@ -388,6 +388,14 @@ SOURCE=.\GameConstants.h # End Source File # Begin Source File +SOURCE=.\GameManager.cpp +# End Source File +# Begin Source File + +SOURCE=.\GameManager.h +# End Source File +# Begin Source File + SOURCE=.\GameTypes.h # End Source File # Begin Source File @@ -404,6 +412,14 @@ SOURCE=.\PadInput.h # End Source File # Begin Source File +SOURCE=.\Pattern.cpp +# End Source File +# Begin Source File + +SOURCE=.\Pattern.h +# End Source File +# Begin Source File + SOURCE=.\Player.cpp # End Source File # Begin Source File @@ -456,19 +472,11 @@ SOURCE=.\SongManager.h # End Source File # Begin Source File -SOURCE=.\Steps.cpp +SOURCE=.\StyleDef.cpp # End Source File # Begin Source File -SOURCE=.\Steps.h -# End Source File -# Begin Source File - -SOURCE=.\Style.cpp -# End Source File -# Begin Source File - -SOURCE=.\Style.h +SOURCE=.\StyleDef.h # End Source File # Begin Source File diff --git a/stepmania/src/StyleDef.cpp b/stepmania/src/StyleDef.cpp new file mode 100644 index 0000000000..f10a8600f7 --- /dev/null +++ b/stepmania/src/StyleDef.cpp @@ -0,0 +1,14 @@ +#include "stdafx.h" +/* +----------------------------------------------------------------------------- + File: StyleDef.cpp + + Desc: A data structure that holds the definition of a GameMode. + + Copyright (c) 2001 Chris Danford. All rights reserved. +----------------------------------------------------------------------------- +*/ + +#include "StyleDef.h" + + diff --git a/stepmania/src/Style.h b/stepmania/src/StyleDef.h similarity index 68% rename from stepmania/src/Style.h rename to stepmania/src/StyleDef.h index 3665539478..88b8d8c232 100644 --- a/stepmania/src/Style.h +++ b/stepmania/src/StyleDef.h @@ -1,6 +1,6 @@ /* ----------------------------------------------------------------------------- - File: Style.h + File: StyleDef.h Desc: A data structure that holds the definition of a GameMode. @@ -11,33 +11,32 @@ #ifndef _Style_H_ #define _Style_H_ -#include "Steps.h" +#include "Pattern.h" const int MAX_NUM_COLUMNS = 12; -struct Style + +struct StyleDef { int m_iNumPlayers; int m_iNumColumns; // will vary depending on the number panels (4,6,8,etc) - TapStep m_ColumnToTapStep[MAX_NUM_COLUMNS]; + TapNote m_ColumnToTapNote[MAX_NUM_COLUMNS]; float m_ColumnToRotation[MAX_NUM_COLUMNS]; - int TapStepToColumnNumber( TapStep tap_step ) + inline int TapNoteToColumnNumber( TapNote tap_step ) { for (int i=0; i& arrayAddTo ); - void GetNumFeet( GameMode gm, int& iDiffEasy, int& iDiffMedium, int& iDiffHard ); + void GetPatternsThatMatchStyle( DanceStyle s, CArray& arrayAddTo ); + void GetNumFeet( DanceStyle s, int& iDiffEasy, int& iDiffMedium, int& iDiffHard ); int GetNumTimesPlayed() { int iTotalNumTimesPlayed = 0; - for( int i=0; i m_FreezeSegments; // this must be sorted before dancing public: - CArray arraySteps; + CArray m_arrayPatterns; }; diff --git a/stepmania/src/splash.bmp b/stepmania/src/splash.bmp index 772480280da6c284650e8d4a59e1d66fce779f3d..ce387761b1fc2f3684e31c539da7c8cfea549285 100644 GIT binary patch literal 10244 zcmbta=~tWCd4Jw(N$j%3A|WKdGq#a1SeWrDgOlK4GuDETKtcipLV#_wF9@*>NF&>m zc+xb@+N4REPSR=8PMfxqG&wnwbCT|#+Mb?%?1%mVJ>C9+^!L0H6YykCKh%I<-S^)6 z+~0lfvtNyQR98s(_ec=&$1TVYF-qtIe=m8J{$l?I9nW8;lJ_F@ zb~n?PHwNg%avxR0R{BMCgx&-FAMD?yzb;$pr+b$%&q{xo?V}$a4AOhsgH-Zeq`6@u zeLa4a5)Wm1H$Oz5i(R4B*Uj|cdMDlM*VB*7H)!Z$8~xzu8ogh!(RX%jBwAD?z=W=1 zhPwXjed>DWJ0x0LsrlVMrKTVK6={F|kJS3j?@@F4ZEF4OZ&TySBhr51TcrQPpHSzw z-y`GuzaZ03|DL*j=l7}WE8nKB-~2jV_{)DH(|3MAU2lJhx}JZY%-{bJbrue&=ZoJY z3&vgkv!BtxKm03M-u^O~4xUo~-~J03Q`=;Cl%xyAL+btPm+9&^-le-g`Z?J@{dv0c z&U-Za!QaujuYI2yk~^ev&5>s47G3z}ACcuN@6ZLTX?gZ}>IV+n_kKiu@B9f}`Qo?8 zR{bp9e(xt_JE+p@fAh~|jpykOFk0L`>Wx04q5M8M-h4rt-}(-jzx_ipE=1|p+h3)Y zd*d|zwLc)$t2TP&3*V=E#WzWGSxB7kq&EC@_q<9%)uzY^iJ$(0R6QnB4+Ka2l;~WK zPR~N5eD2V*TzPU_slL^KagHkvW!%?@w69n94$5!7`Q~nUEuBuQ zr$|3PH}}w+FYH&UFN6>+{U&AXZxc0C_KSs$@|&dEB};j2Ej^E)srmW&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