00001 //Filename : OFIRM.h 00002 //Description : Firm Class Declaration 00003 //owner : ho 00004 00005 #ifndef __OFIRM_H 00006 #define __OFIRM_H 00007 00008 #include <OFIRMID.H> 00009 00010 #ifndef __OFIRMA_H 00011 #include <OFIRMA.H> 00012 #endif 00013 00014 #ifndef __ORECT_H 00015 #include <ORECT.H> 00016 #endif 00017 00018 //----------- Define class Firm ------------// 00019 00020 class Matrix; 00021 00024 class Firm { 00025 public: 00026 short firm_recno; // record number in (and assigned by) FirmArray 00027 short firm_id; // const 00028 00029 short department_recno; // >0 if this is an academic department 00030 00031 short loc_x1, loc_y1, loc_x2, loc_y2; 00032 Rect abs_rect[MAX_ZOOM_LEVEL]; 00033 // short firm_width; 00034 // short firm_height; 00035 00036 int setup_date; 00037 00038 char* name(); 00039 #if(GAME_VERSION>=200) 00040 char* name_on_map(); // for display name on zoom matrix 00041 #endif 00042 int is_selected() { return firm_array.selected_recno == firm_recno; } 00043 00044 //------------------------------------------// 00045 00046 public: 00047 void init(int xLoc, int yLoc, int firmId); 00048 void deinit(); 00049 00050 void draw(Matrix*); 00051 void double_click_firm(); 00052 00053 private: 00054 void init_abs(int zoomLevel, int locWidth, int locHeight); 00055 void init_matrix(); 00056 void deinit_matrix(); 00057 }; 00058 00059 //-----------------------------------------// 00060 #endif