Logo Search packages:      
Sourcecode: race version File versions

debug.cpp

#include <iostream>
#include <string>
#include "debug.h"

void RaceDebug::print( std::string msg, unsigned char area)
{
      // debug areas: (always add comment when adding a new debug area)
      
      bool debug[] =
      {
            0, // 0: game loop
            0, // 1: game loop detailed
            0, // 2: track creation
            0, // 3: IO related errors
            0, // 4: setup whatever 
            0, // 5: create Car_Player & Car_AI objects
            0, // 6: menus
            0, // 7: resources
            0, // 8: gui loops
            0, // 9: gui creation
            0, // 10: Music
            0  // 11: Sound
      };
      
      short max_debug_areas = 15;

      for( unsigned char i=0; i <= max_debug_areas ; i++ )
            if( area == i && debug[i] == true )
                  std::cout << "RaceDebug: " << msg.c_str() << std::endl;
}

Generated by  Doxygen 1.6.0   Back to index