1 // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
2 // Copyright (C) 2010 Winch Gate Property Limited
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU Affero General Public License as
6 // published by the Free Software Foundation, either version 3 of the
7 // License, or (at your option) any later version.
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU Affero General Public License for more details.
14 // You should have received a copy of the GNU Affero General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
20 #ifndef NL_DEBUG_CLIENT_H
21 #define NL_DEBUG_CLIENT_H
27 #include "nel/misc/types_nl.h"
29 #include "game_share/entity_types.h"
38 VerboseNone
= 0x00000000,
39 VerboseMagic
= 0x00000001,
40 VerboseAnim
= 0x00000002,
41 VerboseAll
= 0xFFFFFFFF
43 extern uint32 Verbose
;
44 extern bool VerboseAnimSelection
;
45 extern bool VerboseAnimUser
;
46 extern bool VerboseVP
;
47 extern CLFECOMMON::TCLEntityId WatchedEntitySlot
;
48 extern uint64 IngameEnterTime
;
54 void initDebugMemory();
55 double memoryUsedSinceLastCall();
57 /// Set an output file to log debugs. (empty to as nlwarning).
58 void setDebugOutput(const std::string
&filename
);
59 /// Push a string in a debug stack but will display only if there is a debug string in the stack when flush.
60 void pushInfoStr(const std::string
&str
);
61 /// Push a string in a debug stack.
62 void pushDebugStr(const std::string
&str
);
63 /// Display 'title' and a warning for each element in the Debug Stack.
64 void flushDebugStack(const std::string
&title
);
68 * \author Guillaume PUZIN
69 * \author Nevrax France
81 // Display streaming debug page
82 void displayStreamingDebug ();
84 // Display Net debug page
85 void displayNetDebug ();
88 // return a string with \n separated to get information about the client at the moment 't'
89 // it is used by the bug_report and when the client crashs
90 std::string
getDebugInformation();
92 // Start the ingame time counter
93 void resetIngameTime ();
96 uint64
ingameTime0 ();
97 uint64
ingameTime1 ();
100 bool verboseVPAdvanceTest(class CEntityCL
*en
, uint32 form
);
101 inline bool verboseVP(class CEntityCL
* /* en */, uint32
/* form */=0)
105 //return verboseVPAdvanceTest(en, form);
109 void crashLogAddServerHopEvent();
110 void crashLogAddFarTpEvent();
111 void crashLogAddReselectPersoEvent();
113 #endif // NL_DEBUG_CLIENT_H
115 /* End of debug_client.h */