#ifndef __DEBUG_H__ #define __DEBUG_H__ #include "types.h" #define DEBUG // Homework should always use debug mode #ifdef DEBUG #include #define ASSERT(a) assert(a) #define VERIFY(a) assert(a) #else // DEBUG #define ASSERT(a) #define VERIFY(a) a #endif // DEBUG // Debugging Levels enum { DL_ERROR, DL_WARNING, DL_EVENT, DL_FUNCCALL, DL_NORMAL, DL_VERBOSE, DL_LOOP }; ////////////////////////////////////////////////////////////////////////////// // Debugging Modules // These are User defined #define DM_NONE 0x00000000 #define DM_ALL 0xffffffff #define DM_GLOBAL 0x00000001 #define DM_APP 0x00000010 #define DM_DISPLAY 0x00000020 #define DM_WINDOW 0x00000040 #define DM_INPUT 0x00000080 #define DM_WORLD 0x00000100 #define DM_OBJECT 0x00000200 #define DM_CAMERA 0x00000400 #define DM_MATHLIB 0xff000000 #define DM_VECTOR 0x80000000 #define DM_VECTORIND 0x40000000 #define DM_POINT 0x20000000 #define DM_QUATER 0x10000000 #define DM_MATRIX 0x08000000 #define DM_BOUND 0x04000000 #define DM_RECT 0x02000000 // ////////////////////////////////////////////////////////////////////////////// #define TRACE dprintf void dprintf(WORD_32 wModule, UINT_32 uiLevel, CHAR *pcFormat, ...); VOID InitDebug(WORD_32 wModule = DM_ALL, UINT_32 uiLevel = DL_NORMAL, CHAR *pcFileName = NULL); VOID UninitDebug(); #endif // __DEBUG_H__