From 5209a6e7687c6d9ba18e3c7bd5c334368ed81c65 Mon Sep 17 00:00:00 2001 From: JappaWakka Date: Thu, 15 Sep 2022 21:11:13 +0200 Subject: [PATCH] =?UTF-8?q?Fixes=20to=20scale=20and=20positioning=20of=20P?= =?UTF-8?q?ok=C3=A9mon=20sprites?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- P3D/Content/Pokemon/Sprites/155.png | Bin 4857 -> 3743 bytes P3D/Dialogues/PokemonImageView.vb | 2 +- P3D/Screens/NewGameScreen.vb | 10 +++++----- P3D/Screens/PC/StorageSystemScreen.vb | 2 +- P3D/Screens/Pokedex/PokedexScreen.vb | 14 +++++++------- P3D/Screens/Pokemon/SummaryScreen.vb | 26 ++++++++++++-------------- 6 files changed, 26 insertions(+), 28 deletions(-) diff --git a/P3D/Content/Pokemon/Sprites/155.png b/P3D/Content/Pokemon/Sprites/155.png index 2d943dd509c0cda40cbb3b356c41fbd48b64202e..55b103894ab788e945bca23e8985e9d07b49987f 100644 GIT binary patch literal 3743 zcmb`KdokO17sJGu`AyII{r-8^`n`X=>;2=Lz1CiP?Q_oF`|Qu!*B$N8hziLH z0RSLsZDoF*CuzTzAU|(EKN>2)6R>bAcLD$i@BO_%{bLDio>Goz;YM`A2N0uuBm9BW z{-J~z0>X(H>312AaK__9+e;@%03fDjZEos(b!55VDCv;3Y#O)WAzyTZmKZj?{pb}& zx>DG6gYabADon=%h=;f(&USow1TVd0;zlpBQCXGuC1EG#VS89v*T$i4I?TKU4N z6TTIHqRkpt?;#%XtON->0#Y0SGbErWMG+T53qlboU~w~$;D4m1jd$4pS=YF%E4^U^ zKw48BDK90^ukoel=~(&dPASG2)Nv_9rS%_R?CU*1<2EN!iUP*o2Shkq!YsnyB`S)P zz`eKI;gVC3SkLwSQV8OW$P;^^R>RXzC65SjAAzg2Hv5VbE;)cMN}(+ZZ_~DR&Z;Gw zATn))Z|Jx%*Pt^49qYt8^!an@%5U+tTasv%y->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j_~IlcFB0qxPM4g_Xy6>!C`$tyx^(A?qvQoihdyG{s{5s>@`o_}jY# zUNj{~=xdfF9~CdT^jzH{iGi$R}E3C+%|e zwo^J&`rjSOBm{XpF&1m5^k{vINhZ;EnvPsJu216v60?8q^*^a%_*@8to8IIR&y=*= zKF?$q5ce{E%@_3x$&>c}ioM&@*N&dLAGs31HI4u_{h+~@RO zHN40O@_5}^Oi|#CxfNwU-egMg@YeWjdW3rCE%7ygl CInt(Core.windowSize.Width / 2) - 200 Then + If ballPosition.X > CInt(Core.windowSize.Width / 2) - MathHelper.Min(CInt(pokeTexture.Width * 2), 256) Then ballPosition.X -= 3 ballPosition.Y += ballVelocity ballVelocity += 0.2F diff --git a/P3D/Screens/PC/StorageSystemScreen.vb b/P3D/Screens/PC/StorageSystemScreen.vb index 168d2eb5d..28011a61f 100644 --- a/P3D/Screens/PC/StorageSystemScreen.vb +++ b/P3D/Screens/PC/StorageSystemScreen.vb @@ -1333,7 +1333,7 @@ Public Class StorageSystemScreen Draw3DModel(p, "Models\Pokemon\" & modelName & "\" & shinyString) Else GetYOffset(p) - Core.SpriteBatch.Draw(p.GetTexture(True), New Rectangle(660, 200 - yOffset, 256, 256), Color.White) + Core.SpriteBatch.Draw(p.GetTexture(True), New Rectangle(792 - CInt(MathHelper.Min(p.GetTexture(True).Width * 3, 288) / 2), 192 - yOffset, MathHelper.Min(p.GetTexture(True).Width * 3, 288), MathHelper.Min(p.GetTexture(True).Height * 3, 288)), Color.White) End If Canvas.DrawRectangle(New Rectangle(660, 472, 320, 240), c) diff --git a/P3D/Screens/Pokedex/PokedexScreen.vb b/P3D/Screens/Pokedex/PokedexScreen.vb index 17d024010..bc36cf08a 100644 --- a/P3D/Screens/Pokedex/PokedexScreen.vb +++ b/P3D/Screens/Pokedex/PokedexScreen.vb @@ -645,10 +645,10 @@ Public Class PokedexScreen End While If entryType = 0 Then - Core.SpriteBatch.DrawString(FontManager.MainFont, "???" & Environment.NewLine & Environment.NewLine & "No. " & no, New Vector2(830, 200), Color.White) + Core.SpriteBatch.DrawString(FontManager.MainFont, "???" & Environment.NewLine & Environment.NewLine & "No. " & no, New Vector2(864, 200), Color.White) Else - Core.SpriteBatch.DrawString(FontManager.MainFont, p.GetName() & Environment.NewLine & Environment.NewLine & "No. " & no, New Vector2(830, 200), Color.White) - Core.SpriteBatch.Draw(p.GetTexture(True), New Rectangle(670, 140, 128, 128), Color.White) + Core.SpriteBatch.DrawString(FontManager.MainFont, p.GetName() & Environment.NewLine & Environment.NewLine & "No. " & no, New Vector2(864, 200), Color.White) + Core.SpriteBatch.Draw(p.GetTexture(True), New Rectangle(CInt(680 - p.GetTexture(True).Width / 4), CInt(140 - p.GetTexture(True).Height / 4), MathHelper.Min(CInt(p.GetTexture(True).Width * 2), 256), MathHelper.Min(CInt(p.GetTexture(True).Height * 2), 256)), Color.White) Core.SpriteBatch.DrawString(FontManager.MainFont, "SPECIES", New Vector2(680, 310), Color.Black) Core.SpriteBatch.DrawString(FontManager.MainFont, "TYPE", New Vector2(680, 350), Color.Black) @@ -685,14 +685,14 @@ Public Class PokedexScreen Core.SpriteBatch.DrawString(FontManager.MainFont, p.PokedexEntry.Text.CropStringToWidth(FontManager.MainFont, 448), New Vector2(688, 490), Color.Black) - Core.SpriteBatch.Draw(TextureManager.GetTexture("GUI\Menus\pokedexhabitat", New Rectangle(160, 160, 10, 10), ""), New Rectangle(928, 242, 20, 20), Color.White) + Core.SpriteBatch.Draw(TextureManager.GetTexture("GUI\Menus\pokedexhabitat", New Rectangle(160, 160, 10, 10), ""), New Rectangle(992, 242, 20, 20), Color.White) Else Core.SpriteBatch.DrawString(FontManager.MainFont, "??? Pokémon", New Vector2(850, 310), Color.Black) Core.SpriteBatch.DrawString(FontManager.MainFont, "???", New Vector2(850, 350), Color.Black) Core.SpriteBatch.DrawString(FontManager.MainFont, "??? m", New Vector2(850, 390), Color.Black) Core.SpriteBatch.DrawString(FontManager.MainFont, "??? kg", New Vector2(850, 430), Color.Black) - Core.SpriteBatch.Draw(TextureManager.GetTexture("GUI\Menus\pokedexhabitat", New Rectangle(160, 170, 10, 10), ""), New Rectangle(928, 242, 20, 20), Color.White) + Core.SpriteBatch.Draw(TextureManager.GetTexture("GUI\Menus\pokedexhabitat", New Rectangle(160, 170, 10, 10), ""), New Rectangle(992, 242, 20, 20), Color.White) End If End If End Sub @@ -1449,8 +1449,8 @@ Public Class PokedexViewScreen Dim playedCry As Boolean = False Private Sub DrawPage1() - Dim v As Vector2 = Core.GetMiddlePosition(New Size(512, 512)) - Core.SpriteBatch.Draw(Pokemon.GetTexture(Me.FrontView), New Rectangle(CInt(v.X), CInt(v.Y) - yOffset * 2, 512, 512), New Color(255, 255, 255, fadeMainImage)) + Dim v As Vector2 = Core.GetMiddlePosition(New Size(MathHelper.Min(Pokemon.GetTexture(True).Width * 4, 512), MathHelper.Min(Pokemon.GetTexture(True).Height * 4, 512))) + Core.SpriteBatch.Draw(Pokemon.GetTexture(Me.FrontView), New Rectangle(CInt(v.X), CInt(v.Y) - yOffset * 2 + 32, MathHelper.Min(Pokemon.GetTexture(True).Width * 4, 512), MathHelper.Min(Pokemon.GetTexture(True).Height * 4, 512)), New Color(255, 255, 255, fadeMainImage)) If fadeMainImage = 255 Then Dim mV As Vector2 = Core.GetMiddlePosition(New Size(0, 0)) diff --git a/P3D/Screens/Pokemon/SummaryScreen.vb b/P3D/Screens/Pokemon/SummaryScreen.vb index e23a3c692..640895ee6 100644 --- a/P3D/Screens/Pokemon/SummaryScreen.vb +++ b/P3D/Screens/Pokemon/SummaryScreen.vb @@ -114,11 +114,11 @@ End Sub Public Overrides Sub Render() - + Dim PokemonTexture = GetPokemon().GetTexture(True) _pixelFade = 1 'Remove when pixel fading effect is properly implemented. - Dim pixelSize As Integer = CInt(256 * _pixelFade).Clamp(16, 256) - If pixelSize = 256 Or Core.GraphicsManager.IsFullScreen = True Then + Dim pixelSize As Integer = CInt(MathHelper.Min(PokemonTexture.Width * 3, 288) * _pixelFade).Clamp(16, MathHelper.Min(PokemonTexture.Width * 3, 288)) + If pixelSize = MathHelper.Min(PokemonTexture.Width * 3, 288) Or Core.GraphicsManager.IsFullScreen = True Then pixeledPokemonTexture = GetPokemon().GetTexture(True) Else Dim pixeled As New RenderTarget2D(GraphicsDevice, pixelSize, pixelSize, False, SurfaceFormat.Color, DepthFormat.None, 0, RenderTargetUsage.PreserveContents) @@ -126,15 +126,15 @@ GraphicsDevice.Clear(Color.Transparent) Dim s As New SpriteBatch(GraphicsDevice) s.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.Default, RasterizerState.CullCounterClockwise) - s.Draw(GetPokemon().GetTexture(True), New Rectangle(0, 0, pixelSize, pixelSize), Color.White) + s.Draw(PokemonTexture, New Rectangle(0, 0, pixelSize, pixelSize), Color.White) s.End() - Dim dePixeled As New RenderTarget2D(GraphicsDevice, 256, 256, False, SurfaceFormat.Color, DepthFormat.None, 0, RenderTargetUsage.PreserveContents) + Dim dePixeled As New RenderTarget2D(GraphicsDevice, MathHelper.Min(PokemonTexture.Width * 3, 288), MathHelper.Min(PokemonTexture.Height * 3, 288), False, SurfaceFormat.Color, DepthFormat.None, 0, RenderTargetUsage.PreserveContents) GraphicsDevice.SetRenderTarget(dePixeled) GraphicsDevice.Clear(Color.Transparent) s = New SpriteBatch(GraphicsDevice) s.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.Default, RasterizerState.CullCounterClockwise) - s.Draw(pixeled, New Rectangle(0, 0, 256, 256), Color.White) + s.Draw(pixeled, New Rectangle(0, 0, MathHelper.Min(PokemonTexture.Width * 3, 288), MathHelper.Min(PokemonTexture.Height * 3, 288)), Color.White) s.End() pixeledPokemonTexture = dePixeled @@ -201,17 +201,15 @@ 'Draw Pokémon preview: If _enrollY >= 160 Then - Dim height As Integer = CInt(_enrollY - 160).Clamp(0, 256) Dim pokemonTexture = GetPokemon().GetTexture(_isFront) - Dim textureHeight As Integer = CInt(pokemonTexture.Height * (height / 256)) + Dim height As Integer = CInt(_enrollY - 160).Clamp(0, MathHelper.Min(pokemonTexture.Height * 3, 288)) - Dim pokemonTextureOffset As Integer = 0 + 8 - If GetPokemon().IsEgg() = True Then - pokemonTextureOffset = 32 + 8 + 8 - End If + Dim textureHeight As Integer = CInt(pokemonTexture.Height * (height / MathHelper.Min(pokemonTexture.Height * 3, 288))) - SpriteBatch.Draw(pokemonTexture, New Rectangle(DeltaX + 20 + 10, DeltaY + 64 - _yOffset + pokemonTextureOffset + 10, 256, height), New Rectangle(0, 0, pokemonTexture.Width, textureHeight), New Color(0, 0, 0, 150)) - SpriteBatch.Draw(pokemonTexture, New Rectangle(DeltaX + 20, DeltaY + 64 - _yOffset + pokemonTextureOffset, 256, height), New Rectangle(0, 0, pokemonTexture.Width, textureHeight), Color.White) + Dim pokemonTextureOffset As Integer = CInt(MathHelper.Min(pokemonTexture.Height * 3, 288) / 2) + + SpriteBatch.Draw(pokemonTexture, New Rectangle(DeltaX + 144 - CInt(MathHelper.Min(pokemonTexture.Width * 3, 288) / 2) + 10, DeltaY + 208 - _yOffset - pokemonTextureOffset + 10, MathHelper.Min(pokemonTexture.Width * 3, 288), height), New Rectangle(0, 0, pokemonTexture.Width, textureHeight), New Color(0, 0, 0, 150)) + SpriteBatch.Draw(pokemonTexture, New Rectangle(DeltaX + 144 - CInt(MathHelper.Min(pokemonTexture.Width * 3, 288) / 2), DeltaY + 208 - _yOffset - pokemonTextureOffset, MathHelper.Min(pokemonTexture.Width * 3, 288), height), New Rectangle(0, 0, pokemonTexture.Width, textureHeight), Color.White) End If 'Draw main infos: