Linux multi-monitor fullscreen support
[ryzomcore.git] / ryzom / client / src / debug_client.h
blob52ca306c9db5f2acb00a79e59b6b255acacae035
1 // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
2 // Copyright (C) 2010 Winch Gate Property Limited
3 //
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.
8 //
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
24 /////////////
25 // INCLUDE //
26 /////////////
27 #include "nel/misc/types_nl.h"
28 // Game Share
29 #include "game_share/entity_types.h"
32 ////////////
33 // GLOBAL //
34 ////////////
35 // Verbose enum
36 enum TVerbose
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;
51 ///////////////
52 // FUNCTIONS //
53 ///////////////
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);
66 /**
67 * <Class description>
68 * \author Guillaume PUZIN
69 * \author Nevrax France
70 * \date 2001
72 class CDebugClient
74 public:
76 /// Constructor
77 CDebugClient();
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 ();
95 // Get ingame time
96 uint64 ingameTime0 ();
97 uint64 ingameTime1 ();
99 // Must verbose VP?
100 bool verboseVPAdvanceTest(class CEntityCL *en, uint32 form);
101 inline bool verboseVP(class CEntityCL * /* en */, uint32 /* form */=0)
103 return VerboseVP;
104 // TestYoyo
105 //return verboseVPAdvanceTest(en, form);
108 // Debug report
109 void crashLogAddServerHopEvent();
110 void crashLogAddFarTpEvent();
111 void crashLogAddReselectPersoEvent();
113 #endif // NL_DEBUG_CLIENT_H
115 /* End of debug_client.h */