-Implement "lifebar graph shows FFC/FEC"\r
-Improve code behind ITG2's beginner helper\r
-OptionList LOL\r
+-Fix up/rewrite network gameplay screens for arcade support\r
-Code structure changes:
Reverted InputFilter - too little gain for too many problems
Backported/modified 4.0's X11 code (Linux window/input)
--New metrics in ScreenGameplay (event mode, same difficulty, versus):
+-New metrics in ScreenGameplay:
+ (Note: must be in Event Mode, Versus, and playing the same chart)
"ScorePxAheadCommand" - played when player's score is higher
"ScorePxBehindCommand" - played when player's score is lower
-New game commands:
"clearcredits" - clears credits on the machine (useful for testing)
"theme" - sets the theme, by name, when used (useful for theme switchers)
+-Win32 changes:
+ Added code to reboot on crashes for arcade builds (#define ITG_ARCADE)
-Misc. changes:
- Moved OpenITG-specific profile options to Extra.ini
+ Moved OpenITG-specific profile options to Extra.ini (caused ITG2 crashes)
Disabled autogeneration of new Public/Private RSA keys on load failure
-Fixed bugs:
Some custom songs end immediately after start
Editor doesn't draw properly, causes failed asserts
Song wheel doesn't "budge" when attempting to move ofter Chance
"Revert from Disk" in editor causes duplicate charts, crashes
+ Crash on bookkeeping when switching to an undefined screen
+ In AutoplayCPU, rolls cause early judgments of arrows and mines
OpenITG, alpha 5 (April 30th, 2008)
-----------------------------------
if( THEME->DoesThemeExist(sValue) )
{
m_sTheme = sValue; //set in ApplySelf
- LOG->Debug( "Theme %s exists.", sValue.c_str() );
}
else
{
- LOG->Debug( "Theme %s does not exist.", sValue.c_str() );
m_sInvalidReason = ssprintf( "Theme \"%s\" does not exist", sValue.c_str() );
m_bInvalid |= true;
}
/* do this here, so we load new metrics before attempting screen loads */
if( m_sTheme != "" && m_sTheme != THEME->GetCurThemeName() )
- {
- LOG->Debug( "Switching to theme %s", m_sTheme.c_str() );
THEME->SwitchThemeAndLanguage( m_sTheme, THEME->GetCurLanguage() );
- }
FOREACH_CONST( CString, m_vsScreensToPrepare, s )
SCREENMAN->PrepareScreen( *s );
#include "RageInput.h"
#include "RageUtil.h"
#include "RageThreads.h"
-
+#include "Preference.h"
InputFilter* INPUTFILTER = NULL; // global and accessable from anywhere in our program
static float g_fTimeBeforeSlow, g_fTimeBeforeFast, g_fTimeBetweenSlow, g_fTimeBetweenFast;
+Preference<float> g_fInputDebounceTime( "InputDebounceTime", 0 );
+
InputFilter::InputFilter()
{
}
+void InputFilter::CheckButtonChange( DeviceInput di, ButtonState &bs, const RageTimer &now )
+{
+ queue.push_back( InputEvent(di, bs.m_BeingHeld ? IET_FIRST_PRESS:IET_RELEASE) );
+}
+
bool InputFilter::IsBeingPressed( DeviceInput di )
{
return m_ButtonState[di.device][di.button].m_BeingHeld;
CString GetButtonComment( DeviceInput di ) const;
void GetInputEvents( InputEventArray &array );
+private:
+ void CheckButtonChange( DeviceInput di, ButtonState &bs, const RageTimer &now );
};
// GetTapNoteScore always returns TNS_MARVELOUS in autoplay.
// If the step is far away, don't judge it.
- if( m_pPlayerState->m_PlayerController == PC_AUTOPLAY &&
- fSecondsFromPerfect > ADJUSTED_WINDOW_TAP(TW_Boo) )
+
+ /* Tentative roll-eats-arrows fix */
+// if( m_pPlayerState->m_PlayerController == PC_AUTOPLAY &&
+ if( fSecondsFromPerfect > ADJUSTED_WINDOW_TAP(TW_Boo) )
score = TNS_NONE;
// TRICKY: We're asking the AI to judge mines. consider TNS_GOOD and below
// as "mine was hit" and everything else as "mine was avoided"
- if( tn.type == TapNote::mine )
+ /* Make sure we don't execute this code if there's no score. -- Vyhd */
+ if( tn.type == TapNote::mine && score != TNS_NONE )
{
// The CPU hits a lot of mines. Only consider hitting the
// first mine for a row. We know we're the first mine if
CString fn = sDir + STATS_XML;\r
if( !IsAFile(fn) )\r
return failed_no_profile;\r
-\r
+/*\r
+EXPERIMENT: will this make stats load and save properly?\r
//\r
// Don't unreasonably large stats.xml files.\r
//\r
return failed_tampered;\r
}\r
}\r
+*/\r
\r
if( bRequireSignature )\r
{ \r
CString efn = sDir + EXTRA_INI;\r
\r
//\r
- // Don't load unreasonably large editable.xml files.\r
+ // Don't load unreasonably large editable.ini files.\r
//\r
int iBytes = FILEMAN->GetFileSizeInBytes( fn );\r
if( iBytes > MAX_EDITABLE_INI_SIZE_BYTES )\r
Win32RestartProgram();
}
-/* Necessary? Is there anything RestartProgram can't do that this can? */
void ArchHooks_Win32::SystemReboot()
{
- GAMESTATE->EndGame();
-
#ifndef ITG_ARCADE
- return; // pretend there's nothing else here right now -- we'll enable if needed
-#endif
+ Win32RestartProgram();
- if( IsAFile("/Data/no-reboot") )
- return;
+ return; // pretend there's nothing else here right now -- enable if you need it
+#endif
/* Reboot, kill any hung processes, "Application Maintenance: Planned" */
bool bRestart = ExitWindowsEx( EWX_REBOOT | EWX_FORCEIFHUNG,
#include "GotoURL.h"
+/* Workaround for 'undefined' problem */
+#ifndef EWX_FORCEIFHUNG
+#define EWX_FORCEIFHUNG 0x10
+#endif
+
static HFONT hFontMono = NULL;
static void DoSave();
return EXCEPTION_CONTINUE_EXECUTION;
}
+/* just halt threads, write the log, and reboot. */
+#ifdef ITG_ARCADE
+ RageThread::HaltAllThreads( false );
+
+ VDDebugInfoInitFromFile( &g_debugInfo );
+
+ if( !g_CrashInfo.m_CrashReason[0] )
+ GetReason( pExc->ExceptionRecord, &g_CrashInfo );
+ do_backtrace( g_CrashInfo.m_BacktracePointers, BACKTRACE_MAX_SIZE, GetCurrentProcess(), GetCurrentThread(), pExc->ContextRecord );
+ DoSave();
+
+ VDDebugInfoDeinit(&g_debugInfo);
+
+ bool bRestart = ExitWindowsEx( EWX_REBOOT | EWX_FORCEIFHUNG,
+ SHTDN_REASON_MAJOR_APPLICATION | SHTDN_REASON_MINOR_MAINTENANCE
+ | SHTDN_REASON_FLAG_PLANNED );
+
+ return;
+#endif
+
static int InHere = 0;
if( InHere > 0 )
{