This commit is contained in:
Ottermandias 2023-03-10 18:29:58 +01:00
parent 3c564add0e
commit 73e2793da6
48 changed files with 4231 additions and 456 deletions

View file

@ -3,6 +3,7 @@ using System.IO;
using System.Numerics;
using Lumina.Data.Files;
using OtterTex;
using Penumbra.Services;
using SixLabors.ImageSharp;
using SixLabors.ImageSharp.Formats.Png;
using SixLabors.ImageSharp.PixelFormats;
@ -48,7 +49,7 @@ public partial class CombinedTexture : IDisposable
{
var (width, height) = CombineImage();
_centerStorage.TextureWrap =
Dalamud.PluginInterface.UiBuilder.LoadImageRaw( _centerStorage.RGBAPixels, width, height, 4 );
DalamudServices.PluginInterface.UiBuilder.LoadImageRaw( _centerStorage.RGBAPixels, width, height, 4 );
}
_current?.Draw( size );

View file

@ -10,6 +10,7 @@ using Lumina.Data.Files;
using OtterGui;
using OtterGui.Raii;
using OtterTex;
using Penumbra.Services;
using Penumbra.String.Classes;
using Penumbra.UI.Classes;
using SixLabors.ImageSharp.PixelFormats;
@ -195,12 +196,12 @@ public sealed class Texture : IDisposable
return File.OpenRead( Path );
}
var file = Dalamud.GameData.GetFile( Path );
var file = DalamudServices.GameData.GetFile( Path );
return file != null ? new MemoryStream( file.Data ) : throw new Exception( $"Unable to obtain \"{Path}\" from game files." );
}
private void CreateTextureWrap( int width, int height )
=> TextureWrap = Dalamud.PluginInterface.UiBuilder.LoadImageRaw( RGBAPixels, width, height, 4 );
=> TextureWrap = DalamudServices.PluginInterface.UiBuilder.LoadImageRaw( RGBAPixels, width, height, 4 );
private string? _tmpPath;
@ -215,7 +216,7 @@ public sealed class Texture : IDisposable
{
if( game )
{
if( !Dalamud.GameData.FileExists( path ) )
if( !DalamudServices.GameData.FileExists( path ) )
{
continue;
}