xoffset -> addx

This commit is contained in:
Chris Danford
2003-04-14 05:22:33 +00:00
parent e22441b291
commit 71c57c1348
3 changed files with 9 additions and 9 deletions
+7 -4
View File
@@ -51,17 +51,18 @@ const int MAX_CODE_LENGTH = 10;
struct CodeCacheItem {
int iNumButtons;
GameButton buttons[MAX_CODE_LENGTH];
float fMaxSecondsBack;
};
CodeCacheItem g_CodeCacheItems[CodeDetector::NUM_CODES];
bool CodeDetector::EnteredCode( GameController controller, Code code )
{
if( g_CodeCacheItems[code].iNumButtons > 0 )
if( INPUTQUEUE->MatchesPattern(controller, g_CodeCacheItems[code].buttons, g_CodeCacheItems[code].iNumButtons) )
return true;
if( g_CodeCacheItems[code].iNumButtons == 0 )
return false;
return false;
const CodeCacheItem& item = g_CodeCacheItems[code];
return INPUTQUEUE->MatchesPattern(controller, item.buttons, item.iNumButtons, item.fMaxSecondsBack);
}
void RefreshCacheItem( int iIndex )
@@ -104,6 +105,8 @@ void RefreshCacheItem( int iIndex )
}
}
item.fMaxSecondsBack = item.iNumButtons*0.4f;
// if we make it here, we found all the buttons in the code
}