home *** CD-ROM | disk | FTP | other *** search
/ Game Audio Programming / GameAudioProgramming.iso / Extras / Sensaura / SDK1.0 / data1.cab / Example_Files / DS3DDemo / Source / Debug.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-06-13  |  1.3 KB  |  64 lines

  1. /*
  2.     Company:            Sensaura
  3.     Copyright:            (C) 1998
  4.  
  5.     File Name:            Debug.h
  6.     File Description:    Debugging support functions, definitions and macros
  7.     Author:                Adam Philp
  8.     Version:            DEV1.00
  9.     Last Update:        29-JUL-98
  10.  
  11.     Target Compiler:    Microsoft Visual C++ Version 5.0
  12. */
  13.  
  14. #ifndef __DEBUG_H        // Only use file if not already included
  15. #define __DEBUG_H
  16.  
  17. #ifdef _DEBUG            // Debug macros expand to functions only in debug build
  18.  
  19. #ifndef FALSE
  20. #define FALSE           0
  21. #endif
  22.  
  23. #ifndef TRUE
  24. #define TRUE            (!FALSE)
  25. #endif
  26.  
  27.  
  28. #ifndef TRACE
  29. #define TRACE            DebugTracePrepare(__FILE__, __LINE__); DebugTrace
  30. #define TRACEDISABLE    DebugTraceDisable();
  31. #define TRACEENABLE        DebugTraceEnable();
  32. #endif
  33.  
  34. #ifndef ASSERT
  35. #include <crtdbg.h>
  36. #define ASSERT            _ASSERT
  37. #define VERIFY          ASSERT
  38. #endif
  39.  
  40. #ifdef __cplusplus
  41. extern "C" {
  42. #endif
  43.  
  44. extern void DebugTracePrepare(const char* lpcszFileName, int NumLine);
  45. extern void DebugTrace(int DebugLevel, const char* lpcszFormat, ...);
  46. extern void DebugTraceDisable();
  47. extern void DebugTraceEnable();
  48.  
  49. #ifdef __cplusplus
  50. }
  51. #endif
  52.  
  53. #else                    // (#ifdef _DEBUG) Macros expand to nothing in release build
  54.  
  55. #define TRACE
  56. #define TRACEDISABLE
  57. #define TRACEENABLE
  58. #define ASSERT
  59. #define VERIFY
  60. #define    END
  61.  
  62. #endif                    // (#ifdef _DEBUG)
  63.  
  64. #endif                    // __DEBUG_H