2003-04-05 03:49:03 +00:00
|
|
|
#include "global.h"
|
2004-04-05 05:22:32 +00:00
|
|
|
#include <cstdlib>
|
2003-04-05 03:49:03 +00:00
|
|
|
#include "ScreenHowToPlay.h"
|
|
|
|
|
#include "ThemeManager.h"
|
|
|
|
|
#include "GameState.h"
|
2004-07-25 17:07:32 +00:00
|
|
|
#include "Game.h"
|
2003-04-05 03:49:03 +00:00
|
|
|
#include "RageLog.h"
|
2003-08-20 09:57:19 +00:00
|
|
|
#include "RageDisplay.h"
|
2003-04-05 03:49:03 +00:00
|
|
|
#include "SongManager.h"
|
2005-07-03 02:48:38 +00:00
|
|
|
#include "Steps.h"
|
2003-04-05 03:49:03 +00:00
|
|
|
#include "NoteFieldPositioning.h"
|
2003-05-26 09:18:44 +00:00
|
|
|
#include "GameManager.h"
|
2003-09-08 17:11:52 +00:00
|
|
|
#include "NotesLoaderSM.h"
|
2004-07-08 00:10:34 +00:00
|
|
|
#include "GameSoundManager.h"
|
2004-08-19 01:18:11 +00:00
|
|
|
#include "Model.h"
|
2004-11-06 23:13:47 +00:00
|
|
|
#include "ThemeMetric.h"
|
2004-12-20 06:25:59 +00:00
|
|
|
#include "PlayerState.h"
|
2005-01-15 02:01:26 +00:00
|
|
|
#include "Style.h"
|
2005-02-09 05:27:51 +00:00
|
|
|
#include "ActorUtil.h"
|
2005-07-04 20:52:21 +00:00
|
|
|
#include "PrefsManager.h"
|
2005-08-14 12:06:40 +00:00
|
|
|
#include "CharacterManager.h"
|
2005-08-23 21:04:35 +00:00
|
|
|
#include "StatsManager.h"
|
2003-04-05 03:49:03 +00:00
|
|
|
|
2004-11-06 23:13:47 +00:00
|
|
|
static const ThemeMetric<CString> STEPFILE ("ScreenHowToPlay","Stepfile");
|
2005-10-08 00:57:40 +00:00
|
|
|
static const ThemeMetric<int> NUM_TIER2S ("ScreenHowToPlay","NumTier2s");
|
2004-11-06 23:13:47 +00:00
|
|
|
static const ThemeMetric<int> NUM_MISSES ("ScreenHowToPlay","NumMisses");
|
|
|
|
|
static const ThemeMetric<bool> USELIFEBAR ("ScreenHowToPlay","UseLifeMeterBar");
|
|
|
|
|
static const ThemeMetric<bool> USECHARACTER ("ScreenHowToPlay","UseCharacter");
|
|
|
|
|
static const ThemeMetric<bool> USEPAD ("ScreenHowToPlay","UsePad");
|
|
|
|
|
static const ThemeMetric<bool> USEPLAYER ("ScreenHowToPlay","UseNotefield");
|
2003-04-05 03:49:03 +00:00
|
|
|
|
2003-09-12 00:47:20 +00:00
|
|
|
enum Animation
|
|
|
|
|
{
|
|
|
|
|
ANIM_DANCE_PAD,
|
|
|
|
|
ANIM_DANCE_PADS,
|
|
|
|
|
ANIM_UP,
|
|
|
|
|
ANIM_DOWN,
|
|
|
|
|
ANIM_LEFT,
|
|
|
|
|
ANIM_RIGHT,
|
|
|
|
|
ANIM_JUMPLR,
|
|
|
|
|
NUM_ANIMATIONS
|
|
|
|
|
};
|
|
|
|
|
|
2004-11-06 23:13:47 +00:00
|
|
|
static const CString anims[NUM_ANIMATIONS] =
|
2003-09-12 00:47:20 +00:00
|
|
|
{
|
2005-10-07 05:00:52 +00:00
|
|
|
"DancePad.txt",
|
|
|
|
|
"DancePads.txt",
|
2003-09-12 00:47:20 +00:00
|
|
|
"BeginnerHelper_step-up.bones.txt",
|
2003-09-15 07:31:26 +00:00
|
|
|
"BeginnerHelper_step-down.bones.txt",
|
|
|
|
|
"BeginnerHelper_step-left.bones.txt",
|
2003-09-12 00:47:20 +00:00
|
|
|
"BeginnerHelper_step-right.bones.txt",
|
|
|
|
|
"BeginnerHelper_step-jumplr.bones.txt"
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static CString GetAnimPath( Animation a )
|
|
|
|
|
{
|
2003-12-10 09:26:05 +00:00
|
|
|
return CString("Characters/") + anims[a];
|
2003-09-12 00:47:20 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static bool HaveAllCharAnimations()
|
|
|
|
|
{
|
|
|
|
|
for( int i = ANIM_UP; i < NUM_ANIMATIONS; ++i )
|
|
|
|
|
if( !DoesFileExist( GetAnimPath( (Animation) i ) ) )
|
|
|
|
|
return false;
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
2004-11-26 17:28:47 +00:00
|
|
|
REGISTER_SCREEN_CLASS( ScreenHowToPlay );
|
2003-09-27 22:30:51 +00:00
|
|
|
ScreenHowToPlay::ScreenHowToPlay( CString sName ) : ScreenAttract( sName )
|
2003-04-05 03:49:03 +00:00
|
|
|
{
|
2005-10-08 00:57:40 +00:00
|
|
|
m_iTier2s = 0;
|
|
|
|
|
m_iNumTier2s = NUM_TIER2S;
|
2003-09-08 17:11:52 +00:00
|
|
|
|
2003-09-08 17:49:44 +00:00
|
|
|
// initialize these because they might not be used.
|
|
|
|
|
m_pPlayer = NULL;
|
|
|
|
|
m_pLifeMeterBar = NULL;
|
|
|
|
|
m_pmCharacter = NULL;
|
|
|
|
|
m_pmDancePad = NULL;
|
2005-02-23 06:29:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void ScreenHowToPlay::Init()
|
|
|
|
|
{
|
|
|
|
|
ScreenAttract::Init();
|
2003-09-08 17:49:44 +00:00
|
|
|
|
2004-11-06 23:13:47 +00:00
|
|
|
if( (bool)USEPAD && DoesFileExist( GetAnimPath(ANIM_DANCE_PAD) ) )
|
2003-08-27 14:40:41 +00:00
|
|
|
{
|
2003-09-08 17:49:44 +00:00
|
|
|
m_pmDancePad = new Model;
|
2004-11-06 23:54:34 +00:00
|
|
|
m_pmDancePad->SetName( "Pad" );
|
2003-09-12 00:47:20 +00:00
|
|
|
m_pmDancePad->LoadMilkshapeAscii( GetAnimPath(ANIM_DANCE_PAD) );
|
2003-09-08 17:49:44 +00:00
|
|
|
m_pmDancePad->SetRotationX( 35 );
|
2004-11-06 23:54:34 +00:00
|
|
|
SET_XY_AND_ON_COMMAND( m_pmDancePad );
|
2003-08-27 14:40:41 +00:00
|
|
|
}
|
2003-09-08 17:11:52 +00:00
|
|
|
|
2003-09-01 11:21:52 +00:00
|
|
|
// Display random character
|
2005-08-14 12:06:40 +00:00
|
|
|
vector<Character*> vpCharacters;
|
|
|
|
|
CHARMAN->GetCharacters( vpCharacters );
|
|
|
|
|
if( (bool)USECHARACTER && vpCharacters.size() && HaveAllCharAnimations() )
|
2003-07-31 11:31:24 +00:00
|
|
|
{
|
2005-08-14 12:06:40 +00:00
|
|
|
Character* rndchar = CHARMAN->GetRandomCharacter();
|
2003-08-25 00:45:12 +00:00
|
|
|
|
2003-10-12 20:00:22 +00:00
|
|
|
CString sModelPath = rndchar->GetModelPath();
|
|
|
|
|
if( sModelPath != "" )
|
|
|
|
|
{
|
|
|
|
|
m_pmCharacter = new Model;
|
2004-12-06 06:22:32 +00:00
|
|
|
m_pmCharacter->SetName( "Character" );
|
2003-10-12 20:00:22 +00:00
|
|
|
m_pmCharacter->LoadMilkshapeAscii( rndchar->GetModelPath() );
|
|
|
|
|
m_pmCharacter->LoadMilkshapeAsciiBones( "Step-LEFT", GetAnimPath( ANIM_LEFT ) );
|
|
|
|
|
m_pmCharacter->LoadMilkshapeAsciiBones( "Step-DOWN", GetAnimPath( ANIM_DOWN ) );
|
|
|
|
|
m_pmCharacter->LoadMilkshapeAsciiBones( "Step-UP", GetAnimPath( ANIM_UP ) );
|
|
|
|
|
m_pmCharacter->LoadMilkshapeAsciiBones( "Step-RIGHT", GetAnimPath( ANIM_RIGHT ) );
|
|
|
|
|
m_pmCharacter->LoadMilkshapeAsciiBones( "Step-JUMPLR", GetAnimPath( ANIM_JUMPLR ) );
|
|
|
|
|
m_pmCharacter->LoadMilkshapeAsciiBones( "rest",rndchar->GetRestAnimationPath() );
|
|
|
|
|
m_pmCharacter->SetDefaultAnimation( "rest" );
|
|
|
|
|
m_pmCharacter->PlayAnimation( "rest" );
|
|
|
|
|
m_pmCharacter->m_bRevertToDefaultAnimation = true; // Stay bouncing after a step has finished animating.
|
|
|
|
|
|
|
|
|
|
m_pmCharacter->SetRotationX( 40 );
|
2005-10-07 05:00:52 +00:00
|
|
|
m_pmCharacter->SetCullMode( CULL_NONE ); // many of the models floating around have the vertex order flipped
|
2004-11-06 23:54:34 +00:00
|
|
|
SET_XY_AND_ON_COMMAND( m_pmCharacter );
|
2003-10-12 20:00:22 +00:00
|
|
|
}
|
2003-07-31 11:31:24 +00:00
|
|
|
}
|
2003-09-08 17:11:52 +00:00
|
|
|
|
|
|
|
|
// silly to use the lifebar without a player, since the player updates the lifebar
|
2003-09-08 17:49:44 +00:00
|
|
|
if( USELIFEBAR )
|
2003-09-08 17:11:52 +00:00
|
|
|
{
|
2003-09-08 17:49:44 +00:00
|
|
|
m_pLifeMeterBar = new LifeMeterBar;
|
2004-11-06 23:54:34 +00:00
|
|
|
m_pLifeMeterBar->SetName("LifeMeterBar");
|
2005-08-23 21:04:35 +00:00
|
|
|
m_pLifeMeterBar->Load( GAMESTATE->m_pPlayerState[PLAYER_1], &STATSMAN->m_CurStageStats.m_player[PLAYER_1] );
|
2004-11-06 23:54:34 +00:00
|
|
|
SET_XY_AND_ON_COMMAND( m_pLifeMeterBar );
|
2005-10-08 00:57:40 +00:00
|
|
|
m_pLifeMeterBar->FillForHowToPlay( NUM_TIER2S, NUM_MISSES );
|
2003-09-08 17:11:52 +00:00
|
|
|
}
|
2003-07-31 11:31:24 +00:00
|
|
|
|
2005-05-07 08:34:20 +00:00
|
|
|
GAMESTATE->m_pCurStyle.Set( GAMEMAN->GetHowToPlayStyleForGame(GAMESTATE->m_pCurGame) );
|
2003-04-05 03:49:03 +00:00
|
|
|
|
2004-05-16 12:42:26 +00:00
|
|
|
if( USEPLAYER )
|
|
|
|
|
{
|
|
|
|
|
SMLoader smfile;
|
2005-09-03 02:08:27 +00:00
|
|
|
smfile.LoadFromSMFile( THEME->GetPathO("", STEPFILE), m_Song, false );
|
2004-05-16 12:42:26 +00:00
|
|
|
m_Song.AddAutoGenNotes();
|
2003-11-01 19:50:43 +00:00
|
|
|
|
2004-06-28 07:26:00 +00:00
|
|
|
const Style* pStyle = GAMESTATE->GetCurrentStyle();
|
2004-05-16 12:42:26 +00:00
|
|
|
|
2004-07-12 22:57:37 +00:00
|
|
|
Steps *pSteps = m_Song.GetStepsByDescription( pStyle->m_StepsType, "" );
|
|
|
|
|
ASSERT_M( pSteps != NULL, ssprintf("%i", pStyle->m_StepsType) );
|
2003-11-01 19:50:43 +00:00
|
|
|
|
2004-10-23 17:43:49 +00:00
|
|
|
NoteData tempNoteData;
|
|
|
|
|
pSteps->GetNoteData( tempNoteData );
|
|
|
|
|
pStyle->GetTransformedNoteDataForStyle( PLAYER_1, tempNoteData, m_NoteData );
|
2003-05-19 08:18:21 +00:00
|
|
|
|
2005-02-24 12:27:30 +00:00
|
|
|
GAMESTATE->m_pCurSong.Set( &m_Song );
|
2004-05-16 12:42:26 +00:00
|
|
|
GAMESTATE->m_bPastHereWeGo = true;
|
2004-12-20 06:25:59 +00:00
|
|
|
GAMESTATE->m_pPlayerState[PLAYER_1]->m_PlayerController = PC_AUTOPLAY;
|
2003-08-27 08:02:51 +00:00
|
|
|
|
2003-09-08 17:49:44 +00:00
|
|
|
m_pPlayer = new Player;
|
2005-01-15 01:28:29 +00:00
|
|
|
m_pPlayer->Init(
|
2005-02-26 05:59:12 +00:00
|
|
|
"Player",
|
2004-12-22 07:31:27 +00:00
|
|
|
GAMESTATE->m_pPlayerState[PLAYER_1],
|
|
|
|
|
NULL,
|
|
|
|
|
m_pLifeMeterBar,
|
|
|
|
|
NULL,
|
|
|
|
|
NULL,
|
|
|
|
|
NULL,
|
|
|
|
|
NULL,
|
|
|
|
|
NULL,
|
|
|
|
|
NULL );
|
2005-01-15 01:28:29 +00:00
|
|
|
m_pPlayer->Load( m_NoteData );
|
2004-12-04 21:14:25 +00:00
|
|
|
m_pPlayer->SetName( "Player" );
|
2003-09-08 17:49:44 +00:00
|
|
|
this->AddChild( m_pPlayer );
|
2004-12-04 21:14:25 +00:00
|
|
|
SET_XY_AND_ON_COMMAND( m_pPlayer );
|
2004-05-16 12:42:26 +00:00
|
|
|
|
|
|
|
|
// Don't show judgement
|
2004-12-20 06:25:59 +00:00
|
|
|
GAMESTATE->m_pPlayerState[PLAYER_1]->m_PlayerOptions.m_fBlind = 1;
|
2004-05-16 12:42:26 +00:00
|
|
|
GAMESTATE->m_MasterPlayerNumber = PLAYER_1;
|
|
|
|
|
GAMESTATE->m_bDemonstrationOrJukebox = true;
|
2003-09-08 17:49:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// deferred until after the player, so the notes go under it
|
|
|
|
|
if( m_pLifeMeterBar )
|
|
|
|
|
this->AddChild( m_pLifeMeterBar );
|
2003-08-27 08:02:51 +00:00
|
|
|
|
2003-04-05 03:49:03 +00:00
|
|
|
m_fFakeSecondsIntoSong = 0;
|
2003-08-27 08:02:51 +00:00
|
|
|
|
|
|
|
|
this->MoveToTail( &m_In );
|
|
|
|
|
this->MoveToTail( &m_Out );
|
2003-04-05 03:49:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ScreenHowToPlay::~ScreenHowToPlay()
|
|
|
|
|
{
|
2003-09-12 00:23:54 +00:00
|
|
|
delete m_pLifeMeterBar;
|
|
|
|
|
delete m_pmCharacter;
|
|
|
|
|
delete m_pmDancePad;
|
|
|
|
|
delete m_pPlayer;
|
2003-04-05 03:49:03 +00:00
|
|
|
}
|
|
|
|
|
|
2003-09-12 00:30:18 +00:00
|
|
|
void ScreenHowToPlay::Step()
|
2003-09-08 17:11:52 +00:00
|
|
|
{
|
2003-09-12 00:39:40 +00:00
|
|
|
#define ST_LEFT 0x01
|
|
|
|
|
#define ST_DOWN 0x02
|
|
|
|
|
#define ST_UP 0x04
|
|
|
|
|
#define ST_RIGHT 0x08
|
2003-09-08 17:11:52 +00:00
|
|
|
#define ST_JUMPLR (ST_LEFT | ST_RIGHT)
|
|
|
|
|
#define ST_JUMPUD (ST_UP | ST_DOWN)
|
|
|
|
|
|
|
|
|
|
int iStep = 0;
|
2003-09-12 00:39:40 +00:00
|
|
|
const int iNoteRow = BeatToNoteRowNotRounded( GAMESTATE->m_fSongBeat + 0.6f );
|
2003-09-08 17:11:52 +00:00
|
|
|
// if we want to miss from here on out, don't process steps.
|
2005-10-08 00:57:40 +00:00
|
|
|
if( m_iTier2s < m_iNumTier2s && m_NoteData.IsThereATapAtRow( iNoteRow ) )
|
2003-09-08 17:11:52 +00:00
|
|
|
{
|
2003-09-12 00:39:40 +00:00
|
|
|
const int iNumTracks = m_NoteData.GetNumTracks();
|
2003-09-08 17:11:52 +00:00
|
|
|
for( int k=0; k<iNumTracks; k++ )
|
2004-09-12 05:56:24 +00:00
|
|
|
if( m_NoteData.GetTapNote(k, iNoteRow).type == TapNote::tap )
|
2003-09-12 00:39:40 +00:00
|
|
|
iStep |= 1 << k;
|
2003-09-08 17:11:52 +00:00
|
|
|
|
|
|
|
|
switch( iStep )
|
|
|
|
|
{
|
2003-09-08 17:49:44 +00:00
|
|
|
case ST_LEFT: m_pmCharacter->PlayAnimation( "Step-LEFT", 1.8f ); break;
|
|
|
|
|
case ST_RIGHT: m_pmCharacter->PlayAnimation( "Step-RIGHT", 1.8f ); break;
|
|
|
|
|
case ST_UP: m_pmCharacter->PlayAnimation( "Step-UP", 1.8f ); break;
|
|
|
|
|
case ST_DOWN: m_pmCharacter->PlayAnimation( "Step-DOWN", 1.8f ); break;
|
|
|
|
|
case ST_JUMPLR: m_pmCharacter->PlayAnimation( "Step-JUMPLR", 1.8f ); break;
|
2003-09-08 17:11:52 +00:00
|
|
|
case ST_JUMPUD:
|
|
|
|
|
// Until I can get an UP+DOWN jump animation, this will have to do.
|
2003-09-08 17:49:44 +00:00
|
|
|
m_pmCharacter->PlayAnimation( "Step-JUMPLR", 1.8f );
|
2003-09-08 17:11:52 +00:00
|
|
|
|
2003-09-08 17:49:44 +00:00
|
|
|
m_pmCharacter->StopTweening();
|
|
|
|
|
m_pmCharacter->BeginTweening( GAMESTATE->m_fCurBPS /8, TWEEN_LINEAR );
|
|
|
|
|
m_pmCharacter->SetRotationY( 90 );
|
|
|
|
|
m_pmCharacter->BeginTweening( (1/(GAMESTATE->m_fCurBPS * 2) ) ); //sleep between jump-frames
|
|
|
|
|
m_pmCharacter->BeginTweening( GAMESTATE->m_fCurBPS /6, TWEEN_LINEAR );
|
|
|
|
|
m_pmCharacter->SetRotationY( 0 );
|
2003-09-08 17:11:52 +00:00
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2003-04-05 03:49:03 +00:00
|
|
|
void ScreenHowToPlay::Update( float fDelta )
|
|
|
|
|
{
|
2003-05-28 03:33:46 +00:00
|
|
|
if(GAMESTATE->m_pCurSong != NULL)
|
|
|
|
|
{
|
2003-12-18 06:14:47 +00:00
|
|
|
GAMESTATE->UpdateSongPosition( m_fFakeSecondsIntoSong, GAMESTATE->m_pCurSong->m_Timing );
|
2003-05-28 03:33:46 +00:00
|
|
|
m_fFakeSecondsIntoSong += fDelta;
|
2003-08-20 09:57:19 +00:00
|
|
|
|
2003-09-08 17:11:52 +00:00
|
|
|
static int iLastNoteRowCounted = 0;
|
|
|
|
|
int iCurNoteRow = BeatToNoteRowNotRounded( GAMESTATE->m_fSongBeat );
|
|
|
|
|
|
2003-09-08 17:49:44 +00:00
|
|
|
if(( iCurNoteRow != iLastNoteRowCounted ) &&(m_NoteData.IsThereATapAtRow( iCurNoteRow )))
|
2003-09-08 17:11:52 +00:00
|
|
|
{
|
2003-09-08 18:05:00 +00:00
|
|
|
if( m_pLifeMeterBar && !m_pPlayer )
|
|
|
|
|
{
|
2005-10-08 00:57:40 +00:00
|
|
|
if ( m_iTier2s < m_iNumTier2s )
|
|
|
|
|
m_pLifeMeterBar->ChangeLife(TNS_Tier2);
|
2003-09-08 18:05:00 +00:00
|
|
|
else
|
2005-10-08 00:57:40 +00:00
|
|
|
m_pLifeMeterBar->ChangeLife(TNS_Miss);
|
2003-09-08 18:05:00 +00:00
|
|
|
}
|
2005-10-08 00:57:40 +00:00
|
|
|
m_iTier2s++;
|
2003-09-08 17:11:52 +00:00
|
|
|
iLastNoteRowCounted = iCurNoteRow;
|
|
|
|
|
}
|
|
|
|
|
|
2004-05-16 12:42:26 +00:00
|
|
|
// once we hit the number of perfects we want, we want to fail.
|
|
|
|
|
// switch the controller to HUMAN. since we aren't taking input,
|
|
|
|
|
// the steps will always be misses.
|
2005-10-08 00:57:40 +00:00
|
|
|
if(m_iTier2s > m_iNumTier2s)
|
2004-12-20 06:25:59 +00:00
|
|
|
GAMESTATE->m_pPlayerState[PLAYER_1]->m_PlayerController = PC_HUMAN;
|
2003-09-01 11:21:52 +00:00
|
|
|
|
2003-09-08 17:49:44 +00:00
|
|
|
if ( m_pmCharacter )
|
2003-07-31 11:31:24 +00:00
|
|
|
{
|
2003-09-12 00:30:18 +00:00
|
|
|
Step();
|
|
|
|
|
if( !GAMESTATE->m_bFreeze )
|
|
|
|
|
m_pmCharacter->Update( fDelta );
|
2003-08-27 08:02:51 +00:00
|
|
|
}
|
2003-05-28 03:33:46 +00:00
|
|
|
}
|
2003-05-19 08:18:21 +00:00
|
|
|
|
2003-09-08 17:49:44 +00:00
|
|
|
if( m_pmDancePad )
|
|
|
|
|
m_pmDancePad->Update( fDelta );
|
2003-09-01 11:21:52 +00:00
|
|
|
|
2003-04-05 03:49:03 +00:00
|
|
|
ScreenAttract::Update( fDelta );
|
2003-05-19 08:18:21 +00:00
|
|
|
}
|
2003-05-26 09:18:44 +00:00
|
|
|
|
|
|
|
|
void ScreenHowToPlay::HandleScreenMessage( const ScreenMessage SM )
|
|
|
|
|
{
|
|
|
|
|
switch( SM )
|
|
|
|
|
{
|
2004-01-30 20:29:24 +00:00
|
|
|
case SM_GainFocus:
|
|
|
|
|
/* We do this ourself. */
|
|
|
|
|
SOUND->HandleSongTimer( false );
|
|
|
|
|
break;
|
|
|
|
|
case SM_LoseFocus:
|
|
|
|
|
SOUND->HandleSongTimer( true );
|
|
|
|
|
break;
|
2003-08-25 15:57:52 +00:00
|
|
|
case SM_GoToNextScreen:
|
|
|
|
|
GAMESTATE->Reset();
|
2003-05-26 09:18:44 +00:00
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
ScreenAttract::HandleScreenMessage( SM );
|
|
|
|
|
}
|
2003-08-20 09:57:19 +00:00
|
|
|
|
|
|
|
|
void ScreenHowToPlay::DrawPrimitives()
|
|
|
|
|
{
|
|
|
|
|
Screen::DrawPrimitives();
|
2003-08-27 08:02:51 +00:00
|
|
|
|
2003-09-08 17:49:44 +00:00
|
|
|
if( m_pmDancePad || m_pmCharacter )
|
2003-09-01 11:21:52 +00:00
|
|
|
{
|
2004-06-19 04:37:37 +00:00
|
|
|
if(PREFSMAN->m_bCelShadeModels)
|
|
|
|
|
{
|
|
|
|
|
if( m_pmDancePad ) m_pmDancePad->DrawCelShaded();
|
|
|
|
|
if( m_pmCharacter ) m_pmCharacter->DrawCelShaded();
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
2004-06-18 11:02:40 +00:00
|
|
|
DISPLAY->SetLighting( true );
|
|
|
|
|
DISPLAY->SetLightDirectional(
|
|
|
|
|
0,
|
|
|
|
|
RageColor(0.5,0.5,0.5,1),
|
|
|
|
|
RageColor(1,1,1,1),
|
|
|
|
|
RageColor(0,0,0,1),
|
|
|
|
|
RageVector3(0, 0, 1) );
|
|
|
|
|
|
2004-06-19 04:37:37 +00:00
|
|
|
if( m_pmCharacter ) m_pmCharacter->Draw();
|
|
|
|
|
if( m_pmDancePad ) m_pmDancePad->Draw();
|
|
|
|
|
|
|
|
|
|
DISPLAY->SetLightOff( 0 );
|
|
|
|
|
DISPLAY->SetLighting( false );
|
2004-06-18 11:02:40 +00:00
|
|
|
}
|
|
|
|
|
|
2003-09-08 18:20:59 +00:00
|
|
|
m_In.DrawPrimitives();
|
|
|
|
|
m_Out.DrawPrimitives();
|
|
|
|
|
}
|
2003-08-20 14:31:55 +00:00
|
|
|
}
|
2004-06-08 05:22:33 +00:00
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* (c) 2001-2004 Chris Danford
|
|
|
|
|
* All rights reserved.
|
|
|
|
|
*
|
|
|
|
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
|
|
|
|
* copy of this software and associated documentation files (the
|
|
|
|
|
* "Software"), to deal in the Software without restriction, including
|
|
|
|
|
* without limitation the rights to use, copy, modify, merge, publish,
|
|
|
|
|
* distribute, and/or sell copies of the Software, and to permit persons to
|
|
|
|
|
* whom the Software is furnished to do so, provided that the above
|
|
|
|
|
* copyright notice(s) and this permission notice appear in all copies of
|
|
|
|
|
* the Software and that both the above copyright notice(s) and this
|
|
|
|
|
* permission notice appear in supporting documentation.
|
|
|
|
|
*
|
|
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
|
|
|
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
|
|
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
|
|
|
|
* THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
|
|
|
|
|
* INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT
|
|
|
|
|
* OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
|
|
|
|
|
* OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
|
|
* OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
|
|
|
* PERFORMANCE OF THIS SOFTWARE.
|
|
|
|
|
*/
|