@@ -69,38 +69,39 @@ public void DrawDiagnostics()
69
69
70
70
public class DebugTab : Window , ITab , IUiService
71
71
{
72
- private readonly PerformanceTracker _performance ;
73
- private readonly Configuration _config ;
74
- private readonly CollectionManager _collectionManager ;
75
- private readonly ModManager _modManager ;
76
- private readonly ValidityChecker _validityChecker ;
77
- private readonly HttpApi _httpApi ;
78
- private readonly ActorManager _actors ;
79
- private readonly StainService _stains ;
80
- private readonly GlobalVariablesDrawer _globalVariablesDrawer ;
81
- private readonly ResourceManagerService _resourceManager ;
82
- private readonly CollectionResolver _collectionResolver ;
83
- private readonly DrawObjectState _drawObjectState ;
84
- private readonly PathState _pathState ;
85
- private readonly SubfileHelper _subfileHelper ;
86
- private readonly IdentifiedCollectionCache _identifiedCollectionCache ;
87
- private readonly CutsceneService _cutsceneService ;
88
- private readonly ModImportManager _modImporter ;
89
- private readonly ImportPopup _importPopup ;
90
- private readonly FrameworkManager _framework ;
91
- private readonly TextureManager _textureManager ;
92
- private readonly ShaderReplacementFixer _shaderReplacementFixer ;
93
- private readonly RedrawService _redraws ;
94
- private readonly DictEmote _emotes ;
95
- private readonly Diagnostics _diagnostics ;
96
- private readonly ObjectManager _objects ;
97
- private readonly IClientState _clientState ;
98
- private readonly IDataManager _dataManager ;
99
- private readonly IpcTester _ipcTester ;
100
- private readonly CrashHandlerPanel _crashHandlerPanel ;
101
- private readonly TexHeaderDrawer _texHeaderDrawer ;
102
- private readonly HookOverrideDrawer _hookOverrides ;
103
- private readonly RsfService _rsfService ;
72
+ private readonly PerformanceTracker _performance ;
73
+ private readonly Configuration _config ;
74
+ private readonly CollectionManager _collectionManager ;
75
+ private readonly ModManager _modManager ;
76
+ private readonly ValidityChecker _validityChecker ;
77
+ private readonly HttpApi _httpApi ;
78
+ private readonly ActorManager _actors ;
79
+ private readonly StainService _stains ;
80
+ private readonly GlobalVariablesDrawer _globalVariablesDrawer ;
81
+ private readonly ResourceManagerService _resourceManager ;
82
+ private readonly CollectionResolver _collectionResolver ;
83
+ private readonly DrawObjectState _drawObjectState ;
84
+ private readonly PathState _pathState ;
85
+ private readonly SubfileHelper _subfileHelper ;
86
+ private readonly IdentifiedCollectionCache _identifiedCollectionCache ;
87
+ private readonly CutsceneService _cutsceneService ;
88
+ private readonly ModImportManager _modImporter ;
89
+ private readonly ImportPopup _importPopup ;
90
+ private readonly FrameworkManager _framework ;
91
+ private readonly TextureManager _textureManager ;
92
+ private readonly ShaderReplacementFixer _shaderReplacementFixer ;
93
+ private readonly RedrawService _redraws ;
94
+ private readonly DictEmote _emotes ;
95
+ private readonly Diagnostics _diagnostics ;
96
+ private readonly ObjectManager _objects ;
97
+ private readonly IClientState _clientState ;
98
+ private readonly IDataManager _dataManager ;
99
+ private readonly IpcTester _ipcTester ;
100
+ private readonly CrashHandlerPanel _crashHandlerPanel ;
101
+ private readonly TexHeaderDrawer _texHeaderDrawer ;
102
+ private readonly HookOverrideDrawer _hookOverrides ;
103
+ private readonly RsfService _rsfService ;
104
+ private readonly SchedulerResourceManagementService _schedulerService ;
104
105
105
106
public DebugTab ( PerformanceTracker performance , Configuration config , CollectionManager collectionManager , ObjectManager objects ,
106
107
IClientState clientState , IDataManager dataManager ,
@@ -110,7 +111,8 @@ public DebugTab(PerformanceTracker performance, Configuration config, Collection
110
111
CutsceneService cutsceneService , ModImportManager modImporter , ImportPopup importPopup , FrameworkManager framework ,
111
112
TextureManager textureManager , ShaderReplacementFixer shaderReplacementFixer , RedrawService redraws , DictEmote emotes ,
112
113
Diagnostics diagnostics , IpcTester ipcTester , CrashHandlerPanel crashHandlerPanel , TexHeaderDrawer texHeaderDrawer ,
113
- HookOverrideDrawer hookOverrides , RsfService rsfService , GlobalVariablesDrawer globalVariablesDrawer )
114
+ HookOverrideDrawer hookOverrides , RsfService rsfService , GlobalVariablesDrawer globalVariablesDrawer ,
115
+ SchedulerResourceManagementService schedulerService )
114
116
: base ( "Penumbra Debug Window" , ImGuiWindowFlags . NoCollapse )
115
117
{
116
118
IsOpen = true ;
@@ -148,6 +150,7 @@ public DebugTab(PerformanceTracker performance, Configuration config, Collection
148
150
_hookOverrides = hookOverrides ;
149
151
_rsfService = rsfService ;
150
152
_globalVariablesDrawer = globalVariablesDrawer ;
153
+ _schedulerService = schedulerService ;
151
154
_objects = objects ;
152
155
_clientState = clientState ;
153
156
_dataManager = dataManager ;
@@ -672,6 +675,22 @@ private unsafe void DrawPathResolverDebug()
672
675
}
673
676
}
674
677
}
678
+
679
+ using ( var tmbCache = TreeNode( "TMB Cache" ) )
680
+ {
681
+ if ( tmbCache )
682
+ {
683
+ using var table = Table( "###TmbTable" , 2 , ImGuiTableFlags . SizingFixedFit ) ;
684
+ if ( table )
685
+ {
686
+ foreach ( var ( id , name ) in _schedulerService. ListedTmbs . OrderBy ( kvp => kvp . Key ) )
687
+ {
688
+ ImUtf8. DrawTableColumn ( $ "{ id : D6} ") ;
689
+ ImUtf8. DrawTableColumn ( name . Span ) ;
690
+ }
691
+ }
692
+ }
693
+ }
675
694
}
676
695
677
696
private void DrawData( )
@@ -680,6 +699,7 @@ private void DrawData()
680
699
return;
681
700
682
701
DrawEmotes( ) ;
702
+ DrawActionTmbs( ) ;
683
703
DrawStainTemplates( ) ;
684
704
DrawAtch( ) ;
685
705
}
@@ -739,6 +759,27 @@ private void DrawEmotes()
739
759
ImGuiClip. DrawEndDummy ( dummy , ImGui . GetTextLineHeightWithSpacing ( ) ) ;
740
760
}
741
761
762
+ private void DrawActionTmbs( )
763
+ {
764
+ using var mainTree = TreeNode( "Action TMBs" ) ;
765
+ if ( ! mainTree )
766
+ return;
767
+
768
+ using var table = Table( "##table" , 2 , ImGuiTableFlags . RowBg | ImGuiTableFlags . ScrollY | ImGuiTableFlags . SizingFixedFit ,
769
+ new Vector2 ( - 1 , 12 * ImGui . GetTextLineHeightWithSpacing ( ) ) ) ;
770
+ if ( ! table )
771
+ return;
772
+
773
+ var skips = ImGuiClip. GetNecessarySkips ( ImGui . GetTextLineHeightWithSpacing ( ) ) ;
774
+ var dummy = ImGuiClip. ClippedDraw ( _schedulerService . ActionTmbs . OrderBy ( r => r . Value ) , skips ,
775
+ p =>
776
+ {
777
+ ImUtf8 . DrawTableColumn ( $ "{ p . Value } ") ;
778
+ ImUtf8 . DrawTableColumn ( p . Key . Span ) ;
779
+ } ) ;
780
+ ImGuiClip. DrawEndDummy ( dummy , ImGui . GetTextLineHeightWithSpacing ( ) ) ;
781
+ }
782
+
742
783
private void DrawStainTemplates( )
743
784
{
744
785
using var mainTree = TreeNode( "Staining Templates" ) ;
@@ -1061,7 +1102,7 @@ public static unsafe void DrawCopyableAddress(ReadOnlySpan<byte> label, void* ad
1061
1102
}
1062
1103
1063
1104
ImUtf8 . HoverTooltip ( "Click to copy address to clipboard."u8 ) ;
1064
- }
1105
+ }
1065
1106
1066
1107
public static unsafe void DrawCopyableAddress( ReadOnlySpan < byte > label , nint address )
1067
1108
=> DrawCopyableAddress ( label , ( void * ) address ) ;
0 commit comments