Ez2dancer Metric Configurable Animated Style Select Backgrounds Back!!

This commit is contained in:
Andrew Livy
2002-09-13 18:06:36 +00:00
parent a0fb710580
commit 05420d9bb4
10 changed files with 145 additions and 7 deletions
+7
View File
@@ -5,6 +5,13 @@ H denotes task on hold.
TODO As of: 07:47:PM 12/09/02
* Get internet connection back (evil BT!! Changed their TOS and didn't tell me!)
* Put the graphics artists work onto the project
* Add credits for the ez2 graphics team :)
X Add PARA Gametype
X Add Ez2dancer Style Select Background Animation
TODO As of: 11:42:PM 05/09/02 TODO As of: 11:42:PM 05/09/02
+62
View File
@@ -54,6 +54,7 @@ ControllerP2Y=350
HelpText=Press $ on the pad to join HelpText=Press $ on the pad to join
TimerSeconds=40 TimerSeconds=40
NextScreen=ScreenSelectGroup NextScreen=ScreenSelectGroup
SilentWait=1
[ScreenSelectStyle] [ScreenSelectStyle]
IconsStartX=60 IconsStartX=60
@@ -672,3 +673,64 @@ Announcer=Choose from this list of installed annoucner packs.::For more informat
Theme=Choose from this list of installed theme packs.::For more information about creating theme packs, see the README. Theme=Choose from this list of installed theme packs.::For more information about creating theme packs, see the README.
NoteSkin=Choose from this list of installed note skins.::For more information about creating a note skin, see the README. NoteSkin=Choose from this list of installed note skins.::For more information about creating a note skin, see the README.
HowToPlay=Toggle whether the How To Play screen is shown. HowToPlay=Toggle whether the How To Play screen is shown.
// BACKGROUND ANIMATION THEME METRICS
// For EVERY gametype you must have AT LEAST [bganims-GAMETYPE-0] WITH
// the NumElements = x
// if you specify NumElements = 0 then you need not add any more elements
// however, if it is 1 or greater you MUST specify the PATH,X,Y,ZOOM and EFFECT
// for EACH sprite you have.
// if EFFECT is NULL then you need not specify the SPEED of that sprite.
//
// NumElements is how many sprites you want to work with. You may use up to 10 sprites
// from then on use SpriteX-path ... where X is the Element you're working with
// e.g. Sprite1-path=somesprite
//
// SpriteX-effect :
// NULL = no effect
// RC = Rotate Clockwise
// RA = Rotate AntiClockwise
//
// SpriteX-speed :
// Depending on the EFFECT you choose, the speed (specified as a float, 0.1 for example)
// will determine how fast something rotates/tweens e.t.c.
//
// SpriteX-zoom :
// Specifies how zoomed the graphic is. in floating point 1.0 is normal size
// anything less is shrunk, anything more is zoomed. 0 is totally invisible.
[bganims-ez2-0]
NumElements=1
Sprite0-path=select style preview game 2 style 3
Sprite0-effect=RC
Sprite0-speed=0.01
Sprite0-zoom=2.0
Sprite0-X=CENTER_X
Sprite0-Y=CENTER_Y
[bganims-ez2-1]
NumElements=1
Sprite0-path=select style preview game 2 style 0
Sprite0-effect=RA
Sprite0-speed=0.01
Sprite0-zoom=2.0
Sprite0-X=CENTER_X
Sprite0-Y=CENTER_Y
[bganims-ez2-2]
NumElements=1
Sprite0-path=select style preview game 2 style 1
Sprite0-effect=RC
Sprite0-speed=0.03
Sprite0-zoom=2.0
Sprite0-X=CENTER_X
Sprite0-Y=CENTER_Y
[bganims-ez2-3]
NumElements=1
Sprite0-path=select style preview game 2 style 2
Sprite0-effect=RC
Sprite0-speed=0.005
Sprite0-zoom=5.0
Sprite0-X=CENTER_X
Sprite0-Y=-350
+16
View File
@@ -53,6 +53,22 @@ MenuElements::MenuElements()
this->AddChild( &m_Invisible ); this->AddChild( &m_Invisible );
} }
void MenuElements::StealthTimer( int iActive )
{
m_MenuTimer.StealthTimer( iActive ); // go a bit deeper... get rid of the sound...
if (iActive == 0) // if we wanna hide the timer...
{
m_MenuTimer.SetXY( TIMER_X, TIMER_Y ); // set it off-screen
}
else if (iActive == 1) // we wanna hide the timer
{
m_MenuTimer.SetXY( 999.0f, 999.0f ); // otherwise position it off-screen
}
// else... take no action :)
}
void MenuElements::Load( CString sBackgroundPath, CString sTopEdgePath, CString sHelpText, bool bShowStyleIcon, bool bTimerEnabled, int iTimerSeconds ) void MenuElements::Load( CString sBackgroundPath, CString sTopEdgePath, CString sHelpText, bool bShowStyleIcon, bool bTimerEnabled, int iTimerSeconds )
{ {
LOG->Trace( "MenuElements::MenuElements()" ); LOG->Trace( "MenuElements::MenuElements()" );
+1
View File
@@ -40,6 +40,7 @@ public:
void StallTimer(); void StallTimer();
void StopTimer(); void StopTimer();
void StealthTimer( int iActive );
void DrawTopLayer(); void DrawTopLayer();
void DrawBottomLayer(); void DrawBottomLayer();
+12
View File
@@ -38,6 +38,18 @@ MenuTimer::MenuTimer()
m_soundBeep.Load( THEME->GetPathTo("Sounds","menu timer") ); m_soundBeep.Load( THEME->GetPathTo("Sounds","menu timer") );
} }
void MenuTimer::StealthTimer( int iActive )
{
if ( iActive == 0 ) // we wanna keep everything as it is...
{
m_soundBeep.Load( THEME->GetPathTo("Sounds","menu timer") ); // reload the sound
}
else if ( iActive == 1 ) // otherwise we wanna make the timer invisible and silent....
{
m_soundBeep.Unload(); // unload the sound
}
// else take no action
}
void MenuTimer::Update( float fDeltaTime ) void MenuTimer::Update( float fDeltaTime )
{ {
+2
View File
@@ -29,6 +29,8 @@ public:
void StopTimer(); void StopTimer();
void StallTimer(); void StallTimer();
void StealthTimer(int iActive);
protected: protected:
float m_fSecondsLeft; float m_fSecondsLeft;
float m_fStallSeconds; float m_fStallSeconds;
+3 -2
View File
@@ -34,7 +34,7 @@ const ScreenMessage SM_GoToNextScreen = ScreenMessage(SM_User + 2);
#define HELP_TEXT THEME->GetMetric("ScreenEz2SelectPlayer","HelpText") #define HELP_TEXT THEME->GetMetric("ScreenEz2SelectPlayer","HelpText")
#define TIMER_SECONDS THEME->GetMetricI("ScreenEz2SelectPlayer","TimerSeconds") #define TIMER_SECONDS THEME->GetMetricI("ScreenEz2SelectPlayer","TimerSeconds")
#define NEXT_SCREEN THEME->GetMetric("ScreenEz2SelectPlayer","NextScreen") #define NEXT_SCREEN THEME->GetMetric("ScreenEz2SelectPlayer","NextScreen")
#define SILENT_WAIT THEME->GetMetricI("ScreenEz2SelectPlayer","SilentWait")
const float TWEEN_TIME = 0.35f; const float TWEEN_TIME = 0.35f;
@@ -222,8 +222,9 @@ void ScreenEz2SelectPlayer::MenuStart( PlayerNumber pn )
else else
{ {
// give the other player a little time to join // give the other player a little time to join
m_Menu.SetTimer( 3 ); m_Menu.SetTimer( 1 );
m_Menu.StartTimer(); m_Menu.StartTimer();
m_Menu.StealthTimer( SILENT_WAIT ); // do we wanna make the timer 'quiet' ?
} }
} }
+25
View File
@@ -52,6 +52,15 @@ ScreenEz2SelectStyle::ScreenEz2SelectStyle()
GAMESTATE->m_PlayMode = PLAY_MODE_ARCADE; // the only mode you can select on this screen GAMESTATE->m_PlayMode = PLAY_MODE_ARCADE; // the only mode you can select on this screen
/*********** TODO: MAKE THIS WORK FOR ALL GAME STYLES! *************/
for (int i=0; i<=3; i++)
{
this->AddChild( &m_BGAnim[i] );
m_BGAnim[i].UpdateMetrics(i);
m_BGAnim[i].SetZoom(0.0f); // hide the background
}
m_BGAnim[0].SetZoom(1.0f);
m_ScrollingList.SetXY( CENTER_X, CENTER_Y ); m_ScrollingList.SetXY( CENTER_X, CENTER_Y );
m_ScrollingList.SetSpacing( 400 ); m_ScrollingList.SetSpacing( 400 );
@@ -92,6 +101,7 @@ ScreenEz2SelectStyle::ScreenEz2SelectStyle()
TweenOnScreen(); TweenOnScreen();
m_Menu.TweenOnScreenFromBlack( SM_None ); m_Menu.TweenOnScreenFromBlack( SM_None );
} }
/************************************ /************************************
@@ -235,14 +245,22 @@ void ScreenEz2SelectStyle::MenuBack( PlayerNumber pn )
void ScreenEz2SelectStyle::MenuLeft( PlayerNumber pn ) void ScreenEz2SelectStyle::MenuLeft( PlayerNumber pn )
{ {
m_BGAnim[m_ScrollingList.GetSelection()].SetZoom(0.0f); // hide old background
m_ScrollingList.Left(); m_ScrollingList.Left();
m_soundChange.Play(); m_soundChange.Play();
m_BGAnim[m_ScrollingList.GetSelection()].SetZoom(1.0f); // show new background
// m_BGAnim.UpdateMetrics(m_ScrollingList.GetSelection());
} }
void ScreenEz2SelectStyle::MenuRight( PlayerNumber pn ) void ScreenEz2SelectStyle::MenuRight( PlayerNumber pn )
{ {
m_BGAnim[m_ScrollingList.GetSelection()].SetZoom(0.0f); // hide old background
m_ScrollingList.Right(); m_ScrollingList.Right();
m_soundChange.Play(); m_soundChange.Play();
m_BGAnim[m_ScrollingList.GetSelection()].SetZoom(1.0f); // show new background
// m_BGAnim.UpdateMetrics(m_ScrollingList.GetSelection());
} }
/************************************ /************************************
@@ -278,6 +296,13 @@ void ScreenEz2SelectStyle::MenuStart( PlayerNumber pn )
RefreshStylesAndList(); RefreshStylesAndList();
m_ScrollingList.SetSelection( 0 ); m_ScrollingList.SetSelection( 0 );
/********** TODO: MAKE IT WORK FOR ALL GAME TYPES! ************/
for (int i=0; i<=3; i++)
{
m_BGAnim[i].SetZoom(0.0f); // hide the background
}
m_BGAnim[0].SetZoom(1.0f);
} }
else else
{ {
+4
View File
@@ -17,6 +17,7 @@ Andrew Livy
#include "Quad.h" #include "Quad.h"
#include "MenuElements.h" #include "MenuElements.h"
#include "ScrollingList.h" #include "ScrollingList.h"
#include "MenuBGAnims.h"
/* Class Definition */ /* Class Definition */
@@ -47,6 +48,9 @@ protected:
Sprite m_sprControllers[NUM_PLAYERS]; Sprite m_sprControllers[NUM_PLAYERS];
CArray<Style,Style> m_aPossibleStyles; CArray<Style,Style> m_aPossibleStyles;
MenuBGAnims m_BGAnim[10];
ScrollingList m_ScrollingList; ScrollingList m_ScrollingList;
void RefreshStylesAndList(); void RefreshStylesAndList();
+10 -2
View File
@@ -56,7 +56,7 @@ LINK32=link.exe
# ADD LINK32 $(intdir)\verstub.obj /nologo /subsystem:windows /map /debug /machine:I386 # ADD LINK32 $(intdir)\verstub.obj /nologo /subsystem:windows /map /debug /machine:I386
# Begin Special Build Tool # Begin Special Build Tool
IntDir=.\../Release6 IntDir=.\../Release6
TargetDir=\stepmania\stepmania TargetDir=\Stepmania\stepmania
TargetName=StepMania TargetName=StepMania
SOURCE="$(InputPath)" SOURCE="$(InputPath)"
PreLink_Cmds=disasm\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\ PreLink_Cmds=disasm\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\
@@ -91,7 +91,7 @@ LINK32=link.exe
# SUBTRACT LINK32 /profile /incremental:no /nodefaultlib # SUBTRACT LINK32 /profile /incremental:no /nodefaultlib
# Begin Special Build Tool # Begin Special Build Tool
IntDir=.\../Debug6 IntDir=.\../Debug6
TargetDir=\stepmania\stepmania TargetDir=\Stepmania\stepmania
TargetName=StepMania-debug TargetName=StepMania-debug
SOURCE="$(InputPath)" SOURCE="$(InputPath)"
PreLink_Cmds=disasm\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\ PreLink_Cmds=disasm\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\
@@ -727,6 +727,14 @@ SOURCE=.\GroupList.h
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\MenuBgAnims.cpp
# End Source File
# Begin Source File
SOURCE=.\MenuBGAnims.h
# End Source File
# Begin Source File
SOURCE=.\MenuElements.cpp SOURCE=.\MenuElements.cpp
# End Source File # End Source File
# Begin Source File # Begin Source File