4
4
#include " mxp\mxp.h"
5
5
#include " sendvw.h"
6
6
#include " Color.h"
7
+ #include " childfrm.h"
8
+ #include " MUSHview.h"
7
9
8
10
#include " png/png.h" // for version
9
11
@@ -21,6 +23,8 @@ extern CString strMacroDescriptions [MACRO_COUNT];
21
23
extern CString strKeypadNames [eKeypad_Max_Items];
22
24
extern tInfoTypeMapping InfoTypes [];
23
25
26
+ #define SHOW_TRUE (x ) ((x) ? " yes" : " no" )
27
+
24
28
// compare-less for colours
25
29
struct colour_less : binary_function<COLORREF, COLORREF, bool >
26
30
{
@@ -730,7 +734,7 @@ VARIANT CMUSHclientDoc::Debug(LPCTSTR Command)
730
734
Note (TFormat (" Author: %s" , (LPCTSTR) p->m_strAuthor ));
731
735
Note (TFormat (" Disk file: %s" , (LPCTSTR) p->m_strSource ));
732
736
Note (TFormat (" Language: %s" , (LPCTSTR) p->m_strLanguage ));
733
- Note (TFormat (" Enabled: %s" , (LPCTSTR) (p->m_bEnabled ? " yes " : " no " )));
737
+ Note (TFormat (" Enabled: %s" , SHOW_TRUE (p->m_bEnabled )));
734
738
735
739
if (!p->m_strScript .IsEmpty ())
736
740
{
@@ -906,20 +910,23 @@ VARIANT CMUSHclientDoc::Debug(LPCTSTR Command)
906
910
Note (TFormat (" Operating system: %s" , (LPCTSTR) sVersion ));
907
911
908
912
// show included library versions
909
- Note (TFormat (" Using : %s, PCRE %s, PNG %s, SQLite3 %s, Zlib %s" ,
913
+ Note (TFormat (" Libraries : %s, PCRE %s, PNG %s, SQLite3 %s, Zlib %s" ,
910
914
LUA_RELEASE,
911
915
XSTRING (PCRE_MAJOR.PCRE_MINOR ),
912
916
PNG_LIBPNG_VER_STRING,
913
917
SQLITE_VERSION,
914
918
ZLIB_VERSION));
915
919
920
+ Note (TFormat (" World name: '%s', ID: %s" ,
921
+ (LPCTSTR) m_mush_name, (LPCTSTR) m_strWorldID));
922
+
916
923
// scripting info
917
924
918
925
Note (TFormat (" Script language: %s, enabled: %s" ,
919
926
(LPCTSTR) m_strLanguage,
920
- (m_bEnableScripts ? " yes " : " no " )));
921
- Note ( TFormat ( " Scripting active: %s " ,
922
- ( GetScriptEngine () ? " yes " : " no " ) ));
927
+ SHOW_TRUE (m_bEnableScripts)
928
+ ));
929
+ Note ( TFormat ( " Scripting active: %s " , SHOW_TRUE ( GetScriptEngine ()) ));
923
930
if (!m_strScriptFilename.IsEmpty ())
924
931
Note (TFormat (" Script file: %s" ,
925
932
(LPCTSTR) m_strScriptFilename
@@ -975,7 +982,7 @@ VARIANT CMUSHclientDoc::Debug(LPCTSTR Command)
975
982
976
983
Note (TFormat (" ** Triggers: %ld in world file, triggers enabled: %s." ,
977
984
nTotal,
978
- (m_enable_triggers ? " yes " : " no " )));
985
+ SHOW_TRUE (m_enable_triggers)));
979
986
Note (TFormat (" %ld enabled, %ld regexp, %I64d attempts, %I64d matched, %1.6f seconds." ,
980
987
nEnabled, nRegexp, nTotalMatchAttempts, nTotalMatches, elapsed_time));
981
988
@@ -1019,7 +1026,7 @@ VARIANT CMUSHclientDoc::Debug(LPCTSTR Command)
1019
1026
1020
1027
Note (TFormat (" ** Aliases: %ld in world file, aliases enabled: %s." ,
1021
1028
nTotal,
1022
- (m_enable_aliases ? " yes " : " no " )));
1029
+ SHOW_TRUE (m_enable_aliases)));
1023
1030
Note (TFormat (" %ld enabled, %ld regexp, %I64d attempts, %I64d matched, %1.6f seconds." ,
1024
1031
nEnabled, nRegexp, nTotalMatchAttempts, nTotalMatches, elapsed_time));
1025
1032
@@ -1042,7 +1049,7 @@ VARIANT CMUSHclientDoc::Debug(LPCTSTR Command)
1042
1049
1043
1050
Note (TFormat (" ** Timers: %ld in world file, timers enabled: %s." ,
1044
1051
nTotal,
1045
- (m_bEnableTimers ? " yes " : " no " )));
1052
+ SHOW_TRUE (m_bEnableTimers)));
1046
1053
Note (TFormat (" %ld enabled, %I64d fired." ,
1047
1054
nEnabled, nTotalMatches));
1048
1055
@@ -1090,7 +1097,7 @@ VARIANT CMUSHclientDoc::Debug(LPCTSTR Command)
1090
1097
Note (TFormat (" Plugin: %s, '%s', enabled: %s" ,
1091
1098
(LPCTSTR) pPlugin->m_strID ,
1092
1099
(LPCTSTR) pPlugin->m_strName ,
1093
- (pPlugin->m_bEnabled ? " yes " : " no " )));
1100
+ SHOW_TRUE (pPlugin->m_bEnabled )));
1094
1101
1095
1102
1096
1103
}
@@ -1113,8 +1120,8 @@ VARIANT CMUSHclientDoc::Debug(LPCTSTR Command)
1113
1120
// MXP
1114
1121
1115
1122
Note (TFormat (" MXP active: %s, Pueblo mode: %s" ,
1116
- (m_bMXP ? " yes " : " no " ),
1117
- (m_bPuebloActive ? " yes " : " no " ) ));
1123
+ SHOW_TRUE (m_bMXP ),
1124
+ SHOW_TRUE (m_bPuebloActive) ));
1118
1125
1119
1126
Note (TFormat (" MXP tags received: %I64d" , m_iMXPtags));
1120
1127
Note (TFormat (" MXP entities received: %I64d" , m_iMXPentities));
@@ -1152,6 +1159,8 @@ VARIANT CMUSHclientDoc::Debug(LPCTSTR Command)
1152
1159
CMiniWindow * pWindow = it->second ;
1153
1160
nTotal++;
1154
1161
int nHotspots = 0 ;
1162
+ int nFonts = 0 ;
1163
+ int nImages = 0 ;
1155
1164
1156
1165
if (pWindow->GetShow ())
1157
1166
nEnabled++;
@@ -1160,28 +1169,70 @@ VARIANT CMUSHclientDoc::Debug(LPCTSTR Command)
1160
1169
for (HotspotMapIterator hit = pWindow->m_Hotspots .begin ();
1161
1170
hit != pWindow->m_Hotspots .end ();
1162
1171
hit++)
1163
- {
1164
1172
nHotspots++;
1165
- }
1166
1173
1167
- Note (TFormat (" Window: '%s', at (%ld,%ld,%ld,%ld), enabled: %s" ,
1174
+ for (FontMap::const_iterator fit = pWindow->GetFonts ().begin ();
1175
+ fit != pWindow->GetFonts ().end ();
1176
+ fit++)
1177
+ nFonts++;
1178
+
1179
+ for (ImageMap::const_iterator imit = pWindow->GetImages ().begin ();
1180
+ imit != pWindow->GetImages ().end ();
1181
+ imit++)
1182
+ nImages++;
1183
+
1184
+ Note (TFormat (" Window: '%s', at (%ld,%ld,%ld,%ld), shown: %s" ,
1168
1185
it->first .c_str (),
1169
1186
pWindow->m_rect .left ,
1170
1187
pWindow->m_rect .top ,
1171
1188
pWindow->m_rect .right ,
1172
1189
pWindow->m_rect .bottom ,
1173
- (pWindow->GetShow () ? " yes " : " no " )));
1190
+ SHOW_TRUE (pWindow->GetShow ())));
1174
1191
1175
- Note (TFormat (" width: %ld, height: %ld, position: %d, hotspots: %ld" ,
1192
+ Note (TFormat (" width: %ld, height: %ld, position: %d, hotspots: %ld, fonts: %ld, images: %ld " ,
1176
1193
pWindow->GetWidth (),
1177
1194
pWindow->GetHeight (),
1178
1195
pWindow->GetPosition (),
1179
- nHotspots
1196
+ nHotspots,
1197
+ nFonts,
1198
+ nImages
1180
1199
));
1181
1200
1182
1201
}
1183
1202
1184
- Note (TFormat (" ** Miniwindows: %ld loaded, %ld enabled." , nTotal, nEnabled));
1203
+ Note (TFormat (" ** Miniwindows: %ld loaded, %ld shown." , nTotal, nEnabled));
1204
+
1205
+ // output window info
1206
+
1207
+ CRect r (0 , 0 , 0 , 0 );
1208
+ CMUSHView* pmyView = GetFirstOutputWindow ();
1209
+
1210
+ if (pmyView)
1211
+ pmyView->GetClientRect (&r);
1212
+
1213
+ Note (TFormat (" ** Output pixels: width %ld, height: %ld, font width: %ld, font height: %ld" ,
1214
+ r.right , r.bottom , m_FontWidth, m_FontHeight));
1215
+
1216
+ if (m_FontWidth > 0 && m_FontHeight > 0 )
1217
+ Note (TFormat (" width %ld characters, wrap at column %ld, height %ld lines." ,
1218
+ r.right / m_FontWidth, m_nWrapColumn, r.bottom / m_FontHeight));
1219
+
1220
+
1221
+ // accelerators
1222
+
1223
+ Note (TFormat (" Accelerators defined: %ld" , m_AcceleratorToCommandMap.size ()));
1224
+
1225
+ // telnet negotiation
1226
+
1227
+ Note (TFormat (" ** Telnet (IAC) received: DO: %ld, DONT: %ld, WILL: %ld, WONT: %ld, SB: %ld" ,
1228
+ m_nCount_IAC_DO,
1229
+ m_nCount_IAC_DONT,
1230
+ m_nCount_IAC_WILL,
1231
+ m_nCount_IAC_WONT,
1232
+ m_nCount_IAC_SB));
1233
+
1234
+
1235
+ // end summary
1185
1236
1186
1237
Note (" " );
1187
1238
Note (" -------------- End summary --------------" );
0 commit comments