diff --git a/P3D/Battle/BattleSystemV2/BattleScreen.vb b/P3D/Battle/BattleSystemV2/BattleScreen.vb index 9f2114096..7afab12c9 100644 --- a/P3D/Battle/BattleSystemV2/BattleScreen.vb +++ b/P3D/Battle/BattleSystemV2/BattleScreen.vb @@ -254,10 +254,12 @@ OwnPokemonNPC = CType(Entity.GetNewEntity("NPC", New Vector3(12, OwnEntityOffsetY, 13) + BattleMapOffset, {Nothing}, {0, 0}, False, New Vector3(0), New Vector3(1), BaseModel.BillModel, 0, "", True, New Vector3(1), 1, "", "", New Vector3(0), {PokemonForms.GetOverworldSpriteName(OwnPokemon), 3, WildPokemon.GetDisplayName(), 0, True, "Still", New List(Of Rectangle)}, 1,,, ownModel), NPC) OppPokemonNPC = CType(Entity.GetNewEntity("NPC", New Vector3(15, OppEntityOffsetY, 13) + BattleMapOffset, {Nothing}, {0, 0}, False, New Vector3(0), New Vector3(1), BaseModel.BillModel, 0, "", True, New Vector3(1), 1, "", "", New Vector3(0), {PokemonForms.GetOverworldSpriteName(WildPokemon), 1, WildPokemon.GetDisplayName(), 1, True, "Still", New List(Of Rectangle)},,,, oppModel), NPC) If ownModel <> "" Then - OwnPokemonNPC.Scale = New Vector3(OwnPokemon.GetModelProperties().Item1) * ModelManager.MODELSCALE + OwnPokemonNPC.Scale = New Vector3(OwnPokemon.GetModelProperties().Item1) * ModelManager.MODELSCALE * GameModeManager.PokeModelScale + OwnPokemonNPC.Rotation = NPC.GetRotationFromInteger(OwnPokemonNPC.faceRotation) + GameModeManager.PokeModelRotation End If If oppModel <> "" Then - OppPokemonNPC.Scale = New Vector3(OppPokemon.GetModelProperties().Item1) * ModelManager.MODELSCALE + OppPokemonNPC.Scale = New Vector3(OppPokemon.GetModelProperties().Item1) * ModelManager.MODELSCALE * GameModeManager.PokeModelScale + OppPokemonNPC.Rotation = NPC.GetRotationFromInteger(OppPokemonNPC.faceRotation) + GameModeManager.PokeModelRotation End If Screen.Level.Entities.Add(OwnPokemonNPC) Screen.Level.Entities.Add(OppPokemonNPC) @@ -412,10 +414,12 @@ OppPokemonNPC = CType(Entity.GetNewEntity("NPC", New Vector3(15, OppEntityOffsetY, 13) + BattleMapOffset, {Nothing}, {0, 0}, False, New Vector3(0), New Vector3(1), BaseModel.BillModel, 0, "", True, New Vector3(1), 1, "", "", New Vector3(0), {PokemonForms.GetOverworldSpriteName(OppPokemon), 1, OppPokemon.GetDisplayName(), 1, True, "Still", New List(Of Rectangle)}, InitiallyVisibleOpp,,, oppModel), NPC) If ownModel <> "" Then - OwnPokemonNPC.Scale = New Vector3(OwnPokemon.GetModelProperties().Item1) * ModelManager.MODELSCALE + OwnPokemonNPC.Scale = New Vector3(OwnPokemon.GetModelProperties().Item1) * ModelManager.MODELSCALE * GameModeManager.PokeModelScale + OwnPokemonNPC.Rotation = NPC.GetRotationFromInteger(OwnPokemonNPC.faceRotation) + GameModeManager.PokeModelRotation End If If oppModel <> "" Then - OppPokemonNPC.Scale = New Vector3(OppPokemon.GetModelProperties().Item1) * ModelManager.MODELSCALE + OppPokemonNPC.Scale = New Vector3(OppPokemon.GetModelProperties().Item1) * ModelManager.MODELSCALE * GameModeManager.PokeModelScale + OppPokemonNPC.Rotation = NPC.GetRotationFromInteger(OppPokemonNPC.faceRotation) + GameModeManager.PokeModelRotation End If Screen.Level.Entities.Add(OwnPokemonNPC) @@ -660,10 +664,12 @@ OppPokemonNPC = CType(Entity.GetNewEntity("NPC", New Vector3(15, 0 + OppEntityOffsetY, 13) + BattleMapOffset, {Nothing}, {0, 0}, False, New Vector3(0), New Vector3(1), BaseModel.BillModel, 0, "", True, New Vector3(1), 1, "", "", New Vector3(0), {PokemonForms.GetOverworldSpriteName(WildPokemon), 1, WildPokemon.GetDisplayName(), 1, True, "Still", New List(Of Rectangle)},,,, oppModel), NPC) If ownModel <> "" Then - OwnPokemonNPC.Scale = New Vector3(OwnPokemon.GetModelProperties().Item1) * ModelManager.MODELSCALE + OwnPokemonNPC.Scale = New Vector3(OwnPokemon.GetModelProperties().Item1) * ModelManager.MODELSCALE * GameModeManager.PokeModelScale + OwnPokemonNPC.Rotation = NPC.GetRotationFromInteger(OwnPokemonNPC.faceRotation) + GameModeManager.PokeModelRotation End If If oppModel <> "" Then - OppPokemonNPC.Scale = New Vector3(OppPokemon.GetModelProperties().Item1) * ModelManager.MODELSCALE + OppPokemonNPC.Scale = New Vector3(OppPokemon.GetModelProperties().Item1) * ModelManager.MODELSCALE * GameModeManager.PokeModelScale + OppPokemonNPC.Rotation = NPC.GetRotationFromInteger(OppPokemonNPC.faceRotation) + GameModeManager.PokeModelRotation End If Screen.Level.Entities.Add(OwnPokemonNPC) @@ -783,10 +789,12 @@ OppPokemonNPC = CType(Entity.GetNewEntity("NPC", New Vector3(15, 0 + OppEntityOffsetY, 13) + BattleMapOffset, {Nothing}, {0, 0}, False, New Vector3(0), New Vector3(1), BaseModel.BillModel, 0, "", True, New Vector3(1), 1, "", "", New Vector3(0), {PokemonForms.GetOverworldSpriteName(WildPokemon), 1, WildPokemon.GetDisplayName(), 1, True, "Still", New List(Of Rectangle)},,,, oppModel), NPC) If ownModel <> "" Then - OwnPokemonNPC.Scale = New Vector3(OwnPokemon.GetModelProperties().Item1) * ModelManager.MODELSCALE + OwnPokemonNPC.Scale = New Vector3(OwnPokemon.GetModelProperties().Item1) * ModelManager.MODELSCALE * GameModeManager.PokeModelScale + OwnPokemonNPC.Rotation = NPC.GetRotationFromInteger(OwnPokemonNPC.faceRotation) + GameModeManager.PokeModelRotation End If If oppModel <> "" Then - OppPokemonNPC.Scale = New Vector3(OppPokemon.GetModelProperties().Item1) * ModelManager.MODELSCALE + OppPokemonNPC.Scale = New Vector3(OppPokemon.GetModelProperties().Item1) * ModelManager.MODELSCALE * GameModeManager.PokeModelScale + OppPokemonNPC.Rotation = NPC.GetRotationFromInteger(OppPokemonNPC.faceRotation) + GameModeManager.PokeModelRotation End If Screen.Level.Entities.Add(OwnPokemonNPC) diff --git a/P3D/Battle/BattleSystemV2/QueryObjects/ToggleEntityQueryObject.vb b/P3D/Battle/BattleSystemV2/QueryObjects/ToggleEntityQueryObject.vb index 92428f549..f043d8da1 100644 --- a/P3D/Battle/BattleSystemV2/QueryObjects/ToggleEntityQueryObject.vb +++ b/P3D/Battle/BattleSystemV2/QueryObjects/ToggleEntityQueryObject.vb @@ -112,11 +112,13 @@ Case 2 Select Case Me._entity Case BattleEntities.OwnPokemon - BV2Screen.OwnPokemonNPC.Scale = New Vector3(BV2Screen.OwnPokemon.GetModelProperties().Item1) * ModelManager.MODELSCALE + BV2Screen.OwnPokemonNPC.Scale = New Vector3(BV2Screen.OwnPokemon.GetModelProperties().Item1) * ModelManager.MODELSCALE * GameModeManager.PokeModelScale + BV2Screen.OwnPokemonNPC.Rotation = NPC.GetRotationFromInteger(BV2Screen.OwnPokemonNPC.faceRotation) + GameModeManager.PokeModelRotation BV2Screen.OwnPokemonNPC.ModelPath = _newTexture BV2Screen.OwnPokemonNPC.Model = ModelManager.GetModel(BV2Screen.OwnPokemonNPC.ModelPath) Case BattleEntities.OppPokemon - BV2Screen.OppPokemonNPC.Scale = New Vector3(BV2Screen.OppPokemon.GetModelProperties().Item1) * ModelManager.MODELSCALE + BV2Screen.OppPokemonNPC.Scale = New Vector3(BV2Screen.OppPokemon.GetModelProperties().Item1) * ModelManager.MODELSCALE * GameModeManager.PokeModelScale + BV2Screen.OppPokemonNPC.Rotation = NPC.GetRotationFromInteger(BV2Screen.OppPokemonNPC.faceRotation) + GameModeManager.PokeModelRotation BV2Screen.OppPokemonNPC.ModelPath = _newTexture BV2Screen.OppPokemonNPC.Model = ModelManager.GetModel(BV2Screen.OppPokemonNPC.ModelPath) End Select diff --git a/P3D/Resources/ContentPackManager.vb b/P3D/Resources/ContentPackManager.vb index e63d0c06f..3371428ea 100644 --- a/P3D/Resources/ContentPackManager.vb +++ b/P3D/Resources/ContentPackManager.vb @@ -9,31 +9,36 @@ If System.IO.File.Exists(ContentPackFile) = True Then Dim Lines() As String = System.IO.File.ReadAllLines(ContentPackFile) For Each Line As String In Lines - If Line.GetSplit(0, "|").ToLower = "waterspeed" Then - GameModeManager.ForceWaterSpeed = CInt(Line.GetSplit(1, "|")) - Else - Select Case Line.CountSplits("|") - Case 2 'ResolutionChange - Dim TextureName As String = Line.GetSplit(0, "|") - Dim Resolution As Single = CSng(Line.GetSplit(1, "|").Replace(".", GameController.DecSeparator)) + Select Case Line.GetSplit(0, "|").ToLower + Case "waterspeed" + GameModeManager.ForceWaterSpeed = CInt(Line.GetSplit(1, "|")) + Case "pokemodelscale" + GameModeManager.PokeModelScale = CSng(Line.GetSplit(1, "|").Replace(".", GameController.DecSeparator)) + Case "pokemodelrotation" + GameModeManager.PokeModelRotation = New Vector3(CSng(Line.GetSplit(1, "|").GetSplit(0).Replace(".", GameController.DecSeparator)), 0, CSng(Line.GetSplit(1, "|").GetSplit(1).Replace(".", GameController.DecSeparator))) + Case Else + Select Case Line.CountSplits("|") + Case 2 'ResolutionChange + Dim TextureName As String = Line.GetSplit(0, "|") + Dim Resolution As Single = CSng(Line.GetSplit(1, "|").Replace(".", GameController.DecSeparator)) - If TextureResolutions.ContainsKey(TextureName) = False Then - TextureResolutions.Add(TextureName, Resolution) - End If - Case 4 'TextureReplacement - Dim oldTextureName As String = Line.GetSplit(0, "|") - Dim newTextureName As String = Line.GetSplit(2, "|") - Dim oRS As String = Line.GetSplit(1, "|") 'oRS = oldRectangleSource - Dim nRS As String = Line.GetSplit(3, "|") 'nRS = newRectangleSource + If TextureResolutions.ContainsKey(TextureName) = False Then + TextureResolutions.Add(TextureName, Resolution) + End If + Case 4 'TextureReplacement + Dim oldTextureName As String = Line.GetSplit(0, "|") + Dim newTextureName As String = Line.GetSplit(2, "|") + Dim oRS As String = Line.GetSplit(1, "|") 'oRS = oldRectangleSource + Dim nRS As String = Line.GetSplit(3, "|") 'nRS = newRectangleSource - Dim oldTextureSource As New TextureSource(oldTextureName, New Rectangle(CInt(oRS.GetSplit(0)), CInt(oRS.GetSplit(1)), CInt(oRS.GetSplit(2)), CInt(oRS.GetSplit(3)))) - Dim newTextureSource As New TextureSource(newTextureName, New Rectangle(CInt(nRS.GetSplit(0)), CInt(nRS.GetSplit(1)), CInt(nRS.GetSplit(2)), CInt(nRS.GetSplit(3)))) + Dim oldTextureSource As New TextureSource(oldTextureName, New Rectangle(CInt(oRS.GetSplit(0)), CInt(oRS.GetSplit(1)), CInt(oRS.GetSplit(2)), CInt(oRS.GetSplit(3)))) + Dim newTextureSource As New TextureSource(newTextureName, New Rectangle(CInt(nRS.GetSplit(0)), CInt(nRS.GetSplit(1)), CInt(nRS.GetSplit(2)), CInt(nRS.GetSplit(3)))) - If TextureReplacements.ContainsKey(oldTextureSource) = False Then - TextureReplacements.Add(oldTextureSource, newTextureSource) - End If - End Select - End If + If TextureReplacements.ContainsKey(oldTextureSource) = False Then + TextureReplacements.Add(oldTextureSource, newTextureSource) + End If + End Select + End Select Next End If End If diff --git a/P3D/Resources/GameModeManager.vb b/P3D/Resources/GameModeManager.vb index 503befcb1..d45aa5a45 100644 --- a/P3D/Resources/GameModeManager.vb +++ b/P3D/Resources/GameModeManager.vb @@ -4,6 +4,8 @@ Public Class GameModeManager Private Shared GameModePointer As Integer = 0 Public Shared Initialized As Boolean = False Public Shared ForceWaterSpeed As Integer = -1 + Public Shared PokeModelScale As Single = 1 + Public Shared PokeModelRotation As New Vector3(0, 0, 0) ''' ''' Loads (or reloads) the list of GameModes. The pointer also gets reset. diff --git a/P3D/Screens/NewOptionScreen.vb b/P3D/Screens/NewOptionScreen.vb index 05dc16af9..2f4e980f6 100644 --- a/P3D/Screens/NewOptionScreen.vb +++ b/P3D/Screens/NewOptionScreen.vb @@ -517,6 +517,8 @@ Public Class NewOptionScreen MusicManager.PlayNoMusic() ContentPackManager.Clear() GameModeManager.ForceWaterSpeed = -1 + GameModeManager.PokeModelScale = 1 + GameModeManager.PokeModelRotation = New Vector3(0, 0, 0) For Each s As String In Core.GameOptions.ContentPackNames ContentPackManager.Load(GameController.GamePath & "\ContentPacks\" & s & "\exceptions.dat") Next