working on Rave

This commit is contained in:
Chris Danford
2003-06-30 18:08:27 +00:00
parent 740fd31f9e
commit fa91f2e636
44 changed files with 658 additions and 577 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 160 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

+7 -5
View File
@@ -223,8 +223,7 @@ NextScreen=ScreenSelectGroup
HelpText=
[ScreenSelectDifficulty]
Choices=arcade-beginner,arcade-easy,arcade-medium,arcade-hard,nonstop,oni,endless
#,rave
Choices=arcade-beginner,arcade-easy,arcade-medium,arcade-hard,nonstop,oni,endless,rave
NumChoicesOnPage1=4
HelpText=Use &LEFT; &RIGHT; to select, then press START
TimerSeconds=40
@@ -774,6 +773,10 @@ LifeP2ExtraX=500
LifeP2ExtraY=450
LifeP2ExtraOnCommand=addy,100;sleep,0.5;linear,1;addy,-100
LifeP2ExtraOffCommand=linear,1;addy,100
CombinedLifeX=320
CombinedLifeY=28
CombinedLifeOnCommand=addy,-100;sleep,0.5;linear,1;addy,100
CombinedLifeOffCommand=linear,1;addy,-100
StageX=320
StageY=54
StageOnCommand=addy,-100;sleep,0.5;linear,1;addy,100
@@ -1801,9 +1804,8 @@ BannerHeight=184
InCommand=diffusealpha,0;zoomy,0;spring,0.20;zoomy,1;diffusealpha,1
OutCommand=linear,0.20;zoomy,0;diffusealpha,1
[RaveHelper]
NumItemTypes=0
AttackDurationSeconds=0
[ScoreKeeperRave]
AttackDurationSeconds=5
[ScreenInputOptions]
HelpText=&UP; &DOWN; to change line &LEFT; &RIGHT; to select between options::START to accept changes BACK to discard changes
+8
View File
@@ -32,7 +32,15 @@ public:
CString m_sCharDir;
CString m_sName;
// All the stuff below will be filled in if this character is playable in Rave mode
bool m_bUsableInRave;
CString m_sAttacks[NUM_ATTACK_LEVELS][NUM_ATTACKS_PER_LEVEL];
CString GetNormalHeadPath();
CString GetHappyHeadPath();
CString GetAngryHeadPath();
};
+79
View File
@@ -0,0 +1,79 @@
#include "global.h"
/*
-----------------------------------------------------------------------------
Class: CombinedLifeMeterEnemy
Desc: See header.
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
Chris Danford
-----------------------------------------------------------------------------
*/
#include "CombinedLifeMeterEnemy.h"
#include "RageUtil.h"
#include "GameConstantsAndTypes.h"
#include "MusicWheel.h"
#include "CombinedLifeMeterEnemy.h"
#include "RageTimer.h"
#include <math.h>
#include "ThemeManager.h"
#include "GameState.h"
#include "CombinedLifeMeterEnemy.h"
#include "ThemeManager.h"
#include "GameState.h"
const float SECONDS_TO_SHOW_FACE = 1.5f;
CombinedLifeMeterEnemy::CombinedLifeMeterEnemy()
{
m_sprFace.Load( THEME->GetPathToG("CombinedLifeMeterEnemy face 2x3") );
ASSERT( m_sprFace.GetNumStates() >= NUM_FACES );
m_sprFace.StopAnimating();
m_meterHealth.Load( THEME->GetPathToG("CombinedLifeMeterEnemy stream"), 464 );
m_fLastSeenHealthPercent = -1;
}
void CombinedLifeMeterEnemy::Update( float fDelta )
{
if( m_fSecondsUntilReturnToNormalFace > 0 )
{
m_fSecondsUntilReturnToNormalFace -= fDelta;
if( m_fSecondsUntilReturnToNormalFace < 0 )
{
m_fSecondsUntilReturnToNormalFace = 0;
this->SetState( normal );
}
}
if( GAMESTATE->m_fOpponentHealthPercent == 0 )
this->SetState( defeated );
m_sprFace.Update( fDelta );
if( m_fLastSeenHealthPercent != GAMESTATE->m_fOpponentHealthPercent )
{
m_meterHealth.SetPercent( GAMESTATE->m_fOpponentHealthPercent );
m_fLastSeenHealthPercent = GAMESTATE->m_fOpponentHealthPercent;
}
/*
SetFace( Face face )
if( GAMESTATE->m_fOpponentHealthPercent == 0 )
return;
this->SetState( face );
m_fSecondsUntilReturnToNormalFace = SECONDS_TO_SHOW_FACE;
*/
}
+46
View File
@@ -0,0 +1,46 @@
#ifndef CombinedLifeMeterEnemy_H
#define CombinedLifeMeterEnemy_H
/*
-----------------------------------------------------------------------------
Class: CombinedLifeMeterEnemy
Desc: A little graphic to the left of the song's text banner in the MusicWheel.
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
Chris Danford
-----------------------------------------------------------------------------
*/
#include "LifeMeter.h"
#include "Sprite.h"
#include "MeterDisplay.h"
class CombinedLifeMeterEnemy : public CombinedLifeMeter
{
public:
CombinedLifeMeterEnemy();
virtual void Update( float fDelta );
enum Face { normal=0, taunt, attack, damage, defeated, NUM_FACES };
virtual void ChangeLife( PlayerNumber pn, TapNoteScore score ) {};
virtual void ChangeLife( PlayerNumber pn, HoldNoteScore score, TapNoteScore tscore ) {};
virtual void OnDancePointsChange( PlayerNumber pn ) {};
virtual bool IsInDanger( PlayerNumber pn ) { return false; };
virtual bool IsHot( PlayerNumber pn ) { return false; };
virtual bool IsFailing( PlayerNumber pn ) { return false; };
virtual bool FailedEarlier( PlayerNumber pn ) { return false; };
protected:
MeterDisplay m_meterHealth;
float m_fLastSeenHealthPercent;
Sprite m_sprFace;
float m_fSecondsUntilReturnToNormalFace;
};
#endif
+65
View File
@@ -0,0 +1,65 @@
#include "global.h"
/*
-----------------------------------------------------------------------------
File: CombinedLifeMeterTug.h
Desc: The song's CombinedLifeMeterTug displayed in SelectSong.
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
-----------------------------------------------------------------------------
*/
#include "CombinedLifeMeterTug.h"
#include "ThemeManager.h"
#include "GameState.h"
CombinedLifeMeterTug::CombinedLifeMeterTug()
{
for( int p=0; p<NUM_PLAYERS; p++ )
{
m_Stream[p].Load( THEME->GetPathToG(ssprintf("CombinedLifeMeterTug stream p%d",p+1)), 600 );
this->AddChild( &m_Stream[p] );
}
m_Stream[PLAYER_2].SetZoomX( -1 );
m_sprFrame.Load( THEME->GetPathToG(ssprintf("CombinedLifeMeterTug frame")) );
this->AddChild( &m_sprFrame );
}
void CombinedLifeMeterTug::Update( float fDelta )
{
m_Stream[PLAYER_1].SetPercent( GAMESTATE->m_fTugLifePercentP1 );
m_Stream[PLAYER_2].SetPercent( 1-GAMESTATE->m_fTugLifePercentP1 );
ActorFrame::Update( fDelta );
}
void CombinedLifeMeterTug::ChangeLife( PlayerNumber pn, TapNoteScore score )
{
float fPercentToMove;
switch( score )
{
case TNS_MARVELOUS: fPercentToMove = +0.02f; break;
case TNS_PERFECT: fPercentToMove = +0.02f; break;
case TNS_GREAT: fPercentToMove = +0.01f; break;
case TNS_GOOD: fPercentToMove = +0.00f; break;
case TNS_BOO: fPercentToMove = -0.02f; break;
case TNS_MISS: fPercentToMove = -0.04f; break;
default: ASSERT(0); fPercentToMove = +0.00f; break;
}
switch( pn )
{
case PLAYER_1: GAMESTATE->m_fTugLifePercentP1 += fPercentToMove; break;
case PLAYER_2: GAMESTATE->m_fTugLifePercentP1 -= fPercentToMove; break;
default: ASSERT(0);
}
CLAMP( GAMESTATE->m_fTugLifePercentP1, 0, 1 );
}
void CombinedLifeMeterTug::ChangeLife( PlayerNumber pn, HoldNoteScore score, TapNoteScore tscore )
{
}
+39
View File
@@ -0,0 +1,39 @@
#ifndef CombinedLifeMeterTug_H
#define CombinedLifeMeterTug_H
/*
-----------------------------------------------------------------------------
File: CombinedLifeMeterTug.h
Desc:
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
Chris Danford
-----------------------------------------------------------------------------
*/
#include "LifeMeter.h"
#include "Sprite.h"
#include "MeterDisplay.h"
class CombinedLifeMeterTug : public CombinedLifeMeter
{
public:
CombinedLifeMeterTug();
virtual void Update( float fDelta );
virtual void ChangeLife( PlayerNumber pn, TapNoteScore score );
virtual void ChangeLife( PlayerNumber pn, HoldNoteScore score, TapNoteScore tscore );
virtual void OnDancePointsChange( PlayerNumber pn ) {};
virtual bool IsInDanger( PlayerNumber pn ) { return false; };
virtual bool IsHot( PlayerNumber pn ) { return false; };
virtual bool IsFailing( PlayerNumber pn ) { return false; };
virtual bool FailedEarlier( PlayerNumber pn ) { return false; };
protected:
MeterDisplay m_Stream[NUM_PLAYERS];
Sprite m_sprFrame;
};
#endif
-62
View File
@@ -1,62 +0,0 @@
#include "global.h"
/*
-----------------------------------------------------------------------------
Class: EnemyFace
Desc: See header.
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
Chris Danford
-----------------------------------------------------------------------------
*/
#include "EnemyFace.h"
#include "RageUtil.h"
#include "GameConstantsAndTypes.h"
#include "MusicWheel.h"
#include "EnemyFace.h"
#include "RageTimer.h"
#include <math.h>
#include "ThemeManager.h"
#include "GameState.h"
const float SECONDS_TO_SHOW_FACE = 1.5f;
EnemyFace::EnemyFace()
{
Load( THEME->GetPathToG("EnemyFace 2x3") );
ASSERT( this->GetNumStates() >= NUM_FACES );
StopAnimating();
SetFace( normal );
}
void EnemyFace::Update( float fDelta )
{
if( m_fSecondsUntilReturnToNormal > 0 )
{
m_fSecondsUntilReturnToNormal -= fDelta;
if( m_fSecondsUntilReturnToNormal < 0 )
{
m_fSecondsUntilReturnToNormal = 0;
this->SetState( normal );
}
}
if( GAMESTATE->m_fOpponentHealthPercent == 0 )
this->SetState( defeated );
Sprite::Update( fDelta );
}
void EnemyFace::SetFace( Face face )
{
if( GAMESTATE->m_fOpponentHealthPercent == 0 )
return;
this->SetState( face );
m_fSecondsUntilReturnToNormal = SECONDS_TO_SHOW_FACE;
}
-32
View File
@@ -1,32 +0,0 @@
#ifndef EnemyFace_H
#define EnemyFace_H
/*
-----------------------------------------------------------------------------
Class: EnemyFace
Desc: A little graphic to the left of the song's text banner in the MusicWheel.
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
Chris Danford
-----------------------------------------------------------------------------
*/
#include "Sprite.h"
class EnemyFace : public Sprite
{
public:
EnemyFace();
virtual void Update( float fDelta );
enum Face { normal=0, taunt, attack, damage, defeated, NUM_FACES };
void SetFace( Face face );
protected:
float m_fSecondsUntilReturnToNormal;
};
#endif
-36
View File
@@ -1,36 +0,0 @@
#include "global.h"
/*
-----------------------------------------------------------------------------
Class: EnemyHealth
Desc: See header.
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
Chris Danford
-----------------------------------------------------------------------------
*/
#include "EnemyHealth.h"
#include "ThemeManager.h"
#include "GameState.h"
EnemyHealth::EnemyHealth() :
MeterDisplay(
THEME->GetPathToG("EnemyHealth stream"),
THEME->GetPathToG("EnemyHealth frame"),
464 )
{
m_fLastSeenHealthPercent = -1;
}
void EnemyHealth::Update( float fDelta )
{
if( m_fLastSeenHealthPercent != GAMESTATE->m_fOpponentHealthPercent )
{
this->SetPercent( GAMESTATE->m_fOpponentHealthPercent );
m_fLastSeenHealthPercent = GAMESTATE->m_fOpponentHealthPercent;
}
MeterDisplay::Update( fDelta );
}
-29
View File
@@ -1,29 +0,0 @@
#ifndef EnemyHealth_H
#define EnemyHealth_H
/*
-----------------------------------------------------------------------------
Class: EnemyHealth
Desc: A little graphic to the left of the song's text banner in the MusicWheel.
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
Chris Danford
-----------------------------------------------------------------------------
*/
#include "MeterDisplay.h"
class EnemyHealth : public MeterDisplay
{
public:
EnemyHealth();
virtual void Update( float fDelta );
protected:
float m_fLastSeenHealthPercent;
};
#endif
+8 -9
View File
@@ -208,6 +208,14 @@ const int MIN_SKILL = 0;
const int MAX_SKILL = 10;
enum StageResult
{
RESULT_WIN,
RESULT_LOSE,
RESULT_DRAW
};
//
// Battle stuff
//
@@ -222,15 +230,6 @@ enum AttackLevel
const int NUM_ATTACKS_PER_LEVEL = 3;
const int ITEM_NONE = -1;
enum BattleResult
{
RESULT_WIN,
RESULT_LOSE,
RESULT_DRAW
};
#define BG_ANIMS_DIR CString("BGAnimations/")
#define VISUALIZATIONS_DIR CString("Visualizations/")
+10 -8
View File
@@ -102,10 +102,17 @@ void GameState::Reset()
for( p=0; p<NUM_PLAYERS; p++ )
{
m_fSuperMeterGrowth[p] = 1;
m_fSuperMeterGrowthScale[p] = 1;
m_iCpuSkill[p] = 5;
}
m_fTugLifePercentP1 = 0.5f;
for( p=0; p<NUM_PLAYERS; p++ )
{
m_fSuperMeter[p] = 0;
m_fSuperMeterGrowthScale[p] = 1;
}
SAFE_DELETE( m_pPosition );
m_pPosition = new NoteFieldPositioning("Positioning.ini");
}
@@ -385,19 +392,14 @@ PlayerNumber GameState::GetWinner()
return winner;
}
BattleResult GameState::GetBattleResult( PlayerNumber pn )
StageResult GameState::GetStageResult( PlayerNumber pn )
{
// PlayerNumber winner = GetWinner();
// if( winner == PLAYER_INVALID )
// return RESULT_DRAW;
// return (winner==pn) ? RESULT_WIN : RESULT_LOSE;
switch( GAMESTATE->m_PlayMode )
{
case PLAY_MODE_BATTLE:
return (m_fOpponentHealthPercent==0)?RESULT_WIN:RESULT_LOSE;
default:
ASSERT(0);
return RESULT_WIN;
return (GetWinner()==pn)?RESULT_WIN:RESULT_LOSE;
}
}
+9 -2
View File
@@ -92,8 +92,15 @@ public:
}
PlayerController m_PlayerController[NUM_PLAYERS];
// Used in Battle and Rave
int m_iCpuSkill[NUM_PLAYERS]; // only used when m_PlayerController is PC_CPU
float m_fSuperMeterGrowth[NUM_PLAYERS]; // between 0.0 and 1.0
// Used in Rave
float m_fTugLifePercentP1;
float m_fSuperMeter[NUM_PLAYERS]; // between 0 and NUM_ATTACK_LEVELS
float m_fSuperMeterGrowthScale[NUM_PLAYERS];
bool IsCourseMode() const;
@@ -198,7 +205,7 @@ public:
bool HasEarnedExtraStage();
PlayerNumber GetWinner();
BattleResult GetBattleResult( PlayerNumber pn );
StageResult GetStageResult( PlayerNumber pn );
bool m_bAllow2ndExtraStage; //only used when "Allow Selection of Extra Stage is on"
-15
View File
@@ -1,15 +0,0 @@
#include "global.h"
/*
-----------------------------------------------------------------------------
Class: LifeMeter
Desc: See header.
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
Chris Danford
-----------------------------------------------------------------------------
*/
#include "LifeMeter.h"
+24 -7
View File
@@ -2,7 +2,7 @@
#define LIFEMETER_H
/*
-----------------------------------------------------------------------------
Class: LifeMeterBar
Class: LifeMeter
Desc: A graphic displayed in the LifeMeterBar during Dancing.
@@ -16,9 +16,6 @@
#include "ActorFrame.h"
class Song;
class LifeMeter : public ActorFrame
{
public:
@@ -26,8 +23,6 @@ public:
virtual ~LifeMeter() {};
virtual void Load( PlayerNumber pn ) { m_PlayerNumber = pn; }
virtual void Update( float fDeltaTime ) { ActorFrame::Update(fDeltaTime); };
virtual void OnSongEnded() {};
/* Change life after receiving a tap note grade. This *is* called for
* the head of hold notes. */
@@ -42,7 +37,29 @@ public:
virtual bool FailedEarlier() = 0;
protected:
PlayerNumber m_PlayerNumber;
PlayerNumber m_PlayerNumber;
};
class CombinedLifeMeter : public ActorFrame
{
public:
CombinedLifeMeter() {};
virtual ~CombinedLifeMeter() {};
virtual void OnSongEnded() {};
/* Change life after receiving a tap note grade. This *is* called for
* the head of hold notes. */
virtual void ChangeLife( PlayerNumber pn, TapNoteScore score ) = 0;
/* Change life after receiving a hold note grade. tscore is the score
* received for the initial tap note. */
virtual void ChangeLife( PlayerNumber pn, HoldNoteScore score, TapNoteScore tscore ) = 0;
virtual void OnDancePointsChange( PlayerNumber pn ) = 0; // look in GAMESTATE and update the display
virtual bool IsInDanger( PlayerNumber pn ) = 0;
virtual bool IsHot( PlayerNumber pn ) = 0;
virtual bool IsFailing( PlayerNumber pn ) = 0;
virtual bool FailedEarlier( PlayerNumber pn ) = 0;
};
#endif
+7 -28
View File
@@ -12,40 +12,24 @@
#include "MeterDisplay.h"
MeterDisplay::MeterDisplay(
CString sSteamPath,
CString sFramePath,
float fStreamWidth )
MeterDisplay::MeterDisplay()
{
}
void MeterDisplay::Load( CString sSteamPath, float fStreamWidth )
{
m_fStreamWidth = fStreamWidth;
m_sprStream.Load( sSteamPath );
m_sprStream.SetZoomX( fStreamWidth / m_sprStream.GetUnzoomedWidth() );
m_quad.SetZoomY( m_sprStream.GetUnzoomedHeight() );
m_quad.SetX( m_fStreamWidth/2 );
m_quad.SetHorizAlign( Actor::align_right );
m_quad.SetDiffuse( RageColor(0,0,0,1) );
m_sprFrame.Load( sFramePath );
m_fTrailingPercent = 0;
SetPercent( 0.5f );
}
MeterDisplay::~MeterDisplay()
{
}
void MeterDisplay::Update( float fDelta )
{
fapproach( m_fTrailingPercent, m_fPercent, 0.2f*fDelta );
m_quad.SetZoomX( m_fStreamWidth * (1-m_fTrailingPercent) );
m_sprStream.Update( fDelta );
m_quad.Update( fDelta );
m_sprFrame.Update( fDelta );
Actor::Update( fDelta );
}
@@ -53,16 +37,11 @@ void MeterDisplay::Update( float fDelta )
void MeterDisplay::DrawPrimitives()
{
m_sprStream.Draw();
m_quad.Draw();
m_sprFrame.Draw();
}
void MeterDisplay::SetPercent( float fPercent )
{
ASSERT( fPercent >= 0 && fPercent <= 1 );
m_fPercent = fPercent;
m_sprFrame.Command( "glow,1,1,1,1;linear,0.5;glow,1,1,1,0" );
m_sprStream.Command( "glow,1,1,1,1;linear,0.5;glow,1,1,1,0" );
m_sprStream.SetCropRight( 1-fPercent );
}
+3 -10
View File
@@ -19,24 +19,17 @@
class MeterDisplay : public Actor
{
public:
MeterDisplay(
CString sSteamPath,
CString sFramePath,
float fStreamWidth );
virtual ~MeterDisplay();
MeterDisplay();
void Load( CString sSteamPath, float fStreamWidth );
virtual void Update( float fDelta );
virtual void DrawPrimitives();
void SetPercent( float fPercent );
protected:
float m_fStreamWidth;
float m_fPercent;
float m_fTrailingPercent;
Sprite m_sprStream;
Quad m_quad;
Sprite m_sprFrame;
Sprite m_sprStream;
};
#endif
+24 -7
View File
@@ -57,8 +57,10 @@ Player::Player()
m_bShowJudgment = true;
m_pLifeMeter = NULL;
m_pCombinedLifeMeter = NULL;
m_pScore = NULL;
m_pScoreKeeper = NULL;
m_pPrimaryScoreKeeper = NULL;
m_pSecondaryScoreKeeper = NULL;
m_pInventory = NULL;
m_iOffsetSample = 0;
@@ -79,15 +81,17 @@ Player::~Player()
{
}
void Player::Load( PlayerNumber pn, NoteData* pNoteData, LifeMeter* pLM, ScoreDisplay* pScore, Inventory* pInventory, ScoreKeeper* pScoreKeeper )
void Player::Load( PlayerNumber pn, NoteData* pNoteData, LifeMeter* pLM, CombinedLifeMeter* pCombinedLM, ScoreDisplay* pScore, Inventory* pInventory, ScoreKeeper* pPrimaryScoreKeeper, ScoreKeeper* pSecondaryScoreKeeper )
{
//LOG->Trace( "Player::Load()", );
m_PlayerNumber = pn;
m_pLifeMeter = pLM;
m_pCombinedLifeMeter = pCombinedLM;
m_pScore = pScore;
m_pInventory = pInventory;
m_pScoreKeeper = pScoreKeeper;
m_pPrimaryScoreKeeper = pPrimaryScoreKeeper;
m_pSecondaryScoreKeeper = pSecondaryScoreKeeper;
m_iRowLastCrossed = BeatToNoteRowNotRounded( GAMESTATE->m_fSongBeat ) - 1;
// m_iRowLastCrossed = -1;
@@ -660,8 +664,11 @@ void Player::HandleTapRowScore( unsigned row )
if( NoCheating && GAMESTATE->m_PlayerController[m_PlayerNumber] == PC_AUTOPLAY )
return;
if(m_pScoreKeeper)
m_pScoreKeeper->HandleTapRowScore(scoreOfLastTap, iNumTapsInRow, m_pInventory);
if(m_pPrimaryScoreKeeper)
m_pPrimaryScoreKeeper->HandleTapRowScore(scoreOfLastTap, iNumTapsInRow );
if(m_pSecondaryScoreKeeper)
m_pSecondaryScoreKeeper->HandleTapRowScore(scoreOfLastTap, iNumTapsInRow );
if (m_pScore)
m_pScore->SetScore(GAMESTATE->m_CurStageStats.iScore[m_PlayerNumber]);
@@ -670,6 +677,10 @@ void Player::HandleTapRowScore( unsigned row )
m_pLifeMeter->ChangeLife( scoreOfLastTap );
m_pLifeMeter->OnDancePointsChange(); // update oni life meter
}
if( m_pCombinedLifeMeter ) {
m_pCombinedLifeMeter->ChangeLife( m_PlayerNumber, scoreOfLastTap );
m_pCombinedLifeMeter->OnDancePointsChange( m_PlayerNumber ); // update oni life meter
}
}
@@ -686,8 +697,10 @@ void Player::HandleHoldScore( HoldNoteScore holdScore, TapNoteScore tapScore )
if( NoCheating && GAMESTATE->m_PlayerController[m_PlayerNumber] == PC_AUTOPLAY )
return;
if(m_pScoreKeeper)
m_pScoreKeeper->HandleHoldScore(holdScore, tapScore);
if(m_pPrimaryScoreKeeper)
m_pPrimaryScoreKeeper->HandleHoldScore(holdScore, tapScore);
if(m_pSecondaryScoreKeeper)
m_pSecondaryScoreKeeper->HandleHoldScore(holdScore, tapScore);
if (m_pScore)
m_pScore->SetScore(GAMESTATE->m_CurStageStats.iScore[m_PlayerNumber]);
@@ -696,6 +709,10 @@ void Player::HandleHoldScore( HoldNoteScore holdScore, TapNoteScore tapScore )
m_pLifeMeter->ChangeLife( holdScore, tapScore );
m_pLifeMeter->OnDancePointsChange();
}
if( m_pCombinedLifeMeter ) {
m_pCombinedLifeMeter->ChangeLife( m_PlayerNumber, holdScore, tapScore );
m_pCombinedLifeMeter->OnDancePointsChange( m_PlayerNumber );
}
}
float Player::GetMaxStepDistanceSeconds()
+5 -2
View File
@@ -32,6 +32,7 @@
#include "ArrowBackdrop.h"
class ScoreDisplay;
class LifeMeter;
class CombinedLifeMeter;
class ScoreKeeper;
class Inventory;
@@ -47,7 +48,7 @@ public:
virtual void DrawPrimitives();
~Player();
void Load( PlayerNumber player_no, NoteData* pNoteData, LifeMeter* pLM, ScoreDisplay* pScore, Inventory* pInventory, ScoreKeeper* pScoreKeeper );
void Load( PlayerNumber player_no, NoteData* pNoteData, LifeMeter* pLM, CombinedLifeMeter* pCombinedLM, ScoreDisplay* pScore, Inventory* pInventory, ScoreKeeper* pPrimaryScoreKeeper, ScoreKeeper* pSecondaryScoreKeeper );
void CrossedRow( int iNoteRow );
void Step( int col );
void RandomiseNotes( int iNoteRow );
@@ -83,8 +84,10 @@ protected:
Combo m_Combo;
LifeMeter* m_pLifeMeter;
CombinedLifeMeter* m_pCombinedLifeMeter;
ScoreDisplay* m_pScore;
ScoreKeeper* m_pScoreKeeper;
ScoreKeeper* m_pPrimaryScoreKeeper;
ScoreKeeper* m_pSecondaryScoreKeeper;
Inventory* m_pInventory;
CString m_sLastSeenNoteSkin;
-92
View File
@@ -1,92 +0,0 @@
#include "global.h"
/*
-----------------------------------------------------------------------------
Class: RaveHelper
Desc: See header.
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
Chris Danford
-----------------------------------------------------------------------------
*/
#include "RaveHelper.h"
#include "ThemeManager.h"
#include "RageUtil.h"
#include "GameState.h"
#include "Character.h"
CachedThemeMetricF ATTACK_DURATION_SECONDS ("RaveHelper","AttackDurationSeconds");
const PlayerNumber OPPOSITE_PLAYER[NUM_PLAYERS] = { PLAYER_2, PLAYER_1 };
RaveHelper::RaveHelper()
{
ATTACK_DURATION_SECONDS.Refresh();
}
void RaveHelper::Load( PlayerNumber pn )
{
m_PlayerNumber = pn;
// don't load sounds if they're not going to be used
if( GAMESTATE->m_PlayMode == PLAY_MODE_RAVE )
{
for( int p=0; p<NUM_PLAYERS; p++ )
{
m_soundLaunchAttack.Load( THEME->GetPathToS(ssprintf("RaveHelper launch attack p%d",p+1)) );
m_soundAttackEnding.Load( THEME->GetPathToS(ssprintf("RaveHelper attack end p%d",p+1)) );
}
}
}
void RaveHelper::Update( float fDelta )
{
if( GAMESTATE->m_PlayMode != PLAY_MODE_RAVE )
return;
if( GAMESTATE->m_bActiveAttackEndedThisUpdate[m_PlayerNumber] )
m_soundAttackEnding.Play();
// PlayerNumber pn = m_PlayerNumber;
// TODO: Award item based on Super meter
/*
// check to see if they deserve a new item
if( GAMESTATE->m_CurStageStats.iCurCombo[pn] != m_iLastSeenCombo )
{
int iOldCombo = m_iLastSeenCombo;
m_iLastSeenCombo = GAMESTATE->m_CurStageStats.iCurCombo[pn];
int iNewCombo = m_iLastSeenCombo;
int iLevelOfOldCombo = (iOldCombo/COMBO_PER_ATTACK_LEVEL) - 1;
int iLevelOfNewCombo = (iNewCombo/COMBO_PER_ATTACK_LEVEL) - 1;
if( iLevelOfOldCombo < iLevelOfNewCombo && // combo increasing
iLevelOfNewCombo >= ATTACK_LEVEL_1 ) // attack level not negative
{
// they deserve a new item
CLAMP( iLevelOfNewCombo, 0, GAMESTATE->m_MaxAttackLevel[pn] );
AttackLevel al = (AttackLevel)iLevelOfNewCombo;
AwardItem( al );
}
}
*/
}
void RaveHelper::LaunchAttack( AttackLevel al )
{
CString* asAttacks = GAMESTATE->m_pCurCharacters[m_PlayerNumber]->m_sAttacks[al]; // [NUM_ATTACKS_PER_LEVEL]
CString sAttackToGive = asAttacks[ rand()%NUM_ATTACKS_PER_LEVEL ];
PlayerNumber pnToAttack = OPPOSITE_PLAYER[m_PlayerNumber];
GameState::Attack a;
a.level = al;
a.fSecsRemaining = ATTACK_DURATION_SECONDS;
a.sModifier = sAttackToGive;
GAMESTATE->LaunchAttack( pnToAttack, a );
m_soundLaunchAttack.Play();
}
-38
View File
@@ -1,38 +0,0 @@
#ifndef RaveHelper_H
#define RaveHelper_H
/*
-----------------------------------------------------------------------------
Class: RaveHelper
Desc: Launches attacks in PLAY_MODE_RAVE.
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
Chris Danford
-----------------------------------------------------------------------------
*/
#include "Actor.h"
#include "PlayerNumber.h"
#include "RageSound.h"
#include "GameConstantsAndTypes.h"
class RaveHelper : public Actor
{
public:
RaveHelper();
void Load( PlayerNumber pn );
virtual void Update( float fDelta );
virtual void DrawPrimitives() {};
protected:
void LaunchAttack( AttackLevel al );
PlayerNumber m_PlayerNumber;
RageSound m_soundLaunchAttack;
RageSound m_soundAttackEnding;
};
#endif
+19 -16
View File
@@ -18,38 +18,41 @@
#include "GameState.h"
#include "ThemeManager.h"
const float LEVEL_WIDTH = 50;
ScoreDisplayRave::ScoreDisplayRave()
{
LOG->Trace( "ScoreDisplayRave::ScoreDisplayRave()" );
m_sprFrame.Load( THEME->GetPathToG("ScoreDisplayRave frame") );
this->AddChild( &m_sprFrame );
for( int i=0; i<NUM_ATTACK_LEVELS; i++ )
{
m_LevelStream[i].Load( THEME->GetPathToG(ssprintf("ScoreDisplayRave stream level%d",i+1)), LEVEL_WIDTH );
float fSpan = (NUM_ATTACK_LEVELS-1)*LEVEL_WIDTH;
float fX = SCALE(i,0.f,NUM_ATTACK_LEVELS-1.f, -fSpan/2, fSpan/2 );
m_LevelStream[i].SetX( fX );
this->AddChild( &m_LevelStream[i] );
}
m_textCurrentAttack.LoadFromFont( THEME->GetPathToF("Common normal") );
this->AddChild( &m_textCurrentAttack );
this->AddChild( &m_sprFrame );
}
void ScoreDisplayRave::Init( PlayerNumber pn )
{
ScoreDisplay::Init( pn );
m_sprFrame.Load( THEME->GetPathToG(ssprintf("ScoreDisplayRave frame p%d",pn+1)) );
}
void ScoreDisplayRave::Update( float fDelta )
{
ScoreDisplay::Update( fDelta );
CString sNewAttack = GAMESTATE->m_ActiveAttacks[m_PlayerNumber][0].sModifier;
if( sNewAttack != m_sLastSeenAttack )
for( int i=0; i<NUM_ATTACK_LEVELS; i++ )
{
m_textCurrentAttack.SetText( sNewAttack );
m_textCurrentAttack.StopTweening();
m_textCurrentAttack.Command( "diffuse,1,1,1,1;zoom,1;"
"sleep,0.1;linear,0;diffusealpha,0;"
"sleep,0.1;linear,0;diffusealpha,1;"
"sleep,0.1;linear,0;diffusealpha,0;"
"sleep,0.1;linear,0;diffusealpha,1;"
"sleep,0.1;linear,0;diffusealpha,0;"
"sleep,0.1;linear,0;diffusealpha,1;" );
float fLevelPercent = GAMESTATE->m_fSuperMeter[m_PlayerNumber] - i;
CLAMP( fLevelPercent, 0 ,1 );
m_LevelStream[i].SetPercent( fLevelPercent );
}
}
+4 -4
View File
@@ -14,6 +14,7 @@
#include "ScoreDisplay.h"
#include "GameConstantsAndTypes.h"
#include "OptionIcon.h"
#include "MeterDisplay.h"
class ScoreDisplayRave : public ScoreDisplay
@@ -25,10 +26,9 @@ public:
virtual void Update( float fDelta );
protected:
Sprite m_sprFrame;
BitmapText m_textCurrentAttack;
CString m_sLastSeenAttack;
MeterDisplay m_LevelStream[NUM_ATTACK_LEVELS];
Sprite m_sprFrame;
BitmapText m_LevelNumber;
};
#endif
-3
View File
@@ -1,3 +0,0 @@
#include "global.h"
#include "ScoreKeeper.h"
+2 -1
View File
@@ -40,10 +40,11 @@ protected:
public:
ScoreKeeper(PlayerNumber pn) { m_PlayerNumber=pn; }
virtual void DrawPrimitives() { }
virtual void Update( float fDelta ) { }
virtual void OnNextSong( int iSongInCourseIndex, Notes* pNotes ) = 0; // before a song plays (called multiple times if course)
virtual void HandleTapRowScore( TapNoteScore scoreOfLastTap, int iNumTapsInRow, Inventory* pInventory ) = 0;
virtual void HandleTapRowScore( TapNoteScore scoreOfLastTap, int iNumTapsInRow ) = 0;
virtual void HandleHoldScore( HoldNoteScore holdScore, TapNoteScore tapScore ) = 0;
virtual int TapNoteScoreToDancePoints( TapNoteScore tns ) = 0;
+1 -1
View File
@@ -222,7 +222,7 @@ void ScoreKeeperMAX2::AddScore( TapNoteScore score )
GAMESTATE->m_CurStageStats.iScore[m_PlayerNumber] = m_iScore;
}
void ScoreKeeperMAX2::HandleTapRowScore( TapNoteScore scoreOfLastTap, int iNumTapsInRow, Inventory* pInventory )
void ScoreKeeperMAX2::HandleTapRowScore( TapNoteScore scoreOfLastTap, int iNumTapsInRow )
{
ASSERT( iNumTapsInRow >= 1 );
+1 -1
View File
@@ -37,7 +37,7 @@ public:
void OnNextSong( int iSongInCourseIndex, Notes* pNotes ); // before a song plays (called multiple times if course)
void HandleTapRowScore( TapNoteScore scoreOfLastTap, int iNumTapsInRow, Inventory* pInventory );
void HandleTapRowScore( TapNoteScore scoreOfLastTap, int iNumTapsInRow );
void HandleHoldScore( HoldNoteScore holdScore, TapNoteScore tapScore );
int TapNoteScoreToDancePoints( TapNoteScore tns );
+96
View File
@@ -0,0 +1,96 @@
#include "global.h"
/*
-----------------------------------------------------------------------------
Class: ScoreKeeperRave
Desc: See header.
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
Chris Danford
-----------------------------------------------------------------------------
*/
#include "ScoreKeeperRave.h"
#include "ThemeManager.h"
#include "RageUtil.h"
#include "GameState.h"
#include "Character.h"
CachedThemeMetricF ATTACK_DURATION_SECONDS ("ScoreKeeperRave","AttackDurationSeconds");
const PlayerNumber OPPOSITE_PLAYER[NUM_PLAYERS] = { PLAYER_2, PLAYER_1 };
ScoreKeeperRave::ScoreKeeperRave(PlayerNumber pn) : ScoreKeeper(pn)
{
ATTACK_DURATION_SECONDS.Refresh();
m_soundLaunchAttack.Load( THEME->GetPathToS(ssprintf("ScoreKeeperRave launch attack p%d",pn+1)) );
m_soundAttackEnding.Load( THEME->GetPathToS(ssprintf("ScoreKeeperRave attack end p%d",pn+1)) );
}
void ScoreKeeperRave::OnNextSong( int iSongInCourseIndex, Notes* pNotes )
{
}
#define CROSSED( val ) (fOld < val && fNew >= val)
#define CROSSED_ATTACK_LEVEL( level ) CROSSED(1.f/NUM_ATTACK_LEVELS*(level+1))
void ScoreKeeperRave::HandleTapRowScore( TapNoteScore scoreOfLastTap, int iNumTapsInRow )
{
AttackLevel oldAL = (AttackLevel)(int)GAMESTATE->m_fSuperMeter[m_PlayerNumber];
float fPercentToMove;
switch( scoreOfLastTap )
{
case TNS_MARVELOUS: fPercentToMove = +0.02f; break;
case TNS_PERFECT: fPercentToMove = +0.02f; break;
case TNS_GREAT: fPercentToMove = +0.01f; break;
case TNS_GOOD: fPercentToMove = +0.00f; break;
case TNS_BOO: fPercentToMove = -0.02f; break;
case TNS_MISS: fPercentToMove = -0.04f; break;
default: ASSERT(0); fPercentToMove = +0.00f; break;
}
GAMESTATE->m_fSuperMeter[m_PlayerNumber] += fPercentToMove * GAMESTATE->m_fSuperMeterGrowthScale[m_PlayerNumber];
CLAMP( GAMESTATE->m_fSuperMeter[m_PlayerNumber], 0.f, NUM_ATTACK_LEVELS );
AttackLevel newAL = (AttackLevel)(int)GAMESTATE->m_fSuperMeter[m_PlayerNumber];
if( newAL > oldAL )
{
if( newAL == NUM_ATTACK_LEVELS ) // hit upper bounds of meter
{
GAMESTATE->m_fSuperMeter[m_PlayerNumber] -= 1.f;
newAL = (AttackLevel)(NUM_ATTACK_LEVELS-1);
}
LaunchAttack( newAL );
}
}
void ScoreKeeperRave::HandleHoldScore( HoldNoteScore holdScore, TapNoteScore tapScore )
{
}
void ScoreKeeperRave::Update( float fDelta )
{
if( GAMESTATE->m_bActiveAttackEndedThisUpdate[m_PlayerNumber] )
m_soundAttackEnding.Play();
}
void ScoreKeeperRave::LaunchAttack( AttackLevel al )
{
CString* asAttacks = GAMESTATE->m_pCurCharacters[m_PlayerNumber]->m_sAttacks[al]; // [NUM_ATTACKS_PER_LEVEL]
CString sAttackToGive = asAttacks[ rand()%NUM_ATTACKS_PER_LEVEL ];
PlayerNumber pnToAttack = OPPOSITE_PLAYER[m_PlayerNumber];
GameState::Attack a;
a.level = al;
a.fSecsRemaining = ATTACK_DURATION_SECONDS;
a.sModifier = sAttackToGive;
GAMESTATE->LaunchAttack( pnToAttack, a );
m_soundLaunchAttack.Play();
}
+39
View File
@@ -0,0 +1,39 @@
#ifndef ScoreKeeperRave_H
#define ScoreKeeperRave_H
/*
-----------------------------------------------------------------------------
Class: ScoreKeeperRave
Desc: Launches attacks in PLAY_MODE_RAVE.
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
Chris Danford
-----------------------------------------------------------------------------
*/
#include "ScoreKeeper.h"
#include "RageSound.h"
#include "GameConstantsAndTypes.h"
class ScoreKeeperRave : public ScoreKeeper
{
public:
// Overrides
ScoreKeeperRave(PlayerNumber pn);
virtual void Update( float fDelta );
virtual void OnNextSong( int iSongInCourseIndex, Notes* pNotes ); // before a song plays (called multiple times if course)
virtual void HandleTapRowScore( TapNoteScore scoreOfLastTap, int iNumTapsInRow );
virtual void HandleHoldScore( HoldNoteScore holdScore, TapNoteScore tapScore );
virtual int TapNoteScoreToDancePoints( TapNoteScore tns ) { return 0; };
virtual int HoldNoteScoreToDancePoints( HoldNoteScore hns ) { return 0; };
virtual int GetPossibleDancePoints( const NoteData* pNoteData ) { return 0; };
protected:
void LaunchAttack( AttackLevel al );
RageSound m_soundLaunchAttack;
RageSound m_soundAttackEnding;
};
#endif
+2 -2
View File
@@ -269,7 +269,7 @@ ScreenEdit::ScreenEdit() : Screen("ScreenEdit")
GAMESTATE->m_PlayerOptions[PLAYER_1].m_sNoteSkin = "default"; // change noteskin back to default before loading player
m_Player.Load( PLAYER_1, &noteData, NULL, NULL, NULL, NULL );
m_Player.Load( PLAYER_1, &noteData, NULL, NULL, NULL, NULL, NULL, NULL );
GAMESTATE->m_PlayerController[PLAYER_1] = PC_HUMAN;
m_Player.SetXY( PLAYER_X, PLAYER_Y );
@@ -1465,7 +1465,7 @@ void ScreenEdit::HandleAreaMenuChoice( AreaMenuChoice c, int* iAnswers )
* where we're starting. */
GAMESTATE->m_fSongBeat = m_NoteFieldEdit.m_fBeginMarker - 4;
m_Player.Load( PLAYER_1, (NoteData*)&m_NoteFieldEdit, NULL, NULL, NULL, NULL );
m_Player.Load( PLAYER_1, (NoteData*)&m_NoteFieldEdit, NULL, NULL, NULL, NULL, NULL, NULL );
GAMESTATE->m_PlayerController[PLAYER_1] = PREFSMAN->m_bAutoPlay?PC_AUTOPLAY:PC_HUMAN;
m_rectRecordBack.StopTweening();
+2 -2
View File
@@ -515,7 +515,7 @@ ScreenEvaluation::ScreenEvaluation( CString sClassName, Type type ) : Screen(sCl
m_sprWin[p].Load( THEME->GetPathToG("ScreenEvaluation win 2x3") );
m_sprWin[p].StopAnimating();
int iFrame = GAMESTATE->GetBattleResult( (PlayerNumber)p )*2 + p;
int iFrame = GAMESTATE->GetStageResult( (PlayerNumber)p )*2 + p;
m_sprWin[p].SetState( iFrame );
m_sprWin[p].SetName( ssprintf("WinP%d",p+1) );
UtilSetXYAndOnCommand( m_sprWin[p], "ScreenEvaluation" );
@@ -674,7 +674,7 @@ ScreenEvaluation::ScreenEvaluation( CString sClassName, Type type ) : Screen(sCl
{
case PLAY_MODE_BATTLE:
{
bool bWon = GAMESTATE->GetBattleResult(GAMESTATE->m_MasterPlayerNumber) == RESULT_WIN;
bool bWon = GAMESTATE->GetStageResult(GAMESTATE->m_MasterPlayerNumber) == RESULT_WIN;
if( bWon )
SOUNDMAN->PlayOnceFromDir( ANNOUNCER->GetPathTo("evaluation win") );
else
+85 -65
View File
@@ -32,13 +32,14 @@
#include "ThemeManager.h"
#include "RageTimer.h"
#include "ScoreKeeperMAX2.h"
#include "ScoreKeeperRave.h"
#include "NoteFieldPositioning.h"
#include "LyricsLoader.h"
#include "ActorUtil.h"
#include "NoteSkinManager.h"
#include "RageTextureManager.h"
#include "EnemyHealth.h"
#include "EnemyFace.h"
#include "CombinedLifeMeterEnemy.h"
#include "CombinedLifeMeterTug.h"
//
// Defines
@@ -96,8 +97,10 @@ ScreenGameplay::ScreenGameplay( bool bDemonstration ) : Screen("ScreenGameplay")
{
m_pLifeMeter[p] = NULL;
m_pScoreDisplay[p] = NULL;
m_pScoreKeeper[p] = NULL;
m_pPrimaryScoreKeeper[p] = NULL;
m_pSecondaryScoreKeeper[p] = NULL;
}
m_pCombinedLifeMeter = NULL;
// fill in difficulty of CPU players with that of the first human player
@@ -164,7 +167,14 @@ ScreenGameplay::ScreenGameplay( bool bDemonstration ) : Screen("ScreenGameplay")
{
if( !GAMESTATE->IsPlayerEnabled(p) )
continue; // skip
m_pScoreKeeper[p] = new ScoreKeeperMAX2( m_apNotesQueue[p], (PlayerNumber)p );
m_pPrimaryScoreKeeper[p] = new ScoreKeeperMAX2( m_apNotesQueue[p], (PlayerNumber)p );
switch( GAMESTATE->m_PlayMode )
{
case PLAY_MODE_RAVE:
m_pSecondaryScoreKeeper[p] = new ScoreKeeperRave( (PlayerNumber)p );
break;
}
}
@@ -243,19 +253,6 @@ ScreenGameplay::ScreenGameplay( bool bDemonstration ) : Screen("ScreenGameplay")
this->AddChild( &m_sprOniGameOver[p] );
}
if( GAMESTATE->m_PlayMode == PLAY_MODE_BATTLE )
{
m_pEnemyFace = new EnemyFace;
m_pEnemyFace->SetName( "EnemyFace" );
this->AddChild( m_pEnemyFace );
SET_XY( *m_pEnemyFace );
m_pEnemyHealth = new EnemyHealth;
m_pEnemyHealth->SetName( "EnemyHealth" );
this->AddChild( m_pEnemyHealth );
SET_XY( *m_pEnemyHealth );
}
this->AddChild(&m_TimingAssist);
this->AddChild( &m_NextSongIn );
@@ -277,27 +274,53 @@ ScreenGameplay::ScreenGameplay( bool bDemonstration ) : Screen("ScreenGameplay")
SET_XY( m_sprLifeFrame );
this->AddChild( &m_sprLifeFrame );
for( p=0; p<NUM_PLAYERS; p++ )
switch( GAMESTATE->m_PlayMode )
{
switch( GAMESTATE->m_SongOptions.m_LifeType )
case PLAY_MODE_ARCADE:
case PLAY_MODE_ONI:
case PLAY_MODE_NONSTOP:
case PLAY_MODE_ENDLESS:
for( p=0; p<NUM_PLAYERS; p++ )
{
case SongOptions::LIFE_BAR:
m_pLifeMeter[p] = new LifeMeterBar;
switch( GAMESTATE->m_SongOptions.m_LifeType )
{
case SongOptions::LIFE_BAR:
m_pLifeMeter[p] = new LifeMeterBar;
break;
case SongOptions::LIFE_BATTERY:
m_pLifeMeter[p] = new LifeMeterBattery;
break;
default:
ASSERT(0);
}
m_pLifeMeter[p]->Load( (PlayerNumber)p );
m_pLifeMeter[p]->SetName( ssprintf("LifeP%d%s",p+1,bExtra?"Extra":"") );
SET_XY( *m_pLifeMeter[p] );
this->AddChild( m_pLifeMeter[p] );
}
break;
case PLAY_MODE_BATTLE:
case PLAY_MODE_RAVE:
switch( GAMESTATE->m_PlayMode )
{
case PLAY_MODE_BATTLE:
m_pCombinedLifeMeter = new CombinedLifeMeterEnemy;
break;
case SongOptions::LIFE_BATTERY:
m_pLifeMeter[p] = new LifeMeterBattery;
case PLAY_MODE_RAVE:
m_pCombinedLifeMeter = new CombinedLifeMeterTug;
break;
default:
ASSERT(0);
}
m_pLifeMeter[p]->Load( (PlayerNumber)p );
m_pLifeMeter[p]->SetName( ssprintf("LifeP%d%s",p+1,bExtra?"Extra":"") );
SET_XY( *m_pLifeMeter[p] );
this->AddChild( m_pLifeMeter[p] );
m_pCombinedLifeMeter->SetName( ssprintf("CombinedLife%s",bExtra?"Extra":"") );
SET_XY( *m_pCombinedLifeMeter );
this->AddChild( m_pCombinedLifeMeter );
break;
}
m_sprStage.SetName( ssprintf("Stage%s",bExtra?"Extra":"") );
SET_XY( m_sprStage );
@@ -440,12 +463,6 @@ ScreenGameplay::ScreenGameplay( bool bDemonstration ) : Screen("ScreenGameplay")
m_Inventory[p].Load( (PlayerNumber)p );
this->AddChild( &m_Inventory[p] );
}
if( GAMESTATE->m_PlayMode==PLAY_MODE_RAVE )
{
m_RaveHelper[p].Load( (PlayerNumber)p );
this->AddChild( &m_RaveHelper[p] );
}
}
@@ -572,11 +589,10 @@ ScreenGameplay::~ScreenGameplay()
{
SAFE_DELETE( m_pLifeMeter[p] );
SAFE_DELETE( m_pScoreDisplay[p] );
SAFE_DELETE( m_pScoreKeeper[p] );
SAFE_DELETE( m_pPrimaryScoreKeeper[p] );
SAFE_DELETE( m_pSecondaryScoreKeeper[p] );
}
delete m_pEnemyHealth;
delete m_pEnemyFace;
SAFE_DELETE( m_pCombinedLifeMeter );
m_soundMusic.StopPlaying();
}
@@ -615,7 +631,9 @@ void ScreenGameplay::LoadNextSong()
continue;
GAMESTATE->m_pCurNotes[p] = m_apNotesQueue[p][iPlaySongIndex];
m_pScoreKeeper[p]->OnNextSong( GAMESTATE->GetCourseSongIndex(), GAMESTATE->m_pCurNotes[p] );
m_pPrimaryScoreKeeper[p]->OnNextSong( GAMESTATE->GetCourseSongIndex(), GAMESTATE->m_pCurNotes[p] );
if( m_pSecondaryScoreKeeper[p] )
m_pSecondaryScoreKeeper[p]->OnNextSong( GAMESTATE->GetCourseSongIndex(), GAMESTATE->m_pCurNotes[p] );
// Put courses options into effect.
GAMESTATE->ApplyModifiers( (PlayerNumber)p, m_asModifiersQueue[p][iPlaySongIndex] );
@@ -640,7 +658,7 @@ void ScreenGameplay::LoadNextSong()
NoteData pNewNoteData;
pStyleDef->GetTransformedNoteDataForStyle( (PlayerNumber)p, &pOriginalNoteData, &pNewNoteData );
m_Player[p].Load( (PlayerNumber)p, &pNewNoteData, m_pLifeMeter[p], m_pScoreDisplay[p], &m_Inventory[p], m_pScoreKeeper[p] );
m_Player[p].Load( (PlayerNumber)p, &pNewNoteData, m_pLifeMeter[p], m_pCombinedLifeMeter, m_pScoreDisplay[p], &m_Inventory[p], m_pPrimaryScoreKeeper[p], m_pSecondaryScoreKeeper[p] );
if( m_bDemonstration )
{
GAMESTATE->m_PlayerController[p] = PC_CPU;
@@ -764,7 +782,8 @@ bool ScreenGameplay::OneIsHot()
{
for( int p=0; p<NUM_PLAYERS; p++ )
if( GAMESTATE->IsPlayerEnabled(PlayerNumber(p)) )
if( m_pLifeMeter[p]->IsHot() )
if( (m_pLifeMeter[p] && m_pLifeMeter[p]->IsHot()) ||
(m_pCombinedLifeMeter && m_pCombinedLifeMeter->IsHot((PlayerNumber)p)) )
return true;
return false;
}
@@ -773,7 +792,8 @@ bool ScreenGameplay::AllAreInDanger()
{
for( int p=0; p<NUM_PLAYERS; p++ )
if( GAMESTATE->IsPlayerEnabled(PlayerNumber(p)) )
if( !m_pLifeMeter[p]->IsInDanger() )
if( (m_pLifeMeter[p] && !m_pLifeMeter[p]->IsInDanger()) ||
(m_pCombinedLifeMeter && !m_pCombinedLifeMeter->IsInDanger((PlayerNumber)p)) )
return false;
return true;
}
@@ -782,7 +802,8 @@ bool ScreenGameplay::AllAreFailing()
{
for( int p=0; p<NUM_PLAYERS; p++ )
if( GAMESTATE->IsPlayerEnabled(PlayerNumber(p)) )
if( !m_pLifeMeter[p]->IsFailing() )
if( (m_pLifeMeter[p] && !m_pLifeMeter[p]->IsFailing()) ||
(m_pCombinedLifeMeter && !m_pCombinedLifeMeter->IsFailing((PlayerNumber)p)) )
return false;
return true;
}
@@ -791,7 +812,8 @@ bool ScreenGameplay::AllFailedEarlier()
{
for( int p=0; p<NUM_PLAYERS; p++ )
if( GAMESTATE->IsPlayerEnabled(p) )
if( !m_pLifeMeter[p]->FailedEarlier() )
if( (m_pLifeMeter[p] && !m_pLifeMeter[p]->FailedEarlier()) ||
(m_pCombinedLifeMeter && !m_pCombinedLifeMeter->FailedEarlier((PlayerNumber)p)) )
return false;
return true;
}
@@ -940,7 +962,8 @@ void ScreenGameplay::Update( float fDeltaTime )
// check for individual fail
for ( pn=0; pn<NUM_PLAYERS; pn++ )
{
if ( m_pLifeMeter[pn]->IsFailing() && !GAMESTATE->m_CurStageStats.bFailed[pn] )
if( (m_pLifeMeter[pn] && m_pLifeMeter[pn]->IsFailing() && !GAMESTATE->m_CurStageStats.bFailed[pn]) ||
(m_pCombinedLifeMeter && m_pCombinedLifeMeter->IsFailing((PlayerNumber)pn) && !GAMESTATE->m_CurStageStats.bFailed[pn]) )
GAMESTATE->m_CurStageStats.bFailed[pn] = true; // fail
}
@@ -955,7 +978,8 @@ void ScreenGameplay::Update( float fDeltaTime )
{
if( !GAMESTATE->IsPlayerEnabled(pn) )
continue;
if( !m_pLifeMeter[pn]->IsFailing())
if( (m_pLifeMeter[pn] && !m_pLifeMeter[pn]->IsFailing()) ||
(m_pCombinedLifeMeter && !m_pCombinedLifeMeter->IsFailing((PlayerNumber)pn)) )
continue; /* isn't failing */
if( GAMESTATE->m_CurStageStats.bFailed[pn] )
continue; /* failed and is already dead */
@@ -994,8 +1018,6 @@ void ScreenGameplay::Update( float fDeltaTime )
if( OneIsHot() ) m_announcerHot.PlayRandom();
else if( AllAreInDanger() ) m_announcerDanger.PlayRandom();
else m_announcerGood.PlayRandom();
if( m_pEnemyFace )
m_pEnemyFace->SetFace( EnemyFace::taunt );
break;
case PLAY_MODE_NONSTOP:
case PLAY_MODE_ONI:
@@ -1413,7 +1435,13 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM )
{
for( p=0; p<NUM_PLAYERS; p++ )
if( GAMESTATE->IsPlayerEnabled(p) && !GAMESTATE->m_CurStageStats.bFailed[p] )
m_pLifeMeter[p]->OnSongEnded(); // give a little life back between stages
{
// give a little life back between stages
if( m_pLifeMeter[p] )
m_pLifeMeter[p]->OnSongEnded();
if( m_pCombinedLifeMeter )
m_pCombinedLifeMeter->OnSongEnded();
}
// HACK: Temporarily set the song pointer to the next song so that
// this m_NextSongOut will show the next song banner
@@ -1583,7 +1611,6 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM )
m_fTimeLeftBeforeDancingComment = SECONDS_BETWEEN_COMMENTS;
}
m_soundBattleTrickLevel1.PlayRandom();
m_pEnemyFace->SetFace( EnemyFace::attack );
break;
case SM_BattleTrickLevel2:
if( SECS_SINCE_LAST_COMMENT > 5 )
@@ -1592,7 +1619,6 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM )
m_fTimeLeftBeforeDancingComment = SECONDS_BETWEEN_COMMENTS;
}
m_soundBattleTrickLevel2.PlayRandom();
m_pEnemyFace->SetFace( EnemyFace::attack );
break;
case SM_BattleTrickLevel3:
if( SECS_SINCE_LAST_COMMENT > 5 )
@@ -1601,7 +1627,6 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM )
m_fTimeLeftBeforeDancingComment = SECONDS_BETWEEN_COMMENTS;
}
m_soundBattleTrickLevel3.PlayRandom();
m_pEnemyFace->SetFace( EnemyFace::attack );
break;
case SM_BattleDamageLevel1:
@@ -1610,7 +1635,6 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM )
m_announcerBattleDamageLevel1.PlayRandom();
m_fTimeLeftBeforeDancingComment = SECONDS_BETWEEN_COMMENTS;
}
m_pEnemyFace->SetFace( EnemyFace::damage );
break;
case SM_BattleDamageLevel2:
if( SECS_SINCE_LAST_COMMENT > 5 )
@@ -1618,7 +1642,6 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM )
m_announcerBattleDamageLevel2.PlayRandom();
m_fTimeLeftBeforeDancingComment = SECONDS_BETWEEN_COMMENTS;
}
m_pEnemyFace->SetFace( EnemyFace::damage );
break;
case SM_BattleDamageLevel3:
if( SECS_SINCE_LAST_COMMENT > 5 )
@@ -1626,7 +1649,6 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM )
m_announcerBattleDamageLevel3.PlayRandom();
m_fTimeLeftBeforeDancingComment = SECONDS_BETWEEN_COMMENTS;
}
m_pEnemyFace->SetFace( EnemyFace::damage );
break;
case SM_SaveChangedBeforeGoingBack:
@@ -1728,9 +1750,12 @@ void ScreenGameplay::TweenOnScreen()
ON_COMMAND( m_sprStage );
ON_COMMAND( m_textSongOptions );
ON_COMMAND( m_sprScoreFrame );
if( m_pCombinedLifeMeter )
ON_COMMAND( *m_pCombinedLifeMeter );
for( int p=0; p<NUM_PLAYERS; p++ )
{
ON_COMMAND( *m_pLifeMeter[p] );
if( m_pLifeMeter[p] )
ON_COMMAND( *m_pLifeMeter[p] );
if( !GAMESTATE->IsPlayerEnabled(p) )
continue;
ON_COMMAND( m_textCourseSongNumber[p] );
@@ -1738,10 +1763,6 @@ void ScreenGameplay::TweenOnScreen()
ON_COMMAND( m_textPlayerOptions[p] );
ON_COMMAND( m_DifficultyIcon[p] );
}
if( m_pEnemyFace )
ON_COMMAND( *m_pEnemyFace );
if( m_pEnemyHealth )
ON_COMMAND( *m_pEnemyHealth );
}
void ScreenGameplay::TweenOffScreen()
@@ -1750,9 +1771,12 @@ void ScreenGameplay::TweenOffScreen()
OFF_COMMAND( m_sprStage );
OFF_COMMAND( m_textSongOptions );
OFF_COMMAND( m_sprScoreFrame );
if( m_pCombinedLifeMeter )
OFF_COMMAND( *m_pCombinedLifeMeter );
for( int p=0; p<NUM_PLAYERS; p++ )
{
OFF_COMMAND( *m_pLifeMeter[p] );
if( m_pLifeMeter[p] )
OFF_COMMAND( *m_pLifeMeter[p] );
if( !GAMESTATE->IsPlayerEnabled(p) )
continue;
OFF_COMMAND( m_textCourseSongNumber[p] );
@@ -1760,10 +1784,6 @@ void ScreenGameplay::TweenOffScreen()
OFF_COMMAND( m_textPlayerOptions[p] );
OFF_COMMAND( m_DifficultyIcon[p] );
}
if( m_pEnemyFace )
OFF_COMMAND( *m_pEnemyFace );
if( m_pEnemyHealth )
OFF_COMMAND( *m_pEnemyHealth );
m_textDebug.StopTweening();
m_textDebug.BeginTweening( 1/8.f );
+3 -10
View File
@@ -25,14 +25,10 @@
#include "DifficultyIcon.h"
#include "BPMDisplay.h"
#include "Inventory.h"
#include "RaveHelper.h"
#include "ActiveItemList.h"
//#include "BeginnerHelper.h" // uncomment once it's checked in
#include "LyricDisplay.h"
#include "TimingAssist.h"
class EnemyHealth;
class EnemyFace;
// messages sent by Combo
const ScreenMessage SM_PlayToasty = ScreenMessage(SM_User+104);
@@ -111,6 +107,7 @@ protected:
Sprite m_sprLifeFrame;
LifeMeter* m_pLifeMeter[NUM_PLAYERS];
CombinedLifeMeter* m_pCombinedLifeMeter;
Sprite m_sprStage;
BitmapText m_textCourseSongNumber[NUM_PLAYERS];
@@ -118,7 +115,8 @@ protected:
Sprite m_sprScoreFrame;
ScoreDisplay* m_pScoreDisplay[NUM_PLAYERS];
ScoreKeeper* m_pScoreKeeper[NUM_PLAYERS];
ScoreKeeper* m_pPrimaryScoreKeeper[NUM_PLAYERS];
ScoreKeeper* m_pSecondaryScoreKeeper[NUM_PLAYERS];
BitmapText m_textPlayerOptions[NUM_PLAYERS];
BitmapText m_textSongOptions;
@@ -148,12 +146,7 @@ protected:
// used in PLAY_MODE_BATTLE
Inventory m_Inventory[NUM_PLAYERS];
ActiveItemList m_ActiveItemList[NUM_PLAYERS];
EnemyHealth* m_pEnemyHealth;
EnemyFace* m_pEnemyFace;
// used in PLAY_MODE_RAVE
RaveHelper m_RaveHelper[NUM_PLAYERS];
DifficultyIcon m_DifficultyIcon[NUM_PLAYERS];
BGAnimation m_bgaBH;
+1 -1
View File
@@ -75,7 +75,7 @@ ScreenHowToPlay::ScreenHowToPlay() : ScreenAttract("ScreenHowToPlay")
GAMESTATE->m_pCurSong = m_pSong;
GAMESTATE->m_bPastHereWeGo = true;
GAMESTATE->m_PlayerController[PLAYER_1] = PC_AUTOPLAY;
m_Player.Load( PLAYER_1, pND, &m_LifeMeter, NULL, NULL, NULL );
m_Player.Load( PLAYER_1, pND, &m_LifeMeter, NULL, NULL, NULL, NULL, NULL );
m_Player.SetX( 480 );
m_Player.DontShowJudgement();
+4 -4
View File
@@ -60,7 +60,7 @@ void ScreenRaveOptions::ImportOptions()
{
if( GAMESTATE->IsHumanPlayer(p) )
{
int iHumanSuperIndex = (int)SCALE( GAMESTATE->m_fSuperMeterGrowth[p], 0.25f, 2.f, 0.f, 7.f );
int iHumanSuperIndex = (int)SCALE( GAMESTATE->m_fSuperMeterGrowthScale[p], 0.25f, 2.f, 0.f, 7.f );
CLAMP( iHumanSuperIndex, 0, 9 );
m_iSelectedOption[p][RO_HUMAN_SUPER] = iHumanSuperIndex;
}
@@ -71,7 +71,7 @@ void ScreenRaveOptions::ImportOptions()
m_iSelectedOption[pnHuman][RO_CPU_SKILL] = GAMESTATE->m_iCpuSkill[p];
CLAMP( m_iSelectedOption[pnHuman][RO_CPU_SKILL], 0, 10 );
int iHumanSuperIndex = (int)SCALE( GAMESTATE->m_fSuperMeterGrowth[pnHuman], 0.25f, 2.f, 0.f, 7.f );
int iHumanSuperIndex = (int)SCALE( GAMESTATE->m_fSuperMeterGrowthScale[pnHuman], 0.25f, 2.f, 0.f, 7.f );
CLAMP( iHumanSuperIndex, 0, 9 );
m_iSelectedOption[pnHuman][RO_CPU_SUPER] = iHumanSuperIndex;
}
@@ -86,11 +86,11 @@ void ScreenRaveOptions::ExportOptions()
{
if( GAMESTATE->IsHumanPlayer(p) )
{
GAMESTATE->m_fSuperMeterGrowth[p] = SCALE( m_iSelectedOption[p][RO_HUMAN_SUPER], 0.f, 7.f, 0.25f, 2.f );
GAMESTATE->m_fSuperMeterGrowthScale[p] = SCALE( m_iSelectedOption[p][RO_HUMAN_SUPER], 0.f, 7.f, 0.25f, 2.f );
PlayerNumber pnCPU = OPPOSITE_PLAYER[p];
GAMESTATE->m_iCpuSkill[pnCPU] = m_iSelectedOption[p][RO_CPU_SKILL];
GAMESTATE->m_fSuperMeterGrowth[pnCPU] = SCALE( m_iSelectedOption[p][RO_CPU_SUPER], 0, 7, 0.25f, 2.f );
GAMESTATE->m_fSuperMeterGrowthScale[pnCPU] = SCALE( m_iSelectedOption[p][RO_CPU_SUPER], 0, 7, 0.25f, 2.f );
}
}
}
+3 -2
View File
@@ -422,12 +422,13 @@ void SongManager::InitMachineScoresFromDisk()
// course ranking
ReadCourseRankingsFromFile( COURSE_RANKING_FILE );
int c;
// notes scores
for( int c=0; c<NUM_MEMORY_CARDS; c++ )
for( c=0; c<NUM_MEMORY_CARDS; c++ )
ReadNoteScoresFromFile( NOTES_SCORES_FILE[c], c );
// course scores
for( int c=0; c<NUM_MEMORY_CARDS; c++ )
for( c=0; c<NUM_MEMORY_CARDS; c++ )
ReadCourseScoresFromFile( COURSE_SCORES_FILE[c], c );
}
+59 -81
View File
@@ -1,5 +1,5 @@
# Microsoft Developer Studio Project File - Name="StepMania" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# Microsoft Developer Studio Generated Build File, Format Version 60000
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Application" 0x0101
@@ -61,7 +61,7 @@ LINK32=link.exe
# SUBTRACT LINK32 /verbose /profile /pdb:none /incremental:no /nodefaultlib
# Begin Special Build Tool
IntDir=.\../Debug6
TargetDir=\temp\stepmania
TargetDir=\stepmania\stepmania
TargetName=StepMania-debug
SOURCE="$(InputPath)"
PreLink_Cmds=disasm\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\
@@ -100,7 +100,11 @@ XBCP=xbecopy.exe
# ADD BASE XBCP /NOLOGO
# ADD XBCP /NOLOGO
# Begin Special Build Tool
PreLink_Cmds=disasm\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\
IntDir=.\StepMania___Xbox_Debug___VC6
TargetDir=.\StepMania___Xbox_Debug___VC6
TargetName=StepMania
SOURCE="$(InputPath)"
PreLink_Cmds=disasm\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\
PostBuild_Cmds=disasm\mapconv $(IntDir)\$(TargetName).map $(TargetDir)\StepMania.vdi ia32.vdi
# End Special Build Tool
@@ -137,7 +141,7 @@ LINK32=link.exe
# SUBTRACT LINK32 /verbose /pdb:none
# Begin Special Build Tool
IntDir=.\../Release6
TargetDir=\temp\stepmania
TargetDir=\stepmania\stepmania
TargetName=StepMania
SOURCE="$(InputPath)"
PreLink_Cmds=disasm\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\
@@ -1189,23 +1193,6 @@ SOURCE=.\RandomSample.h
# End Source File
# Begin Source File
SOURCE=.\RaveHelper.cpp
!IF "$(CFG)" == "StepMania - Win32 Debug"
!ELSEIF "$(CFG)" == "StepMania - Xbox Debug"
!ELSEIF "$(CFG)" == "StepMania - Win32 Release"
!ENDIF
# End Source File
# Begin Source File
SOURCE=.\RaveHelper.h
# End Source File
# Begin Source File
SOURCE=.\Song.cpp
!IF "$(CFG)" == "StepMania - Win32 Debug"
@@ -2293,6 +2280,40 @@ SOURCE=.\Background.h
# End Source File
# Begin Source File
SOURCE=.\CombinedLifeMeterEnemy.cpp
!IF "$(CFG)" == "StepMania - Win32 Debug"
!ELSEIF "$(CFG)" == "StepMania - Xbox Debug"
!ELSEIF "$(CFG)" == "StepMania - Win32 Release"
!ENDIF
# End Source File
# Begin Source File
SOURCE=.\CombinedLifeMeterEnemy.h
# End Source File
# Begin Source File
SOURCE=.\CombinedLifeMeterTug.cpp
!IF "$(CFG)" == "StepMania - Win32 Debug"
!ELSEIF "$(CFG)" == "StepMania - Xbox Debug"
!ELSEIF "$(CFG)" == "StepMania - Win32 Release"
!ENDIF
# End Source File
# Begin Source File
SOURCE=.\CombinedLifeMeterTug.h
# End Source File
# Begin Source File
SOURCE=.\Combo.cpp
!IF "$(CFG)" == "StepMania - Win32 Debug"
@@ -2327,40 +2348,6 @@ SOURCE=.\DancingCharacters.h
# End Source File
# Begin Source File
SOURCE=.\EnemyFace.cpp
!IF "$(CFG)" == "StepMania - Win32 Debug"
!ELSEIF "$(CFG)" == "StepMania - Xbox Debug"
!ELSEIF "$(CFG)" == "StepMania - Win32 Release"
!ENDIF
# End Source File
# Begin Source File
SOURCE=.\EnemyFace.h
# End Source File
# Begin Source File
SOURCE=.\EnemyHealth.cpp
!IF "$(CFG)" == "StepMania - Win32 Debug"
!ELSEIF "$(CFG)" == "StepMania - Xbox Debug"
!ELSEIF "$(CFG)" == "StepMania - Win32 Release"
!ENDIF
# End Source File
# Begin Source File
SOURCE=.\EnemyHealth.h
# End Source File
# Begin Source File
SOURCE=.\GhostArrow.cpp
!IF "$(CFG)" == "StepMania - Win32 Debug"
@@ -2497,19 +2484,6 @@ SOURCE=.\Judgment.h
# End Source File
# Begin Source File
SOURCE=.\LifeMeter.cpp
!IF "$(CFG)" == "StepMania - Win32 Debug"
!ELSEIF "$(CFG)" == "StepMania - Xbox Debug"
!ELSEIF "$(CFG)" == "StepMania - Win32 Release"
!ENDIF
# End Source File
# Begin Source File
SOURCE=.\LifeMeter.h
# End Source File
# Begin Source File
@@ -2701,19 +2675,6 @@ SOURCE=.\ScoreDisplayRave.h
# End Source File
# Begin Source File
SOURCE=.\ScoreKeeper.cpp
!IF "$(CFG)" == "StepMania - Win32 Debug"
!ELSEIF "$(CFG)" == "StepMania - Xbox Debug"
!ELSEIF "$(CFG)" == "StepMania - Win32 Release"
!ENDIF
# End Source File
# Begin Source File
SOURCE=.\ScoreKeeper.h
# End Source File
# Begin Source File
@@ -2735,6 +2696,23 @@ SOURCE=.\ScoreKeeperMAX2.h
# End Source File
# Begin Source File
SOURCE=.\ScoreKeeperRave.cpp
!IF "$(CFG)" == "StepMania - Win32 Debug"
!ELSEIF "$(CFG)" == "StepMania - Xbox Debug"
!ELSEIF "$(CFG)" == "StepMania - Win32 Release"
!ENDIF
# End Source File
# Begin Source File
SOURCE=.\ScoreKeeperRave.h
# End Source File
# Begin Source File
SOURCE=.\TimingAssist.cpp
!IF "$(CFG)" == "StepMania - Win32 Debug"
@@ -30,14 +30,15 @@ bool RageMovieTexture::GetFourCC( CString fn, CString &handler, CString &type )
f.seekg( 0x70, ios_base::beg );
type = " ";
f.read((char *) type.c_str(), 4);
for(int i = 0; i < 4; ++i)
int i;
for( i = 0; i < 4; ++i)
if(type[i] < 0x20 || type[i] > 0x7E) type[i] = '?';
f.seekg( 0xBC, ios_base::beg );
handler = " ";
f.read((char *) handler.c_str(), 4);
for(int i = 0; i < 4; ++i)
for(i = 0; i < 4; ++i)
if(handler[i] < 0x20 || handler[i] > 0x7E) handler[i] = '?';
} catch(ifstream::failure e) {
LOG->Warn("error on %s: %s", fn.c_str(), e.what() );