00001 //Filename : OPOWER.CPP 00002 //Description : Object Power 00003 00004 #include <OIMGRES.H> 00005 #include <OMOUSE.H> 00006 #include <OMOUSECR.H> 00007 #include <OPOWER.H> 00008 #include <OFIRM.H> 00009 #include <OSYS.H> 00010 #include <OWORLD.H> 00011 00012 //----------- Begin of function Power::Power -----------// 00013 Power::Power() { 00014 memset( this, 0, sizeof(Power) ); 00015 } 00016 00017 //----------- End of function Power::Power -----------// 00018 00019 //----------- Begin of function Power::~Power -----------// 00020 Power::~Power() { 00021 } 00022 00023 //----------- End of function Power::~Power -----------// 00024 00025 //----------- Begin of function Power::init -----------// 00026 00027 void Power::init() { 00028 memset( this, 0, sizeof(Power) ); 00029 00030 reset_selection(); // there may be selections left by the previous game. 00031 } 00032 00033 //----------- End of function Power::init -----------// 00034 00035 //----------- Begin of function Power::deinit -----------// 00036 00037 void Power::deinit() { 00038 } 00039 00040 //----------- End of function Power::deinit -----------// 00041 00042 //-------- Begin of function Power::mouse_handler --------// 00045 void Power::mouse_handler() { 00046 if( sys.view_mode != MODE_NORMAL ) { 00047 mouse_cursor.set_icon(CURSOR_NORMAL); 00048 return; 00049 } 00050 } 00051 00052 //--------- End of function Power::mouse_handler ---------// 00053 00054 //--------- Begin of function Power::reset_selection ---------// 00058 void Power::reset_selection() { 00059 firm_array.select_firm(0); 00060 } 00061 00062 //----------- End of function Power::reset_selection -----------//