#include "XmlFile.h" // I need this, for checking the Revision [ScreenArcadeDiagnostics]
+// If you need this, uncomment it. - Vyhd
+#if 0
#include <sys/types.h>
#include <sys/socket.h>
#include <ifaddrs.h> // Hayy, now I can get an IP! [ScreenArcadeDiagnostics]
#include <csetjmp>
#include <cassert>
+#endif
LuaManager *LUA = NULL;
static LuaFunctionList *g_LuaFunctions = NULL;
else
return string::npos;
}
-
+// If you need this, we can uncomment it. I don't think it's being used, though.
+// - Vyhd
// Progress Indicator for loading custom songs. -- Matt1360
+/*
void UpdateLoadingProgress( float fProgress )
{
CString sText = ssprintf( "Please wait ... Copying Patch: \n%u%%\n\n\n"
SCREENMAN->OverlayMessage( sText );
SCREENMAN->Draw();
}
+*/
#if 0
// Get Newest Revision
/*
* (c) 2004 Glenn Maynard
+ * (c) 2008 BoXoRRoXoRs
* All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
stepmania_SOURCES = $(main_SOURCES)
stepmania_LDADD = $(main_LDADD)
+# $(srcdir)/ffmpeg/lib/libavcodec.a $(srcdir)/ffmpeg/lib/libavformat.a
if HAVE_GTK
bin_PROGRAMS += GtkModule.so
\r
#include <fcntl.h>\r
#include <cerrno>\r
+// XXX: is this stuff portable? I have no idea. - Vyhd\r
#include <sys/types.h>\r
#include <sys/stat.h>\r
\r
#include <io.h>\r
#endif\r
\r
+/* courtesy of random.org. This is for future testing. -- Vyhd */\r
+#define DEFAULT_AES_KEY "65487573252940086457044055343188392138734144585"\r
+\r
//#define tell( handle ) lseek( handle, 0L, SEEK_CUR )\r
//#define _tell tell\r
\r
FDB->ResolvePath( sPath );\r
\r
crypt_file *newFile = ITG2CryptInterface::crypt_open(sPath, secret);\r
- if (newFile == NULL) {\r
+\r
+ if (newFile == NULL)\r
return NULL;\r
- }\r
\r
return new RageFileObjCrypt(newFile);\r
}\r
/* Search for a directory with "Songs" in it. Be careful: the CWD is likely to
* be ~, and it's possible that some users will have a ~/Songs/ directory that
* has nothing to do with us, so check the initial directory last. */
-
-
- RageFileManager::Mount( "dir" , "/stats" , "/Data" );
- RageFileManager::Mount( "dir" , "/dxldata" , "/Packages" );
-
+
+ /* Not yet, matt. We want this to stay self-contained *
+ * until the beta stage. :) - Vyhd */
+ //RageFileManager::Mount( "dir" , "/stats/" , "/Data" );
+ //RageFileManager::Mount( "dir" , "/dxldata" , "/Packages" );
+
CString Root = "";
struct stat st;
if( Root == "" && !stat( DirOfExecutable + "/Songs", &st ) && st.st_mode&S_IFDIR )
// I'm loading off zips and additional folders...I don't want no crashes...
// -- Matt1360
- // not standard for ITG file structure, keep commented out
- //RageFileManager::Mount( "dir", Root, "/" );
+ // not standard for ITG file structure, keep commented out
+ // Bad idea - this breaks all file loading on Linux. -- Vyhd
+ RageFileManager::Mount( "dir", Root, "/" );
+
#elif defined(_WINDOWS)
/* All Windows data goes in the directory one level above the executable. */
CHECKPOINT_M( ssprintf( "DOE \"%s\"", DirOfExecutable.c_str()) );
return true;
}
-bool CopyWithProgress( RageFileBasic &in, RageFileBasic &out, RageFileBasic &read,
- CString &sError, void(*OnUpdate)(float), bool *bReadError )
-{
- int iTarget = in.GetFileSize();
- float fPercent;
- while(1)
- {
- CString data;
- if( in.Read(data, 1024*32) == -1 )
- {
- sError = ssprintf( "read error: %s", in.GetError().c_str() );
- if( bReadError != NULL )
- *bReadError = true;
- return false;
- }
- if( data.empty() )
- break;
- int i = out.Write(data);
- if( i == -1 )
- {
- sError = ssprintf( "write error: %s", out.GetError().c_str() );
- if( bReadError != NULL )
- *bReadError = false;
- return false;
- }
-
- // now, update our loop
-
-
- fPercent = (float)(read.GetFileSize() / iTarget);
- LOG->Trace( "Copying.... %f done. %u of %u.", fPercent, read.GetFileSize(), iTarget );
- OnUpdate( fPercent );
- }
-
- if( out.Flush() == -1 )
- {
- sError = ssprintf( "write error: %s", out.GetError().c_str() );
- if( bReadError != NULL )
- *bReadError = false;
- return false;
- }
-
- return true;
-}
+/* Removed obsolete/unused function -- Vyhd */
/*
* Copyright (c) 2001-2004 Chris Danford, Glenn Maynard
+ * Copyright (c) 2008 BoXoRRoXoRs
* All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
bool FileCopy( CString sSrcFile, CString sDstFile );
bool FileCopy( RageFileBasic &in, RageFileBasic &out, CString &sError, bool *bReadError = NULL );
bool CopyWithProgress( CString sSrcFile, CString sDstFile, void(*OnUpdate)(float) );
-bool CopyWithProgress( RageFileBasic &in, RageFileBasic &out, RageFileBasic &read,
- CString &sError, void(*OnUpdate)(float), bool *bReadError = NULL );
+/* We will probably never need to use this. */
+//bool CopyWithProgress( RageFileBasic &in, RageFileBasic &out, RageFileBasic &read,
+// CString &sError, void(*OnUpdate)(float), bool *bReadError = NULL );
#endif
/*
* Copyright (c) 2001-2004 Chris Danford, Glenn Maynard
+ * Copyright (c) 2008 BoXoRRoXoRs
* All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
static BitmapText *m_PatchStatus;
static bool g_doReboot;
-int GetRevision();
+// This is hacky, obviously. I'll fix it up soon.
+// Right now, this just needs to compile. -- Vyhd
+int GetRevision()
+{
+ return 21;
+}
ScreenArcadePatch::~ScreenArcadePatch()
{
/* Requires "LightsDriver=ext" */
void InputHandler_Linux_PIUIO::UpdateLights()
{
+ /* From the decompile: */
+#if 0
+ if ( LightsDriver_External__g_LightState[9] )
+ *(_WORD *)(a2 + 2) |= 0x20u;
+ if ( LightsDriver_External__g_LightState[8] )
+ *(_WORD *)(a2 + 2) |= 0x10u;
+ if ( LightsDriver_External__g_LightState[11] )
+ *(_WORD *)(a2 + 2) |= 8u;
+ if ( LightsDriver_External__g_LightState[10] )
+ *(_WORD *)(a2 + 2) |= 4u;
+ if ( LightsDriver_External__g_LightState[29] )
+ *(_WORD *)a2 |= 0x20u;
+ if ( LightsDriver_External__g_LightState[28] )
+ *(_WORD *)a2 |= 0x10u;
+ if ( LightsDriver_External__g_LightState[31] )
+ *(_WORD *)a2 |= 8u;
+ if ( LightsDriver_External__g_LightState[30] )
+ *(_WORD *)a2 |= 4u;
+ if ( (_BYTE)LightsDriver_External__g_LightState )
+ *(_WORD *)(a2 + 2) |= 0x80u;
+ if ( LightsDriver_External__g_LightState[2] )
+ *(_WORD *)(a2 + 2) |= 0x200u;
+ if ( LightsDriver_External__g_LightState[1] )
+ *(_WORD *)(a2 + 2) |= 0x400u;
+ if ( LightsDriver_External__g_LightState[3] )
+ *(_WORD *)(a2 + 2) |= 0x100u;
+ if ( LightsDriver_External__g_LightState[6] )
+ *(_WORD *)a2 |= 0x400u;
+ if ( LightsDriver_External__g_LightState[7] )
+ *(_WORD *)a2 |= 0x400u;
+#endif
+
static const int iCabinetBits[NUM_CABINET_LIGHTS-1] =
{ (1 << 22), (1 << 25), (1 << 24), (1 << 23), 0, 0, (1 << 10) };
FOREACH_ENUM( GameButton, 4, gb )
if( g_LightsState.m_bGameButtonLights[gc][gb] )
m_iLightData += iPlayerBits[gc][gb];
+
+ LOG->Trace( "UpdateLights: %u", m_iLightData );
+
+ // lights updating isn't too important...leave a lot of process time.
+ usleep( 10000 );
}
/*
if( ret == NULL )
- LOG->Warn( "Unknown lights driver name: %s", s->c_str() );
+ LOG->Warn( "Unknown input handler name: %s", s->c_str() );
else
Add.push_back( ret );
}