[default -> sm130futures] Update the branch.
This commit is contained in:
@@ -142,7 +142,7 @@ static void StartMusic( MusicToPlay &ToPlay )
|
||||
{
|
||||
LOG->Trace( "Found '%s'", ToPlay.m_sTimingFile.c_str() );
|
||||
Song song;
|
||||
if( GetExtension(ToPlay.m_sTimingFile.c_str()) == ".ssc" &&
|
||||
if( GetExtension(ToPlay.m_sTimingFile) == ".ssc" &&
|
||||
SSCLoader::LoadFromSSCFile(ToPlay.m_sTimingFile, song) )
|
||||
{
|
||||
ToPlay.HasTiming = true;
|
||||
@@ -152,7 +152,7 @@ static void StartMusic( MusicToPlay &ToPlay )
|
||||
if( pStepsCabinetLights )
|
||||
pStepsCabinetLights->GetNoteData( ToPlay.m_LightsData );
|
||||
}
|
||||
else if( GetExtension(ToPlay.m_sTimingFile.c_str()) == ".sm" &&
|
||||
else if( GetExtension(ToPlay.m_sTimingFile) == ".sm" &&
|
||||
SMLoader::LoadFromSMFile(ToPlay.m_sTimingFile, song) )
|
||||
{
|
||||
ToPlay.HasTiming = true;
|
||||
|
||||
+7
-2
@@ -355,9 +355,14 @@ void GameState::JoinPlayer( PlayerNumber pn )
|
||||
if( ALLOW_LATE_JOIN && m_pCurStyle != NULL )
|
||||
{
|
||||
const Style *pStyle;
|
||||
// only use one player for StyleType_OnePlayerTwoSides.
|
||||
// Only use one player for StyleType_OnePlayerTwoSides and StepsTypes
|
||||
// that can only be played by one player (e.g. dance-solo,
|
||||
// dance-threepanel, popn-nine). -aj
|
||||
// XXX?: still shows joined player as "Insert Card". May not be an issue? -aj
|
||||
if( m_pCurStyle->m_StyleType == StyleType_OnePlayerTwoSides )
|
||||
if( m_pCurStyle->m_StyleType == StyleType_OnePlayerTwoSides ||
|
||||
m_pCurStyle->m_StepsType == StepsType_dance_solo ||
|
||||
m_pCurStyle->m_StepsType == StepsType_dance_threepanel ||
|
||||
m_pCurStyle->m_StepsType == StepsType_popn_nine )
|
||||
pStyle = GAMEMAN->GetFirstCompatibleStyle( m_pCurGame, 1, m_pCurStyle->m_StepsType );
|
||||
else
|
||||
pStyle = GAMEMAN->GetFirstCompatibleStyle( m_pCurGame, GetNumSidesJoined(), m_pCurStyle->m_StepsType );
|
||||
|
||||
+15
-13
@@ -418,7 +418,7 @@ void NoteDisplay::DrawHoldPart( vector<Sprite*> &vpSpr, int iCol, int fYStep, fl
|
||||
{
|
||||
/* For very large hold notes, shift the texture coordinates to be near 0, so we
|
||||
* don't send very large values to the renderer. */
|
||||
const float fDistFromTop = fYStartPos - fYTop;
|
||||
const float fDistFromTop = fYStartPos - fYTop;
|
||||
float fTexCoordTop = SCALE( fDistFromTop, 0, fFrameHeight, rect.top, rect.bottom );
|
||||
fTexCoordTop += fAddToTexCoord;
|
||||
fAddToTexCoord -= floorf( fTexCoordTop );
|
||||
@@ -542,8 +542,8 @@ void NoteDisplay::DrawHoldBody( const TapNote& tn, int iCol, float fBeat, bool b
|
||||
DISPLAY->SetZTestMode( bWavyPartsNeedZBuffer?ZTEST_WRITE_ON_PASS:ZTEST_OFF );
|
||||
DISPLAY->SetZWrite( bWavyPartsNeedZBuffer );
|
||||
|
||||
/* Hack: Z effects need a finer grain step. */
|
||||
const int fYStep = bWavyPartsNeedZBuffer? 4: 16; // use small steps only if wavy
|
||||
// Hack: Z effects need a finer grain step.
|
||||
const int fYStep = bWavyPartsNeedZBuffer? 4: 16; // use small steps only if wavy
|
||||
|
||||
if( bFlipHoldBody )
|
||||
{
|
||||
@@ -641,16 +641,18 @@ void NoteDisplay::DrawHold( const TapNote &tn, int iCol, int iRow, bool bIsBeing
|
||||
/* The body and caps should have no overlap, so their order doesn't matter.
|
||||
* Draw the head last, so it appears on top. */
|
||||
float fBeat = NoteRowToBeat(iRow);
|
||||
//if( !cache->m_bHoldHeadIsAboveWavyParts )
|
||||
//{
|
||||
// Actor *pActor = GetHoldActor( m_HoldHead, NotePart_HoldHead, NoteRowToBeat(iRow), tn.subType == TapNote::hold_head_roll, bIsBeingHeld );
|
||||
// DrawActor( tn, pActor, NotePart_HoldHead, iCol, bFlipHeadAndTail ? fEndYOffset : fStartYOffset, fBeat, bIsAddition, fPercentFadeToFail, fReverseOffsetPixels, fColorScale, fDrawDistanceAfterTargetsPixels, fDrawDistanceBeforeTargetsPixels, fFadeInPercentOfDrawFar );
|
||||
//}
|
||||
//if( !cache->m_bHoldTailIsAboveWavyParts )
|
||||
//{
|
||||
// Actor *pActor = GetHoldActor( m_HoldTail, NotePart_HoldTail, NoteRowToBeat(iRow), tn.subType == TapNote::hold_head_roll, bIsBeingHeld );
|
||||
// DrawActor( tn, pActor, NotePart_HoldTail, iCol, bFlipHeadAndTail ? fStartYOffset : fEndYOffset, fBeat, bIsAddition, fPercentFadeToFail, fReverseOffsetPixels, fColorScale, fDrawDistanceAfterTargetsPixels, fDrawDistanceBeforeTargetsPixels, fFadeInPercentOfDrawFar );
|
||||
//}
|
||||
/*
|
||||
if( !cache->m_bHoldHeadIsAboveWavyParts )
|
||||
{
|
||||
Actor *pActor = GetHoldActor( m_HoldHead, NotePart_HoldHead, NoteRowToBeat(iRow), tn.subType == TapNote::hold_head_roll, bIsBeingHeld );
|
||||
DrawActor( tn, pActor, NotePart_HoldHead, iCol, bFlipHeadAndTail ? fEndYOffset : fStartYOffset, fBeat, bIsAddition, fPercentFadeToFail, fReverseOffsetPixels, fColorScale, fDrawDistanceAfterTargetsPixels, fDrawDistanceBeforeTargetsPixels, fFadeInPercentOfDrawFar );
|
||||
}
|
||||
if( !cache->m_bHoldTailIsAboveWavyParts )
|
||||
{
|
||||
Actor *pActor = GetHoldActor( m_HoldTail, NotePart_HoldTail, NoteRowToBeat(iRow), tn.subType == TapNote::hold_head_roll, bIsBeingHeld );
|
||||
DrawActor( tn, pActor, NotePart_HoldTail, iCol, bFlipHeadAndTail ? fStartYOffset : fEndYOffset, fBeat, bIsAddition, fPercentFadeToFail, fReverseOffsetPixels, fColorScale, fDrawDistanceAfterTargetsPixels, fDrawDistanceBeforeTargetsPixels, fFadeInPercentOfDrawFar );
|
||||
}
|
||||
*/
|
||||
|
||||
DrawHoldBody( tn, iCol, fBeat, bIsBeingHeld, fYHead, fYTail, bIsAddition, fPercentFadeToFail, fColorScale, false, fDrawDistanceAfterTargetsPixels, fDrawDistanceBeforeTargetsPixels, fFadeInPercentOfDrawFar );
|
||||
DrawHoldBody( tn, iCol, fBeat, bIsBeingHeld, fYHead, fYTail, bIsAddition, fPercentFadeToFail, fColorScale, true, fDrawDistanceAfterTargetsPixels, fDrawDistanceBeforeTargetsPixels, fFadeInPercentOfDrawFar );
|
||||
|
||||
+4
-4
@@ -2562,7 +2562,7 @@ void Player::UpdateTapNotesMissedOlderThan( float fMissIfOlderThanSeconds )
|
||||
|
||||
if( !NeedsTapJudging(tn) )
|
||||
continue;
|
||||
|
||||
|
||||
// Ignore all notes that are skipped via WARPS.
|
||||
if( GAMESTATE->m_pCurSong->m_Timing.IsWarpAtRow( iter.Row() ) )
|
||||
continue;
|
||||
@@ -2598,7 +2598,7 @@ void Player::UpdateJudgedRows()
|
||||
{
|
||||
int iRow = iter.Row();
|
||||
|
||||
// if row is within a warp section, ignore it. -aj
|
||||
// If row is within a warp section, ignore it. -aj
|
||||
if( GAMESTATE->m_pCurSong->m_Timing.IsWarpAtRow(iRow) )
|
||||
continue;
|
||||
|
||||
@@ -2933,7 +2933,7 @@ void Player::HandleTapRowScore( unsigned row )
|
||||
bNoCheating = false;
|
||||
#endif
|
||||
|
||||
// more warp hackery. -aj
|
||||
// Warp hackery. -aj
|
||||
if( GAMESTATE->m_pCurSong->m_Timing.IsWarpAtRow( row ) )
|
||||
return;
|
||||
|
||||
@@ -3037,7 +3037,7 @@ void Player::HandleHoldCheckpoint( int iRow, int iNumHoldsHeldThisRow, int iNumH
|
||||
bNoCheating = false;
|
||||
#endif
|
||||
|
||||
// more warp hackery. -aj
|
||||
// More warp hackery. -aj
|
||||
if( GAMESTATE->m_pCurSong->m_Timing.IsWarpAtRow( iRow ) )
|
||||
return;
|
||||
|
||||
|
||||
+8
-5
@@ -85,11 +85,12 @@ public:
|
||||
m_iNumExtraStagesPassed(0), m_iNumExtraStagesFailed(0),
|
||||
m_iNumToasties(0), m_iTotalTapsAndHolds(0), m_iTotalJumps(0),
|
||||
m_iTotalHolds(0), m_iTotalRolls(0), m_iTotalMines(0),
|
||||
m_iTotalHands(0), m_iTotalLifts(0), m_UnlockedEntryIDs(),
|
||||
m_sLastPlayedMachineGuid(""), m_LastPlayedDate(),
|
||||
m_iNumSongsPlayedByStyle(), m_iNumTotalSongsPlayed(0),
|
||||
m_UserData(), m_SongHighScores(), m_CourseHighScores(),
|
||||
m_vScreenshots(), m_mapDayToCaloriesBurned()
|
||||
m_iTotalHands(0), m_iTotalLifts(0), m_bNewProfile(false),
|
||||
m_UnlockedEntryIDs(), m_sLastPlayedMachineGuid(""),
|
||||
m_LastPlayedDate(),m_iNumSongsPlayedByStyle(),
|
||||
m_iNumTotalSongsPlayed(0), m_UserData(), m_SongHighScores(),
|
||||
m_CourseHighScores(), m_vScreenshots(),
|
||||
m_mapDayToCaloriesBurned()
|
||||
{
|
||||
m_lastSong.Unset();
|
||||
m_lastCourse.Unset();
|
||||
@@ -182,6 +183,8 @@ public:
|
||||
int m_iTotalMines;
|
||||
int m_iTotalHands;
|
||||
int m_iTotalLifts;
|
||||
/** @brief Is this a brand new profile? */
|
||||
bool m_bNewProfile;
|
||||
set<RString> m_UnlockedEntryIDs;
|
||||
/**
|
||||
* @brief Which machine did we play on last, based on the Guid?
|
||||
|
||||
@@ -97,6 +97,7 @@ void ProfileManager::Init()
|
||||
m_bLastLoadWasTamperedOrCorrupt[p] = false;
|
||||
m_bLastLoadWasFromLastGood[p] = false;
|
||||
m_bNeedToBackUpLastLoad[p] = false;
|
||||
m_bNewProfile[p] = false;
|
||||
}
|
||||
|
||||
LoadMachineProfile();
|
||||
@@ -222,6 +223,7 @@ bool ProfileManager::LoadProfileFromMemoryCard( PlayerNumber pn, bool bLoadEdits
|
||||
|
||||
vector<RString> asDirsToTry;
|
||||
GetMemoryCardProfileDirectoriesToTry( asDirsToTry );
|
||||
m_bNewProfile[pn] = true;
|
||||
|
||||
for( unsigned i = 0; i < asDirsToTry.size(); ++i )
|
||||
{
|
||||
@@ -239,6 +241,7 @@ bool ProfileManager::LoadProfileFromMemoryCard( PlayerNumber pn, bool bLoadEdits
|
||||
ProfileLoadResult res = LoadProfile( pn, sDir, true );
|
||||
if( res == ProfileLoadResult_Success )
|
||||
{
|
||||
m_bNewProfile[pn] = false;
|
||||
/* If importing, store the directory we imported from, for display purposes. */
|
||||
if( i > 0 )
|
||||
m_sProfileDirImportedFrom[pn] = asDirsToTry[i];
|
||||
@@ -246,7 +249,10 @@ bool ProfileManager::LoadProfileFromMemoryCard( PlayerNumber pn, bool bLoadEdits
|
||||
}
|
||||
|
||||
if( res == ProfileLoadResult_FailedTampered )
|
||||
{
|
||||
m_bNewProfile[pn] = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* If we imported a profile fallback directory, change the memory card
|
||||
@@ -544,6 +550,11 @@ bool ProfileManager::ProfileWasLoadedFromMemoryCard( PlayerNumber pn ) const
|
||||
return !m_sProfileDir[pn].empty() && m_bWasLoadedFromMemoryCard[pn];
|
||||
}
|
||||
|
||||
bool ProfileManager::ProfileFromMemoryCardIsNew( PlayerNumber pn ) const
|
||||
{
|
||||
return GetProfile(pn) && m_bWasLoadedFromMemoryCard[pn] && m_bNewProfile[pn];
|
||||
}
|
||||
|
||||
bool ProfileManager::LastLoadWasTamperedOrCorrupt( PlayerNumber pn ) const
|
||||
{
|
||||
return !m_sProfileDir[pn].empty() && m_bLastLoadWasTamperedOrCorrupt[pn];
|
||||
|
||||
@@ -77,6 +77,7 @@ public:
|
||||
|
||||
RString GetPlayerName( PlayerNumber pn ) const;
|
||||
bool ProfileWasLoadedFromMemoryCard( PlayerNumber pn ) const;
|
||||
bool ProfileFromMemoryCardIsNew( PlayerNumber pn ) const;
|
||||
bool LastLoadWasTamperedOrCorrupt( PlayerNumber pn ) const;
|
||||
bool LastLoadWasFromLastGood( PlayerNumber pn ) const;
|
||||
|
||||
@@ -117,6 +118,7 @@ private:
|
||||
bool m_bLastLoadWasTamperedOrCorrupt[NUM_PLAYERS]; // true if Stats.xml was present, but failed to load (probably because of a signature failure)
|
||||
bool m_bLastLoadWasFromLastGood[NUM_PLAYERS]; // if true, then m_bLastLoadWasTamperedOrCorrupt is also true
|
||||
mutable bool m_bNeedToBackUpLastLoad[NUM_PLAYERS]; // if true, back up profile on next save
|
||||
bool m_bNewProfile[NUM_PLAYERS];
|
||||
|
||||
Profile *m_pMemoryCardProfile[NUM_PLAYERS]; // holds Profile for the currently inserted card
|
||||
Profile *m_pMachineProfile;
|
||||
|
||||
@@ -151,7 +151,6 @@ bool RoomWheel::Select()
|
||||
{
|
||||
// Since this is not actually an option outside of this wheel, NULL is a good idea.
|
||||
m_LastSelection = NULL;
|
||||
// todo: Call a screen with class ScreenTextEntry instead. -aj
|
||||
ScreenTextEntry::TextEntry( SM_BackFromRoomName, ENTER_ROOM_NAME, "", 255 );
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -3531,7 +3531,6 @@ void ScreenEdit::HandleStepsInformationChoice( StepsInformationChoice c, const v
|
||||
switch( c )
|
||||
{
|
||||
case description:
|
||||
// todo: Call a screen with class ScreenTextEntry instead. -aj
|
||||
ScreenTextEntry::TextEntry(
|
||||
SM_None,
|
||||
ENTER_NEW_DESCRIPTION,
|
||||
@@ -3580,8 +3579,6 @@ void ScreenEdit::HandleSongInformationChoice( SongInformationChoice c, const vec
|
||||
{
|
||||
Song* pSong = GAMESTATE->m_pCurSong;
|
||||
|
||||
// todo: Call a screen with class ScreenTextEntry instead.
|
||||
// multiple times in this section, so I'm only saying it here. -aj
|
||||
switch( c )
|
||||
{
|
||||
DEFAULT_FAIL(c);
|
||||
@@ -3628,7 +3625,6 @@ void ScreenEdit::HandleTimingDataInformationChoice( TimingDataInformationChoice
|
||||
{
|
||||
DEFAULT_FAIL( c );
|
||||
case bpm:
|
||||
// todo: Call a screen with class ScreenTextEntry instead. -aj
|
||||
ScreenTextEntry::TextEntry(
|
||||
SM_BackFromBPMChange,
|
||||
ENTER_BPM_VALUE,
|
||||
@@ -3637,7 +3633,6 @@ void ScreenEdit::HandleTimingDataInformationChoice( TimingDataInformationChoice
|
||||
);
|
||||
break;
|
||||
case stop:
|
||||
// todo: Call a screen with class ScreenTextEntry instead. -aj
|
||||
ScreenTextEntry::TextEntry(
|
||||
SM_BackFromStopChange,
|
||||
ENTER_STOP_VALUE,
|
||||
@@ -3646,7 +3641,6 @@ void ScreenEdit::HandleTimingDataInformationChoice( TimingDataInformationChoice
|
||||
);
|
||||
break;
|
||||
case delay:
|
||||
// todo: Call a screen with class ScreenTextEntry instead. -aj
|
||||
ScreenTextEntry::TextEntry(
|
||||
SM_BackFromDelayChange,
|
||||
ENTER_DELAY_VALUE,
|
||||
@@ -3687,7 +3681,6 @@ void ScreenEdit::HandleTimingDataInformationChoice( TimingDataInformationChoice
|
||||
);
|
||||
break;
|
||||
case warp:
|
||||
// todo: Call a screen with class ScreenTextEntry instead. -aj
|
||||
ScreenTextEntry::TextEntry(
|
||||
SM_BackFromWarpChange,
|
||||
ENTER_WARP_VALUE,
|
||||
|
||||
@@ -35,6 +35,7 @@ void ScreenGameplaySyncMachine::Init()
|
||||
SongUtil::GetPlayableSteps( &m_Song, vpSteps );
|
||||
ASSERT_M(vpSteps.size() > 0, "No playable steps for ScreenGameplaySyncMachine");
|
||||
Steps *pSteps = vpSteps[0];
|
||||
// TODO: Either detect which player accessed this file, or FOREACH all of them. -Wolfman2000
|
||||
GAMESTATE->m_pCurSteps[0].Set( pSteps );
|
||||
|
||||
GamePreferences::m_AutoPlay.Set( PC_HUMAN );
|
||||
|
||||
@@ -81,7 +81,8 @@ void ScreenNameEntryTraditional::BeginScreen()
|
||||
GAMESTATE->GetRankingFeats( pn, aFeats );
|
||||
|
||||
bool bNoStagesLeft = GAMESTATE->m_iPlayerStageTokens[pn] <= 0;
|
||||
m_bEnteringName[pn] = aFeats.size() > 0 && bNoStagesLeft;
|
||||
m_bEnteringName[pn] = ( aFeats.size() > 0 ||
|
||||
PROFILEMAN->ProfileFromMemoryCardIsNew(pn) ) && bNoStagesLeft;
|
||||
m_bFinalized[pn] = !m_bEnteringName[pn];
|
||||
}
|
||||
|
||||
|
||||
@@ -25,8 +25,8 @@ void ScreenOptionsExportPackage::Init()
|
||||
void ScreenOptionsExportPackage::BeginScreen()
|
||||
{
|
||||
// Fill m_vsPossibleDirsToExport
|
||||
// todo: split these out over multiple screens so the scroller
|
||||
// isn't so overloaded. -freem
|
||||
// todo: Split these out over multiple screens so the scroller
|
||||
// isn't so overloaded. (See ScreenOptionsToggleSongs) -freem
|
||||
{
|
||||
// Add themes
|
||||
{
|
||||
|
||||
@@ -809,8 +809,7 @@ void ScreenSelectMaster::MenuStart( const InputEventPlus &input )
|
||||
mc.ApplyToAllPlayers();
|
||||
// We want to be able to broadcast a Start message to the theme, in
|
||||
// case a themer wants to handle something. -aj
|
||||
// TODO: Find a way to differentiate this from the message below, for
|
||||
// less ambiguousness?
|
||||
// TODO: Add a param to differentiate this from the message below.
|
||||
MESSAGEMAN->Broadcast( (MessageID)(Message_MenuStartP1+pn) );
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -485,7 +485,7 @@ void ScreenSelectMusic::Input( const InputEventPlus &input )
|
||||
m_bStepsChosen[input.pn] )
|
||||
return; // ignore
|
||||
|
||||
// todo: use mousewheel to scroll MusicWheel -aj
|
||||
// todo: Allow mousewheel to scroll MusicWheel -aj
|
||||
|
||||
if( USE_PLAYER_SELECT_MENU )
|
||||
{
|
||||
@@ -1528,9 +1528,8 @@ void ScreenSelectMusic::AfterStepsOrTrailChange( const vector<PlayerNumber> &vpn
|
||||
}
|
||||
else
|
||||
{
|
||||
// I don't like how numbers just stay up there if the current
|
||||
// selection is NULL.
|
||||
// todo: Let themers set the text instead of just using 0. -aj
|
||||
// The numbers shouldn't stay if the current selection is NULL.
|
||||
// todo: Let themers set the text value instead of just using 0. -aj
|
||||
m_textHighScore[pn].SetText( ssprintf("%*i", NUM_SCORE_DIGITS, 0) );
|
||||
}
|
||||
}
|
||||
|
||||
+5
-4
@@ -19,6 +19,9 @@
|
||||
#include "LuaBinding.h"
|
||||
#include "EnumHelper.h"
|
||||
|
||||
ThemeMetric<int> SORT_BPM_DIVISION ( "MusicWheel", "SortBPMDivision" );
|
||||
ThemeMetric<int> SORT_LENGTH_DIVISION ( "MusicWheel", "SortLengthDivision" );
|
||||
|
||||
bool SongCriteria::Matches( const Song *pSong ) const
|
||||
{
|
||||
if( !m_sGroupName.empty() && m_sGroupName != pSong->m_sGroupName )
|
||||
@@ -595,8 +598,7 @@ RString SongUtil::GetSectionNameFromSongAndSort( const Song* pSong, SortOrder so
|
||||
return SORT_NOT_AVAILABLE.GetValue();
|
||||
case SORT_BPM:
|
||||
{
|
||||
// todo: make this a theme metric? -aj
|
||||
const int iBPMGroupSize = 20;
|
||||
const int iBPMGroupSize = SORT_BPM_DIVISION;
|
||||
DisplayBpms bpms;
|
||||
pSong->GetDisplayBpms( bpms );
|
||||
int iMaxBPM = (int)bpms.GetMax();
|
||||
@@ -605,8 +607,7 @@ RString SongUtil::GetSectionNameFromSongAndSort( const Song* pSong, SortOrder so
|
||||
}
|
||||
case SORT_LENGTH:
|
||||
{
|
||||
// todo: make this a theme metric? -aj
|
||||
const int iSortLengthSize = 5;
|
||||
const int iSortLengthSize = SORT_LENGTH_DIVISION;
|
||||
int iMaxLength = (int)pSong->m_fMusicLengthSeconds;
|
||||
iMaxLength += (iSortLengthSize - (iMaxLength%iSortLengthSize) - 1);
|
||||
int iMinLength = iMaxLength - (iSortLengthSize-1);
|
||||
|
||||
@@ -331,7 +331,6 @@ static BOOL CALLBACK DIMouse_EnumDevObjectsProc(LPCDIDEVICEOBJECTINSTANCE dev, L
|
||||
|
||||
in.ofs = dev->dwOfs;
|
||||
|
||||
// xxx: does this check for scrollwheels? -aj
|
||||
if(dev->dwType & DIDFT_BUTTON)
|
||||
{
|
||||
in.type = in.BUTTON;
|
||||
|
||||
@@ -398,7 +398,7 @@ void InputHandler_Linux_Event::InputThread()
|
||||
DeviceButton neg = g_apEventDevices[i]->aiAbsMappingLow[event.code];
|
||||
DeviceButton pos = g_apEventDevices[i]->aiAbsMappingHigh[event.code];
|
||||
|
||||
float l = SCALE( int(event.value), (float) g_apEventDevices[i]->aiAbsMin[i], (float) g_apEventDevices[i]->aiAbsMax[i], -1.0f, 1.0f );
|
||||
float l = SCALE( int(event.value), (float) g_apEventDevices[i]->aiAbsMin[event.code], (float) g_apEventDevices[i]->aiAbsMax[event.code], -1.0f, 1.0f );
|
||||
ButtonPressed( DeviceInput(g_apEventDevices[i]->m_Dev, neg, max(-l,0), now) );
|
||||
ButtonPressed( DeviceInput(g_apEventDevices[i]->m_Dev, pos, max(+l,0), now) );
|
||||
break;
|
||||
|
||||
@@ -101,7 +101,7 @@ void run()
|
||||
CHECK( test.GetElapsedTimeFromBeat(15.0f), 14.5f ); // stopped
|
||||
CHECK( test.GetElapsedTimeFromBeat(16), 20.0f );
|
||||
|
||||
/* todo: add warp tests once the warp code is done */
|
||||
// todo: add warp tests -aj
|
||||
|
||||
RageTimer foobar;
|
||||
/* We can look up the time of any given beat, then look up the beat of that
|
||||
@@ -124,10 +124,10 @@ int q = 0;
|
||||
}
|
||||
LOG->Trace("... %i in %f", q, foobar.GetDeltaTime());
|
||||
|
||||
// todo: add warp segments
|
||||
TimingData test2;
|
||||
test2.AddBPMSegment( BPMSegment(0, 60) );
|
||||
test2.AddStopSegment( StopSegment(0, 1) );
|
||||
//test2.AddWarpSegment( WarpSegment() );
|
||||
CHECK( test2.GetBeatFromElapsedTime(-1), -1.0f );
|
||||
CHECK( test2.GetBeatFromElapsedTime(0), 0.0f );
|
||||
CHECK( test2.GetBeatFromElapsedTime(1), 0.0f );
|
||||
|
||||
Reference in New Issue
Block a user