fixes for ScreenHowToPlay

This commit is contained in:
Thad Ward
2003-08-27 08:02:51 +00:00
parent 0edd67b70b
commit 68908aa30a
7 changed files with 48 additions and 17 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

+8 -1
View File
@@ -2138,8 +2138,15 @@ NextScreen=ScreenHowToPlay
[ScreenHowToPlay]
NextScreen=ScreenDemonstration
SongBPM=100
SecondsToShow=25
SongBPM=100
NumPerfects=4
NumMisses=6
LifeMeterBarOnCommand=x,480;y,40;addy,-60;sleep,2.4;linear,0.2;addy,60
UseCharacter=1
CharacterOnCommand=Zoom,20;X,120;Y,400;addy,-500;sleep,6.0;linear,0.4;addy,500
PadOnCommand=X,40;Y,310;Zoom,15;RotationY,180;sleep,4.7;linear,1.0;RotationY,360;Zoom,20;X,230;Y,390
PlayerOnCommand=x,480;addx,320;linear,0.3;addx,-320
[ScreenDemonstration]
SecondsToShow=30
+39 -16
View File
@@ -21,13 +21,26 @@
#include "NoteFieldPositioning.h"
#include "GameManager.h"
#define SONG_BPM THEME->GetMetricF("ScreenHowToPlay","SongBPM")
#define SECONDS_TO_SHOW THEME->GetMetricF("ScreenHowToPlay","SecondsToShow")
#define NUM_PERFECTS 4
#define NUM_MISSES 6
#define SONG_BPM THEME->GetMetricF("ScreenHowToPlay","SongBPM")
#define SECONDS_TO_SHOW THEME->GetMetricF("ScreenHowToPlay","SecondsToShow")
#define NUM_PERFECTS THEME->GetMetricI("ScreenHowToPlay","NumPerfects")
#define NUM_MISSES THEME->GetMetricI("ScreenHowToPlay","NumMisses")
#define LIFEBARONCOMMAND THEME->GetMetric ("ScreenHowToPlay","LifeMeterBarOnCommand")
#define USECHARACTER THEME->GetMetricB("ScreenHowToPlay","UseCharacter")
#define CHARACTERONCOMMAND THEME->GetMetric ("ScreenHowToPlay","CharacterOnCommand")
#define PADONCOMMAND THEME->GetMetric ("ScreenHowToPlay","PadOnCommand")
#define PLAYERONCOMMAND THEME->GetMetric ("ScreenHowToPlay","PlayerOnCommand")
ScreenHowToPlay::ScreenHowToPlay() : ScreenAttract("ScreenHowToPlay")
{
m_In.Load( THEME->GetPathToB("ScreenHowToPlay in") );
m_In.StartTransitioning();
m_Out.Load( THEME->GetPathToB("ScreenHowToPlay out") );
m_Overlay.LoadFromAniDir( THEME->GetPathToB("ScreenHowToPlay overlay") );
this->AddChild( &m_Overlay );
switch(GAMESTATE->m_CurGame) // which style should we use to demonstrate?
{
case GAME_DANCE: GAMESTATE->m_CurStyle = STYLE_DANCE_SINGLE; break;
@@ -45,22 +58,23 @@ ScreenHowToPlay::ScreenHowToPlay() : ScreenAttract("ScreenHowToPlay")
ASSERT(iNumOfTracks > 0); // crazy to have less than 1 track....
m_LifeMeterBar.Load( PLAYER_1 );
m_LifeMeterBar.SetXY( 480, 40 );
m_LifeMeterBar.Command( LIFEBARONCOMMAND );
m_LifeMeterBar.FillForHowToPlay( NUM_PERFECTS, NUM_MISSES );
m_mDancePad.LoadMilkshapeAscii("Characters" SLASH "DancePad-DDR.txt");
m_mDancePad.SetRotationX( 35 );
m_mDancePad.Command( PADONCOMMAND );
// Display random character+pad
if( GAMESTATE->m_pCharacters.size() )
if( USECHARACTER && GAMESTATE->m_pCharacters.size() )
{
Character* rndchar = GAMESTATE->GetRandomCharacter();
m_mCharacter.LoadMilkshapeAscii( rndchar->GetModelPath() );
m_mDancePad.LoadMilkshapeAscii("Characters" SLASH "DancePad-DDR.txt");
m_mCharacter.LoadMilkshapeAsciiBones("howtoplay", rndchar->GetHowToPlayAnimationPath() );
m_mCharacter.SetRotationX( 40 );
m_mDancePad.SetRotationX( 35 );
m_mCharacter.Command("X,120;Y,300;Zoom,15;RotationY,180;sleep,4.7;linear,1.0;RotationY,360;Zoom,20;X,120;Y,400");
m_mDancePad.Command("X,40;Y,310;Zoom,15;RotationY,180;sleep,4.7;linear,1.0;RotationY,360;Zoom,20;X,230;Y,390");
m_mCharacter.Command( CHARACTERONCOMMAND );
}
NoteData* pND = new NoteData;
@@ -115,9 +129,10 @@ 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_LifeMeterBar, NULL, NULL, NULL, NULL, NULL );
m_Player.SetX( 480 );
m_Player.Command( PLAYERONCOMMAND );
// Don't show judgement
GAMESTATE->m_PlayerOptions[PLAYER_1].m_fBlind = 1;
GAMESTATE->m_MasterPlayerNumber = PLAYER_1;
@@ -129,6 +144,10 @@ ScreenHowToPlay::ScreenHowToPlay() : ScreenAttract("ScreenHowToPlay")
m_fFakeSecondsIntoSong = 0;
this->ClearMessageQueue();
this->PostScreenMessage( SM_BeginFadingOut, SECONDS_TO_SHOW );
this->MoveToTail( &m_Overlay );
this->MoveToTail( &m_In );
this->MoveToTail( &m_Out );
}
ScreenHowToPlay::~ScreenHowToPlay()
@@ -196,12 +215,11 @@ void ScreenHowToPlay::Update( float fDelta )
// if we update at normal speed during a step animation, it is too slow and
// doesn't finish in time.
rate = 1.8f;
};
}
}
m_mCharacter.Update(fDelta * rate);
m_mDancePad.Update(fDelta);
m_mCharacter.Update( fDelta * rate );
m_mDancePad.Update( fDelta );
ScreenAttract::Update( fDelta );
}
@@ -219,6 +237,7 @@ void ScreenHowToPlay::HandleScreenMessage( const ScreenMessage SM )
void ScreenHowToPlay::DrawPrimitives()
{
Screen::DrawPrimitives();
DISPLAY->SetLighting( true );
DISPLAY->SetLightDirectional(
0,
@@ -232,4 +251,8 @@ void ScreenHowToPlay::DrawPrimitives()
DISPLAY->SetLightOff( 0 );
DISPLAY->SetLighting( false );
m_Overlay.DrawPrimitives();
m_In.DrawPrimitives();
m_Out.DrawPrimitives();
}
+1
View File
@@ -28,6 +28,7 @@ public:
protected:
LifeMeterBar m_LifeMeterBar;
BGAnimation m_Overlay;
Player m_Player;
Model m_mCharacter;
Model m_mDancePad;