Fix use of obselete methods
This commit is contained in:
parent
7ec48abda5
commit
413e3bf937
|
@ -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)
|
private static Texture BuildLightmapTexture(WorldRep.Cell[] cells, PackingRectangle[] packingRects, Dictionary<int, LightmapRectData> rectDataMap, Dictionary<int, MeshSurfaceData> surfaceDataMap)
|
||||||
{
|
{
|
||||||
RectanglePacker.Pack(packingRects, out var bounds);
|
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)
|
foreach (var rect in packingRects)
|
||||||
{
|
{
|
||||||
if (!rectDataMap.ContainsKey(rect.Id)) GD.Print("Invalid rectDataMap key");
|
if (!rectDataMap.ContainsKey(rect.Id)) GD.Print("Invalid rectDataMap key");
|
||||||
|
|
|
@ -14,7 +14,7 @@ public partial class TextureLoader
|
||||||
|
|
||||||
var width = gifImage.Width;
|
var width = gifImage.Width;
|
||||||
var height = gifImage.Height;
|
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 y = 0; y < height; y++)
|
||||||
{
|
{
|
||||||
for (var x = 0; x < width; x++)
|
for (var x = 0; x < width; x++)
|
||||||
|
|
|
@ -93,7 +93,7 @@ public partial class TextureLoader
|
||||||
// Read run length encoded pixel Data
|
// Read run length encoded pixel Data
|
||||||
var width = (int)(max.X - min.X + 1);
|
var width = (int)(max.X - min.X + 1);
|
||||||
var height = (int)(max.Y - min.Y + 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++)
|
for (var y = 0; y < height; y++)
|
||||||
{
|
{
|
||||||
var x = 0;
|
var x = 0;
|
||||||
|
|
Loading…
Reference in New Issue