mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-12 18:27:24 +01:00
Fix behaviour for non-main-map resources in debug.
This commit is contained in:
parent
6949011acf
commit
d07355c0f8
3 changed files with 7 additions and 12 deletions
|
|
@ -21,7 +21,7 @@ public unsafe partial class ResourceLoader
|
|||
{
|
||||
public ResourceHandle* OriginalResource;
|
||||
public ResourceHandle* ManipulatedResource;
|
||||
public Utf8GamePath OriginalPath;
|
||||
public Utf8GamePath OriginalPath;
|
||||
public FullPath ManipulatedPath;
|
||||
public ResourceCategory Category;
|
||||
public object? ResolverInfo;
|
||||
|
|
@ -52,7 +52,7 @@ public unsafe partial class ResourceLoader
|
|||
}
|
||||
|
||||
var crc = ( uint )originalPath.Path.Crc32;
|
||||
var originalResource = ( *ResourceManager )->FindResourceHandle( &handle->Category, &handle->FileType, &crc );
|
||||
var originalResource = FindResource( handle->Category, handle->FileType, crc );
|
||||
_debugList[ manipulatedPath.Value ] = new DebugData()
|
||||
{
|
||||
OriginalResource = originalResource,
|
||||
|
|
@ -113,9 +113,12 @@ public unsafe partial class ResourceLoader
|
|||
// Find a resource in the resource manager by its category, extension and crc-hash
|
||||
public static ResourceHandle* FindResource( ResourceCategory cat, uint ext, uint crc32 )
|
||||
{
|
||||
var manager = *ResourceManager;
|
||||
var manager = *ResourceManager;
|
||||
var catIdx = ( uint )cat >> 0x18;
|
||||
cat = ( ResourceCategory )( ushort )cat;
|
||||
var category = ( ResourceGraph.CategoryContainer* )manager->ResourceGraph->ContainerArray + ( int )cat;
|
||||
var extMap = FindInMap( category->MainMap, ext );
|
||||
var extMap = FindInMap( ( StdMap< uint, Pointer< StdMap< uint, Pointer< ResourceHandle > > > >* )category->CategoryMaps[ catIdx ],
|
||||
ext );
|
||||
if( extMap == null )
|
||||
{
|
||||
return null;
|
||||
|
|
|
|||
|
|
@ -77,7 +77,6 @@ public class MetaCollection
|
|||
// and that the contained manipulations are still valid and non-default manipulations.
|
||||
public bool Validate( ModMeta modMeta )
|
||||
{
|
||||
var defaultFiles = Penumbra.MetaDefaults;
|
||||
SortLists();
|
||||
foreach( var group in GroupData )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -10,19 +10,14 @@ using Penumbra.Api;
|
|||
using Penumbra.GameData.Enums;
|
||||
using Penumbra.Interop;
|
||||
using Penumbra.Mods;
|
||||
using Penumbra.PlayerWatch;
|
||||
using Penumbra.UI;
|
||||
using Penumbra.Util;
|
||||
using System.Linq;
|
||||
using Penumbra.Interop.Loader;
|
||||
using Penumbra.Interop.Resolver;
|
||||
using Penumbra.Meta.Manipulations;
|
||||
|
||||
namespace Penumbra;
|
||||
|
||||
public class MetaDefaults
|
||||
{ }
|
||||
|
||||
public class Penumbra : IDalamudPlugin
|
||||
{
|
||||
public string Name
|
||||
|
|
@ -38,7 +33,6 @@ public class Penumbra : IDalamudPlugin
|
|||
public static ResidentResourceManager ResidentResources { get; private set; } = null!;
|
||||
public static CharacterUtility CharacterUtility { get; private set; } = null!;
|
||||
|
||||
public static MetaDefaults MetaDefaults { get; private set; } = null!;
|
||||
public static ModManager ModManager { get; private set; } = null!;
|
||||
|
||||
public static ResourceLoader ResourceLoader { get; set; } = null!;
|
||||
|
|
@ -68,7 +62,6 @@ public class Penumbra : IDalamudPlugin
|
|||
|
||||
ResidentResources = new ResidentResourceManager();
|
||||
CharacterUtility = new CharacterUtility();
|
||||
MetaDefaults = new MetaDefaults();
|
||||
ResourceLoader = new ResourceLoader( this );
|
||||
ResourceLogger = new ResourceLogger( ResourceLoader );
|
||||
ModManager = new ModManager();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue