Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4782 in orxonox.OLD for orxonox/trunk/src/lib


Ignore:
Timestamp:
Jul 3, 2005, 12:26:16 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: orxonox-events registered, solved an error in ClassList

Location:
orxonox/trunk/src/lib
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/lib/event/event.h

    r4457 r4782  
    1 /*! 
     1/*!
    22    \file event.h
    33    \brief an abstract event
     
    2525  int      type;                        //!< the type field
    2626  bool     bPressed;                    //!< is true, if the button/mouse was pressed, false if released
    27        
     27
    2828  Uint16   x;                           //!< x coordinate
    2929  Uint16   y;                           //!< y coordinate
    3030  Sint16   xRel;                        //!< relative x movement to last point
    3131  Sint16   yRel;                        //!< relative y movement to last point
     32
     33  SDL_ResizeEvent resize;
    3234};
    3335
  • orxonox/trunk/src/lib/event/event_def.h

    r4780 r4782  
    3030  EV_JOY_BUTTON,
    3131
     32  EV_VIDEO_RESIZE                 = SDL_VIDEORESIZE,
     33
    3234  EV_UNKNOWN,
    3335
    3436  EV_NUMBER,
    35 
    36   EV_VIDEO_RESIZE                 = SDL_VIDEORESIZE
    3737};
    3838
     
    4747    ES_ALL,            //!< you want to register events for all states
    4848
    49     ES_NUMBER,         //!< the number of states
     49    ES_NUMBER,          //!< the number of states
    5050  };
    5151
  • orxonox/trunk/src/lib/event/event_handler.cc

    r4780 r4782  
    252252          ev.type = EV_JOY_BUTTON;
    253253          break;
     254        case SDL_VIDEORESIZE:
     255          ev.resize = event.resize;
     256          break;
    254257        default:
    255258          ev.type = EV_UNKNOWN;
  • orxonox/trunk/src/lib/graphics/graphics_engine.cc

    r4777 r4782  
    218218   \param resizeInfo SDL information about the size of the new screen size
    219219*/
    220 int GraphicsEngine::resolutionChanged(SDL_ResizeEvent* resizeInfo)
    221 {
    222   this->setResolution(resizeInfo->w, resizeInfo->h, this->bitsPerPixel);
     220int GraphicsEngine::resolutionChanged(const SDL_ResizeEvent& resizeInfo)
     221{
     222  this->setResolution(resizeInfo.w, resizeInfo.h, this->bitsPerPixel);
    223223}
    224224
  • orxonox/trunk/src/lib/graphics/graphics_engine.h

    r4777 r4782  
    4646    inline int getbbp() const { return this->bitsPerPixel; };
    4747
    48     int resolutionChanged(SDL_ResizeEvent* resizeInfo);
     48    int resolutionChanged(const SDL_ResizeEvent& resizeInfo);
    4949
    5050    static void enter2DMode();
  • orxonox/trunk/src/lib/lang/class_list.cc

    r4778 r4782  
    4747ClassList::~ClassList ()
    4848{
     49  delete this->objectList;
    4950  --ClassList::classCount;
    5051}
     
    6566{
    6667  ClassList* regClass;
     68  PRINTF(5)("subscribe a %s\n", className );
    6769
    6870  if(ClassList::first == NULL)
     
    7981      }
    8082
    81       if (tmp->next == NULL)
     83      if (unlikely(tmp->next == NULL))
     84      {
    8285        tmp->next = regClass = new ClassList(classID, className);
     86        break;
     87      }
    8388      tmp = tmp->next;
    8489    }
  • orxonox/trunk/src/lib/lang/class_list.h

    r4764 r4782  
    5252
    5353    // STATIC MEMBERS
    54     static ClassList*        first;                  //!< The first Class in the List (should be BaseObject)
     54    static ClassList*        first;                  //!< The first Class in the List
    5555    static unsigned int      classCount;             //!< The Count of classes that have been registered (should match the lower description)
    5656};
Note: See TracChangeset for help on using the changeset viewer.