home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2009 February / maximum-cd-2009-02.iso / DiscContents / SMC_1.6_win32.exe / src / level / level_manager.h < prev    next >
Encoding:
C/C++ Source or Header  |  2008-07-01  |  1.8 KB  |  59 lines

  1. /***************************************************************************
  2.  * level_manager.h  -  header for the corresponding cpp file
  3.  *
  4.  * Copyright (C) 2007 - 2008 Florian Richter
  5.  ***************************************************************************/
  6. /*
  7.    This program is free software; you can redistribute it and/or modify
  8.    it under the terms of the GNU General Public License as published by
  9.    the Free Software Foundation; either version 3 of the License, or
  10.    (at your option) any later version.
  11.    
  12.    You should have received a copy of the GNU General Public License
  13.    along with this program.  If not, see <http://www.gnu.org/licenses/>.
  14. */
  15.  
  16. #ifndef SMC_LEVEL_MANAGER_H
  17. #define SMC_LEVEL_MANAGER_H
  18.  
  19. #include "../core/globals.h"
  20. #include "../core/obj_manager.h"
  21. #include "../core/camera.h"
  22. #include "../level/level.h"
  23.  
  24. // default files for levels
  25. #define LEVEL_DEFAULT_MUSIC "land/land_5.ogg"
  26. #define LEVEL_DEFAULT_BACKGROUND "game/background/green_junglehills.png"
  27.  
  28. /* *** *** *** *** *** cLevel_Manager  *** *** *** *** *** *** *** *** *** *** *** *** */
  29.  
  30. class cLevel_Manager : public cObject_Manager<cLevel>
  31. {
  32. public:
  33.     cLevel_Manager( void );
  34.     virtual ~cLevel_Manager( void );
  35.  
  36.     // Load level descriptions
  37.     void Init( void );
  38.     // Unload
  39.     void Unload( void );
  40.  
  41.     /* Load level
  42.      * delayed : if set the level will be loaded on the next update
  43.      * sub_level : if set previous level isn't unloaded
  44.     */
  45.     bool Load( string filename, bool delayed = 0, bool sub_level = 0 );
  46.  
  47.     // level camera
  48.     cCamera *camera;
  49. };
  50.  
  51. /* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
  52.  
  53. // The Level Manager
  54. extern cLevel_Manager *pLevel_Manager;
  55.  
  56. /* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
  57.  
  58. #endif
  59.