now default.xip/default.xap
CODE
//only need these if you are going to use the old drop down style hd menus...
//DEF theGamesMenu TitleMenu
//DEF theApplicationsMenu TitleMenu
//DEF theEmulatorsMenu TitleMenu
//DEF theDashboardsMenu TitleMenu
DEF theConfig Config
DEF theHardDrive HardDrive
DEF theTranslator Translator
DEF theXboxNetwork XboxNetwork
DEF theMusicInline Inline
{
visible false
url "music.xap"
function onLoad() { theMusicInline.children[0].theMusicMenu.GoTo(); }
}
function GoToMusic()
{
if(theMusicInline.visible) { theMusicInline.children[0].theMusicMenu.GoTo(); }
else
{
BlockMemoryUnitInsert();
theMusicInline.visible = true;
}
}
function StartBackGroundMusicPlayer()
{
if (theMusicPlayer.transportMode != 1) { MusicPlayerRandom(); }
}
function MusicPlayerPlay()
{
theMusicPlayer.url = "st:" + theMusicCollection.GetSoundtrackSongID( currentAlbum, currentTrack );
log("Playing " + theMusicPlayer.url);
DisableAmbientAudio();
theMusicPlayer.Play();
}
function MusicPlayerRandom()
{
theMusicPlayer.playbackMode = 2;
var totalAlbums = theMusicCollection.GetSoundtrackCount() - 1;
var a = Math.random() * totalAlbums;
currentAlbum = Math.round(a);
var totalTracks = theMusicCollection.GetSoundtrackSongCount(currentAlbum) - 1;
var b = Math.random() * totalTracks;
currentTrack = Math.round(b);
MusicPlayerPlay();
}
function MusicPlayerFastForward()
{
var totaltracks = theMusicCollection.GetSoundtrackSongCount(currentAlbum) - 1;
if(currentTrack == totaltracks)
{
currentTrack = 0;
MusicPlayerPlay();
}
else
{
currentTrack = currentTrack + 1;
MusicPlayerPlay();
}
}
DEF theMusicCollection MusicCollection
{
function OnCopyComplete() { theMusicInline.children[0].OnMusicCopyComplete(); }
function OnCopyProgressChanged()
{
UpdateProgressText(theMusicCollection.GetUpdateString());
SetProgress(copyProgress);
}
function OnAddSoundtrackNewSongFailed(ErrorCode)
{
g_nRec = ErrorCode;
if (ErrorCode == 1) { theLauncherLevel.GoTo(); }
}
}
//new addition: AudioClip playbackModes
//theMusicPlayer.playbackMode = 0; Continuous from Soundtracks
//theMusicPlayer.playbackMode = 1; Random in current Soundtrack
//theMusicPlayer.playbackMode = 2; Random Globally in Soundtracks
//theMusicPlayer.playbackMode = 3; Repeat current song
//theMusicPlayer.playbackMode = 4; Continuous from Playlist
//theMusicPlayer.playbackMode = 5; Random in current Playlist
//theMusicPlayer.playbackMode = 6; Random Globally in Playlist
//until we do a soundtracks update to include playlists only soundtrack random is used...
DEF theMusicPlayer AudioClip
{
url "cd:"
sendProgress true
volume 0.86
function OnProgressChanged() { if (bInMusicMenu == true) { theMusicInline.children[0].SetMusicPlayPos(progress); } }
function OnTransportModeChanged() { if (bInMusicMenu == true) { theMusicInline.children[0].UpdateTransportIndicators(); } }
function OnTrackChanged() { if (bInMusicMenu == true) { theMusicInline.children[0].UpdateTrackList(); } }
function OnEndOfAudio()
{
if (bInMusicMenu == true) { theMusicInline.children[0].DoEndOfAudio(); }
else
{
if( theMusicPlayer.playbackMode == 0 ) { MusicPlayerFastForward(); }
if( theMusicPlayer.playbackMode == 2 ) { MusicPlayerRandom(); }
}
}
}
DEF audioVisualizer DynamicTexture
{
palette Palette { type 7 changePeriod 3 }
size 352
erase false
fps 60
children
[
ImageFader { changePeriod 10 }
StarField
AudioVisualizer
{
source USE theMusicPlayer
type "circle"
scale 1.5
}
AudioVisualizer
{
source USE theMusicPlayer
type "analyzer"
}
]
}
function MusicPlayerVolumeUp()
{
if(theMusicPlayer.volume >= 0.99) { theMusicPlayer.volume = 1.0; }
else { theMusicPlayer.volume = theMusicPlayer.volume + 0.01; }
}
function MusicPlayerVolumeDown()
{
if(theMusicPlayer.volume <= 0.0) { theMusicPlayer.volume = 0.0; }
else { theMusicPlayer.volume = theMusicPlayer.volume - 0.01; }
}
function MusicOnBootCheck()
{
var IniFile = new Settings;
IniFile.SetIniSection( "Music On Boot" );
var a = IniFile.GetIniValue( "enabled" );
var b = IniFile.GetIniValue( "volume" );
IniFile.CloseIniFile();
if( a == "true" ) { musicOnBoot = true; }
else { musicOnBoot = false; }
var c = ReturnInteger(b);
theMusicPlayer.volume = c;
}
//Start and Back buttons are no longer bound to be the same as A and B buttons
//putting these functions here saves alot of pasting to make them all global
function OnBackDown() { MusicPlayerVolumeUp(); } //back and start buttons
function OnStartDown() { MusicPlayerVolumeDown(); } //repeat when held down
function OnBlackDown() { theDiscDrive.OpenTray(); }
function OnWhiteDown() { theDiscDrive.CloseTray();}
function OnRightThumbMoveDown() { FanSpeedDown(); }
function OnRightThumbMoveUp() { FanSpeedUp(); }
DEF theGlobal Transform
{
visible false
children
[
Shape
{
appearance Appearance { material Material { } }
geometry DEF theCellWallMesh Mesh
}
]
scale 0 0 0
translation 500 0 0
}
DEF theSkinsInline Inline
{
visible false
url "skins.xap"
function onLoad() { theSkinsInline.children[0].theSkinsMenu.GoTo(); }
}
function GoToSkins()
{
theSettingsMenuIn.Play();
if( theSkinsInline.visible ) { theSkinsInline.children[0].theSkinsMenu.GoTo(); }
else { theSkinsInline.visible = true; }
}
DEF theConfigInline Inline
{
visible false
url "config.xap"
function onLoad() { theConfigInline.children[0].theConfigPanel.GoTo(); }
}
function GoToConfig()
{
if(theConfigInline.visible) { theConfigInline.children[0].theConfigPanel.GoTo(); }
else { theConfigInline.visible = true; }
}
DEF theMusicPlayWithSubsInline Inline
{
visible false
url "music_play_with_subs.xap"
function onLoad() { theMusicPlayWithSubsInline.children[0].theMusicPlayWithSubs.GoTo(); }
}
function GoToMusicPlayWithSubs()
{
if(theMusicPlayWithSubsInline.visible) { theMusicPlayWithSubsInline.children[0].theMusicPlayWithSubs.GoTo(); }
else { theMusicPlayWithSubsInline.visible = true; }
}
DEF theSettingsStyleMenuInline Inline
{
visible false
url "settings_style_menu.xap"
function onLoad() { theSettingsStyleMenuInline.children[0].theSettingsStyleMenu.GoTo(); }
}
function GoToSettingsStyleMenu()
{
if(theSettingsStyleMenuInline.visible) { theSettingsStyleMenuInline.children[0].theSettingsStyleMenu.GoTo(); }
else { theSettingsStyleMenuInline.visible = true; }
}
function AutoLaunchCheck()
{
var IniFile = new Settings;
IniFile.SetIniSection( "AutoLaunch Media" );
var a = IniFile.GetIniValue( "Launch On Insert" );
IniFile.CloseIniFile();
if( a == "true" ) { AutoLaunch(); }
else if( a == "ask" )
{
var stra;
var strb;
if(theDiscDrive.discType == "Audio")
{
stra = " An Audio CD has been detected.";
strb = " Do you wish to hear it ?";
}
else if(theDiscDrive.discType == "Video")
{
stra = " A DVD movie has been detected.";
strb = " Do you wish to watch it ?";
}
else if(theDiscDrive.discType == "Title")
{
stra = " An Xbox Game has been detected.";
strb = " Do you wish to play it ?";
}
else if(theDiscDrive.discType == "unknown")
{
stra = " An Unknown disk type has been detected.";
strb = " Do you wish to try to launch it and see what happens ?";
}
AskQuestion("\n" + stra + "\n" + strb,"AutoLaunch()","",1);
}
else { return; }
}
function AutoLaunch()
{
if (theDiscDrive.discType == "Audio") { StartCDPlayer(); }
else if (theDiscDrive.discType == "Video") { ReStartDash(); }
else if (theDiscDrive.discType == "Title") { theLauncherLevel.GoTo(); }
else if (theDiscDrive.discType == "unknown") { TellUser("ERROR MESSAGE 1",""); }
}
function ReStartDash()
{
b_restart = true;
theLauncherLevel.GoTo();
}
function RefreshCaches()
{
theGamesMenu.RefreshCache();
theApplicationsMenu.RefreshCache();
theEmulatorsMenu.RefreshCache();
theDashboardsMenu.RefreshCache();
}
function UpDateMainMenuButtonsText()
{
var IniFile = new Settings;
IniFile.SetIniSection( "Main Menu Tabs" );
var c = theMainMenu.children[0].children[0];
c.Button_01_Text.geometry.text = IniFile.GetIniValue( "Tab Text 1" );
c.Button_02_Text.geometry.text = IniFile.GetIniValue( "Tab Text 2" );
c.Button_04_Text.geometry.text = IniFile.GetIniValue( "Tab Text 3" );
c.Button_05_Text.geometry.text = IniFile.GetIniValue( "Tab Text 4" );
c.Button_06_Text.geometry.text = IniFile.GetIniValue( "Tab Text 5" );
c.Button_07_Text.geometry.text = IniFile.GetIniValue( "Tab Text 6" );
IniFile.CloseIniFile();
}
function MainMenuAttract()
{
var a = 0.65;
var c = theMainMenu.children[0].children[0];
var d = theMainMenu.children[0].children[0].theMainMenuLevel.children[0];
d.fade = a * 1.5;
c.Rotating_Large_X.fade = a;
c.ring.fade = a;
c.main_pod1.fade = a;
c.main_poda.fade = a;
c.main_podb.fade = a;
c.main_pod2.fade = a;
c.Stock_Orb.fade = a;
c.Modded_Orb.fade = a;
d.SetRotation(0,0,0,0);
d.SetTranslation(0,0,0);
c.Rotating_Large_X.SetTranslation(0,0,0);
c.ring.SetTranslation(-57.980000,-13.690000,-84.760002);
c.main_pod1.SetTranslation(-61.689999 ,-13.400000 ,0.337400);
c.main_poda.SetTranslation(-61.689999 ,-13.400000 ,0.337400);
c.main_podb.SetTranslation(-61.689999 ,-13.400000 ,0.337400);
c.main_pod2.SetTranslation(-61.689999 ,-13.400000 ,0.337400);
c.Stock_Orb.SetScale(1.44,1.44,1.44);
c.Modded_Orb.SetScale(43,43,43);
c.Rotating_Large_X.fade = 0.43;
}
DEF theMainMenuViewpoint Viewpoint
{
fieldOfView 1.755000
orientation -0.177400 -0.983500 -0.036250 -0.045440
position 11.180000 -32.299999 129.300003
jump false
}
function ApplyDashStyle()
{
var c = theMainMenu.children[0].children[0];
if( dashStyle == "modded" )//we're using the modded look so enable all the eye candy
{
theScreen.MotionStart();
c.Large_X_Spinner.rpm = 1;
c.Pod_1_Spinner.rpm = 1.3;
c.Pod_1a_Spinner.rpm = 5.75;
c.Pod_1b_Spinner.rpm = 5.75;
c.Pod_2_Spinner.rpm = 1.3;
c.Pod_2a_Spinner.rpm = 5.75;
c.Pod_2b_Spinner.rpm = 5.75;
c.Pod_3_Spinner.rpm = 1.3;
c.Pod_3a_Spinner.rpm = 5.75;
c.Pod_3b_Spinner.rpm = 5.75;
c.Pod_4_Spinner.rpm = 1.3;
c.Pod_4a_Spinner.rpm = 5.75;
c.Pod_4b_Spinner.rpm = 5.75;
c.MainPod_1_Spinner.rpm = -1;
c.MainPod_2_Spinner.rpm = 1.3;
c.MainPod_3_Spinner.rpm = -2.3;
c.MainPod_4_Spinner.rpm = -1.0;
c.Stock_Orb.visible = false;
c.podsupport_ring.visible = false;
}
else//we're going with the stock look so make sure it'll pass the 'Gcue stock test';)
{
c.Modded_Orb.visible = false;
c.Dark_Pod_Backing.visible = false;
}
}
function InitializeMenus() //use this to setpaths for any TitleMenu objects you create
{
var IniFile = new Settings; //read in storage settings from the main data file uix.ini
IniFile.SetIniSection( "Games" );
var a = IniFile.GetIniValue( "Path" );
theGamesMenu.SetPath( a );
a = IniFile.GetIniValue( "Name" );
theGamesMenu.SetMenuName( a );
IniFile.SetIniSection( "Applications" );
a = IniFile.GetIniValue( "Path" );
theApplicationsMenu.SetPath( a );
a = IniFile.GetIniValue( "Name" );
theApplicationsMenu.SetMenuName( a );
IniFile.SetIniSection( "Emulators" );
a = IniFile.GetIniValue( "Path" );
theEmulatorsMenu.SetPath( a );
a = IniFile.GetIniValue( "Name" );
theEmulatorsMenu.SetMenuName( a );
IniFile.SetIniSection( "Dashboards" );
a = IniFile.GetIniValue( "Path" );
theDashboardsMenu.SetPath( a );
a = IniFile.GetIniValue( "Name" );
theDashboardsMenu.SetMenuName( a );
IniFile.CloseIniFile(); //saves and closes current file - want to be sure when using uix.ini
}
function QuickLaunchA()
{
}
function QuickLaunchB()
{
}
function QuickLaunchX()
{
theScreen.TakeScreenShot();
}
function QuickLaunchY()
{
if( true == b_InWireFrame )
{
theScreen.WireFrameStop();
b_InWireFrame = false;
}
else
{
theScreen.WireFrameStart();
b_InWireFrame = true;
}
}
function StartScreenSaverView()
{
bInScreenSaverView = true;
if( CurrentViewpoint != theMainMenuViewpoint ) { theMainMenu.GoTo(); }
DoScreenSaverView();
}
function DoScreenSaverView()
{
var c = theMainMenu.children[0].children[0];
c.theMainMenuLevel.fade = 3;
c.theMenuItems.SetAlpha(0);
EnableCurrentAlternateViewpoint();
MainMenuPositionOne();
}
function StopScreenSaverView()
{
bInScreenSaverView = false;
var c = theMainMenu.children[0].children[0];
theMainMenuSpinner.rpm = 0;
c.theMainMenuLevel.fade = 0.6;
c.theMainMenuLevel.SetRotation(0,0,0,0);
c.theMainMenuLevel.SetTranslation(0,0,0);
DisableCurrentAlternateViewpoint();
c.theMenuItems.SetAlpha(1);
}
function MainMenuPositionOne()
{
var c = theMainMenu.children[0].children[0];
theMainMenuSpinner.rpm = 5;
c.theMainMenuLevel.fade = 100;
c.theMainMenuLevel.SetTranslation( 30, -104, 4 );
}
function MainMenuPositionTwo()
{
var c = theMainMenu.children[0].children[0];
theMainMenuSpinner.rpm = 4;
c.theMainMenuLevel.fade = 100;
c.theMainMenuLevel.SetTranslation( 74, -46, -14 );
c.theMainMenuLevel.SetRotation( -0.0006, 0, 0.00005, 0.314159 );
}
function MainMenuPositionThree()
{
var c = theMainMenu.children[0].children[0];
theMainMenuSpinner.rpm = 3;
c.theMainMenuLevel.fade = 100;
c.theMainMenuLevel.SetTranslation( -24, -36, -262 );
c.theMainMenuLevel.SetRotation( -0.001, 0.0003, 0.0003, 0.314159 );
}
DEF theScreen Screen
{
width 640
height 480
}
DEF theAmbientSounds Group
{
children
[
DEF theAmbientSound0 AudioClip { url "audio/ambient audio/amb_12_hydrothunder_lr.wav" loop true volume 0 fade 2 }
DEF theAmbientSound1 AudioClip { url "audio/ambient audio/amb_12_hydrothunder_lr.wav" loop true volume 0 fade 2 }
DEF theAmbientSound2 AudioClip { url "audio/ambient audio/amb_06_communication_lr.wav" loop true volume 0 fade 2 }
DEF theAmbientSound3 AudioClip { url "audio/ambient audio/amb_05_engineroom_lr.wav" loop true volume 0 fade 2 }
]
}
DEF thePeriodicSounds Group
{
children
[
PeriodicAudioGroup
{
period 60 // how many seconds between sounds (minimum)
periodNoise 20 // maximum random seconds to add to period
children
[
AudioClip { url "audio/ambient audio/amb_ec_steam1.wav" volume 0.80 }
AudioClip { url "audio/ambient audio/amb_ec_steam2.wav" volume 0.80 }
AudioClip { url "audio/ambient audio/amb_ec_steam3.wav" volume 0.80 }
AudioClip { url "audio/ambient audio/amb_ec_steam4.wav" volume 0.80 }
AudioClip { url "audio/ambient audio/amb_ec_steam5.wav" volume 0.80 }
AudioClip { url "audio/ambient audio/amb_ec_steam6.wav" volume 0.80 }
AudioClip { url "audio/ambient audio/amb_ec_steam7.wav" volume 0.80 }
]
}
PeriodicAudioGroup
{
period 120 // how many seconds between sounds (minimum)
periodNoise 30 // maximum random seconds to add to period
children
[
AudioClip { url "audio/ambient audio/amb_ec_voices1.wav" volume 0.80 }
AudioClip { url "audio/ambient audio/amb_ec_voices2.wav" volume 0.80 }
AudioClip { url "audio/ambient audio/amb_ec_voices3.wav" volume 0.80 }
AudioClip { url "audio/ambient audio/amb_ec_voices4.wav" volume 0.80 }
AudioClip { url "audio/ambient audio/amb_ec_voices5.wav" volume 0.80 }
AudioClip { url "audio/ambient audio/amb_ec_voices6.wav" volume 0.80 }
AudioClip { url "audio/ambient audio/amb_ec_voices7.wav" volume 0.80 }
AudioClip { url "audio/ambient audio/amb_ec_voices8.wav" volume 0.80 }
AudioClip { url "audio/ambient audio/amb_ec_voices9.wav" volume 0.80 }
AudioClip { url "audio/ambient audio/amb_ec_voices10.wav" volume 0.80 }
AudioClip { url "audio/ambient audio/amb_ec_voices11.wav" volume 0.80 }
AudioClip { url "audio/ambient audio/amb_ec_voices12.wav" volume 0.80 }
]
}
PeriodicAudioGroup
{
period 45 // how many seconds between sounds (minimum)
periodNoise 15 // maximum random seconds to add to period
children
[
AudioClip { url "audio/ambient audio/comm voice 1.wav" fade 2 volume 0.85 }
AudioClip { url "audio/ambient audio/comm voice 2.wav" fade 2 volume 0.85 }
AudioClip { url "audio/ambient audio/comm static 1.wav" fade 2 volume 0.85 }
AudioClip { url "audio/ambient audio/comm voice 3.wav" fade 2 volume 0.85 }
AudioClip { url "audio/ambient audio/comm voice 4.wav" fade 2 volume 0.85 }
AudioClip { url "audio/ambient audio/comm static 2.wav" fade 2 volume 0.85 }
AudioClip { url "audio/ambient audio/comm voice 5.wav" fade 2 volume 0.85 }
AudioClip { url "audio/ambient audio/comm voice 6.wav" fade 2 volume 0.85 }
AudioClip { url "audio/ambient audio/comm static 3.wav" fade 2 volume 0.85 }
AudioClip { url "audio/ambient audio/comm voice 7.wav" fade 2 volume 0.85 }
AudioClip { url "audio/ambient audio/comm voice 8.wav" fade 2 volume 0.85 }
AudioClip { url "audio/ambient audio/comm static 4.wav" fade 2 volume 0.85 }
AudioClip { url "audio/ambient audio/comm voice 9.wav" fade 2 volume 0.85 }
]
}
PeriodicAudioGroup
{
period 300
periodNoise 60
children
[
AudioClip { url "audio/ambient audio/amb_ec_pinger1.wav" volume 0.85 }
AudioClip { url "audio/ambient audio/control room loop.wav" volume 0.85 }
AudioClip { url "audio/ambient audio/control room loop ver2.wav" volume 0.85 }
]
}
]
}
function EnableAmbientAudio()
{
var n = Math.round(Math.random() * (theAmbientSounds.children.length() - 1));
log("Picking ambient track " + (n + 1));
for(var i = 0; i < theAmbientSounds.children.length(); i = i + 1) { theAmbientSounds.children[i].volume = 0; }
theAmbientSounds.children[n].volume = 0.95;
for(i = 0; i < thePeriodicSounds.children.length(); i = i + 1) { thePeriodicSounds.children[i].isActive = true; }
}
function AmbientAudioOn(Area)
{
var n = 0;
if(Area == "MAIN MENU") { n = 0; }
else if(Area == "MEMORY") { n = 1; }
else if(Area == "MUSIC") { n = 2; }
else if(Area == "SETTINGS") { n = 3; }
log("Picking ambient track " + (n + 1));
for(var i = 0; i < theAmbientSounds.children.length(); i = i + 1) { theAmbientSounds.children[i].volume = 0; }
theAmbientSounds.children[n].volume = 0.95;
for(i = 0; i < thePeriodicSounds.children.length(); i = i + 1) { thePeriodicSounds.children[i].isActive = true; }
}
function AmbientAudioOff()
{
log("Disabling ambient audio...");
for(var i = 0; i < theAmbientSounds.children.length(); i = i + 1) { theAmbientSounds.children[i].volume = 0; }
for(i = 0; i < thePeriodicSounds.children.length(); i = i + 1) { thePeriodicSounds.children[i].isActive = false; }
}
function DisableAmbientAudio()
{
log("Disabling ambient audio...");
for(var i = 0; i < theAmbientSounds.children.length(); i = i + 1) { theAmbientSounds.children[i].volume = 0; }
for(i = 0; i < thePeriodicSounds.children.length(); i = i + 1) { thePeriodicSounds.children[i].isActive = false; }
}
DEF theGamesMenuIn AudioClip { url "audio/transition audio/games main menu in_lr.wav" volume 0.92 }
DEF theGamesMenuOut AudioClip { url "audio/transition audio/games main menu out_lr.wav" volume 0.92 }
DEF theGamesSubMenuIn AudioClip {url "audio/transition audio/games Sub Menu in_lr.wav" volume 0.92 }
DEF theGamesSubMenuOut AudioClip {url "audio/transition audio/games Sub Menu out_lr.wav" volume 0.92 }
DEF theMusicMenuIn AudioClip { url "audio/transition audio/music main menu in_lr.wav" volume 0.92 }
DEF theMusicMenuOut AudioClip { url "audio/transition audio/music main menu out_lr.wav" volume 0.92 }
DEF theMusicSubMenuIn AudioClip { url "audio/transition audio/music select track in_lr.wav" volume 0.92 }
DEF theMusicSubMenuOut AudioClip { url "audio/transition audio/music select track out_lr.wav" volume 0.92 }
DEF theSettingsMenuIn AudioClip { url "audio/transition audio/settings main menu in_lr.wav" volume 0.92 }
DEF theSettingsMenuOut AudioClip { url "audio/transition audio/settings main menu out_lr.wav" volume 0.92 }
DEF theSettingsSubMenuIn AudioClip { url "audio/transition audio/settings sub menu in_lr.wav" volume 0.92 }
DEF theSettingsSubMenuOut AudioClip { url "audio/transition audio/settings sub menu out_lr.wav" volume 0.92 }
DEF theCDExpand AudioClip { url "audio/music audio/music cd select.wav" volume 0.85 }
DEF thePlayerPanelIn AudioClip { url "audio/music audio/games info screen in msurr.wav" volume 0.92 }
DEF thePlayerPanelOut AudioClip { url "audio/music audio/games info screen out msurr.wav" volume 0.92 }
DEF theMainMenuForward AudioClip { url "audio/main audio/global main menufwd3ver2.wav" volume 0.90 }
DEF theMainMenuBackward AudioClip { url "audio/main audio/global main menuback3ver2.wav" volume 0.90 }
DEF theASound AudioClip { url "audio/main audio/global a button select.wav" pan 75 volume 0.92 }
DEF theBSound AudioClip { url "audio/main audio/global b button back.wav" pan -75 volume 0.92 }
DEF theMenuChangeSound AudioClip { url "audio/main audio/global scroll beep.wav" volume 0.85 }
DEF theErrorSound AudioClip { url "audio/main audio/global error message b.wav" volume 0.85 }
DEF theDeleteSound AudioClip { url "audio/main audio/global delete_destroy.wav" volume 0.85 }
DEF theProgressSound AudioClip { url "audio/main audio/global progress bar.wav" loop true volume 0.85 }
DEF theCompleteSound AudioClip { url "audio/main audio/global completion beep.wav" volume 0.85 }
DEF theMemoryControllerSelectSound AudioClip { url "audio/memory audio/memory controller select.wav" volume 0.90 }
DEF theMemoryTitleSelectSound AudioClip { url "audio/memory audio/memory games select.wav" volume 0.90 }
DEF theMemorySaveSelectSound AudioClip { url "audio/memory audio/memory memory slot select.wav" volume 0.90 }
DEF theSettingsLangSound AudioClip { url "audio/settings audio/settings lang submenu sel.wav" volume 0.90 }
DEF theSettingsParentSound AudioClip { url "audio/settings audio/settings parent submenu sel.wav" volume 0.90 }
function PlaySoundError() { theErrorSound.Play(); }
function PlaySoundDelete() { theDeleteSound.Play(); }
function PlaySoundA() { theASound.Play(); }
function PlaySoundB() { theBSound.Play(); }
function PlaySoundMenuChange() { theMenuChangeSound.Play(); }
DEF theScreenSaver ScreenSaver
{
function OnStart()
{
if( dashStyle == "modded" ) { StartScreenSaverView(); }
else { theScreen.brightness = 0.1; }
}
function OnEnd()
{
if( dashStyle == "modded" ) { StopScreenSaverView(); }
else { theScreen.brightness = 1; }
}
function OnDelay2() { if( dashStyle == "modded" ) { MainMenuPositionTwo(); } }
function OnDelay3() { if( dashStyle == "modded" ) { MainMenuPositionThree(); } }
}
NavigationInfo
{
type "sample"
headlight false
}
DEF HighlightTexture ImageTexture { url "menu_hilight.xbx" }
function GetLanguage() { return theConfig.GetLanguage(); }
function SetLanguage(nLanguage) { return theConfig.SetLanguage(nLanguage); }
DEF theBackground Background
{
skyColor 0 0 0
//backdrop ImageTexture { url "xboxlogo.xbx" }
}
function ClosePopup()
{
if (g_bKeyboardDisplayed) { CloseKeyboard(); }
if (g_bPanelDisplayed) { CloseMessage(); }
}
DEF theDVDPlayerInline Inline
{
visible false
url "dvd.xap"
function onLoad() { theDVDPlayerInline.children[0].theDVDLevel.GoTo(); }
}
DEF theDiscDrive DiscDrive
{
function OnDiscRemoved()
{
if (theDVDPlayerInline.visible)
{
bShowDVDStopBackground = false;
theDVDPlayerInline.children[0].theDVDPlayer.stop();
theDVDPlayerInline.children[0].ClearOnScreenInfo();
if (g_bPanelDisplayed) { CloseMessage(); }
theLauncherLevel.GoTo();
return;
}
else if (theMusicInline.visible)
{
var c = theMusicInline.children[0];
ClosePopup();
if (c.musicSelect != 0) { return; }
if (c.theMusicPlayMenu.visible)
{
c.DoMusicStop();
c.InitPlaylist();
c.UpdateTrackList();
}
else if (c.theMusicCopyMenu.visible)
{
c.theMusicCollection.error = 3;
c.OnMusicCopyComplete();
}
else if (c.theMusicMenu.visible) { c.UpdateMusicMetaData(); }
}
else { CloseMessage(); }
}
function OnDiscInserted() { AutoLaunchCheck(); }
}
function StartDVDPlayer()
{
log("Starting the DVD player!");
theDVDPlayerInline.visible = true;
}
function StartCDPlayer()
{
log("Should start the CD player now!");
bGoToCDPlayer = true;
EnableInput(false);
GoToMusic();
}
DEF theMemoryInline Inline
{
visible false
url "memory.xap"
function onLoad() { theMemoryInline.children[0].theMemoryMenu.GoTo(); }
}
function GoToMemory()
{
if(theMemoryInline.visible) { theMemoryInline.children[0].theMemoryMenu.GoTo(); }
else { theMemoryInline.visible = true; }
}
DEF theHardDriveInline Inline
{
visible false
url "hard_drive.xap"
function onLoad() { theHardDriveInline.children[0].theHardDriveMenu.GoTo(); }
}
function GoToHardDrive()
{
if(theHardDriveInline.visible) { theHardDriveInline.children[0].theHardDriveMenu.GoTo(); }
else { theHardDriveInline.visible = true; }
}
DEF theFileManagerInline Inline
{
visible false
url "file_manager.xap"
function onLoad() { theFileManagerInline.children[0].theFileManager.GoTo(); }
}
function GoToFileManager()
{
theSettingsMenuIn.Play();
if(theFileManagerInline.visible) { theFileManagerInline.children[0].theFileManager.GoTo(); }
else
{
BlockMemoryUnitInsert();
theFileManagerInline.visible = true;
}
}
DEF theSettingsInline Inline
{
visible false
url "settings.xap"
function onLoad() { theSettingsInline.children[0].theSettingsMenu.GoTo(); }
}
function GoToSettings()
{
bBackToDVDPlayer = false;
if(theSettingsInline.visible) { theSettingsInline.children[0].theSettingsMenu.GoTo(); }
else { theSettingsInline.visible = true; }
}
var nCurMainMenuItem;
function UpdateMainMenu()
{
if( m_nbuttons == 4 ) { Update4ButtonMainMenu(); }
else { Update3ButtonMainMenu(); }
}
function Update4ButtonMainMenu()
{
var c = theMainMenu.children[0].children[0];
c.game_select_pod_inner02.visible = true; // Button 1 Flashing Orb
c.game_select_pod_inner.visible = true; // Button 2 Flashing Orb
c.game_select_pod_inner04.visible = true; // Button 3 Flashing Orb
c.game_select_pod_inner03.visible = true; // Button 4 Flashing Orb
c.game_select_pod_inner05.visible = true;
c.game_select_pod_inner06.visible = true;
c.game_select_pod_inner07.visible = true;
if (nCurMainMenuItem == 0) // Button 1
{
c.game_select_pod_inner02.visible = true;
//simple 'if' check to make the pod supports move with menu change to comply with stock look
if( dashStyle != "modded" ) { c.Rotating_Large_X.SetRotation(0, 0, 1, -0.25); }
c.theMenuItems.SetRotation(0, 0, 1, -0.25);
c.theMemoryItem.SetRotation(0, 1, 0, -0.25);
c.theMusicItem.SetRotation(0, 1, 0, -0.25);
c.theOnlineItem.SetRotation(0, 1, 0, -0.25);
c.theSettingsItem.SetRotation(0, 1, 0, -0.25);
c.MemoryPanelMaterial.name = "GameHilite";
c.MusicPanelMaterial.name = "FlatSurfaces2sided";
c.OnlinePanelMaterial.name = "FlatSurfaces2sided";
c.SettingsPanelMaterial.name = "FlatSurfaces2sided";
c.MemoryTextMaterial.name = "HilightedType";
c.MusicTextMaterial.name = "NavType";
c.OnlineTextMaterial.name = "NavType";
c.SettingsTextMaterial.name = "NavType";
}
else if (nCurMainMenuItem == 1) // Button 2 (Default position)
{
c.game_select_pod_inner.visible = true;
c.theMenuItems.SetRotation(0, 0, 1, 0.0);
if( dashStyle != "modded" ) { c.Rotating_Large_X.SetRotation(0, 0, 1, 0.0); }
c.theMemoryItem.SetRotation(0, 1, 0, 0.0);
c.theMusicItem.SetRotation(0, 1, 0, 0.0);
c.theOnlineItem.SetRotation(0, 1, 0, 0.0);
c.theSettingsItem.SetRotation(0, 1, 0, 0.0);
c.MemoryPanelMaterial.name = "FlatSurfaces2sided";
c.MusicPanelMaterial.name = "GameHilite";
c.OnlinePanelMaterial.name = "FlatSurfaces2sided";
c.SettingsPanelMaterial.name = "FlatSurfaces2sided";
c.MemoryTextMaterial.name = "NavType";
c.MusicTextMaterial.name = "HilightedType";
c.OnlineTextMaterial.name = "NavType";
c.SettingsTextMaterial.name = "NavType";
}
else if (nCurMainMenuItem == 2) // Button 3
{
c.game_select_pod_inner04.visible = true;
c.theMenuItems.SetRotation(0, 0, 1, 0.25);
if( dashStyle != "modded" ) { c.Rotating_Large_X.SetRotation(0, 0, 1, 0.25); }
c.theMemoryItem.SetRotation(0, 1, 0, 0.25);
c.theMusicItem.SetRotation(0, 1, 0, 0.25);
c.theOnlineItem.SetRotation(0, 1, 0, 0.25);
c.theSettingsItem.SetRotation(0, 1, 0, 0.25);
c.MemoryPanelMaterial.name = "FlatSurfaces2sided";
c.MusicPanelMaterial.name = "FlatSurfaces2sided";
c.OnlinePanelMaterial.name = "GameHilite";
c.SettingsPanelMaterial.name = "FlatSurfaces2sided";
c.MemoryTextMaterial.name = "NavType";
c.MusicTextMaterial.name = "NavType";
c.OnlineTextMaterial.name = "HilightedType";
c.SettingsTextMaterial.name = "NavType";
}
else if (nCurMainMenuItem == 3) // Button 4
{
c.game_select_pod_inner03.visible = true;
c.theMenuItems.SetRotation(0, 0, 1, 0.50);
if( dashStyle != "modded" ) { c.Rotating_Large_X.SetRotation(0, 0, 1, 0.50); }
c.theMemoryItem.SetRotation(0, 1, 0, 0.50);
c.theMusicItem.SetRotation(0, 1, 0, 0.50);
c.theOnlineItem.SetRotation(0, 1, 0, 0.50);
c.theSettingsItem.SetRotation(0, 1, 0, 0.50);
c.MemoryPanelMaterial.name = "FlatSurfaces2sided";
c.MusicPanelMaterial.name = "FlatSurfaces2sided";
c.OnlinePanelMaterial.name = "FlatSurfaces2sided";
c.SettingsPanelMaterial.name = "GameHilite";
c.MemoryTextMaterial.name = "NavType";
c.MusicTextMaterial.name = "NavType";
c.OnlineTextMaterial.name = "NavType";
c.SettingsTextMaterial.name = "HilightedType";
}
}
function Update3ButtonMainMenu()
{
var c = theMainMenu.children[0].children[0];
c.game_select_pod_inner02.visible = true; // Button 1 Flashing Orb
c.game_select_pod_inner.visible = true; // Button 2 Flashing Orb
c.game_select_pod_inner04.visible = true; // Button 3 Flashing Orb
c.game_select_pod_inner03.visible = true; // Button 4 Flashing Orb
//c.game_select_pod_inner05.visible = true;
//c.game_select_pod_inner06.visible = true;
//c.game_select_pod_inner07.visible = true;
//c.Extra1_Text.children[0].children[0].geometry.SetRotation(0, 1, 0, 3.20);
//c.Extra2_Text.SetRotation(0, 1, 0, 3.20);
//c.Extra3_Text.SetRotation(0, 1, 0, 3.20);
if (nCurMainMenuItem == 0) // Button 1
{
c.game_select_pod_inner02.visible = true;
c.theMenuItems.SetRotation(0, 0, 1, 0.0);
if( dashStyle != "modded" ) { c.Rotating_Large_X.SetRotation(0, 0, 1, -0.45); }
c.theMemoryItem.SetRotation(0, 1, 0, 0.0);
c.theMusicItem.SetRotation(0, 1, 0, 0.0);
c.theSettingsItem.SetRotation(0, 1, 0, 0.0);
c.theExtra1Item.SetRotation(0, 1, 0, 3.15);
c.theExtra2Item.SetRotation(0, 1, 0, 3.12);
c.theExtra3Item.SetRotation(0, 1, 0, 3.18);
c.MemoryPanelMaterial.name = "GameHilite";
c.MusicPanelMaterial.name = "FlatSurfaces2sided";
c.SettingsPanelMaterial.name = "FlatSurfaces2sided";
c.Extra1PanelMaterial.name = "FlatSurfaces2sided";
c.Extra2PanelMaterial.name = "FlatSurfaces2sided";
c.Extra3PanelMaterial.name = "FlatSurfaces2sided";
c.MemoryTextMaterial.name = "HilightedType";
c.MusicTextMaterial.name = "NavType";
c.SettingsTextMaterial.name = "NavType";
c.Extra1TextMaterial.name = "NavType";
c.Extra2TextMaterial.name = "NavType";
c.Extra3TextMaterial.name = "NavType";
}
else if (nCurMainMenuItem == 1) // Button 2 (Default position)
{
c.game_select_pod_inner.visible = true;
c.theMenuItems.SetRotation(0, 0, 1, 0.0);
if( dashStyle != "modded" ) { c.Rotating_Large_X.SetRotation(0, 0, 1, 0.0); }
c.theMemoryItem.SetRotation(0, 1, 0, 0.0);
c.theMusicItem.SetRotation(0, 1, 0, 0.0);
c.theSettingsItem.SetRotation(0, 1, 0, 0.0);
c.theExtra1Item.SetRotation(0, 1, 0, 3.15);
c.theExtra2Item.SetRotation(0, 1, 0, 3.12);
c.theExtra3Item.SetRotation(0, 1, 0, 3.18);
c.MemoryPanelMaterial.name = "FlatSurfaces2sided";
c.MusicPanelMaterial.name = "GameHilite";
c.SettingsPanelMaterial.name = "FlatSurfaces2sided";
c.Extra1PanelMaterial.name = "FlatSurfaces2sided";
c.Extra2PanelMaterial.name = "FlatSurfaces2sided";
c.Extra3PanelMaterial.name = "FlatSurfaces2sided";
c.MemoryTextMaterial.name = "NavType";
c.MusicTextMaterial.name = "HilightedType";
c.SettingsTextMaterial.name = "NavType";
c.Extra1TextMaterial.name = "NavType";
c.Extra2TextMaterial.name = "NavType";
c.Extra3TextMaterial.name = "NavType";
}
else if (nCurMainMenuItem == 2) // Button 3
{
nCurMainMenuItem = 1;
UpdateMainMenu();
}
else if (nCurMainMenuItem == 3) // Button 4
{
c.game_select_pod_inner03.visible = true;
c.theMenuItems.SetRotation(0, 0, 1, -0.0);
if( dashStyle != "modded" ) { c.Rotating_Large_X.SetRotation(0, 0, 1, 0.45); }
c.theMemoryItem.SetRotation(0, 1, 0, -0.0);
c.theMusicItem.SetRotation(0, 1, 0, -0.0);
c.theSettingsItem.SetRotation(0, 1, 0, -0.0);
c.theExtra1Item.SetRotation(0, 1, 0, 3.15);
c.theExtra2Item.SetRotation(0, 1, 0, 3.12);
c.theExtra3Item.SetRotation(0, 1, 0, 3.18);
//c.theExtra1Item.SetTranslation(0, 0, -10);
c.MemoryPanelMaterial.name = "FlatSurfaces2sided";
c.MusicPanelMaterial.name = "FlatSurfaces2sided";
c.SettingsPanelMaterial.name = "GameHilite";
c.Extra1PanelMaterial.name = "FlatSurfaces2sided";
c.Extra2PanelMaterial.name = "FlatSurfaces2sided";
c.Extra3PanelMaterial.name = "FlatSurfaces2sided";
c.MemoryTextMaterial.name = "NavType";
c.MusicTextMaterial.name = "NavType";
c.SettingsTextMaterial.name = "HilightedType";
c.Extra1TextMaterial.name = "NavType";
c.Extra2TextMaterial.name = "NavType";
c.Extra3TextMaterial.name = "NavType";
}
else if (nCurMainMenuItem == 4) // Button 5
{
c.game_select_pod_inner04.visible = true;
c.theMenuItems.SetRotation(0, 0, 0, 0.0);
if( dashStyle != "modded" ) { c.Rotating_Large_X.SetRotation(0, 0, 1, 0.45); }
c.theMemoryItem.SetRotation(0, 0, 0, 0.0);
c.theMusicItem.SetRotation(0, 1, 0, 0.0);
c.theSettingsItem.SetRotation(0, 1, 0, 0.0);
c.theExtra1Item.SetRotation(0, 1, 0, 3.15);
c.theExtra2Item.SetRotation(0, 1, 0, 3.12);
c.theExtra3Item.SetRotation(0, 1, 0, 3.18);
c.MemoryPanelMaterial.name = "FlatSurfaces2sided";
c.MusicPanelMaterial.name = "FlatSurfaces2sided";
c.SettingsPanelMaterial.name = "FlatSurfaces2sided";
c.Extra1PanelMaterial.name = "GameHilite";
c.Extra2PanelMaterial.name = "FlatSurfaces2sided";
c.Extra3PanelMaterial.name = "FlatSurfaces2sided";
c.MemoryTextMaterial.name = "NavType";
c.MusicTextMaterial.name = "NavType";
c.SettingsTextMaterial.name = "NavType";
c.Extra1TextMaterial.name = "HilightedType";
c.Extra2TextMaterial.name = "NavType";
c.Extra3TextMaterial.name = "NavType";
}
else if (nCurMainMenuItem == 5) // Button 6
{
c.game_select_pod_inner04.visible = true;
c.theMenuItems.SetRotation(0, 0, 0, 0.0);
if( dashStyle != "modded" ) { c.Rotating_Large_X.SetRotation(0, 0, 1, 0.45); }
c.theMemoryItem.SetRotation(0, 0, 0, 0.0);
c.theMusicItem.SetRotation(0, 1, 0, 0.0);
c.theSettingsItem.SetRotation(0, 1, 0, 0.0);
c.theExtra1Item.SetRotation(0, 1, 0, 3.15);
c.theExtra2Item.SetRotation(0, 1, 0, 3.12);
c.theExtra3Item.SetRotation(0, 1, 0, 3.18);
c.MemoryPanelMaterial.name = "FlatSurfaces2sided";
c.MusicPanelMaterial.name = "FlatSurfaces2sided";
c.SettingsPanelMaterial.name = "FlatSurfaces2sided";
c.Extra1PanelMaterial.name = "FlatSurfaces2sided";
c.Extra1PanelMaterial.name = "FlatSurfaces2sided";
c.Extra2PanelMaterial.name = "GameHilite";
c.MemoryTextMaterial.name = "NavType";
c.MusicTextMaterial.name = "NavType";
c.SettingsTextMaterial.name = "NavType";
c.Extra1TextMaterial.name = "NavType";
c.Extra2TextMaterial.name = "HilightedType";
c.Extra3TextMaterial.name = "NavType";
}
else if (nCurMainMenuItem == 6) // Button 7
{
c.game_select_pod_inner04.visible = true;
c.theMenuItems.SetRotation(0, 0, 0, 0.0);
if( dashStyle != "modded" ) { c.Rotating_Large_X.SetRotation(0, 0, 1, 0.45); }
c.theMemoryItem.SetRotation(0, 0, 0, 0.0);
c.theMusicItem.SetRotation(0, 1, 0, 0.0);
c.theSettingsItem.SetRotation(0, 1, 0, 0.0);
c.theExtra1Item.SetRotation(0, 1, 0, 3.15);
c.theExtra2Item.SetRotation(0, 1, 0, 3.12);
c.theExtra3Item.SetRotation(0, 1, 0, 3.18);
c.MemoryPanelMaterial.name = "FlatSurfaces2sided";
c.MusicPanelMaterial.name = "FlatSurfaces2sided";
c.SettingsPanelMaterial.name = "FlatSurfaces2sided";
c.Extra1PanelMaterial.name = "FlatSurfaces2sided";
c.Extra2PanelMaterial.name = "FlatSurfaces2sided";
c.Extra3PanelMaterial.name = "GameHilite";
c.MemoryTextMaterial.name = "NavType";
c.MusicTextMaterial.name = "NavType";
c.SettingsTextMaterial.name = "NavType";
c.Extra1TextMaterial.name = "NavType";
c.Extra2TextMaterial.name = "NavType";
c.Extra3TextMaterial.name = "HilightedType";
}
}
DEF theMainMenu Level
{
archive "main_menu.xip"
unloadable false
children
[
Inline
{
url "main_menu/default.xap"
function onLoad()
{
var c = theMainMenu.children[0].children[0];
ApplyDashStyle();
if( m_nbuttons == 4 )
{
c.Main_memory_ringpin_3.SetTranslation(62.779999, 13.892000, 102.000000);
c.Main_memory_ringpin_2.SetTranslation(56.830002, 33.290001, 101.900002);
c.Main_Online_ringpin.SetTranslation(62.779999, -6.092000, 102.000000);
c.Main_memory_ringpin_4.SetTranslation(57.430000, -24.379999, 101.500000);
}
else
{
//c.theMenuItems.setTranslation(0.1,0,0);
c.Main_Online_ringpin.visible = false;
c.Main_memory_ringpin_3.SetTranslation(62.779999, 4.492000, 102.000000);
c.Main_memory_ringpin_2.SetTranslation(56.830002, 32.290001, 101.900002);
c.Main_memory_ringpin_4.SetTranslation(57.430000, -23.379999, 101.500000);
c.Main_memory_ringpin_5.SetTranslation(59.430000, -22.379999, 101.500000);
c.Main_memory_ringpin_6.SetTranslation(67.000000, -48.379999, 101.500000);
c.Main_memory_ringpin_7.SetTranslation(64.000000, 4.379999, 101.500000);
}
MusicOnBootCheck();
UpdateMainMenu();
UpDateMainMenuButtonsText();
MainMenuAttract();
EnableAudio();
}
}
]
shell Transform
{
scale 150 150 150
translation 0 -20 80
children
[
DEF theMainMenuSpinner Spinner
{
rpm 0
axis 0 1 0
children
[
DEF theMainMenuWaver Waver
{
rpm 2.25//rpm 0.75
children
[
Shape
{
appearance Appearance
{
material MaxMaterial { name "InnerWall_01" }
texture ImageTexture
{
alpha true
url "shell.xbx"