Files
itgmania212121/stepmania/src/ScreenCaution.cpp
T

70 lines
1.8 KiB
C++
Raw Normal View History

2002-05-20 08:59:37 +00:00
#include "stdafx.h"
/*
-----------------------------------------------------------------------------
File: ScreenCaution.h
Desc: Screen that displays while resources are being loaded.
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
-----------------------------------------------------------------------------
*/
#include "ScreenCaution.h"
#include "GameConstantsAndTypes.h"
#include "ScreenSelectStyle.h"
#include "RageTextureManager.h"
2002-07-23 01:41:40 +00:00
#include "PrefsManager.h"
2002-05-20 08:59:37 +00:00
#include "AnnouncerManager.h"
const ScreenMessage SM_DoneOpening = ScreenMessage(SM_User-7);
const ScreenMessage SM_StartClosing = ScreenMessage(SM_User-8);
const ScreenMessage SM_GoToSelectMusic = ScreenMessage(SM_User-9);
ScreenCaution::ScreenCaution()
{
m_sprCaution.Load( THEME->GetPathTo(GRAPHIC_CAUTION) );
m_sprCaution.StretchTo( CRect(0,0,640,480) );
2002-07-23 01:41:40 +00:00
this->AddSubActor( &m_sprCaution );
2002-05-20 08:59:37 +00:00
m_Wipe.OpenWipingRight( SM_DoneOpening );
2002-07-23 01:41:40 +00:00
this->AddSubActor( &m_Wipe );
2002-05-20 08:59:37 +00:00
this->SendScreenMessage( SM_StartClosing, 3 );
}
void ScreenCaution::Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI )
{
if( m_Wipe.IsClosing() )
return;
Screen::Input( DeviceI, type, GameI, MenuI, StyleI );
}
void ScreenCaution::HandleScreenMessage( const ScreenMessage SM )
{
switch( SM )
{
case SM_StartClosing:
2002-06-25 18:44:54 +00:00
if( !m_Wipe.IsClosing() )
m_Wipe.CloseWipingRight( SM_GoToSelectMusic );
2002-05-20 08:59:37 +00:00
break;
case SM_DoneOpening:
2002-07-11 19:02:26 +00:00
SOUND->PlayOnceStreamedFromDir( ANNOUNCER->GetPathTo(ANNOUNCER_CAUTION) );
2002-05-20 08:59:37 +00:00
break;
case SM_GoToSelectMusic:
SCREENMAN->SetNewScreen( new ScreenSelectStyle );
break;
}
}
2002-05-27 18:36:01 +00:00
void ScreenCaution::MenuStart( const PlayerNumber p )
2002-05-20 08:59:37 +00:00
{
2002-06-25 18:44:54 +00:00
if( !m_Wipe.IsClosing() )
m_Wipe.CloseWipingRight( SM_GoToSelectMusic );
2002-05-20 08:59:37 +00:00
}