This commit is contained in:
CaptainSegis 2016-12-06 02:33:42 -05:00
commit f7ba040e7c
3 changed files with 34 additions and 3 deletions

View File

@ -1,12 +1,20 @@
Module CommandLineArgHandler
Private _forceGraphics As Boolean = False
Private _nosplash As Boolean = False
Public Sub Initialize(ByVal args() As String)
If args.Length > 0 Then
If args(0) = "-forcegraphics" Then
If args.Any(Function(arg As String)
Return arg = "-forcegraphics"
End Function) Then
_forceGraphics = True
End If
If args.Any(Function(arg As String)
Return arg = "-nosplash"
End Function) Then
_nosplash = True
End If
End If
For Each arg As String In args
@ -28,4 +36,10 @@
End Get
End Property
Public ReadOnly Property NoSplash() As Boolean
Get
Return _nosplash
End Get
End Property
End Module

View File

@ -73,7 +73,13 @@
GraphicsDevice.SamplerStates(0) = sampler
KeyboardInput = New KeyboardInput()
SetScreen(New SplashScreen(GameInstance))
If CommandLineArgHandler.NoSplash = True Then
Core.LoadContent()
SetScreen(New MainMenuScreen())
Else
SetScreen(New SplashScreen(GameInstance))
End If
End Sub
Public Sub LoadContent()

View File

@ -1,4 +1,6 @@
''' <summary>
Imports System.Threading
''' <summary>
''' The screen to display the default Overworld gameplay.
''' </summary>
Public Class OverworldScreen
@ -380,6 +382,15 @@ Public Class OverworldScreen
'Set to correct music:
If TrainerEncountered = False Then
Dim x = 0
While (x < 100 And String.IsNullOrEmpty(Level.MusicLoop))
Thread.Sleep(20)
x = x + 1
End While
If String.IsNullOrEmpty(Level.MusicLoop)
Return
End If
Dim theme As String = Level.MusicLoop
If Screen.Level.Surfing = True Then
theme = "surf"