OF_RESE.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. /*
  2. * Seven Kingdoms: Ancient Adversaries
  3. *
  4. * Copyright 1997,1998 Enlight Software Ltd.
  5. *
  6. * This program is free software: you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation, either version 2 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  18. *
  19. */
  20. //Filename : OF_RESE.H
  21. //Description : Header of FirmResearch
  22. #ifndef __OF_RESE_H
  23. #define __OF_RESE_H
  24. #ifndef __OFIRM_H
  25. #include <OFIRM.h>
  26. #endif
  27. //------- Define class FirmResearch --------//
  28. #pragma pack(1)
  29. class FirmResearch : public Firm
  30. {
  31. public:
  32. short tech_id; // the id. of the tech this firm is currently researching
  33. float complete_percent; // percent completed on researching the current technology
  34. int is_operating() { return productivity > 0 && tech_id; }
  35. public:
  36. FirmResearch();
  37. ~FirmResearch();
  38. void init_derived();
  39. void put_info(int refreshFlag);
  40. void detect_info();
  41. void disp_main_menu(int refreshFlag);
  42. void detect_main_menu();
  43. void disp_research_menu(int refreshFlag);
  44. void detect_research_menu();
  45. void start_research(int techId, char remoteAction);
  46. void process_research();
  47. void terminate_research();
  48. void research_complete();
  49. void next_day();
  50. void process_ai();
  51. void change_nation(int newNationRecno);
  52. virtual FirmResearch* cast_to_FirmResearch() { return this; };
  53. //-------------- multiplayer checking codes ---------------//
  54. virtual UCHAR crc8();
  55. virtual void clear_ptr();
  56. private:
  57. void disp_research_info(int dispY1, int refreshFlag);
  58. void disp_research_button(int y, int techId, int buttonUp);
  59. //-------- AI actions ---------//
  60. void think_new_research();
  61. int think_del();
  62. };
  63. #pragma pack()
  64. //--------------------------------------//
  65. #endif