Pump Song Select now using Masked Banners.

This commit is contained in:
Andrew Livy
2003-06-02 19:25:29 +00:00
parent f32d40e07c
commit efb49096a8
6 changed files with 129 additions and 68 deletions
+16 -10
View File
@@ -3,9 +3,15 @@ X denotes task complete or no longer required to do.
- denotes task to do, but also being worked upon by other dev.
H denotes task on hold.
TODO As of: 13:41 03/06/02
* Finish Pump Theme
* Make Pump Premier 3 Theme
TODO As of: 17:11 03/04/22
* Pass Exams
* Finish the BGA editor
X Pass Exams
H Finish the BGA editor
TODO As of: 16:57 03/02/08
@@ -17,10 +23,10 @@ X Systems Programming 2 Assignment
* Ez2-Style Scoreboard
- Pump Battle Mode
H Pump Random Speed
H Pump Random Vanish
X Pump Random Vanish
TODO As of: 01:30:PM 13/11/02
* Work on 3DDX Support
H Work on 3DDX Support
X Software Engineering Assignment
X Operating Systems Assignment
X Object Oriented Design Assignment
@@ -34,10 +40,6 @@ H Update Menu Graphics for Ez2
* Finish The PUMP Graphics
- Work on Beatmania Support
TODO As of: 11:42:PM 05/09/02
X Fix the Bug on ScreenStage that reports the current stage number for final stage as being 00 in Ez2
TODO As of: 01:29:AM 04/09/02
X Fix Ez2dancer SelectPlayer Theme Metrics
@@ -48,8 +50,8 @@ H Create Ez2dancer style End Scroll, possibly new class, possibly just metric ch
- Add Scoreboard System (longterm project)
H Create some kind of metrics so that Ez2dancer may have extra stage the way it should
X Fix Ez2dancer type stage screens
H Create Ez2dancer type "extra stage" stage screen.
H Modify Gameplay Screen Metrics so that Ez2dancer style screen is more arcade-accurate
- Create Ez2dancer type "extra stage" stage screen.
X Modify Gameplay Screen Metrics so that Ez2dancer style screen is more arcade-accurate
H Modify DEMO Play Screen so that Ez2dancer shows each style (double, real, e.t.c.) in the way it should.
H Create Ez2dancer HowToPlay screens.
X Modify Pump Style Select So it is more arcade accurate.
@@ -64,6 +66,10 @@ X Modify Pump Style Select So it is more arcade accurate.
Completed Modules Of Work
TODO As of: 11:42:PM 05/09/02
X Fix the Bug on ScreenStage that reports the current stage number for final stage as being 00 in Ez2
TODO As of: 07:47:PM 12/09/02
X Get internet connection back (evil BT!! Changed their TOS and didn't tell me!)
+1 -1
View File
@@ -34,7 +34,7 @@ bool CroppedSprite::Load( RageTextureID ID )
void CroppedSprite::SetWH(float fWidth, float fHeight)
{
Sprite::SetWidth(fWidth);
Sprite::SetHeight(fWidth);
Sprite::SetHeight(fHeight);
}
void CroppedSprite::SetCroppedSize( float fWidth, float fHeight )
+1 -1
View File
@@ -21,7 +21,7 @@
#include "song.h"
#include "ActorUtil.h"
#define BANNERSPACING 200
#define BANNERSPACING THEME->GetMetricI("ScreenEz2SelectMusic","BannerSpacing")
#define MAXSONGSINBUFFER 5
#define BANNERTYPE 1
+73 -33
View File
@@ -31,10 +31,13 @@ enum BANNER_PREFS_TYPES
#define BANNER_WIDTH THEME->GetMetricF("ScreenSelectMusic","BannerWidth")
#define BANNER_HEIGHT THEME->GetMetricF("ScreenSelectMusic","BannerHeight")
#define EZ2_BANNER_WIDTH 92
#define EZ2_BANNER_HEIGHT 92
#define EZ2_BANNER_WIDTH THEME->GetMetricF("ScreenSelectMusic","BannerWidth")
#define EZ2_BANNER_HEIGHT THEME->GetMetricF("ScreenSelectMusic","BannerHeight")
#define EZ2_BANNER_ZOOM 2.0
#define ZOOM_OFFSET THEME->GetMetricF("ScreenEz2SelectMusic","BannerZoomOffset")
#define FADE_OFFSET THEME->GetMetricF("ScreenEz2SelectMusic","BannerFadeOffset")
#define SPRITE_TYPE_SPRITE 0
#define SPRITE_TYPE_CROPPEDSPRITE 1
#define DDRROT_ROTATION 315
@@ -53,6 +56,7 @@ Initializes Variables for the ScrollingList
ScrollingList::ScrollingList()
{
m_iBouncingState = 0;
m_iBounceSize = 0;
m_fNextTween = 0;
m_iBannerPrefs = BANNERPREFS_EZ2;
m_iSpriteType = SPRITE_TYPE_SPRITE;
@@ -62,8 +66,14 @@ ScrollingList::ScrollingList()
m_iNumVisible = DEFAULT_VISIBLE_ELEMENTS;
m_iBounceDir=0;
m_iBounceWait=0;
m_sprBannerMask.SetName( "Banner" ); // use the same metrics and animation as Banner
m_sprBannerMask.Load( THEME->GetPathToG("ScreenSelectMusic banner mask") );
m_RippleCSprite.SetXY(0,0);
m_RippleSprite.SetXY(0,0);
m_sprBannerMask.SetBlendMode( BLEND_NO_EFFECT ); // don't draw to color buffer
m_sprBannerMask.SetUseZBuffer( true ); // do draw to the zbuffer
m_sprBannerMask.SetWidth(EZ2_BANNER_WIDTH);
m_sprBannerMask.SetHeight(EZ2_BANNER_HEIGHT);
}
void ScrollingList::UseSpriteType(int NewSpriteType)
@@ -335,28 +345,22 @@ void ScrollingList::Update( float fDeltaTime )
if(m_fNextTween <= 0) // we're ready to update stuff
{
m_fNextTween = 0.1f; // reset the tween count
if(m_apCSprites[m_iSelection]->GetZoom() >= 1.2f && m_iBounceDir == 1) // if we're over biggest boundary
if(m_iBounceSize <= 0 && m_iBounceDir == 0 ) // going smaller
{
m_iBounceDir = 2; // next phase will be a wait
m_apCSprites[m_iSelection]->SetZoom( m_apCSprites[m_iSelection]->GetZoom() - 0.25f); // make it smaller
m_RippleCSprite.SetZoom( m_RippleCSprite.GetZoom() - 0.30f); // make the ripple smaller
m_iBounceDir = 2;
}
else if(m_apCSprites[m_iSelection]->GetZoom() <= 1.0f && m_iBounceDir == 0) // if we're over smallest boundary
else if(m_iBounceDir == 1 && m_iBounceSize >= 0.2f) // getting big
{
m_iBounceDir = 1; // next phase will be making graphic bigger
m_apCSprites[m_iSelection]->SetZoom( m_apCSprites[m_iSelection]->GetZoom() + 0.25f); // make it bigger
m_RippleCSprite.SetZoom( m_RippleCSprite.GetZoom() + 0.30f); // make ripple bigger
m_RippleCSprite.SetDiffuse( RageColor(1,1,1,0.5f)); // make ripple appear semi transparent
m_iBounceDir = 0;
}
else if(m_iBounceDir == 0 && m_apCSprites[m_iSelection]->GetZoom() != 1.0f) // travelling smaller
else if(m_iBounceDir == 0)
{
m_apCSprites[m_iSelection]->SetZoom( m_apCSprites[m_iSelection]->GetZoom() - 0.25f); // make smaller
m_RippleCSprite.SetZoom( m_RippleCSprite.GetZoom() - 0.30f); // make smaller
m_iBounceSize-=0.2f;
}
else if(m_iBounceDir == 1 && m_apCSprites[m_iSelection]->GetZoom() != 1.2f) // travelling bigger
else if(m_iBounceDir == 1)
{
m_apCSprites[m_iSelection]->SetZoom( m_apCSprites[m_iSelection]->GetZoom() + 0.25f); // make bigger
m_RippleCSprite.SetZoom( m_RippleCSprite.GetZoom() + 0.30f ); // make bigger
m_iBounceSize+=0.2f;
}
else if(m_iBounceDir == 2) // we're waiting before doing bounce processes again
{
@@ -366,10 +370,10 @@ void ScrollingList::Update( float fDeltaTime )
m_iBounceWait--; // otherwise decrease by 1
if(m_iBounceWait == 2) // if we're one moment after start of wait
m_RippleCSprite.SetDiffuse( RageColor(1,1,1,0.0f)); // hide the ripple
m_RippleSprite.SetDiffuse( RageColor(1,1,1,0.0f)); // hide the ripple
if(m_iBounceWait == 0) // if we just turned to 0
m_iBounceDir = 0; // go to the 'make smaller' stage. as we SHOULD already be pretty small, we should start increasing in size a couple phases on.
m_iBounceDir = 1;
}
}
else
@@ -416,11 +420,11 @@ void ScrollingList::Replace(CString sGraphicPath, int ElementNumber)
{
if(pNewCSprite->GetUnzoomedWidth() == pNewCSprite->GetUnzoomedHeight()) // rotated graphics need cropping
{
pNewCSprite->SetCroppedSize( EZ2_BANNER_WIDTH*2, EZ2_BANNER_HEIGHT*2 );
pNewCSprite->SetCroppedSize( EZ2_BANNER_WIDTH, EZ2_BANNER_HEIGHT );
}
else // flat, unrotated graphics need widths changing
{
pNewCSprite->SetWH(EZ2_BANNER_WIDTH*2, EZ2_BANNER_HEIGHT*2);
pNewCSprite->SetWH(EZ2_BANNER_WIDTH, EZ2_BANNER_HEIGHT);
}
}
@@ -485,17 +489,61 @@ void ScrollingList::DrawPrimitives()
m_apCSprites[iIndexToDraw1]->SetX( (-i+m_fSelectionLag) * m_iSpacing );
m_apCSprites[iIndexToDraw2]->SetX( (+i+m_fSelectionLag) * m_iSpacing );
m_apCSprites[iIndexToDraw1]->SetZ( (m_iNumVisible)/2 - i);
m_apCSprites[iIndexToDraw2]->SetZ( (m_iNumVisible)/2 - i);
if( i==0 ) // so we don't draw 0 twice
{
m_apCSprites[iIndexToDraw1]->SetDiffuse( COLOR_SELECTED );
if(!m_iBouncingState)
m_apCSprites[iIndexToDraw1]->SetZoom( 1.0 - (ZOOM_OFFSET * i) );
m_apCSprites[iIndexToDraw1]->SetDiffuse( COLOR_SELECTED + RageColor(0,0,0,(1.0 - (FADE_OFFSET * i))) );
m_apCSprites[iIndexToDraw1]->SetUseZBuffer( true ); // do have to pass the z test
m_sprBannerMask.SetXY(m_apCSprites[iIndexToDraw1]->GetX(), m_apCSprites[iIndexToDraw1]->GetY());
m_sprBannerMask.SetZ( m_apCSprites[iIndexToDraw1]->GetZ()+0.05f );
m_sprBannerMask.SetZoom( m_apCSprites[iIndexToDraw1]->GetZoom());
m_sprBannerMask.Draw();
m_apCSprites[iIndexToDraw1]->Draw();
if(m_iBouncingState) // bouncing
{
if(m_iBounceDir == 1)
{
m_apCSprites[iIndexToDraw1]->SetZoom(m_apCSprites[iIndexToDraw1]->GetZoom() + 0.05 );
m_sprBannerMask.SetZoom( m_apCSprites[iIndexToDraw1]->GetZoom() );
m_sprBannerMask.Draw();
m_apCSprites[iIndexToDraw1]->Draw();
m_apCSprites[iIndexToDraw1]->SetZoom(m_apCSprites[iIndexToDraw1]->GetZoom() - 0.05 );
m_sprBannerMask.SetZoom( m_apCSprites[iIndexToDraw1]->GetZoom() );
}
m_apCSprites[iIndexToDraw1]->SetZoom(m_apCSprites[iIndexToDraw1]->GetZoom() + m_iBounceSize );
RageColor currentcolor = m_apCSprites[iIndexToDraw1]->GetDiffuse();
m_apCSprites[iIndexToDraw1]->SetZ( m_apCSprites[iIndexToDraw1]->GetZ() + 1);
m_sprBannerMask.SetZ( m_apCSprites[iIndexToDraw1]->GetZ()+0.05f );
m_sprBannerMask.SetZoom( m_sprBannerMask.GetZoom() + m_iBounceSize );
m_apCSprites[iIndexToDraw1]->SetDiffuse( RageColor( 1, 1, 1, 0.4f ) );
m_sprBannerMask.Draw();
m_apCSprites[iIndexToDraw1]->Draw(); // again for the bounce effect
m_apCSprites[iIndexToDraw1]->SetZoom(m_apCSprites[iIndexToDraw1]->GetZoom() - m_iBounceSize );
m_sprBannerMask.SetZoom( m_sprBannerMask.GetZoom() - m_iBounceSize );
m_apCSprites[iIndexToDraw1]->SetDiffuse( currentcolor );
m_apCSprites[iIndexToDraw1]->SetZ( m_apCSprites[iIndexToDraw1]->GetZ() - 1);
}
}
else
{
m_apCSprites[iIndexToDraw1]->SetDiffuse( COLOR_NOT_SELECTED );
m_apCSprites[iIndexToDraw2]->SetDiffuse( COLOR_NOT_SELECTED );
m_apCSprites[iIndexToDraw1]->SetZoom( 1.0 - (ZOOM_OFFSET * i) );
m_apCSprites[iIndexToDraw2]->SetZoom( 1.0 - (ZOOM_OFFSET * i) );
m_apCSprites[iIndexToDraw1]->SetDiffuse( COLOR_NOT_SELECTED + RageColor(0,0,0,(- (FADE_OFFSET * i))) );
m_apCSprites[iIndexToDraw2]->SetDiffuse( COLOR_NOT_SELECTED + RageColor(0,0,0,(- (FADE_OFFSET * i))) );
m_apCSprites[iIndexToDraw1]->SetUseZBuffer( true ); // do have to pass the z test
m_sprBannerMask.SetXY(m_apCSprites[iIndexToDraw1]->GetX(), m_apCSprites[iIndexToDraw1]->GetY());
m_sprBannerMask.SetZ( m_apCSprites[iIndexToDraw1]->GetZ()+0.05f );
m_sprBannerMask.SetZoom( m_apCSprites[iIndexToDraw1]->GetZoom());
m_sprBannerMask.Draw();
m_apCSprites[iIndexToDraw1]->Draw();
m_apCSprites[iIndexToDraw2]->SetUseZBuffer( true ); // do have to pass the z test
m_sprBannerMask.SetXY(m_apCSprites[iIndexToDraw2]->GetX(), m_apCSprites[iIndexToDraw1]->GetY());
m_sprBannerMask.SetZ( m_apCSprites[iIndexToDraw2]->GetZ()+0.05f );
m_sprBannerMask.SetZoom( m_apCSprites[iIndexToDraw2]->GetZoom());
m_sprBannerMask.Draw();
m_apCSprites[iIndexToDraw2]->Draw();
}
}
@@ -507,12 +555,4 @@ void ScrollingList::DrawPrimitives()
m_RippleSprite.Draw();
}
}
else
{
if(m_iBouncingState)
{
m_RippleCSprite.Draw();
m_RippleSprite.Draw();
}
}
}
+3 -1
View File
@@ -45,6 +45,8 @@ protected:
int m_iBouncingState;
int m_iBounceDir;
int m_iBounceWait;
float m_iBounceSize;
int m_iBannerPrefs;
int m_iSpriteType;
@@ -53,7 +55,7 @@ protected:
int m_iSpacing;
int m_iNumVisible;
float m_fNextTween;
Sprite m_sprBannerMask;
CroppedSprite m_RippleCSprite;
Sprite m_RippleSprite;
+35 -22
View File
@@ -1,5 +1,5 @@
# Microsoft Developer Studio Project File - Name="StepMania" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 60000
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Application" 0x0101
@@ -61,10 +61,10 @@ LINK32=link.exe
# SUBTRACT LINK32 /verbose /profile /pdb:none /incremental:no /nodefaultlib
# Begin Special Build Tool
IntDir=.\../Debug6
TargetDir=\stepmania\stepmania
TargetDir=\Stepmania\stepmania
TargetName=StepMania-debug
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)\
PostBuild_Cmds=disasm\mapconv $(IntDir)\$(TargetName).map $(TargetDir)\StepMania.vdi ia32.vdi
# End Special Build Tool
@@ -82,29 +82,25 @@ PostBuild_Cmds=disasm\mapconv $(IntDir)\$(TargetName).map $(TargetDir)\StepMania
# PROP Intermediate_Dir "StepMania___Xbox_Debug___VC6"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
CPP=cl.exe
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /I "." /I "SDL-1.2.5\include" /I "SDL_image-1.2" /I "plib-1.6.0" /D "WIN32" /D "_XBOX" /D "_DEBUG" /Fr /YX"global.h" /FD /c
# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "." /I "SDL-1.2.5\include" /I "SDL_image-1.2" /I "plib-1.6.0" /D "WIN32" /D "_XBOX" /D "_DEBUG" /Fr /YX"global.h" /FD /c
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
XBCP=xbecopy.exe
# ADD BASE XBCP /NOLOGO
# ADD XBCP /NOLOGO
XBE=imagebld.exe
# ADD BASE XBE /nologo /stack:0x10000 /debug
# ADD XBE /nologo /stack:0x10000 /debug
LINK32=link.exe
# ADD BASE LINK32 $(intdir)\verstub.obj kernel32.lib shell32.lib user32.lib gdi32.lib advapi32.lib winmm.lib /nologo /pdb:"../debug6/StepMania-debug.pdb" /map /debug /machine:IX86 /nodefaultlib:"libcmtd.lib" /out:"../StepMania-debug.exe"
# SUBTRACT BASE LINK32 /verbose /profile /pdb:none /incremental:no /nodefaultlib
# ADD LINK32 $(intdir)\verstub.obj kernel32.lib shell32.lib user32.lib gdi32.lib advapi32.lib winmm.lib /nologo /pdb:"../debug6/StepMania-debug.pdb" /map /debug /machine:IX86 /nodefaultlib:"libcmtd.lib" /out:"../StepMania-debug.exe"
# SUBTRACT LINK32 /verbose /profile /pdb:none /incremental:no /nodefaultlib
XBE=imagebld.exe
# ADD BASE XBE /nologo /stack:0x10000 /debug
# ADD XBE /nologo /stack:0x10000 /debug
XBCP=xbecopy.exe
# ADD BASE XBCP /NOLOGO
# ADD XBCP /NOLOGO
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
CPP=cl.exe
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /I "." /I "SDL-1.2.5\include" /I "SDL_image-1.2" /I "plib-1.6.0" /D "WIN32" /D "_XBOX" /D "_DEBUG" /Fr /YX"global.h" /FD /c
# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "." /I "SDL-1.2.5\include" /I "SDL_image-1.2" /I "plib-1.6.0" /D "WIN32" /D "_XBOX" /D "_DEBUG" /Fr /YX"global.h" /FD /c
# Begin Special Build Tool
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)\
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
@@ -141,10 +137,10 @@ LINK32=link.exe
# SUBTRACT LINK32 /verbose /pdb:none
# Begin Special Build Tool
IntDir=.\../Release6
TargetDir=\stepmania\stepmania
TargetDir=\Stepmania\stepmania
TargetName=StepMania
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)\
PostBuild_Cmds=disasm\mapconv $(IntDir)\$(TargetName).map $(TargetDir)\StepMania.vdi ia32.vdi
# End Special Build Tool
@@ -2896,6 +2892,23 @@ SOURCE=.\MenuTimer.h
# End Source File
# Begin Source File
SOURCE=.\ModeSwitcher.cpp
!IF "$(CFG)" == "StepMania - Win32 Debug"
!ELSEIF "$(CFG)" == "StepMania - Xbox Debug"
!ELSEIF "$(CFG)" == "StepMania - Win32 Release"
!ENDIF
# End Source File
# Begin Source File
SOURCE=.\ModeSwitcher.h
# End Source File
# Begin Source File
SOURCE=.\MusicBannerWheel.cpp
!IF "$(CFG)" == "StepMania - Win32 Debug"