Fix use of obselete methods

This commit is contained in:
Jarrod Doyle 2024-08-26 12:40:51 +01:00
parent 7ec48abda5
commit 413e3bf937
Signed by: Jayrude
GPG Key ID: 38B57B16E7C0ADF7
3 changed files with 3 additions and 3 deletions

View File

@ -273,7 +273,7 @@ public partial class Mission : Node3D
private static Texture BuildLightmapTexture(WorldRep.Cell[] cells, PackingRectangle[] packingRects, Dictionary<int, LightmapRectData> rectDataMap, Dictionary<int, MeshSurfaceData> surfaceDataMap)
{
RectanglePacker.Pack(packingRects, out var bounds);
var image = Image.Create((int)bounds.Width, (int)bounds.Height, false, Image.Format.Rgba8);
var image = Image.CreateEmpty((int)bounds.Width, (int)bounds.Height, false, Image.Format.Rgba8);
foreach (var rect in packingRects)
{
if (!rectDataMap.ContainsKey(rect.Id)) GD.Print("Invalid rectDataMap key");

View File

@ -14,7 +14,7 @@ public partial class TextureLoader
var width = gifImage.Width;
var height = gifImage.Height;
var image = Image.Create(width, height, false, Image.Format.Rgba8);
var image = Image.CreateEmpty(width, height, false, Image.Format.Rgba8);
for (var y = 0; y < height; y++)
{
for (var x = 0; x < width; x++)

View File

@ -93,7 +93,7 @@ public partial class TextureLoader
// Read run length encoded pixel Data
var width = (int)(max.X - min.X + 1);
var height = (int)(max.Y - min.Y + 1);
var image = Image.Create(width, height, false, Image.Format.Rgba8);
var image = Image.CreateEmpty(width, height, false, Image.Format.Rgba8);
for (var y = 0; y < height; y++)
{
var x = 0;