Virtual U.org
Get Personal Training on VU Today
    
Top shadow
 
 register/help
User Name:

Password:

OGAME.H Source File
Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

OGAME.H

Go to the documentation of this file.
00001 //Filename    : OGAME.H
00002 //Description : Game Class Declaration
00003 
00004 #ifndef __OGAME_H
00005 #define __OGAME_H
00006 
00007 #ifndef __WINDOWS_
00008 #include <WINDOWS.H>
00009 #endif
00010 
00011 #ifndef __ALL_H
00012 #include <ALL.H>
00013 #endif
00014 
00015 #ifndef __OCONFIG_H
00016 #include <OCONFIG.H>
00017 #endif
00018 
00019 //-------- Define game modes -----------//
00020 
00021 enum {
00022     GAME_PREGAME=1,
00023     GAME_SINGLE_PLAYER,                             // game_mode is set once the player clicks an option on the screen, the game doesn't have to be actually running.
00024     GAME_TUTORIAL,
00025     GAME_TEST,
00026 };
00027 
00028 //-------- Define class Game -----------//
00029 
00035 class Game {
00036 public:
00037     char      init_flag;
00038     char      started_flag;
00039     char      game_mode;
00040     char      game_has_ended;                     // whether game_end() has been called once already and the player is now just staying in the game to continue to play or observe
00041 
00042 public:
00043     Game();
00044 
00045     int     init(int loadGameCall=0);
00046     void      deinit(int loadGameCall=0);
00047 
00048     void      main_menu();
00049 
00050     int       write_file(File* filePtr);
00051     int     read_file(File* filePtr);
00052 
00053 private:
00054     void      run_main_menu_option(int optionId);
00055     void      new_game();
00056     void      play_scenario();
00057     void      credit();
00058     void      disp_version();
00059 
00060     //#### begin fred 0121 ####//
00061     void      scenario_menu();
00062     //void                      scenario_constructor();
00063     void      scenario_init();
00064     void      scenario_report(int refreshFlag);
00065     int     scenario_detect();
00066 
00067     void      loadgame_menu();
00068     void      loadgame_init();
00069     void      loadgame_report(int refreshFlag);
00070     int     loadgame_detect();
00071 
00072 public:
00073     void      hall_of_fame();
00074 
00075     void      scenario_deinit();
00076     void      loadgame_deinit();
00077     //#### end fred 0121 ####//
00078 
00079     //------- new game generation functions -----//
00080 
00081     int       generator(int genMode);
00082     void      gen_disp(int refreshFlag);
00083     void      gen_detect();
00084 };
00085 
00086 extern Game game;
00087 
00088 //-------------------------------------//
00089 #endif

Generated on Fri Aug 23 01:37:42 2002 for VirtualU by doxygen1.2.17