home *** CD-ROM | disk | FTP | other *** search
/ PC Format (South-Africa) 2001 June / PCFJune.iso / Xenon / XenonSource.exe / gamesystem / source / gs_error.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  2000-08-08  |  1.1 KB  |  61 lines

  1. //-------------------------------------------------------------
  2. //
  3. // Class:    gsCError
  4. //
  5. // Author:    John M Phillips
  6. //
  7. // Started:    12/03/00
  8. //
  9. // Base:    None
  10. //
  11. // Derived:    None
  12. //
  13. //-------------------------------------------------------------
  14.  
  15. #include "gamesystem.h"
  16.  
  17. #ifdef _DEBUG
  18. #include "assert.h"
  19. #endif
  20.  
  21. //-------------------------------------------------------------
  22.  
  23. #ifdef _DEBUG
  24.  
  25. void gsDoAssert(void *exp, void *file, unsigned line)
  26. {
  27.     _assert(exp,file,line);
  28. }
  29.  
  30. #endif
  31.  
  32. //-------------------------------------------------------------
  33.  
  34. gsCError::gsCError()
  35. {
  36. }
  37.  
  38. //-------------------------------------------------------------
  39.  
  40. gsCError::~gsCError()
  41. {
  42. }
  43.  
  44. //-------------------------------------------------------------
  45.  
  46. void _cdecl gsCError::log(const char *format,...)
  47. {
  48.     va_list arglist;
  49.     static char message[1000];
  50.  
  51.     va_start(arglist,format);
  52.     vsprintf(message,format,arglist);
  53.     va_end(arglist);
  54.  
  55.     strcat(message,"\n");
  56.  
  57.     OutputDebugString(message);
  58. }
  59.  
  60. //-------------------------------------------------------------
  61.