Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3395 in orxonox.OLD


Ignore:
Timestamp:
Feb 6, 2005, 1:12:06 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: adapted PRINTF/PRINT/COUT, now they should behave properly.

Location:
orxonox/trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/debug.h

    r3365 r3395  
     1/*
     2   orxonox - the future of 3D-vertical-scrollers
     3
     4   Copyright (C) 2004 orx
     5
     6   This program is free software; you can redistribute it and/or modify
     7   it under the terms of the GNU General Public License as published by
     8   the Free Software Foundation; either version 2, or (at your option)
     9   any later version.
     10
     11   ### File Specific:
     12   main-programmer: Benjamin Grauer
     13   co-programmer: ...
     14*/
     15
     16/*!
     17    \file debug.h
     18    \brief Handles output to console for different Verbose-Modes.
     19*/
     20
    121#ifndef _DEBUG_H
    222#define _DEBUG_H
    323
     24#define NO              0
     25#define ERROR           1
     26#define WARNING         2
     27#define INFORMATION     3
     28#define DEBUGING        4
     29
     30#include <stdio.h>
    431
    532///////////////////////////////////////////////////
     
    1239           PRINTF ## x
    1340
    14 #if DEBUG >= 1
     41#if DEBUG >= ERROR
    1542#define PRINTF1 \
    16     if (verbose >= 1 ) \
     43    if (verbose >= ERROR) \
    1744      printf("%s:%d::", __FILE__, __LINE__) && printf
    1845#else
    19 #define PRINTF1 //
     46#define PRINTF1 if (NO)
    2047#endif
    2148     
    22 #if DEBUG >= 2
     49#if DEBUG >= WARNING
    2350#define PRINTF2 \
    24      if (verbose >= 2 ) \
     51     if (verbose >= WARNING) \
    2552       printf("%s:%d::", __FILE__, __LINE__) && printf
    2653         
    2754#else
    28 #define PRINTF2 //
     55#define PRINTF2 if (NO)
    2956#endif
    3057     
    31 #if DEBUG >= 3
     58#if DEBUG >= INFORMATION
    3259#define PRINTF3 \
    33      if (verbose >= 3 ) \
     60     if (verbose >= INFORMATION) \
    3461       printf("%s:%d::", __FILE__, __LINE__) && printf
    3562#else
    36 #define PRINTF3 //
     63#define PRINTF3 if (NO)
    3764#endif
    3865     
    39 #if DEBUG >= 4
     66#if DEBUG >= DEBUGING
    4067#define PRINTF4 \
    41      if (verbose >= 4 ) \
     68     if (verbose >= DEBUGING) \
    4269       printf("%s:%d::", __FILE__, __LINE__) && printf
    4370#else
    44 #define PRINTF4 //
     71#define PRINTF4 if (NO)
    4572#endif
    4673     
    4774     
    4875#else 
    49 #define PRINTF(x) //
     76#define PRINTF(x) if (NO)
    5077#endif
    5178
     
    5481
    5582
    56 
    57 
    5883///////////////////////////////////////////////////
    5984///  PRINT: just prints output as is            ///
    6085///////////////////////////////////////////////////
     86#ifdef  DEBUG
     87extern int verbose;
     88#define PRINT(x) \
     89  PRINT ## x
    6190
    62 #ifdef  DEBUG
    63 #define PRINT(x) \
    64            PRINT ## x
     91#if DEBUG >= ERROR
     92#define PRINT1  \
     93  if (verbose >= ERROR) \
     94    printf
     95#else
     96#define PRINT1 if (NO)
     97#endif
    6598
    66 #if DEBUG >= 1
    67 #define PRINT1 \
    68     if (verbose >= 1 ) \
    69       printf
    70 #else
    71 #define PRINT1 //
    72 #endif
    73      
    74 #if DEBUG >= 2
     99#if DEBUG >= WARNING
    75100#define PRINT2 \
    76      if (verbose >= 2 ) \
    77        printf
     101  if (verbose >= WARNING) \
     102    printf
    78103
    79104#else
    80 #define PRINT2 //
     105#define PRINT2 if (NO)
    81106#endif
    82      
    83 #if DEBUG >= 3
     107
     108#if DEBUG >= INFORMATION
    84109#define PRINT3 \
    85      if (verbose >= 3 ) \
    86        printf
    87 #else
    88 #define PRINT3 //
     110  if (verbose >= INFORMATION) \
     111    printf
     112#else 
     113#define PRINT3 if (NO)
    89114#endif
    90      
    91 #if DEBUG >= 4
     115
     116#if DEBUG >= DEBUGING
    92117#define PRINT4 \
    93      if (verbose >= 4 ) \
    94        printf
     118  if (verbose >= DEBUGING) \
     119    printf
    95120#else
    96 #define PRINT4 //
     121#define PRINT4 if (NO)
    97122#endif
    98      
    99      
     123
     124
    100125#else 
    101 #define PRINT(x) //
     126#define PRINT(x) if (NO)
    102127#endif
    103128
    104129#define PRINT0 \
    105            printf
    106 
     130  printf
    107131
    108132///////////////////////////////////////////////////
     
    118142      cout
    119143#else
    120 #define COUT1 //
     144#define COUT1 if (NO) cout
    121145#endif
    122146     
     
    127151
    128152#else
    129 #define COUT2 //
     153#define COUT2 if (NO) cout
    130154#endif
    131155     
     
    135159       cout
    136160#else
    137 #define COUT3 //
     161#define COUT3 if (NO) cout
    138162#endif
    139163     
     
    143167       cout
    144168#else
    145 #define COUT4 //
     169#define COUT4 if (NO) cout
    146170#endif
    147171     
    148172     
    149173#else 
    150 #define COUT(x) //
     174#define COUT(x) if (NO) cout
    151175#endif
    152176
  • orxonox/trunk/src/importer/model.h

    r3365 r3395  
    1212#include "material.h"
    1313#include "vector.h"
    14 #include <fstream>
    1514
    1615using namespace std;
     
    8887  float scaleFactor;    //!< The Factor with which the Model should be scaled. \todo maybe one wants to scale the Model after Initialisation
    8988
    90   char* objPath;        //!< The Path wher the obj and mtl-file are located.
     89  char* objPath;        //!< The Path where the obj and mtl-file are located.
    9190  char* objFileName;    //!< The Name of the obj-file.
    9291  char* mtlFileName;    //!< The Name of the mtl-file (parsed out of the obj-file)
Note: See TracChangeset for help on using the changeset viewer.