~ubuntu-branches/ubuntu/trusty/ultrastar-ng/trusty

« back to all changes in this revision

Viewing changes to include/screen.h

  • Committer: Bazaar Package Importer
  • Author(s): Miriam Ruiz
  • Date: 2007-05-19 13:27:05 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20070519132705-0e57ieq232ykprpv
Tags: 0.1.4-1
* Build-Depends on libcairo2-dev (>= 1.2)
* Modified rules so that the icon and desktop files appear in both flavours
  of the program.
* Added rule-flavour type of targets in debian/rules, so that it is
  easier to maintain.
* New Upstream Release.
  + Added difficulty level
  + Added to-start cursor
  + Added audio pause/seek
  + Added practice screen
  + Added ingame fullscreen support
  + Rewrote of the lyrics parsing and screen API
  + Added manpage, desktop and pixmap files
  + Fixed latest unscaled graphics
  + Bufixes and memleak fixes
* Reconfigure autotools files before running configure.
  Added build dependencies: autoconf, automake1.10
* Added patch to avoid rebuilding the man page, not working properly.

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
        virtual ~CScreen() {};
16
16
        virtual void manageEvent( SDL_Event event )=0;
17
17
        virtual void draw( void )=0;
 
18
        virtual void enter( void )=0;
 
19
        virtual void exit( void )=0;
18
20
        char * getName( void ) {return screenName;};
19
21
        protected:
20
22
        char * screenName; // Must be set by each constructor
28
30
                screens.push_back(screen);
29
31
                fprintf(stdout,"Adding screen \"%s\" to screen manager\n",screen->getName());
30
32
        };
31
 
        void activateScreen(char * name) {
32
 
                for( unsigned int i = 0 ; i < screens.size() ; i++ )
33
 
                        if( !strcmp(screens[i]->getName(),name) )
34
 
                                currentScreen=screens[i];
35
 
        };
 
33
        void activateScreen(char * name);
36
34
        CScreen * getCurrentScreen( void ) {return currentScreen;};
37
 
        CScreen * getScreen(char * name) {
38
 
                for( unsigned int i = 0 ; i < screens.size() ; i++ )
39
 
                        if( !strcmp(screens[i]->getName(),name) )
40
 
                                return screens[i];
41
 
        }
 
35
        CScreen * getScreen(char * name);
42
36
 
43
37
        void setSDLScreen( SDL_Surface * _screen ) { screen = _screen;};
44
38
        SDL_Surface * getSDLScreen( void ) { return screen;};
45
39
 
46
40
        int getWidth( void ) {return width;};
47
41
        int getHeight( void ) {return height;};
 
42
        
 
43
        void setDifficulty( unsigned int _difficulty ) { difficulty=_difficulty;};
 
44
        unsigned int getDifficulty( void ) {return difficulty;};
48
45
 
49
46
        CAudio * getAudio( void ) {return audio;};
50
47
        void setAudio( CAudio * _audio ) {audio=_audio;};
57
54
 
58
55
        CSongs * getSongs( void ) {return songs;};
59
56
        void setSongs( CSongs * _songs ) {
60
 
                if(songs)
61
 
                        delete songs;
62
57
                songs=_songs;
63
58
        };
 
59
        void setNextSongId( void );
 
60
        void setPreviousSongId( void );
64
61
        void setSongId( int _id ) {songId = _id; };
65
62
        int getSongId( void ) {return songId; };
66
63
        CSong * getSong( void ) {return songs->getSong(songId);};
85
82
        bool m_finished;
86
83
        int width;
87
84
        int height;
 
85
        unsigned int difficulty;
88
86
};
89
87
 
90
88
#endif