@@ -32,7 +32,7 @@ private static void MonitorThread(object rpo)
32
32
33
33
do
34
34
{
35
- DebugLogger . WriteLine ( "MONITOR:" ) ;
35
+ DebugLogger . WriteLine ( ">> MONITOR:" ) ;
36
36
for ( int i = 0 ; i < accessors . Count ; i ++ )
37
37
{
38
38
int value ;
@@ -85,16 +85,29 @@ public static void Run(Process currentProcess, string profileFile = ".7thWrapper
85
85
}
86
86
}
87
87
88
- DebugLogger . WriteLine ( $ "Wrap run... PName: { _process . ProcessName } PID: { _process . Id } Path: { _profile . ModPath } Capture: { String . Join ( ", " , _profile . MonitorPaths ) } ") ;
88
+ DebugLogger . WriteLine ( $ "Starting wrapper now:") ;
89
+
90
+ DebugLogger . WriteLine ( $ ">> PName: { _process . ProcessName } ") ;
91
+ DebugLogger . WriteLine ( $ ">> PID: { _process . Id } ") ;
92
+ DebugLogger . WriteLine ( $ ">> FF7Path: { _profile . FF7Path } ") ;
93
+ DebugLogger . WriteLine ( $ ">> ModPath: { _profile . ModPath } ") ;
94
+ DebugLogger . WriteLine ( $ ">> MonitorPaths:") ;
95
+ foreach ( string monPath in _profile . MonitorPaths )
96
+ DebugLogger . WriteLine ( $ " - { monPath } ") ;
89
97
for ( int i = _profile . MonitorPaths . Count - 1 ; i >= 0 ; i -- ) {
90
98
if ( ! _profile . MonitorPaths [ i ] . EndsWith ( System . IO . Path . DirectorySeparatorChar . ToString ( ) ) )
91
99
_profile . MonitorPaths [ i ] += System . IO . Path . DirectorySeparatorChar ;
92
100
if ( String . IsNullOrWhiteSpace ( _profile . MonitorPaths [ i ] ) ) _profile . MonitorPaths . RemoveAt ( i ) ;
93
101
}
94
102
103
+ DebugLogger . WriteLine ( $ "\n Loading mods:") ;
104
+
95
105
foreach ( var item in _profile . Mods ) {
96
- DebugLogger . WriteLine ( $ " Mod: { item . BaseFolder } has { item . Conditionals . Count } conditionals") ;
97
- DebugLogger . WriteLine ( " Additional paths: " + String . Join ( ", " , item . ExtraFolders ) ) ;
106
+ DebugLogger . WriteLine ( $ ">> Mod: { item . BaseFolder } ") ;
107
+ DebugLogger . WriteLine ( $ " - Conditionals: { item . Conditionals . Count } ") ;
108
+ DebugLogger . WriteLine ( $ " - Extra Folders:") ;
109
+ foreach ( string extraFolder in item . ExtraFolders )
110
+ DebugLogger . WriteLine ( $ " - { extraFolder } ") ;
98
111
item . Startup ( ) ;
99
112
}
100
113
@@ -119,6 +132,8 @@ public static void Run(Process currentProcess, string profileFile = ".7thWrapper
119
132
}
120
133
}
121
134
135
+ DebugLogger . WriteLine ( $ "\n Loading hext patches:") ;
136
+
122
137
foreach ( var mod in _profile . Mods . AsEnumerable ( ) . Reverse ( ) ) {
123
138
foreach ( string file in mod . GetPathOverrideNames ( "hext" ) ) {
124
139
foreach ( var of in mod . GetOverrides ( "hext\\ " + file ) ) {
@@ -128,11 +143,11 @@ public static void Run(Process currentProcess, string profileFile = ".7thWrapper
128
143
} else {
129
144
s = of . Archive . GetData ( of . File ) ;
130
145
}
131
- DebugLogger . WriteLine ( $ "Applying hext patch { file } from mod { mod . BaseFolder } ") ;
146
+ DebugLogger . WriteLine ( $ ">> Applying hext patch { file } from mod { mod . BaseFolder } ") ;
132
147
try {
133
148
HexPatch . Apply ( s ) ;
134
149
} catch ( Exception ex ) {
135
- DebugLogger . WriteLine ( "Error applying patch: " + ex . Message ) ;
150
+ DebugLogger . WriteLine ( " - Error applying patch: " + ex . Message ) ;
136
151
}
137
152
}
138
153
}
@@ -167,6 +182,9 @@ public static void Run(Process currentProcess, string profileFile = ".7thWrapper
167
182
AddIROFilesToMappedFiles ( "" , null , archive ) ;
168
183
}
169
184
}
185
+
186
+ DebugLogger . WriteLine ( $ "\n Wrapper startup complete.") ;
187
+ DebugLogger . WriteLine ( $ "\n Listening for game actions...") ;
170
188
} catch ( Exception e ) {
171
189
DebugLogger . WriteLine ( e . ToString ( ) ) ;
172
190
return ;
@@ -262,7 +280,7 @@ public static int HCloseHandle(IntPtr hObject)
262
280
if ( _varchives . ContainsKey ( hObject ) )
263
281
{
264
282
_varchives . Remove ( hObject ) ;
265
- DebugLogger . WriteLine ( $ "Closing dummy handle { hObject } ") ;
283
+ DebugLogger . WriteLine ( $ ">> Closing dummy handle { hObject } ") ;
266
284
}
267
285
268
286
return ret ;
@@ -272,7 +290,7 @@ public static uint HGetFileType(IntPtr hFile)
272
290
{
273
291
uint ret = 0 ;
274
292
275
- DebugLogger . DetailedWriteLine ( $ "GetFileType on { hFile } ") ;
293
+ DebugLogger . DetailedWriteLine ( $ ">> GetFileType on { hFile } ") ;
276
294
if ( _varchives . ContainsKey ( hFile ) )
277
295
{
278
296
//DebugLogger.WriteLine(" ---faking dummy file");
@@ -319,7 +337,7 @@ public static int HReadFile(IntPtr handle, IntPtr bytes, uint numBytesToRead, In
319
337
public static IntPtr CreateVA ( OverrideFile of ) {
320
338
VArchiveData va = new VArchiveData ( of . Archive . GetBytes ( of . File ) ) ;
321
339
IntPtr dummy = of . Archive . GetDummyHandle ( _process ) ;
322
- DebugLogger . WriteLine ( $ "Creating dummy file handle { dummy } to access { of . Archive } { of . File } ") ;
340
+ DebugLogger . WriteLine ( $ ">> Creating dummy file handle { dummy } to access { of . Archive } { of . File } ") ;
323
341
_varchives [ dummy ] = va ;
324
342
325
343
return dummy ;
@@ -348,7 +366,7 @@ public static IntPtr HCreateFileW(
348
366
if ( isFF7GameFile )
349
367
{
350
368
lpFileName = lpFileName . Replace ( "\\ /" , "\\ " ) . Replace ( "/" , "\\ " ) . Replace ( "\\ \\ " , "\\ " ) ;
351
- DebugLogger . DetailedWriteLine ( $ "CreateFileW for { lpFileName } ...") ;
369
+ DebugLogger . DetailedWriteLine ( $ ">> CreateFileW for { lpFileName } ...") ;
352
370
if ( lpFileName . IndexOf ( '\\ ' ) < 0 )
353
371
{
354
372
//DebugLogger.WriteLine("No path: curdir is {0}", System.IO.Directory.GetCurrentDirectory(), 0);
@@ -375,7 +393,7 @@ public static IntPtr HCreateFileW(
375
393
376
394
if ( mapped != null )
377
395
{
378
- DebugLogger . WriteLine ( $ "Remapping { lpFileName } to { mapped . File } [ Matched: '{ match } ' ]") ;
396
+ DebugLogger . WriteLine ( $ " - Remapping { lpFileName } to { mapped . File } [ Matched: '{ match } ' ]") ;
379
397
380
398
if ( mapped . Archive == null )
381
399
{
@@ -391,7 +409,7 @@ public static IntPtr HCreateFileW(
391
409
}
392
410
}
393
411
else
394
- DebugLogger . DetailedWriteLine ( $ "Skipped file { lpFileName } ") ;
412
+ DebugLogger . DetailedWriteLine ( $ ">> Skipped file { lpFileName } ") ;
395
413
396
414
if ( ret == IntPtr . Zero )
397
415
ret = Win32 . CreateFileW ( lpFileName , dwDesiredAccess , dwShareMode , lpSecurityAttributes , dwCreationDisposition , dwFlagsAndAttributes , hTemplateFile ) ;
@@ -403,7 +421,7 @@ public static IntPtr HCreateFileW(
403
421
404
422
public static IntPtr HFindFirstFileW ( string lpFileName , IntPtr lpFindFileData )
405
423
{
406
- DebugLogger . WriteLine ( "FindFirstFile for " + lpFileName ) ;
424
+ DebugLogger . WriteLine ( ">> FindFirstFile for " + lpFileName ) ;
407
425
408
426
return IntPtr . Zero ;
409
427
}
@@ -419,7 +437,7 @@ public static int HGetFileInformationByHandle(IntPtr hFile, IntPtr lpFileInforma
419
437
420
438
if ( result && _varchives . ContainsKey ( hFile ) )
421
439
{
422
- DebugLogger . DetailedWriteLine ( $ "Overriding GetFileInformationByHandle for dummy file { hFile } ") ;
440
+ DebugLogger . DetailedWriteLine ( $ ">> Overriding GetFileInformationByHandle for dummy file { hFile } ") ;
423
441
_lpFileInformation . FileSizeHigh = ( uint ) ( _varchives [ hFile ] . Size >> 32 ) ;
424
442
_lpFileInformation . FileSizeLow = ( uint ) ( _varchives [ hFile ] . Size & 0xffffffff ) ;
425
443
@@ -438,7 +456,7 @@ public static int HDuplicateHandle(IntPtr hSourceProcessHandle, IntPtr hSourceHa
438
456
if ( _varchives . ContainsKey ( hSourceHandle ) )
439
457
{
440
458
_varchives [ lpTargetHandle ] = _varchives [ hSourceHandle ] ;
441
- DebugLogger . DetailedWriteLine ( $ "Duplicating dummy handle { hSourceHandle } to { lpTargetHandle } ") ;
459
+ DebugLogger . DetailedWriteLine ( $ ">> Duplicating dummy handle { hSourceHandle } to { lpTargetHandle } ") ;
442
460
}
443
461
444
462
return 1 ;
@@ -450,7 +468,7 @@ public static uint HGetFileSize(IntPtr hFile, IntPtr lpFileSizeHigh)
450
468
451
469
if ( _varchives . ContainsKey ( hFile ) )
452
470
{
453
- DebugLogger . WriteLine ( $ "GetFileSize on dummy handle { hFile } ") ;
471
+ DebugLogger . WriteLine ( $ ">> GetFileSize on dummy handle { hFile } ") ;
454
472
ret = _varchives [ hFile ] . GetFileSize ( lpFileSizeHigh ) ;
455
473
}
456
474
@@ -463,7 +481,7 @@ public static int HGetFileSizeEx(IntPtr hFile, IntPtr lpFileSize)
463
481
464
482
if ( _varchives . ContainsKey ( hFile ) )
465
483
{
466
- DebugLogger . WriteLine ( $ "GetFileSizeEx on dummy handle { hFile } ") ;
484
+ DebugLogger . WriteLine ( $ ">> GetFileSizeEx on dummy handle { hFile } ") ;
467
485
byte [ ] tmp = BitConverter . GetBytes ( _varchives [ hFile ] . Size ) ;
468
486
Util . CopyToIntPtr ( tmp , lpFileSize , tmp . Length ) ;
469
487
0 commit comments