42
42
using Penumbra . Interop . Hooks . PostProcessing ;
43
43
using Penumbra . Interop . Hooks . ResourceLoading ;
44
44
using Penumbra . GameData . Files . StainMapStructs ;
45
+ using Penumbra . String . Classes ;
45
46
using Penumbra . UI . AdvancedWindow . Materials ;
46
47
47
48
namespace Penumbra . UI . Tabs . Debug ;
@@ -196,7 +197,7 @@ public void DrawContent()
196
197
}
197
198
198
199
199
- private void DrawCollectionCaches ( )
200
+ private unsafe void DrawCollectionCaches ( )
200
201
{
201
202
if ( ! ImGui . CollapsingHeader (
202
203
$ "Collections ({ _collectionManager . Caches . Count } /{ _collectionManager . Storage . Count - 1 } Caches)###Collections") )
@@ -207,25 +208,35 @@ private void DrawCollectionCaches()
207
208
if ( collection . HasCache )
208
209
{
209
210
using var color = PushColor ( ImGuiCol . Text , ColorId . FolderExpanded . Value ( ) ) ;
210
- using var node = TreeNode ( $ "{ collection . AnonymizedName } (Change Counter { collection . ChangeCounter } )") ;
211
+ using var node = TreeNode ( $ "{ collection . Name } (Change Counter { collection . ChangeCounter } )### { collection . Name } ") ;
211
212
if ( ! node )
212
213
continue ;
213
214
214
215
color . Pop ( ) ;
215
- foreach ( var ( mod , paths , manips ) in collection . _cache ! . ModData . Data . OrderBy ( t => t . Item1 . Name ) )
216
+ using ( var resourceNode = ImUtf8 . TreeNode ( "Custom Resources"u8 ) )
216
217
{
217
- using var id = mod is TemporaryMod t ? PushId ( t . Priority . Value ) : PushId ( ( ( Mod ) mod ) . ModPath . Name ) ;
218
- using var node2 = TreeNode ( mod . Name . Text ) ;
219
- if ( ! node2 )
220
- continue ;
218
+ if ( resourceNode )
219
+ foreach ( var ( path , resource ) in collection . _cache ! . CustomResources )
220
+ ImUtf8 . TreeNode ( $ "{ path } -> 0x{ ( ulong ) resource . ResourceHandle : X} ",
221
+ ImGuiTreeNodeFlags . Bullet | ImGuiTreeNodeFlags . Leaf ) . Dispose ( ) ;
222
+ }
221
223
222
- foreach ( var path in paths )
224
+ using var modNode = ImUtf8 . TreeNode ( "Enabled Mods"u8 ) ;
225
+ if ( modNode )
226
+ foreach ( var ( mod , paths , manips ) in collection . _cache ! . ModData . Data . OrderBy ( t => t . Item1 . Name ) )
227
+ {
228
+ using var id = mod is TemporaryMod t ? PushId ( t . Priority . Value ) : PushId ( ( ( Mod ) mod ) . ModPath . Name ) ;
229
+ using var node2 = TreeNode ( mod . Name . Text ) ;
230
+ if ( ! node2 )
231
+ continue ;
223
232
224
- TreeNode ( path . ToString ( ) , ImGuiTreeNodeFlags . Bullet | ImGuiTreeNodeFlags . Leaf ) . Dispose ( ) ;
233
+ foreach ( var path in paths )
225
234
226
- foreach ( var manip in manips )
227
- TreeNode ( manip . ToString ( ) , ImGuiTreeNodeFlags . Bullet | ImGuiTreeNodeFlags . Leaf ) . Dispose ( ) ;
228
- }
235
+ TreeNode ( path . ToString ( ) , ImGuiTreeNodeFlags . Bullet | ImGuiTreeNodeFlags . Leaf ) . Dispose ( ) ;
236
+
237
+ foreach ( var manip in manips )
238
+ TreeNode ( manip . ToString ( ) , ImGuiTreeNodeFlags . Bullet | ImGuiTreeNodeFlags . Leaf ) . Dispose ( ) ;
239
+ }
229
240
}
230
241
else
231
242
{
@@ -1051,17 +1062,27 @@ private unsafe void DrawGlobalVariableInfo()
1051
1062
DrawDebugResidentResources ( ) ;
1052
1063
}
1053
1064
1065
+ private string _crcInput = string . Empty ;
1066
+ private FullPath _crcPath = FullPath . Empty ;
1067
+
1054
1068
private unsafe void DrawCrcCache ( )
1055
1069
{
1056
1070
var header = ImUtf8 . CollapsingHeader ( "CRC Cache"u8 ) ;
1057
1071
if ( ! header )
1058
1072
return ;
1059
1073
1074
+ if ( ImUtf8 . InputText ( "##crcInput"u8 , ref _crcInput , "Input path for CRC..."u8 ) )
1075
+ _crcPath = new FullPath ( _crcInput ) ;
1076
+
1077
+ using var font = ImRaii . PushFont ( UiBuilder . MonoFont ) ;
1078
+ ImUtf8 . Text ( $ " CRC32: { _crcPath . InternalName . CiCrc32 : X8} ") ;
1079
+ ImUtf8 . Text ( $ "CI CRC32: { _crcPath . InternalName . Crc32 : X8} ") ;
1080
+ ImUtf8 . Text ( $ " CRC64: { _crcPath . Crc64 : X16} ") ;
1081
+
1060
1082
using var table = ImUtf8 . Table ( "table"u8 , 2 ) ;
1061
1083
if ( ! table )
1062
1084
return ;
1063
1085
1064
- using var font = ImRaii . PushFont ( UiBuilder . MonoFont ) ;
1065
1086
ImUtf8 . TableSetupColumn ( "Hash"u8 , ImGuiTableColumnFlags . WidthFixed , 18 * UiBuilder . MonoFont . GetCharAdvance ( '0' ) ) ;
1066
1087
ImUtf8 . TableSetupColumn ( "Type"u8 , ImGuiTableColumnFlags . WidthFixed , 5 * UiBuilder . MonoFont . GetCharAdvance ( '0' ) ) ;
1067
1088
ImGui . TableHeadersRow ( ) ;
0 commit comments