Skip to content

Commit d0f9900

Browse files
kill more attack garb
1 parent ee90f20 commit d0f9900

10 files changed

+15
-87
lines changed

src/NoteData.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,6 @@ bool NoteData::IsHoldNoteAtRow( int iTrack, int iRow, int *pHeadRow ) const
458458

459459
case TapNoteType_Tap:
460460
case TapNoteType_Mine:
461-
case TapNoteType_Attack:
462461
case TapNoteType_Lift:
463462
case TapNoteType_Fake:
464463
return false;

src/NoteDataUtil.cpp

-37
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,6 @@ void NoteDataUtil::GetSMNoteDataString( const NoteData &in, RString &sRet )
630630
break;
631631
case TapNoteType_HoldTail: c = '3'; break;
632632
case TapNoteType_Mine: c = 'M'; break;
633-
case TapNoteType_Attack: c = 'A'; break;
634633
case TapNoteType_AutoKeysound: c = 'K'; break;
635634
case TapNoteType_Lift: c = 'L'; break;
636635
case TapNoteType_Fake: c = 'F'; break;
@@ -640,11 +639,6 @@ void NoteDataUtil::GetSMNoteDataString( const NoteData &in, RString &sRet )
640639
}
641640
sRet.append( 1, c );
642641

643-
if( tn.type == TapNoteType_Attack )
644-
{
645-
sRet.append( ssprintf("{%s:%.2f}", tn.sAttackModifiers.c_str(),
646-
tn.fAttackDurationSeconds) );
647-
}
648642
// hey maybe if we have TapNoteType_Item we can do things here.
649643
if( tn.iKeysoundIndex >= 0 )
650644
sRet.append( ssprintf("[%d]",tn.iKeysoundIndex) );
@@ -1173,7 +1167,6 @@ void NoteDataUtil::CalculateRadarValues( const NoteData &in, float fSongSeconds,
11731167
case TapNoteType_Lift:
11741168
// HoldTails and Attacks are counted by IsTap. But it doesn't
11751169
// make sense to count HoldTails as hittable notes. -Kyz
1176-
case TapNoteType_Attack:
11771170
++out[RadarCategory_Notes];
11781171
++state.num_notes_on_curr_row;
11791172
++total_taps;
@@ -1858,7 +1851,6 @@ static void SuperShuffleTaps( NoteData &inout, int iStartIndex, int iEndIndex )
18581851
continue; // skip
18591852
case TapNoteType_Tap:
18601853
case TapNoteType_Mine:
1861-
case TapNoteType_Attack:
18621854
case TapNoteType_Lift:
18631855
case TapNoteType_Fake:
18641856
break; // shuffle this
@@ -1890,7 +1882,6 @@ static void SuperShuffleTaps( NoteData &inout, int iStartIndex, int iEndIndex )
18901882
case TapNoteType_Empty:
18911883
case TapNoteType_Tap:
18921884
case TapNoteType_Mine:
1893-
case TapNoteType_Attack:
18941885
case TapNoteType_Lift:
18951886
case TapNoteType_Fake:
18961887
break; // ok to swap with this
@@ -2990,34 +2981,6 @@ void NoteDataUtil::TransformNoteData( NoteData &nd, TimingData const& timing_dat
29902981
nd.RevalidateATIs(vector<int>(), false);
29912982
}
29922983

2993-
void NoteDataUtil::AddTapAttacks( NoteData &nd, Song* pSong )
2994-
{
2995-
// throw an attack in every 30 seconds
2996-
2997-
const char* szAttacks[3] =
2998-
{
2999-
"2x",
3000-
"drunk",
3001-
"dizzy",
3002-
};
3003-
3004-
for( float sec=15; sec<pSong->m_fMusicLengthSeconds; sec+=30 )
3005-
{
3006-
float fBeat = pSong->m_SongTiming.GetBeatFromElapsedTime( sec );
3007-
int iBeat = (int)fBeat;
3008-
int iTrack = iBeat % nd.GetNumTracks(); // deterministically calculates track
3009-
TapNote tn(
3010-
TapNoteType_Attack,
3011-
TapNoteSubType_Invalid,
3012-
TapNoteSource_Original,
3013-
szAttacks[RandomInt(ARRAYLEN(szAttacks))],
3014-
15.0f,
3015-
-1 );
3016-
nd.SetTapNote( iTrack, BeatToNoteRow(fBeat), tn );
3017-
}
3018-
nd.RevalidateATIs(vector<int>(), false);
3019-
}
3020-
30212984
void NoteDataUtil::Scale( NoteData &nd, float fScale )
30222985
{
30232986
ASSERT( fScale > 0 );

src/NoteDataUtil.h

-1
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,6 @@ namespace NoteDataUtil
165165
void TransformNoteData(NoteData &nd, TimingData const& timing_data,
166166
const PlayerOptions &po, StepsType st,
167167
int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW );
168-
void AddTapAttacks( NoteData &nd, Song* pSong );
169168

170169
void Scale( NoteData &nd, float fScale );
171170
void ScaleRegion( NoteData &nd, float fScale, int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW );

src/NoteDataWithScoring.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,6 @@ void NoteDataWithScoring::GetActualRadarValues(const NoteData &in,
313313
case TapNoteType_HoldHead:
314314
// HoldTails and Attacks are counted by IsTap. But it doesn't
315315
// make sense to count HoldTails as hittable notes. -Kyz
316-
case TapNoteType_Attack:
317316
case TapNoteType_Lift:
318317
UpdateHittable(state.curr_row, first_hittable_row, last_hittable_row);
319318
++state.num_notes_on_curr_row;

src/NoteDisplay.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -1504,7 +1504,6 @@ void NoteColumnRenderer::DrawPrimitives()
15041504
case TapNoteType_HoldTail:
15051505
case TapNoteType_Mine:
15061506
case TapNoteType_Lift:
1507-
case TapNoteType_Attack:
15081507
case TapNoteType_AutoKeysound:
15091508
case TapNoteType_Fake:
15101509
if(!tn.result.bHidden)

src/NoteTypes.cpp

+11-17
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,17 @@
55
#include "XmlFile.h"
66
#include "LocalizedString.h"
77

8-
TapNote TAP_EMPTY ( TapNoteType_Empty, TapNoteSubType_Invalid, TapNoteSource_Original, "", 0, -1 );
9-
TapNote TAP_ORIGINAL_TAP ( TapNoteType_Tap, TapNoteSubType_Invalid, TapNoteSource_Original, "", 0, -1 );
10-
TapNote TAP_ORIGINAL_LIFT ( TapNoteType_Lift, TapNoteSubType_Invalid, TapNoteSource_Original, "", 0, -1 );
11-
TapNote TAP_ORIGINAL_HOLD_HEAD ( TapNoteType_HoldHead, TapNoteSubType_Hold, TapNoteSource_Original, "", 0, -1 );
12-
TapNote TAP_ORIGINAL_ROLL_HEAD ( TapNoteType_HoldHead, TapNoteSubType_Roll, TapNoteSource_Original, "", 0, -1 );
13-
TapNote TAP_ORIGINAL_MINE ( TapNoteType_Mine, TapNoteSubType_Invalid, TapNoteSource_Original, "", 0, -1 );
14-
TapNote TAP_ORIGINAL_ATTACK ( TapNoteType_Attack, TapNoteSubType_Invalid, TapNoteSource_Original, "", 0, -1 );
15-
TapNote TAP_ORIGINAL_AUTO_KEYSOUND ( TapNoteType_AutoKeysound,TapNoteSubType_Invalid, TapNoteSource_Original, "", 0, -1 );
16-
TapNote TAP_ORIGINAL_FAKE ( TapNoteType_Fake, TapNoteSubType_Invalid, TapNoteSource_Original, "", 0, -1 );
17-
//TapNote TAP_ORIGINAL_MINE_HEAD ( TapNoteType_HoldHead, TapNoteSubType_Mine, TapNoteSource_Original, "", 0, -1 );
18-
TapNote TAP_ADDITION_TAP ( TapNoteType_Tap, TapNoteSubType_Invalid, TapNoteSource_Addition, "", 0, -1 );
19-
TapNote TAP_ADDITION_MINE ( TapNoteType_Mine, TapNoteSubType_Invalid, TapNoteSource_Addition, "", 0, -1 );
8+
TapNote TAP_EMPTY ( TapNoteType_Empty, TapNoteSubType_Invalid, TapNoteSource_Original, -1 );
9+
TapNote TAP_ORIGINAL_TAP ( TapNoteType_Tap, TapNoteSubType_Invalid, TapNoteSource_Original, -1 );
10+
TapNote TAP_ORIGINAL_LIFT ( TapNoteType_Lift, TapNoteSubType_Invalid, TapNoteSource_Original, -1 );
11+
TapNote TAP_ORIGINAL_HOLD_HEAD ( TapNoteType_HoldHead, TapNoteSubType_Hold, TapNoteSource_Original, -1 );
12+
TapNote TAP_ORIGINAL_ROLL_HEAD ( TapNoteType_HoldHead, TapNoteSubType_Roll, TapNoteSource_Original, -1 );
13+
TapNote TAP_ORIGINAL_MINE ( TapNoteType_Mine, TapNoteSubType_Invalid, TapNoteSource_Original, -1 );
14+
TapNote TAP_ORIGINAL_AUTO_KEYSOUND ( TapNoteType_AutoKeysound,TapNoteSubType_Invalid, TapNoteSource_Original, -1 );
15+
TapNote TAP_ORIGINAL_FAKE ( TapNoteType_Fake, TapNoteSubType_Invalid, TapNoteSource_Original, -1 );
16+
//TapNote TAP_ORIGINAL_MINE_HEAD ( TapNoteType_HoldHead, TapNoteSubType_Mine, TapNoteSource_Original, -1 );
17+
TapNote TAP_ADDITION_TAP ( TapNoteType_Tap, TapNoteSubType_Invalid, TapNoteSource_Addition, -1 );
18+
TapNote TAP_ADDITION_MINE ( TapNoteType_Mine, TapNoteSubType_Invalid, TapNoteSource_Addition, -1 );
2019

2120

2221
static const char *TapNoteTypeNames[] = {
@@ -26,7 +25,6 @@ static const char *TapNoteTypeNames[] = {
2625
"HoldTail",
2726
"Mine",
2827
"Lift",
29-
"Attack",
3028
"AutoKeySound",
3129
"Fake",
3230
};
@@ -255,8 +253,6 @@ class LunaTapNote: public Luna<TapNote>
255253
DEFINE_METHOD( GetTapNoteSubType, subType );
256254
DEFINE_METHOD( GetTapNoteSource, source );
257255
DEFINE_METHOD( GetPlayerNumber, pn );
258-
DEFINE_METHOD( GetAttackModifiers, sAttackModifiers );
259-
DEFINE_METHOD( GetAttackDuration, fAttackDurationSeconds );
260256
DEFINE_METHOD( GetKeysoundIndex, iKeysoundIndex );
261257
static int GetHoldDuration( T* p, lua_State* L ) { lua_pushnumber(L, NoteRowToBeat(p->iDuration)); return 1; }
262258
static int GetTapNoteResult( T* p, lua_State* L ) { p->result.PushSelf(L); return 1; }
@@ -269,8 +265,6 @@ class LunaTapNote: public Luna<TapNote>
269265
ADD_METHOD( GetTapNoteSource );
270266
ADD_METHOD( GetTapNoteResult );
271267
ADD_METHOD( GetPlayerNumber );
272-
ADD_METHOD( GetAttackModifiers );
273-
ADD_METHOD( GetAttackDuration );
274268
ADD_METHOD( GetKeysoundIndex );
275269
ADD_METHOD( GetHoldDuration );
276270
ADD_METHOD( GetHoldNoteResult );

src/NoteTypes.h

+3-16
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ enum TapNoteType
9090
TapNoteType_HoldTail, /**< In 2sand3s mode, holds are deleted and hold_tail is added. */
9191
TapNoteType_Mine, /**< In most modes, it is suggested to not step on these mines. */
9292
TapNoteType_Lift, /**< Lift your foot up when it crosses the target area. */
93-
TapNoteType_Attack, /**< Hitting this note causes an attack to take place. */
9493
TapNoteType_AutoKeysound, /**< A special sound is played when this note crosses the target area. */
9594
TapNoteType_Fake, /**< This arrow can't be scored for or against the player. */
9695
NUM_TapNoteType,
@@ -139,10 +138,6 @@ struct TapNote
139138
/** @brief The Player that is supposed to hit this note. This is mainly for Routine Mode. */
140139
PlayerNumber pn;
141140

142-
// used only if Type == attack:
143-
RString sAttackModifiers;
144-
float fAttackDurationSeconds;
145-
146141
// Index into Song's vector of keysound files if nonnegative:
147142
int iKeysoundIndex;
148143

@@ -161,29 +156,23 @@ struct TapNote
161156
bool IsNote() const { return type == TapNoteType_Tap || type == TapNoteType_HoldHead; }
162157

163158
TapNote(): type(TapNoteType_Empty), subType(TapNoteSubType_Invalid),
164-
source(TapNoteSource_Original), result(), pn(PLAYER_INVALID), sAttackModifiers(""),
165-
fAttackDurationSeconds(0), iKeysoundIndex(-1), iDuration(0), HoldResult() {}
159+
source(TapNoteSource_Original), result(), pn(PLAYER_INVALID), iKeysoundIndex(-1), iDuration(0), HoldResult() {}
166160
void Init()
167161
{
168162
type = TapNoteType_Empty;
169163
subType = TapNoteSubType_Invalid;
170164
source = TapNoteSource_Original;
171165
pn = PLAYER_INVALID,
172-
fAttackDurationSeconds = 0.f;
173166
iKeysoundIndex = -1;
174167
iDuration = 0;
175168
}
176169
TapNote(
177170
TapNoteType type_,
178171
TapNoteSubType subType_,
179-
TapNoteSource source_,
180-
RString sAttackModifiers_,
181-
float fAttackDurationSeconds_,
172+
TapNoteSource source_,
182173
int iKeysoundIndex_ ):
183174
type(type_), subType(subType_), source(source_), result(),
184-
pn(PLAYER_INVALID), sAttackModifiers(sAttackModifiers_),
185-
fAttackDurationSeconds(fAttackDurationSeconds_),
186-
iKeysoundIndex(iKeysoundIndex_), iDuration(0), HoldResult()
175+
pn(PLAYER_INVALID), iKeysoundIndex(iKeysoundIndex_), iDuration(0), HoldResult()
187176
{
188177
if (type_ > TapNoteType_Fake )
189178
{
@@ -202,8 +191,6 @@ struct TapNote
202191
COMPARE(type);
203192
COMPARE(subType);
204193
COMPARE(source);
205-
COMPARE(sAttackModifiers);
206-
COMPARE(fAttackDurationSeconds);
207194
COMPARE(iKeysoundIndex);
208195
COMPARE(iDuration);
209196
COMPARE(pn);

src/NotesLoaderJson.cpp

-5
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,6 @@ static void Deserialize( TapNote &o, const Json::Value &root )
9494
o.type = (TapNoteType)root["Type"].asInt();
9595
//if( o.type == TapNoteType_HoldHead )
9696
o.subType = (TapNoteSubType)root["SubType"].asInt();
97-
//root["Source"] = (int)source;
98-
//if( !o.sAttackModifiers.empty() )
99-
o.sAttackModifiers = root["AttackModifiers"].asString();
100-
//if( o.fAttackDurationSeconds > 0 )
101-
o.fAttackDurationSeconds = (float)root["AttackDurationSeconds"].asDouble();
10297
//if( o.bKeysound )
10398
o.iKeysoundIndex = root["KeysoundIndex"].asInt();
10499
//if( o.iDuration > 0 )

src/NotesWriterJson.cpp

-5
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,6 @@ static void Serialize( const TapNote &o, Json::Value &root )
5959
root["Type"] = (int)o.type;
6060
if( o.type == TapNoteType_HoldHead )
6161
root["SubType"] = (int)o.subType;
62-
//root["Source"] = (int)source;
63-
if( !o.sAttackModifiers.empty() )
64-
root["AttackModifiers"] = o.sAttackModifiers;
65-
if( o.fAttackDurationSeconds > 0 )
66-
root["AttackDurationSeconds"] = o.fAttackDurationSeconds;
6762
if( o.iKeysoundIndex != -1 )
6863
root["KeysoundIndex"] = o.iKeysoundIndex;
6964
if( o.iDuration > 0 )

src/Player.cpp

+1-3
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,6 @@ static bool NeedsTapJudging( const TapNote &tn )
500500
case TapNoteType_Lift:
501501
return tn.result.tns == TNS_None;
502502
case TapNoteType_HoldTail:
503-
case TapNoteType_Attack:
504503
case TapNoteType_AutoKeysound:
505504
case TapNoteType_Fake:
506505
case TapNoteType_Empty:
@@ -523,7 +522,6 @@ static bool NeedsHoldJudging( const TapNote &tn )
523522
case TapNoteType_HoldTail:
524523
case TapNoteType_Mine:
525524
case TapNoteType_Lift:
526-
case TapNoteType_Attack:
527525
case TapNoteType_AutoKeysound:
528526
case TapNoteType_Fake:
529527
case TapNoteType_Empty:
@@ -2053,7 +2051,7 @@ void Player::Step( int col, int row, const std::chrono::steady_clock::time_point
20532051
score = TNS_HitMine;
20542052
}
20552053

2056-
if( pTN->type == TapNoteType_Attack && score > TNS_W4 )
2054+
if( score > TNS_W4 )
20572055
score = TNS_W2; // sentinel
20582056

20592057
/* AI will generate misses here. Don't handle a miss like a regular

0 commit comments

Comments
 (0)