add AttackDisplay
This commit is contained in:
@@ -1968,6 +1968,11 @@ ComboXOffsetOneSideP2=0
|
||||
ComboXOffsetBothSides=0
|
||||
ComboY=270
|
||||
ComboYReverse=210
|
||||
AttackDisplayXOffsetOneSideP1=0
|
||||
AttackDisplayXOffsetOneSideP2=0
|
||||
AttackDisplayXOffsetBothSides=0
|
||||
AttackDisplayY=190
|
||||
AttackDisplayYReverse=290
|
||||
HoldJudgmentYStandard=150
|
||||
HoldJudgmentYReverse=330
|
||||
BrightGhostComboThreshold=100
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
#include "global.h"
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
Class: AttackDisplay
|
||||
|
||||
Desc: See header.
|
||||
|
||||
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
|
||||
Chris Danford
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include "AttackDisplay.h"
|
||||
#include "ThemeManager.h"
|
||||
#include "GameState.h"
|
||||
|
||||
|
||||
AttackDisplay::AttackDisplay()
|
||||
{
|
||||
m_textAttack.LoadFromFont( THEME->GetPathToF("AttackDisplay") );
|
||||
m_textAttack.SetDiffuseAlpha( 0 ); // invisible
|
||||
this->AddChild( &m_textAttack );
|
||||
}
|
||||
|
||||
void AttackDisplay::Update( float fDelta )
|
||||
{
|
||||
ActorFrame::Update( fDelta );
|
||||
|
||||
// FIXME: Make GAMESTATE->m_ActiveAttacks a vector
|
||||
if( !GAMESTATE->m_ActiveAttacks[m_PlayerNumber][0].IsBlank() )
|
||||
{
|
||||
m_textAttack.SetDiffuseAlpha( 1 );
|
||||
m_textAttack.SetText( GAMESTATE->m_ActiveAttacks[m_PlayerNumber][0].sModifier );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_textAttack.SetDiffuseAlpha( 0 );
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
#ifndef AttackDisplay_H
|
||||
#define AttackDisplay_H
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
Class: AttackDisplay
|
||||
|
||||
Desc:
|
||||
|
||||
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
|
||||
Chris Danford
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include "ActorFrame.h"
|
||||
#include "Sprite.h"
|
||||
#include "BitmapText.h"
|
||||
#include "PlayerNumber.h"
|
||||
#include "GameConstantsAndTypes.h" // for TapNoteScore
|
||||
|
||||
|
||||
class AttackDisplay : public ActorFrame
|
||||
{
|
||||
public:
|
||||
AttackDisplay();
|
||||
|
||||
void Init( PlayerNumber pn ) { m_PlayerNumber = pn; }
|
||||
|
||||
virtual void Update( float fDelta );
|
||||
|
||||
protected:
|
||||
PlayerNumber m_PlayerNumber;
|
||||
|
||||
BitmapText m_textAttack;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -16,7 +16,6 @@
|
||||
#include "BitmapText.h"
|
||||
#include "PlayerNumber.h"
|
||||
#include "GameConstantsAndTypes.h" // for TapNoteScore
|
||||
class Inventory;
|
||||
|
||||
|
||||
class Combo : public ActorFrame
|
||||
|
||||
@@ -44,7 +44,7 @@ struct NoteFieldMode
|
||||
float m_fFirstPixelToDrawScale, m_fLastPixelToDrawScale;
|
||||
CString m_Backdrop;
|
||||
|
||||
CString m_JudgmentCmd, m_ComboCmd;
|
||||
CString m_JudgmentCmd, m_ComboCmd, m_AttackDisplayCmd;
|
||||
CString m_HoldJudgmentCmd[MAX_NOTE_TRACKS];
|
||||
};
|
||||
|
||||
|
||||
@@ -43,6 +43,9 @@ CachedThemeMetricF GRAY_ARROWS_Y_REVERSE ("Player","GrayArrowsYReverse");
|
||||
#define COMBO_X( p, both_sides ) THEME->GetMetricF("Player",both_sides ? "ComboXOffsetBothSides" : ssprintf("ComboXOffsetOneSideP%d",p+1))
|
||||
#define COMBO_Y THEME->GetMetricF("Player","ComboY")
|
||||
#define COMBO_Y_REVERSE THEME->GetMetricF("Player","ComboYReverse")
|
||||
#define ATTACK_DISPLAY_X( p, both_sides ) THEME->GetMetricF("Player",both_sides ? "AttackDisplayXOffsetBothSides" : ssprintf("AttackDisplayXOffsetOneSideP%d",p+1))
|
||||
#define ATTACK_DISPLAY_Y THEME->GetMetricF("Player","AttackDisplayY")
|
||||
#define ATTACK_DISPLAY_Y_REVERSE THEME->GetMetricF("Player","AttackDisplayYReverse")
|
||||
CachedThemeMetricF HOLD_JUDGMENT_Y_STANDARD ("Player","HoldJudgmentYStandard");
|
||||
CachedThemeMetricF HOLD_JUDGMENT_Y_REVERSE ("Player","HoldJudgmentYReverse");
|
||||
CachedThemeMetricI BRIGHT_GHOST_COMBO_THRESHOLD("Player","BrightGhostComboThreshold");
|
||||
@@ -85,6 +88,7 @@ PlayerMinus::PlayerMinus()
|
||||
this->AddChild( &m_Judgment );
|
||||
this->AddChild( &m_ProTimingDisplay );
|
||||
this->AddChild( &m_Combo );
|
||||
this->AddChild( &m_AttackDisplay );
|
||||
for( int c=0; c<MAX_NOTE_TRACKS; c++ )
|
||||
this->AddChild( &m_HoldJudgment[c] );
|
||||
|
||||
@@ -134,6 +138,7 @@ void PlayerMinus::Load( PlayerNumber pn, const NoteData* pNoteData, LifeMeter* p
|
||||
m_Judgment.StopTweening();
|
||||
// m_Combo.Reset(); // don't reset combos between songs in a course!
|
||||
m_Combo.Init( pn );
|
||||
m_AttackDisplay.Init( pn );
|
||||
m_Judgment.Reset();
|
||||
|
||||
/* Don't re-init this; that'll reload graphics. Add a separate Reset() call
|
||||
@@ -192,6 +197,8 @@ void PlayerMinus::Load( PlayerNumber pn, const NoteData* pNoteData, LifeMeter* p
|
||||
bool bPlayerUsingBothSides = GAMESTATE->GetCurrentStyleDef()->m_StyleType==StyleDef::ONE_PLAYER_TWO_CREDITS;
|
||||
m_Combo.SetX( COMBO_X(m_PlayerNumber,bPlayerUsingBothSides) );
|
||||
m_Combo.SetY( bReverse ? COMBO_Y_REVERSE : COMBO_Y );
|
||||
m_AttackDisplay.SetX( ATTACK_DISPLAY_X(m_PlayerNumber,bPlayerUsingBothSides) );
|
||||
m_AttackDisplay.SetY( bReverse ? ATTACK_DISPLAY_Y_REVERSE : ATTACK_DISPLAY_Y );
|
||||
m_Judgment.SetX( JUDGMENT_X(m_PlayerNumber,bPlayerUsingBothSides) );
|
||||
m_Judgment.SetY( bReverse ? JUDGMENT_Y_REVERSE : JUDGMENT_Y );
|
||||
m_ProTimingDisplay.SetX( JUDGMENT_X(m_PlayerNumber,bPlayerUsingBothSides) );
|
||||
@@ -201,6 +208,7 @@ void PlayerMinus::Load( PlayerNumber pn, const NoteData* pNoteData, LifeMeter* p
|
||||
m_Judgment.Command( g_NoteFieldMode[pn].m_JudgmentCmd );
|
||||
m_ProTimingDisplay.Command( g_NoteFieldMode[pn].m_JudgmentCmd );
|
||||
m_Combo.Command( g_NoteFieldMode[pn].m_ComboCmd );
|
||||
m_AttackDisplay.Command( g_NoteFieldMode[pn].m_AttackDisplayCmd );
|
||||
|
||||
int c;
|
||||
for( c=0; c<pStyleDef->m_iColsPerPlayer; c++ )
|
||||
@@ -434,6 +442,8 @@ void PlayerMinus::DrawPrimitives()
|
||||
if( GAMESTATE->m_PlayerOptions[m_PlayerNumber].m_fBlind == 0 )
|
||||
m_Combo.Draw();
|
||||
|
||||
m_AttackDisplay.Draw();
|
||||
|
||||
if( TAP_JUDGMENTS_UNDER_FIELD )
|
||||
DrawTapJudgments();
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#include "ProTimingDisplay.h"
|
||||
#include "RageSound.h"
|
||||
#include "DancingCharacters.h"
|
||||
#include "AttackDisplay.h"
|
||||
|
||||
class ScoreDisplay;
|
||||
class LifeMeter;
|
||||
@@ -83,6 +84,8 @@ protected:
|
||||
|
||||
Combo m_Combo;
|
||||
|
||||
AttackDisplay m_AttackDisplay;
|
||||
|
||||
int m_iDCState;
|
||||
// DancingCharacters* m_pDancingCharacters; // used to adjust the 2D anims dancing states
|
||||
LifeMeter* m_pLifeMeter;
|
||||
|
||||
@@ -102,7 +102,7 @@ void ScoreKeeperRave::LaunchAttack( AttackLevel al )
|
||||
// apply new attack
|
||||
GAMESTATE->LaunchAttack( pnToAttack, a );
|
||||
|
||||
SCREENMAN->SystemMessage( ssprintf( "attacking %d with %s", pnToAttack, sAttackToGive.c_str() ) );
|
||||
// SCREENMAN->SystemMessage( ssprintf( "attacking %d with %s", pnToAttack, sAttackToGive.c_str() ) );
|
||||
|
||||
m_soundLaunchAttack.Play();
|
||||
}
|
||||
|
||||
+55
-28
@@ -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=\projects\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
|
||||
# End Special Build Tool
|
||||
|
||||
@@ -98,8 +98,12 @@ XBCP=xbecopy.exe
|
||||
# ADD BASE XBCP /NOLOGO
|
||||
# ADD XBCP /NOLOGO
|
||||
# Begin Special Build Tool
|
||||
PreLink_Cmds=disasm\verinc cl /Zl /nologo /c verstub.cpp \
|
||||
/Fo$(IntDir)\
|
||||
IntDir=.\Debug
|
||||
TargetDir=\stepmania\stepmania
|
||||
TargetName=default
|
||||
SOURCE="$(InputPath)"
|
||||
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
|
||||
|
||||
@@ -136,10 +140,10 @@ LINK32=link.exe
|
||||
# SUBTRACT LINK32 /verbose /pdb:none
|
||||
# Begin Special Build Tool
|
||||
IntDir=.\../Release6
|
||||
TargetDir=\projects\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
|
||||
# End Special Build Tool
|
||||
|
||||
@@ -176,8 +180,12 @@ XBCP=xbecopy.exe
|
||||
# ADD BASE XBCP /NOLOGO
|
||||
# ADD XBCP /NOLOGO
|
||||
# Begin Special Build Tool
|
||||
PreLink_Cmds=disasm\verinc cl /Zl /nologo /c verstub.cpp \
|
||||
/Fo$(IntDir)\
|
||||
IntDir=.\StepMania___Xbox_Release
|
||||
TargetDir=\stepmania\stepmania
|
||||
TargetName=default
|
||||
SOURCE="$(InputPath)"
|
||||
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
|
||||
|
||||
@@ -2300,6 +2308,25 @@ SOURCE=.\arch\Lights\LightsDriver_Null.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\arch\Lights\LightsDriver_SystemMessage.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=.\arch\Lights\LightsDriver_SystemMessage.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\arch\Lights\LightsDriver_Win32Parallel.cpp
|
||||
|
||||
!IF "$(CFG)" == "StepMania - Win32 Debug"
|
||||
@@ -2934,6 +2961,25 @@ SOURCE=.\ArrowEffects.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\AttackDisplay.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=.\AttackDisplay.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Background.cpp
|
||||
|
||||
!IF "$(CFG)" == "StepMania - Win32 Debug"
|
||||
@@ -5558,25 +5604,6 @@ SOURCE=.\error2.bmp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\arch\Lights\LightsDriver_SystemMessage.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=.\arch\Lights\LightsDriver_SystemMessage.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\loading.bmp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
Reference in New Issue
Block a user