xbox updates

This commit is contained in:
Chris Danford
2003-11-13 00:39:36 +00:00
parent 5b076e16fa
commit 47def7d3dc
40 changed files with 1358 additions and 19 deletions
+3
View File
@@ -79,6 +79,9 @@ void AddLayersFromAniDir( CString sAniDir, vector<BGAnimationLayer*> &layersAddT
if( ini.GetValue(sLayer, "Import", sImportDir) )
{
// import a whole BGAnimation
#ifdef _XBOX
sImportDir.Replace("/","\\");
#endif
sImportDir = sAniDir + sImportDir;
CollapsePath( sImportDir );
AddLayersFromAniDir( sImportDir, layersAddTo, Generic );
+15
View File
@@ -49,6 +49,7 @@ PrefsManager::PrefsManager()
#else
m_bShowStats = false;
#endif
m_bShowBanners = true ;
m_BackgroundMode = BGMODE_ANIMATIONS;
m_iNumBackgrounds = 8;
m_bShowDanger = true;
@@ -168,6 +169,10 @@ PrefsManager::PrefsManager()
#ifdef _XBOX
m_bInterlaced = true;
m_bPAL = false;
m_fScreenPosX = 0 ;
m_fScreenPosY = 0 ;
m_fScreenWidth = 640 ;
m_fScreenHeight = 480 ;
#else
m_bInterlaced = false;
#endif
@@ -214,6 +219,10 @@ void PrefsManager::ReadGlobalPrefsFromDisk()
ini.GetValue( "Options", "Interlaced", m_bInterlaced );
#ifdef _XBOX
ini.GetValue( "Options", "PAL", m_bPAL );
ini.GetValue( "Options", "ScreenPosX", m_fScreenPosX );
ini.GetValue( "Options", "ScreenPosY", m_fScreenPosY );
ini.GetValue( "Options", "ScreenWidth", m_fScreenWidth );
ini.GetValue( "Options", "ScreenHeight", m_fScreenHeight );
#endif
ini.GetValue( "Options", "DisplayWidth", m_iDisplayWidth );
ini.GetValue( "Options", "DisplayHeight", m_iDisplayHeight );
@@ -224,6 +233,7 @@ void PrefsManager::ReadGlobalPrefsFromDisk()
ini.GetValue( "Options", "RefreshRate", m_iRefreshRate );
ini.GetValue( "Options", "UseDedicatedMenuButtons", m_bOnlyDedicatedMenuButtons );
ini.GetValue( "Options", "ShowStats", m_bShowStats );
ini.GetValue( "Options", "ShowBanners", m_bShowBanners );
ini.GetValue( "Options", "BackgroundMode", (int&)m_BackgroundMode );
ini.GetValue( "Options", "NumBackgrounds", m_iNumBackgrounds);
ini.GetValue( "Options", "ShowDanger", m_bShowDanger );
@@ -373,6 +383,7 @@ void PrefsManager::SaveGlobalPrefsToDisk() const
ini.SetValue( "Options", "RefreshRate", m_iRefreshRate );
ini.SetValue( "Options", "UseDedicatedMenuButtons", m_bOnlyDedicatedMenuButtons );
ini.SetValue( "Options", "ShowStats", m_bShowStats );
ini.SetValue( "Options", "ShowBanners", m_bShowBanners );
ini.SetValue( "Options", "BackgroundMode", m_BackgroundMode);
ini.SetValue( "Options", "NumBackgrounds", m_iNumBackgrounds);
ini.SetValue( "Options", "ShowDanger", m_bShowDanger );
@@ -410,6 +421,10 @@ void PrefsManager::SaveGlobalPrefsToDisk() const
ini.SetValue( "Options", "Interlaced", m_bInterlaced );
#ifdef _XBOX
ini.SetValue( "Options", "PAL", m_bPAL );
ini.SetValue( "Options", "ScreenPosX", m_fScreenPosX );
ini.SetValue( "Options", "ScreenPosY", m_fScreenPosY );
ini.SetValue( "Options", "ScreenWidth", m_fScreenWidth );
ini.SetValue( "Options", "ScreenHeight", m_fScreenHeight );
#endif
ini.SetValue( "Options", "HowToPlay", m_bInstructions );
ini.SetValue( "Options", "Caution", m_bShowDontDie );
+5
View File
@@ -29,6 +29,7 @@ public:
int m_iMaxTextureResolution;
int m_iRefreshRate;
bool m_bShowStats;
bool m_bShowBanners;
enum BackgroundModes { BGMODE_OFF, BGMODE_ANIMATIONS, BGMODE_MOVIEVIS, BGMODE_RANDOMMOVIES } m_BackgroundMode;
int m_iNumBackgrounds;
float m_fBGBrightness;
@@ -37,6 +38,10 @@ public:
bool m_bInterlaced;
#ifdef _XBOX
bool m_bPAL;
float m_fScreenPosX ;
float m_fScreenPosY ;
float m_fScreenWidth ;
float m_fScreenHeight ;
#endif
bool m_bDelayedTextureDelete;
bool m_bTexturePreload;
+2
View File
@@ -204,6 +204,7 @@ bool ProfileManager::LoadProfileFromMemoryCard( PlayerNumber pn )
bool ProfileManager::LoadFirstAvailableProfile( PlayerNumber pn )
{
#ifndef _XBOX
// mount card
if( !PREFSMAN->m_sMemoryCardMountCommand[pn].empty() )
system( PREFSMAN->m_sMemoryCardMountCommand[pn] );
@@ -218,6 +219,7 @@ bool ProfileManager::LoadFirstAvailableProfile( PlayerNumber pn )
if( LoadProfileFromMemoryCard(pn) )
return true;
}
#endif
if( LoadDefaultProfileFromMachine(pn) )
return true;
+31 -2
View File
@@ -29,6 +29,7 @@
#include "SDL_video.h" // for SDL_Surface
#include "SDL_utils.h"
#include "D3DX8Core.h"
#include "PrefsManager.h"
#include "arch/arch.h"
@@ -489,8 +490,21 @@ CString RageDisplay_D3D::TryVideoMode( VideoModeParams p, bool &bNewDeviceOut )
g_d3dpp.Flags = 0;
g_d3dpp.FullScreen_RefreshRateInHz = D3DPRESENT_RATE_DEFAULT;
#else
g_d3dpp.Flags = (p.interlaced? D3DPRESENTFLAG_INTERLACED: D3DPRESENTFLAG_PROGRESSIVE ) | D3DPRESENTFLAG_10X11PIXELASPECTRATIO;
g_d3dpp.FullScreen_RefreshRateInHz = p.PAL ? 50 : 60;
if(XGetVideoStandard() == XC_VIDEO_STANDARD_PAL_I)
{
//get supported video flags
DWORD videoFlags = XGetVideoFlags();
//set pal60 if available.
if(videoFlags & XC_VIDEO_FLAGS_PAL_60Hz)
g_d3dpp.FullScreen_RefreshRateInHz = 60 ;
else
g_d3dpp.FullScreen_RefreshRateInHz = 50 ;
}
else
g_d3dpp.FullScreen_RefreshRateInHz = 60 ;
g_d3dpp.Flags = 0 ;
#endif
LOG->Trace( "Present Parameters: %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d",
@@ -502,6 +516,11 @@ CString RageDisplay_D3D::TryVideoMode( VideoModeParams p, bool &bNewDeviceOut )
g_d3dpp.FullScreen_PresentationInterval
);
#ifdef _XBOX
if ( D3D__pDevice )
g_pd3dDevice = D3D__pDevice ;
#endif
if( g_pd3dDevice == NULL ) // device is not yet created. We need to create it
{
bNewDeviceOut = true;
@@ -567,6 +586,16 @@ CString RageDisplay_D3D::TryVideoMode( VideoModeParams p, bool &bNewDeviceOut )
void RageDisplay_D3D::ResolutionChanged()
{
#ifdef _XBOX
g_CurrentParams.width = PREFSMAN->m_fScreenWidth ;
g_CurrentParams.height = PREFSMAN->m_fScreenHeight ;
D3DVIEWPORT8 viewData2 = { 0,0,640,480, 0.f, 1.f };
g_pd3dDevice->SetViewport( &viewData2 );
g_pd3dDevice->Clear( 0, NULL, D3DCLEAR_TARGET|D3DCLEAR_ZBUFFER,
D3DCOLOR_XRGB(0,0,0), 1.0f, 0x00000000 );
D3DVIEWPORT8 viewData = { PREFSMAN->m_fScreenPosX, PREFSMAN->m_fScreenPosY, g_CurrentParams.width, g_CurrentParams.height, 0.f, 1.f };
g_pd3dDevice->SetViewport( &viewData );
#endif
// no need to clear because D3D uses an overlay
// SetViewport(0,0);
//
+5 -2
View File
@@ -12,8 +12,11 @@
#ifdef _WIN32
#include "mad-0.15.0b/mad.h"
#ifdef _XBOX
// not set up
// #pragma comment(lib, "mad-0.15.0b/msvc++/Xbox_Release/libmad.lib")
#ifdef _DEBUG
#pragma comment(lib, "mad-0.15.0b/xboxmad/debug/xboxmad.lib")
#else
#pragma comment(lib, "mad-0.15.0b/xboxmad/Release/xboxmad.lib")
#endif
#else
#pragma comment(lib, "mad-0.15.0b/msvc++/Release/libmad.lib")
#endif
@@ -8,6 +8,16 @@
#pragma comment(lib, "libresample/resample.lib")
#endif
#ifdef _XBOX
#ifdef _DEBUG
#pragma comment(lib, "libresample/xboxresample/debug/xboxresample.lib")
#else
#pragma comment(lib, "libresample/xboxresample/release/xboxresample.lib")
#endif
#endif
#include "RageTimer.h"
RageSoundReader_Resample_Good::RageSoundReader_Resample_Good()
@@ -15,9 +15,15 @@
#endif
#if defined(_XBOX)
#ifdef _DEBUG
#pragma comment(lib, "vorbis/xbox/ogg_static_d.lib")
#pragma comment(lib, "vorbis/xbox/vorbis_static_d.lib")
#pragma comment(lib, "vorbis/xbox/vorbisfile_static_d.lib")
#else
#pragma comment(lib, "vorbis/xbox/ogg_static.lib")
#pragma comment(lib, "vorbis/xbox/vorbis_static.lib")
#pragma comment(lib, "vorbis/xbox/vorbisfile_static.lib")
#endif
#elif defined(_WINDOWS)
#pragma comment(lib, "vorbis/win32/ogg_static.lib")
#pragma comment(lib, "vorbis/win32/vorbis_static.lib")
+4 -1
View File
@@ -293,8 +293,11 @@ void RageThread::HaltAllThreads( bool Kill )
continue;
if( ThisThreadID == (int) g_ThreadSlots[entry].threadid )
continue;
// SuspendThread( g_ThreadSlots[entry].ThreadHandle );
#ifdef _XBOX
SuspendThread( g_ThreadSlots[entry].ThreadHandle );
#else
TerminateThread( g_ThreadSlots[entry].ThreadHandle, 0 );
#endif
}
#endif
}
+4
View File
@@ -299,10 +299,14 @@ CString GetExtension( CString sPath )
CString GetCwd()
{
#ifdef _XBOX
return "D:\\" ;
#else
char buf[PATH_MAX];
bool ret = getcwd(buf, PATH_MAX) != NULL;
ASSERT(ret);
return buf;
#endif
}
/* mkdir -p. Doesn't fail if Path already exists and is a directory. */
+24 -1
View File
@@ -62,7 +62,14 @@ void FileSet::LoadFromDir(const CString &dir)
#if defined(WIN32)
WIN32_FIND_DATA fd;
HANDLE hFind = FindFirstFile( dir+SLASH "*", &fd );
CString dirHolder = dir ;
if ( dirHolder.size() > 0 && dirHolder.Right(1) == SLASH )
{
dirHolder.erase( dirHolder.size() - 1 ) ;
}
HANDLE hFind = FindFirstFile( dirHolder+SLASH "*", &fd );
if( hFind == INVALID_HANDLE_VALUE )
return;
@@ -222,7 +229,12 @@ static void SplitPath( CString Path, CString &Dir, CString &Name )
if( Path.size() > 0 && Path.Right(1) == SLASH )
Path.erase( Path.size()-1 );
#ifdef _XBOX
static Regex split("(.*\\\\)([^\\\\]+)");
#else
static Regex split("(.*/)([^/]+)");
#endif
CStringArray match;
if(split.Compare(Path, match)) {
/* At least one slash. */
@@ -230,8 +242,13 @@ static void SplitPath( CString Path, CString &Dir, CString &Name )
Name = match[1];
} else {
/* No slash. */
#ifdef _XBOX
Dir = "D:\\" ;
Name = "" ;
#else
Dir = "." SLASH;
Name = Path;
#endif
}
}
@@ -288,6 +305,12 @@ bool FilenameDB::IsADirectory( const CString &sPath )
CString Dir, Name;
SplitPath(sPath, Dir, Name);
FileSet &fs = GetFileSet(Dir.c_str());
#ifdef _XBOX
if ( ( Dir == "D:\\" ) && ( Name == "" ) )
return true ;
#endif
return fs.IsADirectory(Name);
}
+11
View File
@@ -372,7 +372,13 @@ ScreenEvaluation::ScreenEvaluation( CString sClassName ) : Screen(sClassName)
if( !GAMESTATE->IsPlayerEnabled(p) )
continue; // skip
#ifdef _XBOX
//shorten filenames for FATX
m_DifficultyIcon[p].Load( THEME->GetPathToG("ScreenEvaluation diff icons 1x5") );
#else
m_DifficultyIcon[p].Load( THEME->GetPathToG("ScreenEvaluation difficulty icons 1x5") );
#endif
m_DifficultyIcon[p].SetFromNotes( (PlayerNumber)p, GAMESTATE->m_pCurNotes[p] );
m_DifficultyIcon[p].SetName( ssprintf("DifficultyIconP%d",p+1) );
UtilSetXYAndOnCommand( m_DifficultyIcon[p], "ScreenEvaluation" );
@@ -620,7 +626,12 @@ ScreenEvaluation::ScreenEvaluation( CString sClassName ) : Screen(sClassName)
UtilSetXYAndOnCommand( m_sprJudgeLabels[l], "ScreenEvaluation" );
this->AddChild( &m_sprJudgeLabels[l] );
#ifdef _XBOX
//shorten filenames for FATX
// m_soundJudgeSound[l].Load( THEME->GetPathToS( ssprintf("ScreenEvaluation j %s", JUDGE_STRING[l]) ) );
#else
// m_soundJudgeSound[l].Load( THEME->GetPathToS( ssprintf("ScreenEvaluation JudgeSound %s", JUDGE_STRING[l]) ) );
#endif
// m_TimeToPlayJudgeSound[l] = JUDGE_SOUND_TIME( JUDGE_STRING[l] );
for( p=0; p<NUM_PLAYERS; p++ )
+6
View File
@@ -173,7 +173,13 @@ ScreenEz2SelectMusic::ScreenEz2SelectMusic( CString sName ) : Screen( sName )
m_InfoFrame.SetXY( INFOFRAME_X, INFOFRAME_Y );
this->AddChild( &m_InfoFrame );
#ifdef _XBOX
//shorten filenames for FATX
m_PumpDifficultyCircle.Load( THEME->GetPathToG("ScreenEz2SelectMusic diff frame"));
#else
m_PumpDifficultyCircle.Load( THEME->GetPathToG("ScreenEz2SelectMusic difficulty frame"));
#endif
m_PumpDifficultyCircle.SetXY( PUMP_DIFF_X, PUMP_DIFF_Y );
this->AddChild( &m_PumpDifficultyCircle );
+12 -8
View File
@@ -95,6 +95,18 @@ ScreenGameplay::ScreenGameplay( CString sName, bool bDemonstration ) : Screen("S
SECONDS_BETWEEN_COMMENTS.Refresh();
G_TICK_EARLY_SECONDS.Refresh();
//need to initialize these before checking for demonstration mode
//otherwise destructor will try to delete possibly invalid pointers
for( p=0; p<NUM_PLAYERS; p++ )
{
m_pLifeMeter[p] = NULL;
m_pScoreDisplay[p] = NULL;
m_pPrimaryScoreKeeper[p] = NULL;
m_pSecondaryScoreKeeper[p] = NULL;
m_pInventory[p] = NULL ;
}
m_pCombinedLifeMeter = NULL;
if( GAMESTATE->m_pCurSong == NULL && GAMESTATE->m_pCurCourse == NULL )
return; // ScreenDemonstration will move us to the next scren. We just need to survive for one update without crashing.
@@ -105,14 +117,6 @@ ScreenGameplay::ScreenGameplay( CString sName, bool bDemonstration ) : Screen("S
GAMESTATE->ResetStageStatistics();
for( p=0; p<NUM_PLAYERS; p++ )
{
m_pLifeMeter[p] = NULL;
m_pScoreDisplay[p] = NULL;
m_pPrimaryScoreKeeper[p] = NULL;
m_pSecondaryScoreKeeper[p] = NULL;
}
m_pCombinedLifeMeter = NULL;
// fill in difficulty of CPU players with that of the first human player
@@ -341,6 +341,7 @@ MOVE( ProgressiveNonstopLifebar, PREFSMAN->m_iProgressiveNonstopLifebar );
MOVE( DisplayMode, PREFSMAN->m_bWindowed );
MOVE( WaitForVsync, PREFSMAN->m_bVsync );
MOVE( ShowStats, PREFSMAN->m_bShowStats );
MOVE( ShowBanners, PREFSMAN->m_bShowBanners );
MOVE( KeepTexturesInMemory, PREFSMAN->m_bDelayedTextureDelete );
MOVE( AntiAliasing, PREFSMAN->m_bAntiAliasing );
@@ -473,6 +474,7 @@ static const ConfOption g_ConfOptions[] =
ConfOption( "Refresh\nRate", RefreshRate, "DEFAULT","60","70","72","75","80","85","90","100","120","150" ),
ConfOption( "Wait For\nVsync", WaitForVsync, "NO", "YES" ),
ConfOption( "Show\nStats", ShowStats, "OFF","ON" ),
ConfOption( "Show\nBanners", ShowBanners, "OFF","ON" ),
/* Sound options */
ConfOption( "Preload\nSounds", PreloadSounds, "NO","YES" ),
+6
View File
@@ -117,7 +117,13 @@ ScreenSelectCourse::ScreenSelectCourse( CString sClassName ) : Screen( sClassNam
this->AddChild( &m_HighScore[p] );
}
#ifdef _XBOX
//shorten filenames for FATX
m_sprOptionsMessage.Load( THEME->GetPathToG("ScreenSelectCourse opt message 1x2") );
#else
m_sprOptionsMessage.Load( THEME->GetPathToG("ScreenSelectCourse options message 1x2") );
#endif
m_sprOptionsMessage.StopAnimating();
m_sprOptionsMessage.SetXY( CENTER_X, CENTER_Y );
m_sprOptionsMessage.SetZoomY( 0 );
+7 -1
View File
@@ -115,9 +115,15 @@ ScreenSelectDifficultyEX::ScreenSelectDifficultyEX( CString sClassName ) : Scree
float fCursorX = GetCursorX( (PlayerNumber)p );
float fCursorY = GetCursorY( (PlayerNumber)p );
#ifdef _XBOX
//shorten filenames for FATX
CString sInfoFile = ssprintf( "ScrSelDiffX info %s", m_ModeChoices[0].m_sName.c_str() );
CString sPictureFile = ssprintf( "ScrSelDiffX picture %s", m_ModeChoices[0].m_sName.c_str() );
#else
CString sInfoFile = ssprintf( "ScreenSelectDifficultyEX info %s", m_ModeChoices[0].m_sName.c_str() );
CString sPictureFile = ssprintf( "ScreenSelectDifficultyEX picture %s", m_ModeChoices[0].m_sName.c_str() );
#endif
m_sprPicture[p].Load( THEME->GetPathToG(sPictureFile) );
m_sprPicture[p].SetXY( PICTURE_X(p), PICTURE_Y(p) );
m_framePages.AddChild( &m_sprPicture[p] );
+4 -1
View File
@@ -1023,7 +1023,10 @@ void ScreenSelectMusic::AfterMusicChange()
pSong->GetSteps( m_arrayNotes, GAMESTATE->GetCurrentStyleDef()->m_StepsType );
SortNotesArrayByDifficulty( m_arrayNotes );
m_Banner.LoadFromSong( pSong );
if ( PREFSMAN->m_bShowBanners )
m_Banner.LoadFromSong( pSong );
else
m_Banner.LoadFallback() ;
if( GAMESTATE->IsExtraStage() || GAMESTATE->IsExtraStage2() )
{
+4
View File
@@ -27,7 +27,11 @@ SongCacheIndex::~SongCacheIndex()
static void EmptyDir( CString dir )
{
#ifdef _XBOX
ASSERT(dir[dir.size()-1] == '\\');
#else
ASSERT(dir[dir.size()-1] == '/');
#endif
CStringArray asCacheFileNames;
GetDirListing( dir, asCacheFileNames );
+33 -1
View File
@@ -56,7 +56,8 @@
#if defined(_XBOX)
#ifdef DEBUG
#include "custom_launch_params.h"
#ifdef _DEBUG
#pragma comment(lib, "SDL-1.2.6/lib/xboxSDLmaind.lib")
#else
#pragma comment(lib, "SDL-1.2.6/lib/xboxSDLmain.lib")
@@ -83,6 +84,11 @@ CString DirOfExecutable;
static void ChangeToDirOfExecutable(const char *argv0)
{
#ifdef _XBOX
DirOfExecutable = "D:\\" ;
return ;
#endif
DirOfExecutable = argv0;
// strip off executable name
unsigned n = DirOfExecutable.find_last_of("/\\");
@@ -494,6 +500,10 @@ struct VideoCardDefaults
static CString GetVideoDriverName()
{
#ifdef _XBOX
return "D3D" ;
#endif
#if defined(_WINDOWS)
return GetPrimaryVideoDriverName();
#else
@@ -735,9 +745,21 @@ void SaveGamePrefsToDisk()
#define UNLOCKS_PATH BASE_PATH "Data" SLASH "Unlocks.dat"
#ifdef _XBOX
char *xboxargv[] = { "d:\\default.xbe" } ;
extern RageDisplay::VideoModeParams g_CurrentParams;
#endif
int main(int argc, char* argv[])
{
#ifdef _XBOX
argc = 1 ;
argv = xboxargv ;
XGetCustomLaunchData() ;
#endif
g_argc = argc;
g_argv = argv;
@@ -869,6 +891,12 @@ int main(int argc, char* argv[])
/* Initialize which courses are ranking courses here. */
SONGMAN->UpdateRankingCourses();
#ifdef _XBOX
g_CurrentParams.width = 600 ;
g_CurrentParams.height= 400 ;
DISPLAY->ResolutionChanged() ;
#endif
/* Run the main loop. */
GameLoop();
@@ -926,6 +954,10 @@ int main(int argc, char* argv[])
SAFE_DELETE( HOOKS );
#ifdef _XBOX
XReturnToLaunchingXBE() ;
#endif
return 0;
}
+6
View File
@@ -5,6 +5,8 @@ Global
GlobalSection(SolutionConfiguration) = preSolution
ConfigName.0 = Debug
ConfigName.1 = Release
ConfigName.2 = Debug Xbox
ConfigName.3 = Release Xbox
EndGlobalSection
GlobalSection(ProjectDependencies) = postSolution
EndGlobalSection
@@ -13,6 +15,10 @@ Global
{670745A6-106B-420D-A2A9-D4F89A23986E}.Debug.Build.0 = Debug|Win32
{670745A6-106B-420D-A2A9-D4F89A23986E}.Release.ActiveCfg = Release|Win32
{670745A6-106B-420D-A2A9-D4F89A23986E}.Release.Build.0 = Release|Win32
{670745A6-106B-420D-A2A9-D4F89A23986E}.Debug Xbox.ActiveCfg = Debug|Xbox
{670745A6-106B-420D-A2A9-D4F89A23986E}.Debug Xbox.Build.0 = Debug|Xbox
{670745A6-106B-420D-A2A9-D4F89A23986E}.Release Xbox.ActiveCfg = Release|Xbox
{670745A6-106B-420D-A2A9-D4F89A23986E}.Release Xbox.Build.0 = Release|Xbox
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
DPBuild = 5
+479
View File
@@ -9,6 +9,8 @@
<Platforms>
<Platform
Name="Win32"/>
<Platform
Name="Xbox"/>
</Platforms>
<Configurations>
<Configuration
@@ -80,6 +82,60 @@ cl /Zl /nologo /c verstub.cpp /Fo&quot;$(IntDir)&quot;\
<Tool
Name="VCWebDeploymentTool"/>
</Configuration>
<Configuration
Name="Debug|Xbox"
OutputDirectory=".\Debug"
IntermediateDirectory=".\Debug"
ConfigurationType="1"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
OptimizeForProcessor="2"
AdditionalIncludeDirectories=".;.\sdl_xbox_includes;&quot;.\SDL_image-1.2&quot;;&quot;.\plib-1.6.0&quot;;&quot;.\SDL_sound-1.0.0&quot;;vorbis"
PreprocessorDefinitions="WIN32,_XBOX,_DEBUG,OGG_ONLY"
RuntimeLibrary="1"
UsePrecompiledHeader="2"
PrecompiledHeaderFile=".\Debug/StepMania.pch"
AssemblerListingLocation=".\Debug/"
ObjectFile=".\Debug/"
ProgramDataBaseFileName=".\Debug/"
WarningLevel="3"
SuppressStartupBanner="TRUE"
DebugInformationFormat="3"
CompileAs="0"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
AdditionalOptions="/MACHINE:I386 /FIXED:NO"
AdditionalDependencies="xapilibd.lib d3d8d.lib d3dx8d.lib xgraphicsd.lib dsoundd.lib dmusicd.lib xnetd.lib xboxkrnl.lib debug\verstub.obj"
OutputFile="../StepManiaXbox-debug.exe"
LinkIncremental="1"
SuppressStartupBanner="TRUE"
IgnoreDefaultLibraryNames="libcd,libcmt"
GenerateDebugInformation="TRUE"
ProgramDatabaseFile=".\Debug/StepManiaXbox-debug.pdb"/>
<Tool
Name="VCPostBuildEventTool"
CommandLine="disasm\mapconv $(IntDir)\$(TargetName).map $(TargetDir)StepMania.vdi ia32.vdi"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"
CommandLine="disasm\verinc
cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\
"/>
<Tool
Name="XboxDeploymentTool"/>
<Tool
Name="XboxImageTool"
FileName="../default.xbe"
StackSize="0x10000"
IncludeDebugInfo="TRUE"
SuppressStartupBanner="TRUE"/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="./.."
@@ -158,6 +214,61 @@ cl /Zl /nologo /c verstub.cpp /Fo&quot;$(IntDir)&quot;\
<Tool
Name="VCWebDeploymentTool"/>
</Configuration>
<Configuration
Name="Release|Xbox"
OutputDirectory=".\StepMania___Xbox_Release"
IntermediateDirectory=".\StepMania___Xbox_Release"
ConfigurationType="1"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE">
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories=".;.\sdl_xbox_includes;&quot;.\SDL_image-1.2&quot;;&quot;.\plib-1.6.0&quot;;&quot;.\SDL_sound-1.0.0&quot;;vorbis"
PreprocessorDefinitions="WIN32,_XBOX,NDEBUG"
StringPooling="TRUE"
RuntimeLibrary="0"
EnableFunctionLevelLinking="TRUE"
UsePrecompiledHeader="2"
PrecompiledHeaderThrough="global.h"
PrecompiledHeaderFile=".\StepMania___Xbox_Release/StepMania.pch"
AssemblerListingLocation=".\StepMania___Xbox_Release/"
ObjectFile=".\StepMania___Xbox_Release/"
ProgramDataBaseFileName=".\StepMania___Xbox_Release/"
WarningLevel="3"
SuppressStartupBanner="TRUE"
CompileAs="0"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
AdditionalOptions="/MACHINE:I386 /FIXED:NO"
AdditionalDependencies="$(intdir)\verstub.obj xapilib.lib d3d8.lib d3dx8.lib xgraphics.lib dsound.lib dmusic.lib xnet.lib xboxkrnl.lib libcmt.lib"
OutputFile="../StepManiaXbox.exe"
LinkIncremental="1"
SuppressStartupBanner="TRUE"
IgnoreDefaultLibraryNames="libc,libcmtd"
ProgramDatabaseFile="../release6xbox/StepMania.pdb"
OptimizeReferences="2"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"
CommandLine="disasm\verinc
cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\
"/>
<Tool
Name="XboxDeploymentTool"/>
<Tool
Name="XboxImageTool"
FileName="../default.xbe"
StackSize="0x10000"
IncludeDebugInfo="TRUE"
SuppressStartupBanner="TRUE"
TitleID="123456"/>
</Configuration>
</Configurations>
<Files>
<Filter
@@ -802,6 +913,12 @@ cl /Zl /nologo /c verstub.cpp /Fo&quot;$(IntDir)&quot;\
<File
RelativePath=".\StepMania.h">
</File>
<File
RelativePath="custom_launch_params.cpp">
</File>
<File
RelativePath="custom_launch_params.h">
</File>
<File
RelativePath=".\global.cpp">
</File>
@@ -823,6 +940,9 @@ cl /Zl /nologo /c verstub.cpp /Fo&quot;$(IntDir)&quot;\
<File
RelativePath="arch\arch_default.h">
</File>
<File
RelativePath="arch\arch_xbox.h">
</File>
<Filter
Name="LoadingWindow"
Filter="">
@@ -837,6 +957,18 @@ cl /Zl /nologo /c verstub.cpp /Fo&quot;$(IntDir)&quot;\
</File>
<File
RelativePath="arch\LoadingWindow\LoadingWindow_Win32.cpp">
<FileConfiguration
Name="Debug|Xbox"
ExcludedFromBuild="TRUE">
<Tool
Name="VCCLCompilerTool"/>
</FileConfiguration>
<FileConfiguration
Name="Release|Xbox"
ExcludedFromBuild="TRUE">
<Tool
Name="VCCLCompilerTool"/>
</FileConfiguration>
</File>
<File
RelativePath="arch\LoadingWindow\LoadingWindow_Win32.h">
@@ -856,12 +988,29 @@ cl /Zl /nologo /c verstub.cpp /Fo&quot;$(IntDir)&quot;\
</File>
<File
RelativePath="arch\Sound\RageSoundDriver_DSound.cpp">
<FileConfiguration
Name="Release|Xbox">
<Tool
Name="VCCLCompilerTool"/>
</FileConfiguration>
</File>
<File
RelativePath="arch\Sound\RageSoundDriver_DSound.h">
</File>
<File
RelativePath="arch\Sound\RageSoundDriver_DSound_Software.cpp">
<FileConfiguration
Name="Debug|Xbox"
ExcludedFromBuild="TRUE">
<Tool
Name="VCCLCompilerTool"/>
</FileConfiguration>
<FileConfiguration
Name="Release|Xbox"
ExcludedFromBuild="TRUE">
<Tool
Name="VCCLCompilerTool"/>
</FileConfiguration>
</File>
<File
RelativePath="arch\Sound\RageSoundDriver_DSound_Software.h">
@@ -874,6 +1023,18 @@ cl /Zl /nologo /c verstub.cpp /Fo&quot;$(IntDir)&quot;\
</File>
<File
RelativePath="arch\Sound\RageSoundDriver_WaveOut.cpp">
<FileConfiguration
Name="Debug|Xbox"
ExcludedFromBuild="TRUE">
<Tool
Name="VCCLCompilerTool"/>
</FileConfiguration>
<FileConfiguration
Name="Release|Xbox"
ExcludedFromBuild="TRUE">
<Tool
Name="VCCLCompilerTool"/>
</FileConfiguration>
</File>
<File
RelativePath="arch\Sound\RageSoundDriver_WaveOut.h">
@@ -887,6 +1048,18 @@ cl /Zl /nologo /c verstub.cpp /Fo&quot;$(IntDir)&quot;\
</File>
<File
RelativePath="arch\ArchHooks\ArchHooks_Win32.cpp">
<FileConfiguration
Name="Debug|Xbox"
ExcludedFromBuild="TRUE">
<Tool
Name="VCCLCompilerTool"/>
</FileConfiguration>
<FileConfiguration
Name="Release|Xbox"
ExcludedFromBuild="TRUE">
<Tool
Name="VCCLCompilerTool"/>
</FileConfiguration>
</File>
<File
RelativePath="arch\ArchHooks\ArchHooks_Win32.h">
@@ -906,18 +1079,72 @@ cl /Zl /nologo /c verstub.cpp /Fo&quot;$(IntDir)&quot;\
</File>
<File
RelativePath="arch\InputHandler\InputHandler_DirectInput.cpp">
<FileConfiguration
Name="Debug|Xbox"
ExcludedFromBuild="TRUE">
<Tool
Name="VCCLCompilerTool"/>
</FileConfiguration>
<FileConfiguration
Name="Release|Xbox"
ExcludedFromBuild="TRUE">
<Tool
Name="VCCLCompilerTool"/>
</FileConfiguration>
</File>
<File
RelativePath="arch\InputHandler\InputHandler_DirectInput.h">
<FileConfiguration
Name="Debug|Xbox"
ExcludedFromBuild="TRUE">
<Tool
Name="VCCustomBuildTool"/>
</FileConfiguration>
</File>
<File
RelativePath="arch\InputHandler\InputHandler_DirectInputHelper.cpp">
<FileConfiguration
Name="Debug|Xbox"
ExcludedFromBuild="TRUE">
<Tool
Name="VCCLCompilerTool"/>
</FileConfiguration>
<FileConfiguration
Name="Release|Xbox"
ExcludedFromBuild="TRUE">
<Tool
Name="VCCLCompilerTool"/>
</FileConfiguration>
</File>
<File
RelativePath="arch\InputHandler\InputHandler_DirectInputHelper.h">
<FileConfiguration
Name="Debug|Xbox"
ExcludedFromBuild="TRUE">
<Tool
Name="VCCustomBuildTool"/>
</FileConfiguration>
</File>
<File
RelativePath="arch\InputHandler\InputHandler_SDL.cpp">
</File>
<File
RelativePath="arch\InputHandler\InputHandler_SDL.h">
</File>
<File
RelativePath="arch\InputHandler\InputHandler_Win32_Pump.cpp">
<FileConfiguration
Name="Debug|Xbox"
ExcludedFromBuild="TRUE">
<Tool
Name="VCCLCompilerTool"/>
</FileConfiguration>
<FileConfiguration
Name="Release|Xbox"
ExcludedFromBuild="TRUE">
<Tool
Name="VCCLCompilerTool"/>
</FileConfiguration>
</File>
<File
RelativePath="arch\InputHandler\InputHandler_Win32_Pump.h">
@@ -934,18 +1161,78 @@ cl /Zl /nologo /c verstub.cpp /Fo&quot;$(IntDir)&quot;\
</File>
<File
RelativePath="arch\MovieTexture\MovieTexture_DShow.cpp">
<FileConfiguration
Name="Debug|Xbox"
ExcludedFromBuild="TRUE">
<Tool
Name="VCCLCompilerTool"/>
</FileConfiguration>
<FileConfiguration
Name="Release|Xbox"
ExcludedFromBuild="TRUE">
<Tool
Name="VCCLCompilerTool"/>
</FileConfiguration>
</File>
<File
RelativePath="arch\MovieTexture\MovieTexture_DShow.h">
<FileConfiguration
Name="Debug|Xbox"
ExcludedFromBuild="TRUE">
<Tool
Name="VCCustomBuildTool"/>
</FileConfiguration>
<FileConfiguration
Name="Release|Xbox"
ExcludedFromBuild="TRUE">
<Tool
Name="VCCustomBuildTool"/>
</FileConfiguration>
</File>
<File
RelativePath="arch\MovieTexture\MovieTexture_DShowHelper.cpp">
<FileConfiguration
Name="Debug|Xbox"
ExcludedFromBuild="TRUE">
<Tool
Name="VCCLCompilerTool"/>
</FileConfiguration>
<FileConfiguration
Name="Release|Xbox"
ExcludedFromBuild="TRUE">
<Tool
Name="VCCLCompilerTool"/>
</FileConfiguration>
</File>
<File
RelativePath="arch\MovieTexture\MovieTexture_DShowHelper.h">
<FileConfiguration
Name="Debug|Xbox"
ExcludedFromBuild="TRUE">
<Tool
Name="VCCustomBuildTool"/>
</FileConfiguration>
<FileConfiguration
Name="Release|Xbox"
ExcludedFromBuild="TRUE">
<Tool
Name="VCCustomBuildTool"/>
</FileConfiguration>
</File>
<File
RelativePath="arch\MovieTexture\MovieTexture_FFMpeg.cpp">
<FileConfiguration
Name="Debug|Xbox"
ExcludedFromBuild="TRUE">
<Tool
Name="VCCLCompilerTool"/>
</FileConfiguration>
<FileConfiguration
Name="Release|Xbox"
ExcludedFromBuild="TRUE">
<Tool
Name="VCCLCompilerTool"/>
</FileConfiguration>
</File>
<File
RelativePath="arch\MovieTexture\MovieTexture_FFMpeg.h">
@@ -976,48 +1263,228 @@ cl /Zl /nologo /c verstub.cpp /Fo&quot;$(IntDir)&quot;\
Filter="">
<File
RelativePath="archutils\Win32\AppInstance.cpp">
<FileConfiguration
Name="Debug|Xbox"
ExcludedFromBuild="TRUE">
<Tool
Name="VCCLCompilerTool"/>
</FileConfiguration>
<FileConfiguration
Name="Release|Xbox"
ExcludedFromBuild="TRUE">
<Tool
Name="VCCLCompilerTool"/>
</FileConfiguration>
</File>
<File
RelativePath="archutils\Win32\AppInstance.h">
<FileConfiguration
Name="Debug|Xbox"
ExcludedFromBuild="TRUE">
<Tool
Name="VCCustomBuildTool"/>
</FileConfiguration>
<FileConfiguration
Name="Release|Xbox"
ExcludedFromBuild="TRUE">
<Tool
Name="VCCustomBuildTool"/>
</FileConfiguration>
</File>
<File
RelativePath="archutils\Win32\Crash.cpp">
<FileConfiguration
Name="Debug|Xbox"
ExcludedFromBuild="TRUE">
<Tool
Name="VCCLCompilerTool"/>
</FileConfiguration>
<FileConfiguration
Name="Release|Xbox"
ExcludedFromBuild="TRUE">
<Tool
Name="VCCLCompilerTool"/>
</FileConfiguration>
</File>
<File
RelativePath="archutils\Win32\Crash.h">
<FileConfiguration
Name="Debug|Xbox"
ExcludedFromBuild="TRUE">
<Tool
Name="VCCustomBuildTool"/>
</FileConfiguration>
<FileConfiguration
Name="Release|Xbox"
ExcludedFromBuild="TRUE">
<Tool
Name="VCCustomBuildTool"/>
</FileConfiguration>
</File>
<File
RelativePath="archutils\Win32\DebugInfoHunt.cpp">
<FileConfiguration
Name="Debug|Xbox"
ExcludedFromBuild="TRUE">
<Tool
Name="VCCLCompilerTool"/>
</FileConfiguration>
<FileConfiguration
Name="Release|Xbox"
ExcludedFromBuild="TRUE">
<Tool
Name="VCCLCompilerTool"/>
</FileConfiguration>
</File>
<File
RelativePath="archutils\Win32\DebugInfoHunt.h">
<FileConfiguration
Name="Debug|Xbox"
ExcludedFromBuild="TRUE">
<Tool
Name="VCCustomBuildTool"/>
</FileConfiguration>
<FileConfiguration
Name="Release|Xbox"
ExcludedFromBuild="TRUE">
<Tool
Name="VCCustomBuildTool"/>
</FileConfiguration>
</File>
<File
RelativePath="archutils\Win32\GotoURL.cpp">
<FileConfiguration
Name="Debug|Xbox"
ExcludedFromBuild="TRUE">
<Tool
Name="VCCLCompilerTool"/>
</FileConfiguration>
<FileConfiguration
Name="Release|Xbox"
ExcludedFromBuild="TRUE">
<Tool
Name="VCCLCompilerTool"/>
</FileConfiguration>
</File>
<File
RelativePath="archutils\Win32\GotoURL.h">
<FileConfiguration
Name="Debug|Xbox"
ExcludedFromBuild="TRUE">
<Tool
Name="VCCustomBuildTool"/>
</FileConfiguration>
<FileConfiguration
Name="Release|Xbox"
ExcludedFromBuild="TRUE">
<Tool
Name="VCCustomBuildTool"/>
</FileConfiguration>
</File>
<File
RelativePath="archutils\Win32\RestartProgram.cpp">
<FileConfiguration
Name="Debug|Xbox"
ExcludedFromBuild="TRUE">
<Tool
Name="VCCLCompilerTool"/>
</FileConfiguration>
<FileConfiguration
Name="Release|Xbox"
ExcludedFromBuild="TRUE">
<Tool
Name="VCCLCompilerTool"/>
</FileConfiguration>
</File>
<File
RelativePath="archutils\Win32\RestartProgram.h">
<FileConfiguration
Name="Debug|Xbox"
ExcludedFromBuild="TRUE">
<Tool
Name="VCCustomBuildTool"/>
</FileConfiguration>
<FileConfiguration
Name="Release|Xbox"
ExcludedFromBuild="TRUE">
<Tool
Name="VCCustomBuildTool"/>
</FileConfiguration>
</File>
<File
RelativePath=".\StepMania.ICO">
<FileConfiguration
Name="Debug|Xbox"
ExcludedFromBuild="TRUE">
<Tool
Name="VCCustomBuildTool"/>
</FileConfiguration>
<FileConfiguration
Name="Release|Xbox"
ExcludedFromBuild="TRUE">
<Tool
Name="VCCustomBuildTool"/>
</FileConfiguration>
</File>
<File
RelativePath=".\StepMania.RC">
<FileConfiguration
Name="Debug|Xbox"
ExcludedFromBuild="TRUE">
<Tool
Name="VCCustomBuildTool"/>
</FileConfiguration>
<FileConfiguration
Name="Release|Xbox"
ExcludedFromBuild="TRUE">
<Tool
Name="VCCustomBuildTool"/>
</FileConfiguration>
</File>
<File
RelativePath="archutils\Win32\USB.cpp">
<FileConfiguration
Name="Debug|Xbox"
ExcludedFromBuild="TRUE">
<Tool
Name="VCCLCompilerTool"/>
</FileConfiguration>
<FileConfiguration
Name="Release|Xbox"
ExcludedFromBuild="TRUE">
<Tool
Name="VCCLCompilerTool"/>
</FileConfiguration>
</File>
<File
RelativePath="archutils\Win32\USB.h">
<FileConfiguration
Name="Debug|Xbox"
ExcludedFromBuild="TRUE">
<Tool
Name="VCCustomBuildTool"/>
</FileConfiguration>
<FileConfiguration
Name="Release|Xbox"
ExcludedFromBuild="TRUE">
<Tool
Name="VCCustomBuildTool"/>
</FileConfiguration>
</File>
<File
RelativePath="archutils\Win32\VideoDriverInfo.cpp">
<FileConfiguration
Name="Debug|Xbox"
ExcludedFromBuild="TRUE">
<Tool
Name="VCCLCompilerTool"/>
</FileConfiguration>
<FileConfiguration
Name="Release|Xbox"
ExcludedFromBuild="TRUE">
<Tool
Name="VCCLCompilerTool"/>
</FileConfiguration>
</File>
<File
RelativePath="archutils\Win32\VideoDriverInfo.h">
@@ -1488,6 +1955,18 @@ cl /Zl /nologo /c verstub.cpp /Fo&quot;$(IntDir)&quot;\
</File>
<File
RelativePath="RageDisplay_OGL.cpp">
<FileConfiguration
Name="Debug|Xbox"
ExcludedFromBuild="TRUE">
<Tool
Name="VCCLCompilerTool"/>
</FileConfiguration>
<FileConfiguration
Name="Release|Xbox"
ExcludedFromBuild="TRUE">
<Tool
Name="VCCLCompilerTool"/>
</FileConfiguration>
</File>
<File
RelativePath="RageDisplay_OGL.h">
@@ -12,6 +12,8 @@
#include "InputHandler_SDL.h"
#include "SDL_utils.h"
#include "RageLog.h"
#include "RageDisplay.h"
#include "PrefsManager.h"
static const Sint8 Handled_SDL_Events[] = {
SDL_KEYDOWN, SDL_KEYUP, SDL_JOYBUTTONDOWN, SDL_JOYBUTTONUP,
@@ -23,6 +25,11 @@ InputHandler_SDL::InputHandler_SDL()
{
SDL_InitSubSystem( SDL_INIT_JOYSTICK );
#ifdef _XBOX
//strange hardware timing issue with 3rd party controllers
Sleep(750) ;
#endif
SDL_EnableKeyRepeat( 0, 0 );
/* We can do this to get Unicode values in the key struct, which (with
@@ -80,6 +87,16 @@ InputHandler_SDL::~InputHandler_SDL()
void InputHandler_SDL::Update(float fDeltaTime)
{
#ifdef _XBOX
static int lastValX1 = 0 ;
static int lastValY1 = 0 ;
static int lastValX2 = 0 ;
static int lastValY2 = 0 ;
static int resolutionChanged = 0 ;
#endif
SDL_Event event;
while(SDL_GetEvent(event, SDL_EventMask))
{
@@ -115,11 +132,67 @@ void InputHandler_SDL::Update(float fDeltaTime)
case SDL_JOYAXISMOTION:
{
#ifdef _XBOX
resolutionChanged = 1 ;
if ( abs(event.jaxis.value) > 15600 )
{
switch ( event.jaxis.axis )
{
case 0 :
{
lastValX1 = event.jaxis.value ;
break;
}
case 1 :
{
lastValY1 = event.jaxis.value ;
break;
}
case 2 :
{
lastValX2 = event.jaxis.value ;
break;
}
case 3 :
{
lastValY2 = event.jaxis.value ;
break;
}
}
}
else
{
switch ( event.jaxis.axis )
{
case 0 :
{
lastValX1 = 0;
break;
}
case 1 :
{
lastValY1 = 0 ;
break;
}
case 2 :
{
lastValX2 = 0;
break;
}
case 3 :
{
lastValY2 = 0;
break;
}
}
}
#else
InputDevice i = InputDevice(DEVICE_JOY1 + event.jaxis.which);
JoystickButton neg = (JoystickButton)(JOY_LEFT+2*event.jaxis.axis);
JoystickButton pos = (JoystickButton)(JOY_RIGHT+2*event.jaxis.axis);
ButtonPressed(DeviceInput(i, neg), event.jaxis.value < -16000);
ButtonPressed(DeviceInput(i, pos), event.jaxis.value > +16000);
#endif
continue;
}
@@ -135,6 +208,32 @@ void InputHandler_SDL::Update(float fDeltaTime)
}
}
#ifdef _XBOX
if ( resolutionChanged )
{
if ( lastValX1 || lastValY1 || lastValX2 || lastValY2 )
{
PREFSMAN->m_fScreenPosX += ((float)lastValX1/32767.0f) ;
if ( PREFSMAN->m_fScreenPosX < 0)
PREFSMAN->m_fScreenPosX = 0 ;
PREFSMAN->m_fScreenPosY -= ((float)lastValY1/32767.0f) ;
if ( PREFSMAN->m_fScreenPosY < 0)
PREFSMAN->m_fScreenPosY = 0 ;
PREFSMAN->m_fScreenWidth += ((float)lastValX2/32767.0f) ;
PREFSMAN->m_fScreenHeight -= ((float)lastValY2/32767.0f) ;
DISPLAY->ResolutionChanged() ;
}
else
{
resolutionChanged = 0 ;
}
}
#endif
InputHandler::UpdateTimer();
}
@@ -38,16 +38,55 @@ LoadingWindow_SDL::LoadingWindow_SDL()
if( image == NULL )
RageException::Throw("Couldn't load loading.bmp: %s",SDL_GetError());
/* Initialize the window */
loading_screen = SDL_SetVideoMode(image->w, image->h, 16, SDL_SWSURFACE|SDL_ANYFORMAT|SDL_NOFRAME);
if( loading_screen == NULL )
RageException::Throw( "Couldn't initialize loading window: %s", SDL_GetError() );
#ifdef _XBOX
SDL_XBOX_SetScreenPosition( 70, 48 ) ;
SDL_XBOX_SetScreenStretch( -150, -300 ) ;
if( FAILED ( XFONT_OpenDefaultFont( &m_pConsoleTTF ) ) )
{
m_pConsoleTTF = 0 ;
}
else
{
m_pConsoleTTF->SetTextHeight( 24 );
// Change Font Style - XFONT_NORMAL, XFONT_BOLD,
// XFONT_ITALICS, XFONT_BOLDITALICS
m_pConsoleTTF->SetTextStyle( XFONT_NORMAL );
// Anti-Alias the font -- 0 for no anti-alias, 2 for some, 4 for MAX!
m_pConsoleTTF->SetTextAntialiasLevel( 2 );
m_pConsoleTTF->SetTextColor( 0xFFFFFFFF ) ;
m_pConsoleTTF->SetBkColor( 0x00000000 ) ;
m_pConsoleTTF->SetBkMode(XFONT_OPAQUE) ;
SetText( CString("Loading Songs" ) ) ;
}
#endif
SDL_BlitSurface(image, NULL, loading_screen, NULL);
SDL_FreeSurface(image);
SDL_UpdateRect(loading_screen, 0,0,0,0);
SDL_UpdateRect(loading_screen, 0,0,0,0);
}
#ifdef _XBOX
void LoadingWindow_SDL::SetText(CString str)
{
m_cstrText = str ;
}
#endif
LoadingWindow_SDL::~LoadingWindow_SDL()
{
SDL_QuitSubSystem( SDL_INIT_VIDEO );
@@ -55,7 +94,33 @@ LoadingWindow_SDL::~LoadingWindow_SDL()
void LoadingWindow_SDL::Paint()
{
#ifdef _XBOX
LPDIRECT3DSURFACE8 m_primarySurface;
int x,y ;
unsigned int val ;
if ( m_pConsoleTTF )
{
WCHAR msg[1000] ;
swprintf( msg, L"%S", m_cstrText.c_str() ) ;
if ( m_pConsoleTTF->GetTextExtent( msg, -1, &val ) != S_OK )
{
val = 100 ;
}
x = (640-val)/2 ;
y = 350 ;
D3D__pDevice->GetRenderTarget( &m_primarySurface ) ;
m_pConsoleTTF->TextOut( m_primarySurface, L" ", -1, (float)0, (float)y ) ;
m_pConsoleTTF->TextOut( m_primarySurface, msg, wcslen(msg), (float)x, (float)y ) ;
m_primarySurface->Release() ;
D3D__pDevice->Present(NULL, NULL, NULL, NULL) ;
}
#else
SDL_UpdateRect(loading_screen, 0,0,0,0);
#endif
}
/*
@@ -4,6 +4,11 @@
#include "LoadingWindow.h"
#include "SDL.h"
#ifdef _XBOX
#define XFONT_TRUETYPE
#include <xfont.h>
#endif
class LoadingWindow_SDL: public LoadingWindow {
SDL_Surface *loading_screen;
@@ -12,6 +17,14 @@ public:
~LoadingWindow_SDL();
void Paint();
#ifdef _XBOX
void SetText(CString str);
CString m_cstrText ;
XFONT* m_pConsoleTTF; // Pointer to the Arial TrueTypeFont
#endif
};
#define HAVE_LOADING_WINDOW_SDL
+23 -1
View File
@@ -168,7 +168,7 @@ DSoundBuf::DSoundBuf(DSound &ds, DSoundBuf::hw hardware,
memset(&format, 0, sizeof(format));
format.dwSize = sizeof(format);
#ifdef _XBOX
format.dwFlags = DSBCAPS_CTRLVOLUME;
format.dwFlags = 0;
#else
format.dwFlags = DSBCAPS_GETCURRENTPOSITION2 | DSBCAPS_GLOBALFOCUS | DSBCAPS_CTRLVOLUME;
#endif
@@ -188,7 +188,24 @@ DSoundBuf::DSoundBuf(DSound &ds, DSoundBuf::hw hardware,
format.dwBufferBytes = buffersize;
#ifndef _XBOX
format.dwReserved = 0;
#else
DSMIXBINVOLUMEPAIR dsmbvp[8] = {
{DSMIXBIN_FRONT_LEFT, DSBVOLUME_MAX}, // left channel
{DSMIXBIN_FRONT_RIGHT, DSBVOLUME_MAX}, // right channel
{DSMIXBIN_FRONT_CENTER, DSBVOLUME_MAX}, // left channel
{DSMIXBIN_FRONT_CENTER, DSBVOLUME_MAX}, // right channel
{DSMIXBIN_BACK_LEFT, DSBVOLUME_MAX}, // left channel
{DSMIXBIN_BACK_RIGHT, DSBVOLUME_MAX}, // right channel
{DSMIXBIN_LOW_FREQUENCY, DSBVOLUME_MAX}, // left channel
{DSMIXBIN_LOW_FREQUENCY, DSBVOLUME_MAX}}; // right channel
DSMIXBINS dsmb;
dsmb.dwMixBinCount = 8;
dsmb.lpMixBinVolumePairs = dsmbvp;
format.lpMixBins = &dsmb;
#endif
format.lpwfxFormat = &waveformat;
/* Query IID_IDirectSoundBuffer instead of IID_IDirectSoundBuffer8. -Chris */
@@ -355,7 +372,12 @@ bool DSoundBuf::get_output_buf(char **buffer, unsigned *bufsiz, int chunksize)
// LOG->Trace("gave %i at %i (%i, %i) %i filled", num_bytes_empty, write_cursor, cursor, write, buffer_bytes_filled);
/* Lock the audio buffer. */
#ifdef _XBOX
result = buf->Lock(write_cursor, num_bytes_empty, (LPVOID *)buffer, (DWORD *) bufsiz, NULL, NULL, 0);
#else
result = buf->Lock(write_cursor, num_bytes_empty, (LPVOID *)buffer, (DWORD *) bufsiz, NULL, &junk, 0);
#endif
#ifndef _XBOX
if ( result == DSERR_BUFFERLOST ) {
buf->Restore();
+3 -1
View File
@@ -2,7 +2,7 @@
#define XBOX_ARCH_H
/* Load drivers for Xbox. */
#include "ErrorDialog/ErrorDialog_null.h"
//#include "ErrorDialog/ErrorDialog_null.h"
#include "ArchHooks/ArchHooks_none.h"
/* Err, is SDL input working on Xbox? arch_default comments indicated no.
@@ -11,6 +11,8 @@
#include "Sound/RageSoundDriver_DSound.h"
#include "LoadingWindow/LoadingWindow_SDL.h"
/* Undef this if you need no SDL input. */
// #undef SUPPORT_SDL_INPUT
@@ -0,0 +1,30 @@
Microsoft Visual Studio Solution File, Format Version 7.00
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xboxresample", "xboxresample.vcproj", "{8F267B70-00CA-49D3-9E55-149B3ECE5396}"
EndProject
Global
GlobalSection(SolutionConfiguration) = preSolution
ConfigName.0 = Debug
ConfigName.1 = Profile
ConfigName.2 = Profile_FastCap
ConfigName.3 = Release
ConfigName.4 = Release_LTCG
EndGlobalSection
GlobalSection(ProjectDependencies) = postSolution
EndGlobalSection
GlobalSection(ProjectConfiguration) = postSolution
{8F267B70-00CA-49D3-9E55-149B3ECE5396}.Debug.ActiveCfg = Debug|Xbox
{8F267B70-00CA-49D3-9E55-149B3ECE5396}.Debug.Build.0 = Debug|Xbox
{8F267B70-00CA-49D3-9E55-149B3ECE5396}.Profile.ActiveCfg = Profile|Xbox
{8F267B70-00CA-49D3-9E55-149B3ECE5396}.Profile.Build.0 = Profile|Xbox
{8F267B70-00CA-49D3-9E55-149B3ECE5396}.Profile_FastCap.ActiveCfg = Profile_FastCap|Xbox
{8F267B70-00CA-49D3-9E55-149B3ECE5396}.Profile_FastCap.Build.0 = Profile_FastCap|Xbox
{8F267B70-00CA-49D3-9E55-149B3ECE5396}.Release.ActiveCfg = Release|Xbox
{8F267B70-00CA-49D3-9E55-149B3ECE5396}.Release.Build.0 = Release|Xbox
{8F267B70-00CA-49D3-9E55-149B3ECE5396}.Release_LTCG.ActiveCfg = Release_LTCG|Xbox
{8F267B70-00CA-49D3-9E55-149B3ECE5396}.Release_LTCG.Build.0 = Release_LTCG|Xbox
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
EndGlobalSection
GlobalSection(ExtensibilityAddIns) = postSolution
EndGlobalSection
EndGlobal
@@ -0,0 +1,218 @@
<?xml version="1.0" encoding = "Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="7.00"
Name="xboxresample"
ProjectGUID="{8F267B70-00CA-49D3-9E55-149B3ECE5396}"
Keyword="XboxProj">
<Platforms>
<Platform
Name="Xbox"/>
</Platforms>
<Configurations>
<Configuration
Name="Debug|Xbox"
OutputDirectory="Debug"
IntermediateDirectory="Debug"
ConfigurationType="4"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
OptimizeForProcessor="2"
AdditionalIncludeDirectories="..\include, ..\src"
PreprocessorDefinitions="_DEBUG;_XBOX;_LIB"
MinimalRebuild="TRUE"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
EnableEnhancedInstructionSet="1"
UsePrecompiledHeader="0"
PrecompiledHeaderFile="$(OutDir)/$(ProjectName).pch"
WarningLevel="3"
Detect64BitPortabilityProblems="FALSE"
DebugInformationFormat="4"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLibrarianTool"
OutputFile="$(OutDir)/$(ProjectName).lib"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
</Configuration>
<Configuration
Name="Profile|Xbox"
OutputDirectory="Profile"
IntermediateDirectory="Profile"
ConfigurationType="4"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
Optimization="3"
OmitFramePointers="TRUE"
OptimizeForProcessor="2"
PreprocessorDefinitions="NDEBUG;_XBOX;PROFILE;_LIB"
StringPooling="TRUE"
RuntimeLibrary="0"
EnableFunctionLevelLinking="TRUE"
EnableEnhancedInstructionSet="1"
UsePrecompiledHeader="0"
PrecompiledHeaderFile="$(OutDir)/$(ProjectName).pch"
WarningLevel="3"
Detect64BitPortabilityProblems="FALSE"
DebugInformationFormat="3"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLibrarianTool"
OutputFile="$(OutDir)/$(ProjectName).lib"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
</Configuration>
<Configuration
Name="Profile_FastCap|Xbox"
OutputDirectory="Profile_FastCap"
IntermediateDirectory="Profile_FastCap"
ConfigurationType="4"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
Optimization="3"
OmitFramePointers="TRUE"
OptimizeForProcessor="2"
PreprocessorDefinitions="NDEBUG;_XBOX;PROFILE;FASTCAP;_LIB"
StringPooling="TRUE"
RuntimeLibrary="0"
EnableFunctionLevelLinking="TRUE"
EnableEnhancedInstructionSet="1"
UsePrecompiledHeader="0"
PrecompiledHeaderFile="$(OutDir)/$(ProjectName).pch"
WarningLevel="3"
Detect64BitPortabilityProblems="FALSE"
DebugInformationFormat="3"
FastCAP="TRUE"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLibrarianTool"
OutputFile="$(OutDir)/$(ProjectName).lib"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
</Configuration>
<Configuration
Name="Release|Xbox"
OutputDirectory="Release"
IntermediateDirectory="Release"
ConfigurationType="4"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
Optimization="3"
OmitFramePointers="TRUE"
OptimizeForProcessor="2"
AdditionalIncludeDirectories="..\include, ..\src"
PreprocessorDefinitions="NDEBUG;_XBOX;_LIB"
StringPooling="TRUE"
RuntimeLibrary="0"
EnableFunctionLevelLinking="TRUE"
EnableEnhancedInstructionSet="1"
UsePrecompiledHeader="0"
PrecompiledHeaderFile="$(OutDir)/$(ProjectName).pch"
WarningLevel="3"
Detect64BitPortabilityProblems="FALSE"
DebugInformationFormat="3"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLibrarianTool"
OutputFile="$(OutDir)/$(ProjectName).lib"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
</Configuration>
<Configuration
Name="Release_LTCG|Xbox"
OutputDirectory="Release_LTCG"
IntermediateDirectory="Release_LTCG"
ConfigurationType="4"
CharacterSet="2"
WholeProgramOptimization="TRUE">
<Tool
Name="VCCLCompilerTool"
Optimization="3"
OmitFramePointers="TRUE"
OptimizeForProcessor="2"
PreprocessorDefinitions="NDEBUG;_XBOX;LTCG;_LIB"
StringPooling="TRUE"
RuntimeLibrary="0"
EnableFunctionLevelLinking="TRUE"
EnableEnhancedInstructionSet="1"
UsePrecompiledHeader="0"
PrecompiledHeaderFile="$(OutDir)/$(ProjectName).pch"
WarningLevel="3"
Detect64BitPortabilityProblems="FALSE"
DebugInformationFormat="3"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLibrarianTool"
OutputFile="$(OutDir)/$(ProjectName).lib"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
</Configuration>
</Configurations>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm">
<File
RelativePath="..\src\filterkit.c">
</File>
<File
RelativePath="..\src\resample.c">
</File>
<File
RelativePath="..\src\resamplesubs.c">
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc">
<File
RelativePath="..\src\config.h">
</File>
<File
RelativePath="..\src\configtemplate.h">
</File>
<File
RelativePath="..\src\filterkit.h">
</File>
<File
RelativePath="..\src\resample_defs.h">
</File>
</Filter>
<File
RelativePath="ReadMe.txt">
</File>
</Files>
<Globals>
</Globals>
</VisualStudioProject>
Binary file not shown.
@@ -0,0 +1,228 @@
<?xml version="1.0" encoding = "Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="7.00"
Name="xboxmad"
ProjectGUID="{CA22B79A-E8A9-4BFB-A297-42231F2213F2}"
Keyword="XboxProj">
<Platforms>
<Platform
Name="Xbox"/>
</Platforms>
<Configurations>
<Configuration
Name="Debug|Xbox"
OutputDirectory="Debug"
IntermediateDirectory="Debug"
ConfigurationType="4"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
OptimizeForProcessor="2"
PreprocessorDefinitions="_DEBUG;_XBOX;_LIB;FPM_DEFAULT;HAVE_CONFIG_H;ASO_ZEROCHECK;WIN32;DEBUG"
MinimalRebuild="TRUE"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
EnableEnhancedInstructionSet="1"
UsePrecompiledHeader="0"
PrecompiledHeaderFile="$(OutDir)/$(ProjectName).pch"
WarningLevel="3"
Detect64BitPortabilityProblems="FALSE"
DebugInformationFormat="4"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLibrarianTool"
OutputFile="$(OutDir)/$(ProjectName).lib"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
</Configuration>
<Configuration
Name="Profile|Xbox"
OutputDirectory="Profile"
IntermediateDirectory="Profile"
ConfigurationType="4"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
Optimization="3"
OmitFramePointers="TRUE"
OptimizeForProcessor="2"
PreprocessorDefinitions="NDEBUG;_XBOX;PROFILE;_LIB"
StringPooling="TRUE"
RuntimeLibrary="0"
EnableFunctionLevelLinking="TRUE"
EnableEnhancedInstructionSet="1"
UsePrecompiledHeader="0"
PrecompiledHeaderFile="$(OutDir)/$(ProjectName).pch"
WarningLevel="3"
Detect64BitPortabilityProblems="FALSE"
DebugInformationFormat="3"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLibrarianTool"
OutputFile="$(OutDir)/$(ProjectName).lib"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
</Configuration>
<Configuration
Name="Profile_FastCap|Xbox"
OutputDirectory="Profile_FastCap"
IntermediateDirectory="Profile_FastCap"
ConfigurationType="4"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
Optimization="3"
OmitFramePointers="TRUE"
OptimizeForProcessor="2"
PreprocessorDefinitions="NDEBUG;_XBOX;PROFILE;FASTCAP;_LIB"
StringPooling="TRUE"
RuntimeLibrary="0"
EnableFunctionLevelLinking="TRUE"
EnableEnhancedInstructionSet="1"
UsePrecompiledHeader="0"
PrecompiledHeaderFile="$(OutDir)/$(ProjectName).pch"
WarningLevel="3"
Detect64BitPortabilityProblems="FALSE"
DebugInformationFormat="3"
FastCAP="TRUE"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLibrarianTool"
OutputFile="$(OutDir)/$(ProjectName).lib"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
</Configuration>
<Configuration
Name="Release|Xbox"
OutputDirectory="Release"
IntermediateDirectory="Release"
ConfigurationType="4"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
Optimization="3"
OmitFramePointers="TRUE"
OptimizeForProcessor="2"
PreprocessorDefinitions="NDEBUG;_XBOX;_LIB;FPM_INTEL;WIN32;HAVE_CONFIG_H;ASO_ZEROCHECK"
StringPooling="TRUE"
RuntimeLibrary="0"
EnableFunctionLevelLinking="TRUE"
EnableEnhancedInstructionSet="1"
UsePrecompiledHeader="0"
PrecompiledHeaderFile="$(OutDir)/$(ProjectName).pch"
WarningLevel="3"
Detect64BitPortabilityProblems="FALSE"
DebugInformationFormat="3"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLibrarianTool"
OutputFile="$(OutDir)/$(ProjectName).lib"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
</Configuration>
<Configuration
Name="Release_LTCG|Xbox"
OutputDirectory="Release_LTCG"
IntermediateDirectory="Release_LTCG"
ConfigurationType="4"
CharacterSet="2"
WholeProgramOptimization="TRUE">
<Tool
Name="VCCLCompilerTool"
Optimization="3"
OmitFramePointers="TRUE"
OptimizeForProcessor="2"
PreprocessorDefinitions="NDEBUG;_XBOX;LTCG;_LIB"
StringPooling="TRUE"
RuntimeLibrary="0"
EnableFunctionLevelLinking="TRUE"
EnableEnhancedInstructionSet="1"
UsePrecompiledHeader="0"
PrecompiledHeaderFile="$(OutDir)/$(ProjectName).pch"
WarningLevel="3"
Detect64BitPortabilityProblems="FALSE"
DebugInformationFormat="3"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLibrarianTool"
OutputFile="$(OutDir)/$(ProjectName).lib"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
</Configuration>
</Configurations>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm">
<File
RelativePath="..\bit.c">
</File>
<File
RelativePath="..\decoder.c">
</File>
<File
RelativePath="..\fixed.c">
</File>
<File
RelativePath="..\frame.c">
</File>
<File
RelativePath="..\huffman.c">
</File>
<File
RelativePath="..\layer12.c">
</File>
<File
RelativePath="..\layer3.c">
</File>
<File
RelativePath="..\stream.c">
</File>
<File
RelativePath="..\synth.c">
</File>
<File
RelativePath="..\timer.c">
</File>
<File
RelativePath="..\version.c">
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc">
</Filter>
<File
RelativePath="ReadMe.txt">
</File>
</Files>
<Globals>
</Globals>
</VisualStudioProject>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.