From e585187b248f48b3c6e9247b49fa07c6565d65e5 Mon Sep 17 00:00:00 2001 From: maximius Date: Sat, 17 Oct 2009 15:51:44 -0700 Subject: *Backed out changeset 3be01fb200a5 --HG-- branch : trunk --- src/shared/vmap/DebugCmdLogger.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/shared/vmap/DebugCmdLogger.h') diff --git a/src/shared/vmap/DebugCmdLogger.h b/src/shared/vmap/DebugCmdLogger.h index f67687343c1..5493ab6f332 100644 --- a/src/shared/vmap/DebugCmdLogger.h +++ b/src/shared/vmap/DebugCmdLogger.h @@ -17,16 +17,21 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + #ifndef _DEBUGCMDLOGGER_H #define _DEBUGCMDLOGGER_H + #include #include + /** Class is used for debugging. We log activities into a file. With an external Class we read that log and display the activity in a graphical view. */ + namespace VMAP { + //========================================== enum C_TYPES { @@ -41,6 +46,7 @@ namespace VMAP TEST_HEIGHT, TEST_OBJECT_HIT, }; + class Command { int iType; @@ -48,11 +54,14 @@ namespace VMAP int ints[4]; char buffer[100]; public: + Command() { iType = STOP; } + inline int getType() { return iType; } inline G3D::Vector3 getVector(int pos) { return(G3D::Vector3(floats[pos*3+0], floats[pos*3+1], floats[pos*3+2])); } inline int getInt(int pos) { return(ints[pos]); } inline char* getBuffer() { return(buffer); } + void fillStopCmd() { iType = STOP; } void fillStartCmd() { iType = START; } void fillLoadTileCmd(int x, int y, G3D::uint32 pMapId) { iType = LOAD_TILE; ints[0] = x; ints[1] = y; ints[2] = pMapId; } @@ -78,9 +87,12 @@ namespace VMAP floats[6] = pResultPos.x; floats[7]=pResultPos.y; floats[8]=pResultPos.z; ints[0] = result; ints[1] = pMapId; } + bool isCoreCmd() const { return(iType != TEST_VIS); } }; + //========================================== + class CommandFileRW { private: @@ -97,9 +109,11 @@ namespace VMAP void setFileName(const std::string& pName) { iFileName = pName; } bool getNewCommands(G3D::Array& commandArray); const G3D::Array >& getFullCommandArray() { return iCommandArray; } + bool appendCmd(const Command& pCommand); bool appendCmds(const G3D::Array& pCmdArray); }; + } #endif -- cgit v1.2.3