remove unused TimingAssist

This commit is contained in:
Glenn Maynard
2004-03-27 00:16:48 +00:00
parent 86304ee6d8
commit 4c1374aea9
9 changed files with 29 additions and 217 deletions
-2
View File
@@ -73,8 +73,6 @@ const OptionColumnEntry g_OptionColumnEntries[] =
{"Space", 6},
{"Hallway", 6},
{"Distant", 6},
{"TimingAssist",-1},
};
int OptionToPreferredColumn( CString sOptionText )
-4
View File
@@ -40,7 +40,6 @@ void PlayerOptions::Init()
m_fPassmark = 0; m_SpeedfPassmark = 1.0f;
ZERO( m_bTurns );
ZERO( m_bTransforms );
m_bTimingAssist = false;
m_bProTiming = false;
m_sPositioning = ""; // "null"
m_sNoteSkin = "default";
@@ -161,7 +160,6 @@ CString PlayerOptions::GetString() const
if( m_bTransforms[TRANSFORM_NOHANDS] ) sReturn += "NoHands, ";
if( m_bTransforms[TRANSFORM_NOQUADS] ) sReturn += "NoQuads, ";
if( m_bTimingAssist ) sReturn += "TimingAssist, ";
if( m_bProTiming ) sReturn += "ProTiming, ";
if( m_fSkew==1 && m_fPerspectiveTilt==-1 )
@@ -299,7 +297,6 @@ void PlayerOptions::FromString( CString sOptions )
else if( sBit == "dark" ) SET_FLOAT( fDark )
else if( sBit == "blind" ) SET_FLOAT( fBlind )
else if( sBit == "passmark" ) SET_FLOAT( fPassmark )
else if( sBit == "timingassist")m_bTimingAssist = on;
else if( sBit == "protiming") m_bProTiming = on;
else if( sBit == "overhead" ) { m_fSkew = 0; m_fPerspectiveTilt = 0; m_SpeedfSkew = m_SpeedfPerspectiveTilt = speed; }
else if( sBit == "incoming" ) { m_fSkew = level; m_fPerspectiveTilt = -level; m_SpeedfSkew = m_SpeedfPerspectiveTilt = speed; }
@@ -518,7 +515,6 @@ bool PlayerOptions::operator==( const PlayerOptions &other ) const
COMPARE(m_fScrollBPM);
COMPARE(m_fDark);
COMPARE(m_fBlind);
COMPARE(m_bTimingAssist);
COMPARE(m_bProTiming);
COMPARE(m_fPerspectiveTilt);
COMPARE(m_fSkew);
-1
View File
@@ -117,7 +117,6 @@ struct PlayerOptions
bool m_bTurns[NUM_TURNS];
bool m_bTransforms[NUM_TRANSFORMS];
bool m_bTimingAssist;
bool m_bProTiming;
CString m_sPositioning; /* The current positioning mode, or empty to use the normal positions. */
CString m_sNoteSkin;
-6
View File
@@ -326,8 +326,6 @@ void ScreenGameplay::Init()
m_Player[p].SetX( fPlayerX );
this->AddChild( &m_Player[p] );
m_TimingAssist.Load((PlayerNumber)p, &m_Player[p]);
m_sprOniGameOver[p].Load( THEME->GetPathToG("ScreenGameplay oni gameover") );
m_sprOniGameOver[p].SetX( fPlayerX );
m_sprOniGameOver[p].SetY( SCREEN_TOP - m_sprOniGameOver[p].GetZoomedHeight()/2 );
@@ -335,8 +333,6 @@ void ScreenGameplay::Init()
this->AddChild( &m_sprOniGameOver[p] );
}
this->AddChild(&m_TimingAssist);
m_NextSongIn.SetZ( -2 ); // on top of everything else
this->AddChild( &m_NextSongIn );
@@ -921,8 +917,6 @@ void ScreenGameplay::LoadNextSong()
GAMESTATE->m_PlayerController[p] = PC_AUTOPLAY;
else
GAMESTATE->m_PlayerController[p] = PC_HUMAN;
m_TimingAssist.Reset();
}
m_textSongTitle.SetText( GAMESTATE->m_pCurSong->m_sMainTitle );
-3
View File
@@ -27,7 +27,6 @@
class Inventory;
#include "BeginnerHelper.h"
#include "LyricDisplay.h"
#include "TimingAssist.h"
#include "Character.h"
#include "Attack.h"
#include "MeterDisplay.h"
@@ -104,8 +103,6 @@ protected:
LyricDisplay m_LyricDisplay;
TimingAssist m_TimingAssist;
Background m_Background;
Foreground m_Foreground;
+29 -56
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
@@ -62,10 +62,10 @@ LINK32=link.exe
# SUBTRACT LINK32 /verbose /profile /pdb:none /incremental:no /nodefaultlib
# Begin Special Build Tool
IntDir=.\../Debug6
TargetDir=\stepmania\stepmania\Program
TargetDir=\temp\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,27 +82,23 @@ PostBuild_Cmds=disasm\mapconv $(IntDir)\$(TargetName).map $(TargetDir)\StepMania
# PROP Intermediate_Dir "../Debug_Xbox"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
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
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"
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
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
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
# 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
@@ -139,10 +135,10 @@ LINK32=link.exe
# SUBTRACT LINK32 /verbose /pdb:none /debug
# Begin Special Build Tool
IntDir=.\../Release6
TargetDir=\stepmania\stepmania\Program
TargetDir=\temp\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
@@ -160,28 +156,24 @@ PostBuild_Cmds=disasm\mapconv $(IntDir)\$(TargetName).map $(TargetDir)\StepMania
# PROP Intermediate_Dir "../Release_Xbox"
# 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 /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
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"
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
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
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
# 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
@@ -3997,25 +3989,6 @@ SOURCE=.\ScoreDisplayRave.cpp
SOURCE=.\ScoreDisplayRave.h
# End Source File
# Begin Source File
SOURCE=.\TimingAssist.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=.\TimingAssist.h
# End Source File
# End Group
# Begin Group "Actors used in Menus"
-6
View File
@@ -1649,12 +1649,6 @@ cl /Zl /nologo /c verstub.cpp /Fo&quot;$(IntDir)&quot;\
<File
RelativePath="ScoreDisplayRave.h">
</File>
<File
RelativePath="TimingAssist.cpp">
</File>
<File
RelativePath="TimingAssist.h">
</File>
</Filter>
<Filter
Name="Rage"
-103
View File
@@ -1,103 +0,0 @@
#include "global.h"
#include "TimingAssist.h"
#include "AnnouncerManager.h"
#include "GameState.h"
#include "NoteData.h"
#include "NoteTypes.h"
#include "PrefsManager.h"
#include "RageLog.h"
TimingAssist::TimingAssist()
{
for(int i = 0; i < 2; ++i)
{
const CString direction = i? "early":"late";
for(TapNoteScore j = TNS_BOO; j < TNS_MARVELOUS; j = TapNoteScore(j+1))
{
CString name;
switch(j)
{
case TNS_MISS: name = "miss"; break;
case TNS_BOO: name = "boo"; break;
case TNS_GOOD: name = "good"; break;
case TNS_GREAT: name = "great"; break;
case TNS_PERFECT: name = "perfect"; break;
}
CString path = ssprintf("gameplay assist %s %s", direction.c_str(), name.c_str());
Timing[j][i].Load(ANNOUNCER->GetPathTo(path));
}
}
Miss.Load(ANNOUNCER->GetPathTo("gameplay assist miss"));
Exact.Load(ANNOUNCER->GetPathTo("gameplay assist exact"));
memset(data, 0, sizeof(data));
}
void TimingAssist::Load(PlayerNumber pn, NoteDataWithScoring *nd)
{
data[pn] = nd;
}
void TimingAssist::Reset()
{
LastRow = 0;
}
void TimingAssist::Update(float fDeltaTime)
{
Actor::Update(fDeltaTime);
for( int pn=0; pn<NUM_PLAYERS; pn++ )
{
if( !GAMESTATE->IsPlayerEnabled(PlayerNumber(pn)) )
continue;
DoTimingAssist((PlayerNumber)pn);
}
}
void TimingAssist::Announce(TapNoteScore tns, bool early)
{
/* Only one miss and perfect/marv sound. We could have early/late
* sounds for perfect and marvelous, but let's just have one "exact"
* sound. We should have something else for advanced players who
* actually do want to know if they're late or early for a marvelous. */
if(tns == TNS_MISS)
Miss.PlayRandom();
else if(tns == TNS_PERFECT || tns == TNS_MARVELOUS)
Exact.PlayRandom();
else
Timing[tns][early].PlayRandom();
}
void TimingAssist::DoTimingAssist(PlayerNumber pn)
{
ASSERT(data[pn]);
if(!GAMESTATE->m_PlayerOptions[pn].m_bTimingAssist)
return;
const int maxrow = BeatToNoteRow(GAMESTATE->m_fSongBeat);
for( ; LastRow <= maxrow; LastRow++)
{
const int last_tns_track = data[pn]->LastTapNoteScoreTrack(LastRow);
/* -1 means the row has no tap notes; it's irrelevant. */
if(last_tns_track == -1) continue;
const TapNoteScore last_tns = data[pn]->GetTapNoteScore(last_tns_track, LastRow);
/* TNS_NONE means the row is incomplete--it hasn't been graded yet. */
if(last_tns == TNS_NONE) return;
const float offset = data[pn]->GetTapNoteOffset(last_tns_track, LastRow);
const bool early = offset < 0;
Announce(last_tns, early);
}
}
/*
-----------------------------------------------------------------------------
Copyright (c) 2003 by the person(s) listed below. All rights reserved.
Glenn Maynard
-----------------------------------------------------------------------------
*/
-36
View File
@@ -1,36 +0,0 @@
#ifndef TIMING_ASSIST_H
#define TIMING_ASSIST_H
#include "Actor.h"
#include "RandomSample.h"
#include "GameConstantsAndTypes.h"
#include "PlayerNumber.h"
#include "NoteDataWithScoring.h"
class TimingAssist: public Actor
{
public:
TimingAssist();
void Load(PlayerNumber pn, NoteDataWithScoring *nd);
void DrawPrimitives() { }
void Update(float fDeltaTime);
void Reset();
private:
void DoTimingAssist(PlayerNumber pn);
void Announce(TapNoteScore tns, bool early);
RandomSample Timing[NUM_TAP_NOTE_SCORES][2];
RandomSample Miss, Exact;
NoteDataWithScoring *data[NUM_PLAYERS];
int LastRow;
};
#endif
/*
-----------------------------------------------------------------------------
Copyright (c) 2003 by the person(s) listed below. All rights reserved.
Glenn Maynard
-----------------------------------------------------------------------------
*/