Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2936 in orxonox.OLD for orxonox


Ignore:
Timestamp:
Nov 21, 2004, 4:02:26 AM (20 years ago)
Author:
bensch
Message:

orxonox/trunk/importer: dynamic frame-size-reading

Location:
orxonox/trunk/importer
Files:
3 edited

Legend:

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

    r2933 r2936  
    3535    return 0;
    3636  }
     37 
     38  printf ("%i, %i\n", wHandler.screen->w, wHandler.screen->h);
    3739  if (argc>=3)
    3840    obj = new Object (argv[1], atof(argv[2]));
     
    9799            printf("MouseButton %d pressed at (%d,%d).\n",
    98100                   event.button.button, event.button.x, event.button.y);
    99             rotatorV = ( 250-event.button.x) / 500.0 /100;
     101            rotatorV = ( (float)wHandler.screen->w/2 -event.button.x) / (float)wHandler.screen->w / 100.0;
    100102          }
    101103           
  • orxonox/trunk/importer/windowHandler.cc

    r2931 r2936  
    6363        }
    6464        SDL_GL_SetAttribute( SDL_GL_STENCIL_SIZE, 1 );
    65         if ( SDL_SetVideoMode(width, height, 0, flags) == NULL ) {
     65        if ( (screen = SDL_SetVideoMode(width, height, 0, flags)) == NULL ) {
    6666                return FALSE;
    6767        }
  • orxonox/trunk/importer/windowHandler.h

    r2931 r2936  
    2929    GLvoid KillGLWindow(GLvoid);
    3030    BOOL CreateGLWindow(char* title, int width, int height, int bits, BOOL fullscreenflag);
     31    SDL_Surface* screen;
    3132  private:
    3233    int InitGL(GLvoid);
Note: See TracChangeset for help on using the changeset viewer.