00001 //Filename : OGCONFIG.H 00002 //Description : Header file for Game GoalGoalConfig class 00003 00004 #ifndef __OGCONFIG_H 00005 #define __OGCONFIG_H 00006 00007 #include <OPSCHOOL.H> 00008 #include <OTASK.H> 00009 00010 //---------- Define struct GoalScen -----------// 00011 00012 #define TOTAL_GOAL_SCEN_VALUE_TYPE 3 00013 00015 struct GoalScen { 00016 short goal_year[TOTAL_PLAQUE_COUNT]; 00017 float goal_value[TOTAL_PLAQUE_COUNT]; 00018 }; 00019 00020 //-------- Define struct GoalTask -------// 00021 00023 struct GoalTask { 00024 short years_lower; 00025 short years_upper; 00026 short value_lower; 00027 short value_upper; 00028 short bonus; 00029 00030 int get_value(); // get a random value between value_lower & value_upper 00031 int get_years(); 00032 }; 00033 00034 //---------- Define class GoalConfig -----------// 00035 00037 class GoalConfig { 00038 public: 00039 GoalScen goal_scen_array[SCENARIO_COUNT]; 00040 GoalTask goal_task_array[TASK_COUNT]; 00041 00042 public: 00043 void init(); 00044 void deinit(); 00045 00046 GoalScen* goal_scen(int scenId) { return goal_scen_array+scenId-1; } 00047 GoalTask* goal_task(int taskId) { return goal_task_array+taskId-1; } 00048 00049 private: 00050 void read_goal_scen(); 00051 void read_goal_task(); 00052 }; 00053 00054 //------------------------------------------// 00055 00056 extern GoalConfig goal_config; 00057 #endif