add ActiveAttackList

This commit is contained in:
Chris Danford
2004-03-17 06:01:17 +00:00
parent 64e00d71ad
commit 09e6b85f3b
11 changed files with 195 additions and 62 deletions
@@ -0,0 +1 @@
Common normal
+8 -32
View File
@@ -1097,38 +1097,14 @@ LyricsReverseY=100
LyricsOneReverseX=320
LyricsOneReverseY=35
LyricsDefaultColor=0,1,0,1
ActiveItemsP1X=0
ActiveItemsP1Y=0
ActiveItemsP1OnCommand=
ActiveItemsP1OffCommand=
ActiveItemsP1ReverseX=0
ActiveItemsP1ReverseY=0
ActiveItemsP1ReverseOnCommand=
ActiveItemsP1ReverseOffCommand=
ActiveItemsP1ExtraX=0
ActiveItemsP1ExtraY=0
ActiveItemsP1ExtraOnCommand=
ActiveItemsP1ExtraOffCommand=
ActiveItemsP1ExtraReverseX=0
ActiveItemsP1ExtraReverseY=0
ActiveItemsP1ExtraReverseOnCommand=
ActiveItemsP1ExtraReverseOffCommand=
ActiveItemsP2X=0
ActiveItemsP2Y=0
ActiveItemsP2OnCommand=
ActiveItemsP2OffCommand=
ActiveItemsP2ReverseX=0
ActiveItemsP2ReverseY=0
ActiveItemsP2ReverseOnCommand=
ActiveItemsP2ReverseOffCommand=
ActiveItemsP2ExtraX=0
ActiveItemsP2ExtraY=0
ActiveItemsP2ExtraOnCommand=
ActiveItemsP2ExtraOffCommand=
ActiveItemsP2ExtraReverseX=0
ActiveItemsP2ExtraReverseY=0
ActiveItemsP2ExtraReverseOnCommand=
ActiveItemsP2ExtraReverseOffCommand=
ActiveAttackListP1X=
ActiveAttackListP1Y=
ActiveAttackListP1OnCommand=hidden,1
ActiveAttackListP1OffCommand=
ActiveAttackListP2X=
ActiveAttackListP2Y=
ActiveAttackListP2OnCommand=hidden,1
ActiveAttackListP2OffCommand=
SurviveTimeX=320
SurviveTimeY=340
SurviveTimeOnCommand=sleep,0.3;linear,0.3;diffusealpha,1;sleep,3.5;linear,0.5;diffusealpha,0
+61
View File
@@ -0,0 +1,61 @@
#include "global.h"
/*
-----------------------------------------------------------------------------
File: ActiveAttackList.h
Desc: A graphic displayed in the ActiveAttackList during Dancing.
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
Chris Danford
-----------------------------------------------------------------------------
*/
#include "ActiveAttackList.h"
#include "RageUtil.h"
#include "GameState.h"
#include "ThemeManager.h"
#include "Inventory.h"
#include "RageTimer.h"
ActiveAttackList::ActiveAttackList()
{
}
void ActiveAttackList::Init( PlayerNumber pn )
{
m_PlayerNumber = pn;
}
void ActiveAttackList::Update( float fDelta )
{
BitmapText::Update( fDelta );
// refresh text only once every second
float fNowSeconds = RageTimer::GetTimeSinceStart();
float fLastSeconds = RageTimer::GetTimeSinceStart() - fDelta;
if( (int)fNowSeconds != (int)fLastSeconds )
{
CString s;
const AttackArray& attacks = GAMESTATE->m_ActiveAttacks[m_PlayerNumber]; // NUM_INVENTORY_SLOTS
// clear all lines, then add all active attacks
for( int i=0; i<attacks.size(); i++ )
{
const Attack& attack = attacks[i];
if( !attack.bOn )
continue; /* hasn't started yet */
CString sDisplayText = attack.sModifier;
if( s.empty() )
s = sDisplayText;
else
s = sDisplayText + "\n" + s;
}
this->SetText( s ); // BitmapText will not rebuild vertices if these strings are the same.
}
}
+32
View File
@@ -0,0 +1,32 @@
#ifndef _ActiveAttackList_H_
#define _ActiveAttackList_H_
/*
-----------------------------------------------------------------------------
File: ActiveAttackList.h
Desc: A graphic displayed in the ActiveAttackList during Dancing.
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
Chris Danford
-----------------------------------------------------------------------------
*/
#include "BitmapText.h"
#include "PlayerNumber.h"
class ActiveAttackList : public BitmapText
{
public:
ActiveAttackList();
void Init( PlayerNumber pn );
virtual void Update( float fDelta );
protected:
PlayerNumber m_PlayerNumber;
};
#endif
+1 -1
View File
@@ -184,11 +184,11 @@ void MenuElements::DrawTopLayer()
m_autoHeader->Draw();
m_sprStyleIcon.Draw();
m_autoFooter->Draw();
for( int p=0; p<NUM_PLAYERS; p++ )
m_MemoryCardDisplay[p].Draw();
if( m_bTimerEnabled )
m_MenuTimer->Draw();
m_autoFooter->Draw();
m_textHelp->Draw();
m_In.Draw();
m_Out.Draw();
+1
View File
@@ -552,6 +552,7 @@ bool PlayerOptions::IsHandicapForSong( Song* pSong )
if( m_bTransforms[TRANSFORM_NOQUADS] ) return true;
if( m_bTransforms[TRANSFORM_PLANTED] ) return true;
if( m_bTransforms[TRANSFORM_TWISTER] ) return true;
if( m_bTransforms[TRANSFORM_ECHO] ) return true;
return false;
}
+12
View File
@@ -593,6 +593,16 @@ void ScreenGameplay::Init()
m_textSongOptions.SetText( GAMESTATE->m_SongOptions.GetString() );
this->AddChild( &m_textSongOptions );
{
FOREACH_EnabledPlayer( pn )
{
m_ActiveAttackList[pn].LoadFromFont( THEME->GetPathF(m_sName,"ActiveAttackList") );
m_ActiveAttackList[pn].Init( pn );
m_ActiveAttackList[pn].SetName( ssprintf("ActiveAttackListP%d",pn+1) );
SET_XY( m_ActiveAttackList[pn] );
this->AddChild( &m_ActiveAttackList[pn] );
}
}
@@ -2244,6 +2254,7 @@ void ScreenGameplay::TweenOnScreen()
if( m_pSecondaryScoreDisplay[p] )
ON_COMMAND( *m_pSecondaryScoreDisplay[p] );
ON_COMMAND( m_textPlayerOptions[p] );
ON_COMMAND( m_ActiveAttackList[p] );
ON_COMMAND( m_DifficultyIcon[p] );
}
m_Overlay.PlayCommand("On");
@@ -2276,6 +2287,7 @@ void ScreenGameplay::TweenOffScreen()
if( m_pSecondaryScoreDisplay[p] )
OFF_COMMAND( *m_pSecondaryScoreDisplay[p] );
OFF_COMMAND( m_textPlayerOptions[p] );
OFF_COMMAND( m_ActiveAttackList[p] );
OFF_COMMAND( m_DifficultyIcon[p] );
}
m_Overlay.PlayCommand("Off");
+2
View File
@@ -31,6 +31,7 @@ class Inventory;
#include "Character.h"
#include "Attack.h"
#include "MeterDisplay.h"
#include "ActiveAttackList.h"
// messages sent by Combo
const ScreenMessage SM_PlayToasty = ScreenMessage(SM_User+104);
@@ -132,6 +133,7 @@ protected:
ScoreKeeper* m_pSecondaryScoreKeeper[NUM_PLAYERS];
BitmapText m_textPlayerOptions[NUM_PLAYERS];
BitmapText m_textSongOptions;
ActiveAttackList m_ActiveAttackList[NUM_PLAYERS];
BitmapText m_textDebug;
@@ -63,12 +63,14 @@ void HighScoreWheelItem::Load( int iRankIndex, const HighScore& hs )
m_textRank.SetName( "Rank" );
m_textRank.LoadFromFont( THEME->GetPathF(m_sName,"rank") );
m_textRank.SetText( ssprintf("%d", iRankIndex+1) );
m_textRank.SetShadowLength( 2 );
this->AddChild( &m_textRank );
SET_XY_AND_ON_COMMAND( m_textRank );
m_textName.SetName( "Name" );
m_textName.LoadFromFont( THEME->GetPathF(m_sName,"name") );
m_textName.SetText( hs.GetDisplayName() );
m_textName.SetShadowLength( 2 );
this->AddChild( &m_textName );
SET_XY_AND_ON_COMMAND( m_textName );
@@ -78,6 +80,7 @@ void HighScoreWheelItem::Load( int iRankIndex, const HighScore& hs )
m_textScore.SetText( ssprintf("%.2f%%", hs.fPercentDP*100) );
else
m_textScore.SetText( ssprintf("%i", hs.iScore) );
m_textScore.SetShadowLength( 2 );
this->AddChild( &m_textScore );
SET_XY_AND_ON_COMMAND( m_textScore );
}
+56 -29
View File
@@ -1,5 +1,5 @@
# Microsoft Developer Studio Project File - Name="StepMania" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# Microsoft Developer Studio Generated Build File, Format Version 60000
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Application" 0x0101
@@ -62,10 +62,10 @@ LINK32=link.exe
# SUBTRACT LINK32 /verbose /profile /pdb:none /incremental:no /nodefaultlib
# Begin Special Build Tool
IntDir=.\../Debug6
TargetDir=\stepmania2\stepmania\Program
TargetDir=\stepmania\stepmania\Program
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
# End Special Build Tool
@@ -82,23 +82,27 @@ PostBuild_Cmds=disasm\mapconv $(IntDir)\$(TargetName).map $(TargetDir)\StepMania
# PROP Intermediate_Dir "../Debug_Xbox"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
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 /out:"../default.xbe"
CPP=cl.exe
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_XBOX" /D "_DEBUG" /YX /FD /G6 /Ztmp /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" /I "SDL_sound-1.0.0" /I "vorbis" /D "WIN32" /D "_DEBUG" /D "_XBOX" /D "OGG_ONLY" /D "DEBUG" /FR /YX"global.h" /FD /G6 /Ztmp /c
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 xapilibd.lib d3d8d.lib d3dx8d.lib xgraphicsd.lib dsoundd.lib dmusicd.lib xnetd.lib xboxkrnl.lib /nologo /incremental:no /debug /machine:I386 /subsystem:xbox /fixed:no /TMP
# ADD LINK32 $(intdir)\verstub.obj xapilibd.lib d3d8d.lib d3dx8d.lib xgraphicsd.lib dsoundd.lib dmusicd.lib xnetd.lib xboxkrnl.lib /nologo /map /debug /machine:I386 /nodefaultlib:"libcd" /nodefaultlib:"libcmt" /out:"../StepManiaXbox-debug.exe" /subsystem:xbox /fixed:no /TMP
# SUBTRACT LINK32 /incremental:no
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
CPP=cl.exe
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_XBOX" /D "_DEBUG" /YX /FD /G6 /Ztmp /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" /I "SDL_sound-1.0.0" /I "vorbis" /D "WIN32" /D "_DEBUG" /D "_XBOX" /D "OGG_ONLY" /D "DEBUG" /FR /YX"global.h" /FD /G6 /Ztmp /c
XBE=imagebld.exe
# ADD BASE XBE /nologo /stack:0x10000 /debug
# ADD XBE /nologo /stack:0x10000 /debug /out:"../default.xbe"
XBCP=xbecopy.exe
# ADD BASE XBCP /NOLOGO
# ADD XBCP /NOLOGO
# Begin Special Build Tool
IntDir=.\../Debug_Xbox
TargetDir=\stepmania\stepmania
TargetName=default
SOURCE="$(InputPath)"
PreLink_Cmds=disasm\verinc cl /Zl /nologo /c PostBuild_Cmds=disasm\mapconv $(IntDir)\$(TargetName).map $(TargetDir)\StepMania.vdi ia32.vdi
# End Special Build Tool
@@ -135,10 +139,10 @@ LINK32=link.exe
# SUBTRACT LINK32 /verbose /pdb:none /debug
# Begin Special Build Tool
IntDir=.\../Release6
TargetDir=\stepmania2\stepmania\Program
TargetDir=\stepmania\stepmania\Program
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
# End Special Build Tool
@@ -156,24 +160,28 @@ PostBuild_Cmds=disasm\mapconv $(IntDir)\$(TargetName).map $(TargetDir)\StepMania
# PROP Intermediate_Dir "../Release_Xbox"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
XBCP=xbecopy.exe
# ADD BASE XBCP /NOLOGO
# ADD XBCP /NOLOGO
XBE=imagebld.exe
# ADD BASE XBE /nologo /stack:0x10000 /debug
# ADD XBE /nologo /testid:"123456" /stack:0x10000 /debug /out:"../default.xbe"
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 /MT /W3 /GX /O2 /I "." /I "SDL-1.2.5\include" /I "SDL_image-1.2" /I "plib-1.6.0" /I "SDL_sound-1.0.0" /I "vorbis" /D "WIN32" /D "NDEBUG" /D "_XBOX" /FR /YX /FD /c
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 $(intdir)\verstub.obj xapilibd.lib d3d8d.lib d3dx8d.lib xgraphicsd.lib dsoundd.lib dmusicd.lib xnetd.lib xboxkrnl.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 xapilib.lib d3d8.lib d3dx8.lib xgraphics.lib dsound.lib dmusic.lib xnet.lib xboxkrnl.lib libcmt.lib /nologo /incremental:no /map /machine:I386 /nodefaultlib:"libc" /nodefaultlib:"libcmtd" /out:"../StepManiaXbox.exe" /subsystem:xbox /fixed:no /TMP /OPT:REF
# SUBTRACT LINK32 /pdb:none /debug
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 /MT /W3 /GX /O2 /I "." /I "SDL-1.2.5\include" /I "SDL_image-1.2" /I "plib-1.6.0" /I "SDL_sound-1.0.0" /I "vorbis" /D "WIN32" /D "NDEBUG" /D "_XBOX" /FR /YX /FD /c
XBE=imagebld.exe
# ADD BASE XBE /nologo /stack:0x10000 /debug
# ADD XBE /nologo /testid:"123456" /stack:0x10000 /debug /out:"../default.xbe"
XBCP=xbecopy.exe
# ADD BASE XBCP /NOLOGO
# ADD XBCP /NOLOGO
# Begin Special Build Tool
IntDir=.\../Release_Xbox
TargetDir=\stepmania\stepmania
TargetName=default
SOURCE="$(InputPath)"
PreLink_Cmds=disasm\verinc cl /Zl /nologo /c PostBuild_Cmds=disasm\mapconv $(IntDir)\$(TargetName).map $(TargetDir)\StepMania.vdi ia32.vdi
# End Special Build Tool
@@ -3337,6 +3345,25 @@ SOURCE=.\Transition.h
# PROP Default_Filter ""
# Begin Source File
SOURCE=.\ActiveAttackList.cpp
!IF "$(CFG)" == "StepMania - Win32 Debug"
!ELSEIF "$(CFG)" == "StepMania - Xbox Debug"
!ELSEIF "$(CFG)" == "StepMania - Win32 Release"
!ELSEIF "$(CFG)" == "StepMania - Xbox Release"
!ENDIF
# End Source File
# Begin Source File
SOURCE=.\ActiveAttackList.h
# End Source File
# Begin Source File
SOURCE=.\ArrowEffects.cpp
!IF "$(CFG)" == "StepMania - Win32 Debug"
+18
View File
@@ -1442,6 +1442,12 @@ cl /Zl /nologo /c verstub.cpp /Fo&quot;$(IntDir)&quot;\
<Filter
Name="Actors used in Gameplay"
Filter="">
<File
RelativePath="ActiveAttackList.cpp">
</File>
<File
RelativePath="ActiveAttackList.h">
</File>
<File
RelativePath="ArrowBackdrop.cpp">
</File>
@@ -2065,6 +2071,12 @@ cl /Zl /nologo /c verstub.cpp /Fo&quot;$(IntDir)&quot;\
<File
RelativePath="MemoryCardManager.h">
</File>
<File
RelativePath="NetworkSyncManager.cpp">
</File>
<File
RelativePath="NetworkSyncManager.h">
</File>
<File
RelativePath="NoteSkinManager.cpp">
</File>
@@ -2107,6 +2119,12 @@ cl /Zl /nologo /c verstub.cpp /Fo&quot;$(IntDir)&quot;\
<File
RelativePath="UnlockSystem.h">
</File>
<File
RelativePath="ezsockets.cpp">
</File>
<File
RelativePath="ezsockets.h">
</File>
</Filter>
<Filter
Name="Crypto"