From 413e3bf937930a00c7084d0ee4f3a9239ddf71ba Mon Sep 17 00:00:00 2001 From: Jarrod Doyle Date: Mon, 26 Aug 2024 12:40:51 +0100 Subject: [PATCH] Fix use of obselete methods --- project/code/TMV/Mission.cs | 2 +- project/code/TMV/TextureLoader.Gif.cs | 2 +- project/code/TMV/TextureLoader.Pcx.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/project/code/TMV/Mission.cs b/project/code/TMV/Mission.cs index 50f19c7..5b586ed 100644 --- a/project/code/TMV/Mission.cs +++ b/project/code/TMV/Mission.cs @@ -273,7 +273,7 @@ public partial class Mission : Node3D private static Texture BuildLightmapTexture(WorldRep.Cell[] cells, PackingRectangle[] packingRects, Dictionary rectDataMap, Dictionary 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"); diff --git a/project/code/TMV/TextureLoader.Gif.cs b/project/code/TMV/TextureLoader.Gif.cs index 4322f42..46ddc29 100644 --- a/project/code/TMV/TextureLoader.Gif.cs +++ b/project/code/TMV/TextureLoader.Gif.cs @@ -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++) diff --git a/project/code/TMV/TextureLoader.Pcx.cs b/project/code/TMV/TextureLoader.Pcx.cs index 449bd9d..fa9c9e5 100644 --- a/project/code/TMV/TextureLoader.Pcx.cs +++ b/project/code/TMV/TextureLoader.Pcx.cs @@ -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;