Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3211 in orxonox.OLD for orxonox/trunk


Ignore:
Timestamp:
Dec 18, 2004, 12:56:24 AM (20 years ago)
Author:
bensch
Message:

orxonox/trunk/src/importer: reload-tester, unload on x reload on c.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/importer/framework.cc

    r3208 r3211  
    4040  //  glRotatef (180, dir.x, dir.y, dir.z);
    4141  glMultMatrixf (*matQ);
    42   obj->draw();
     42  if (obj)
     43    obj->draw();
    4344
    4445  glPopMatrix();
     
    203204            }
    204205        break;
     206
     207
     208      case SDL_KEYDOWN:
     209        switch (event.key.keysym.sym)
     210          {
     211          case SDLK_x:
     212            delete obj;
     213            obj = NULL;
     214            break;
     215          case SDLK_c:
     216            if (!obj)
     217              obj = new Object(argv[1]);
     218            break;
     219          }
     220        break;
    205221           
    206222        // If a quit event was recieved
     
    224240
    225241  // Kill the GL & SDL screens
    226   delete obj;
     242  if (obj)
     243    delete obj;
    227244  wHandler.KillGLWindow();
    228245  // And quit
Note: See TracChangeset for help on using the changeset viewer.