mirror of
https://github.com/P3D-Legacy/P3D-Legacy.git
synced 2025-04-08 18:35:09 +02:00
Marked possible leaking functions, made crappy fix
This commit is contained in:
parent
69ec7efbb1
commit
cd77bba60e
2.5DHero/2.5DHero/Screens
@ -190,6 +190,7 @@
|
||||
Dim t As Texture2D = GameJolt.Emblem.GetOnlineSprite(Trainer.GameJoltID)
|
||||
If Not t Is Nothing Then
|
||||
Dim spriteSize As New Vector2(t.Width / 3.0F, t.Height / 4.0F)
|
||||
'It will leak
|
||||
t3 = TextureManager.TextureRectangle(t, New Rectangle(0, CInt(spriteSize.Y * 2), CInt(spriteSize.X), CInt(spriteSize.Y)))
|
||||
End If
|
||||
End If
|
||||
@ -252,6 +253,7 @@
|
||||
Dim t As Texture2D = GameJolt.Emblem.GetOnlineSprite(Trainer.GameJoltID)
|
||||
If Not t Is Nothing Then
|
||||
Dim spriteSize As New Vector2(t.Width / 3.0F, t.Height / 4.0F)
|
||||
'It will leak
|
||||
t3 = TextureManager.TextureRectangle(t, New Rectangle(0, CInt(spriteSize.Y * 2), CInt(spriteSize.X), CInt(spriteSize.Y)))
|
||||
End If
|
||||
End If
|
||||
|
@ -385,7 +385,10 @@
|
||||
c = Color.Gray
|
||||
End If
|
||||
|
||||
Core.SpriteBatch.Draw(Route.getTexture(objectsTexture, isSelected), Route.getRectangle(mapOffset), c)
|
||||
' Plz Fix It Aragaz Plz
|
||||
Dim texture = Route.getTexture(objectsTexture, isSelected)
|
||||
Core.SpriteBatch.Draw(texture, Route.getRectangle(mapOffset), c)
|
||||
texture.Dispose()
|
||||
Next
|
||||
End If
|
||||
|
||||
@ -401,7 +404,10 @@
|
||||
c = Color.Gray
|
||||
End If
|
||||
|
||||
Core.SpriteBatch.Draw(City.getTexture(objectsTexture, isSelected), City.getRectangle(mapOffset), c)
|
||||
' Plz Fix It Aragaz Plz
|
||||
Dim texture = City.getTexture(objectsTexture, isSelected)
|
||||
Core.SpriteBatch.Draw(texture, City.getRectangle(mapOffset), c)
|
||||
texture.Dispose()
|
||||
Next
|
||||
End If
|
||||
|
||||
@ -417,7 +423,10 @@
|
||||
c = Color.Gray
|
||||
End If
|
||||
|
||||
Core.SpriteBatch.Draw(Place.getTexture(objectsTexture, isSelected), Place.getRectangle(mapOffset), c)
|
||||
' Plz Fix It Aragaz Plz
|
||||
Dim texture = Place.getTexture(objectsTexture, isSelected)
|
||||
Core.SpriteBatch.Draw(texture, Place.getRectangle(mapOffset), c)
|
||||
texture.Dispose()
|
||||
Next
|
||||
End If
|
||||
|
||||
@ -643,6 +652,7 @@
|
||||
Return New Rectangle(CInt(Me.getPosition().X + offset.X), CInt(Me.getPosition().Y + offset.Y), sizeX, sizeY)
|
||||
End Function
|
||||
|
||||
' It will leak
|
||||
Public Function getTexture(ByVal FullTexture As Texture2D, ByVal isSelected As Boolean) As Texture2D
|
||||
If Me.T Is Nothing Or isSelected = True Then
|
||||
Dim r As Rectangle
|
||||
@ -794,6 +804,7 @@
|
||||
Return New Rectangle(CInt(Me.getPosition().X + PositionOffset.X + offset.X), CInt(Me.getPosition().Y + PositionOffset.Y + offset.Y), CInt(sizeX), CInt(sizeY))
|
||||
End Function
|
||||
|
||||
'It will leak
|
||||
Public Function getTexture(ByVal FullTexture As Texture2D, ByVal isSelected As Boolean) As Texture2D
|
||||
If Me.T Is Nothing Or isSelected = True Then
|
||||
Dim r As Rectangle
|
||||
@ -943,6 +954,7 @@
|
||||
Return New Rectangle(CInt(Me.getPosition().X + PositionOffset.X + offset.X), CInt(Me.getPosition().Y + PositionOffset.Y + offset.Y), CInt(sizeX), CInt(sizeY))
|
||||
End Function
|
||||
|
||||
'It will leak
|
||||
Public Function getTexture(ByVal FullTexture As Texture2D, ByVal isSelected As Boolean) As Texture2D
|
||||
If Me.T Is Nothing Or isSelected = True Then
|
||||
Dim r As Rectangle
|
||||
|
@ -367,6 +367,7 @@
|
||||
CanMuteMusic = False
|
||||
|
||||
If ControllerHandler.ButtonPressed(Buttons.X) = True Then
|
||||
'It will leak
|
||||
Core.SetScreen(New InputScreen(Core.CurrentScreen, "Player", InputScreen.InputModes.Name, Me.CurrentText, 14, {TextureManager.TextureRectangle(TextureManager.GetTexture("Textures\NPC\" & startSkins(SkinIndex)), New Rectangle(0, 64, 32, 32))}.ToList(), AddressOf Me.ConfirmInput))
|
||||
Else
|
||||
KeyBindings.GetNameInput(Me.CurrentText, 14)
|
||||
|
@ -1220,6 +1220,7 @@ Public Class TradeScreen
|
||||
Core.SpriteBatch.DrawString(Font, Text, New Vector2(Position.X + Height + 10, Position.Y + textY), Color.White)
|
||||
End Sub
|
||||
|
||||
' It will leak.
|
||||
Private Function GetItemTypeTexture(ByVal itemType As Items.ItemTypes) As Texture2D
|
||||
Dim i As Integer = 0
|
||||
Select Case itemType
|
||||
|
Loading…
x
Reference in New Issue
Block a user