~ubuntu-branches/ubuntu/natty/gav/natty

« back to all changes in this revision

Viewing changes to automa/AutomaMainLoop.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Ari Pollak
  • Date: 2006-05-27 17:49:14 UTC
  • mfrom: (2.1.1 etch)
  • Revision ID: james.westby@ubuntu.com-20060527174914-3hgcv8ov8y6hbqpb
Tags: 0.9.0-1
* New upstream release
  - Now saves settings between games (Closes: #261197)

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
#include "globals.h"
27
27
#include "StateMenu.h"
28
28
#include "StatePlaying.h"
 
29
#include "MenuItemFullScreen.h"
29
30
#ifndef NONET
30
31
#include "StateClient.h"
31
32
#endif
33
34
AutomaMainLoop::AutomaMainLoop()
34
35
{
35
36
  _is = new InputState();
36
 
  controlsArray = new ControlsArray();
37
 
  
 
37
 
38
38
  StateMenu *sm = new StateMenu();
39
39
  addState(STATE_MENU, sm);
40
40
  _curr = STATE_MENU;
92
92
    
93
93
    _is->getInput();
94
94
    if ( _is->getF()[9] ) {
95
 
      SDL_FreeSurface(screen);
96
 
      int wasFull = (screenFlags & SDL_FULLSCREEN);
97
 
      screenFlags =
98
 
        wasFull?(screenFlags & ~SDL_FULLSCREEN):(screenFlags|SDL_FULLSCREEN);
99
 
      screen = SDL_SetVideoMode(SCREEN_WIDTH(),
100
 
                                //      SCREEN_HEIGHT(), BPP, screenFlags);
101
 
                                SCREEN_HEIGHT(),
102
 
                                videoinfo->vfmt->BitsPerPixel, 
103
 
                                screenFlags);
 
95
      std::stack<Menu *> s;
 
96
      MenuItemFullScreen().execute(s);
104
97
    }
105
 
    
 
98
 
106
99
    // execute the _curr state's code, and transact
107
100
    int retval  = _states[_curr]->execute(_is,
108
101
                                          ticks, prevTicks,