variables.h 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. /*
  2. FinalSun/FinalAlert 2 Mission Editor
  3. Copyright (C) 1999-2024 Electronic Arts, Inc.
  4. Authored by Matthias Wagner
  5. This program is free software: you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation, either version 3 of the License, or
  8. (at your option) any later version.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with this program. If not, see <https://www.gnu.org/licenses/>.
  15. */
  16. /*******************************************
  17. Declare the global variables here
  18. *******************************************/
  19. #ifndef VARIABLES_H_INCLUDED
  20. #define VARIABLES_H_INCLUDED
  21. #include "structs.h"
  22. #include "FinalSun.h"
  23. #include "MapData.h"
  24. // the map
  25. extern CMapData* Map;
  26. // the ini files:
  27. extern CIniFile rules;
  28. extern CIniFile art;
  29. extern CIniFile ai;
  30. extern CIniFile sound;
  31. extern CIniFile tutorial;
  32. extern CIniFile eva;
  33. extern CIniFile theme;
  34. extern CIniFile g_data;
  35. extern CIniFile language;
  36. extern CIniFile tiles_t;
  37. extern CIniFile tiles_s;
  38. extern CIniFile tiles_u;
  39. extern CIniFile tiles_un; // new urbannmd.ini
  40. extern CIniFile tiles_l; // new lunarmd.ini
  41. extern CIniFile tiles_d; // new desertmd.ini
  42. extern CIniFile* tiles;
  43. // first time options are shown (at startup)
  44. extern BOOL bOptionsStartup;
  45. // the current file beeing edited.
  46. extern char currentMapFile[MAX_PATH + 1];
  47. // all the pictures shown in the mapview
  48. extern map<CString, PICDATA> pics;
  49. extern TILEDATA* t_tiledata;
  50. extern TILEDATA* s_tiledata;
  51. extern TILEDATA* u_tiledata;
  52. extern TILEDATA** tiledata;
  53. extern DWORD s_tiledata_count;
  54. extern DWORD t_tiledata_count;
  55. extern DWORD u_tiledata_count;
  56. extern DWORD* tiledata_count;
  57. // MW new tilesets
  58. extern TILEDATA* un_tiledata;
  59. extern DWORD un_tiledata_count;
  60. extern TILEDATA* l_tiledata;
  61. extern DWORD l_tiledata_count;
  62. extern TILEDATA* d_tiledata;
  63. extern DWORD d_tiledata_count;
  64. extern map<int, int> tilesets_start;
  65. extern RGBTRIPLE palIso[256];
  66. extern RGBTRIPLE palUnit[256];
  67. extern RGBTRIPLE palStd[256];
  68. extern RGBTRIPLE palTheater[256];
  69. extern RGBTRIPLE palLib[256];
  70. extern int iPalIso[256];
  71. extern int iPalUnit[256];
  72. extern int iPalStd[256];
  73. extern int iPalTheater[256];
  74. extern int iPalLib[256];
  75. extern int bpp;
  76. extern map<CString, int> color_conv;
  77. extern map<COLORREF, int> colorref_conv;
  78. extern map<int, HOUSEINFO> houses;
  79. extern map<int, SIDEINFO> sides;
  80. extern map<CString, BOOL> missingimages;
  81. extern vector<CString> rndterrainsrc;
  82. // infos for buildings and trees (should be extended to infantry, units, and aircraft)
  83. // they are initialized in CIsoView, should be changed to CMapData
  84. extern BUILDING_INFO buildinginfo[0x0F00];
  85. extern TREE_INFO treeinfo[0x0F00];
  86. #ifdef SMUDGE_SUPP
  87. extern SMUDGE_INFO smudgeinfo[0x0F00];
  88. #endif
  89. // the app object:
  90. extern CFinalSunApp theApp;
  91. /* error output */
  92. extern ofstream errstream;
  93. // application path
  94. extern char AppPath[MAX_PATH + 1];
  95. extern const std::string u8AppDataPath;
  96. extern const std::wstring u16AppDataPath;
  97. extern char TSPath[MAX_PATH + 1];
  98. extern bool bAllowAccessBehindCliffs;
  99. // overlay types (the ones with additional information like name etc.)
  100. extern int overlay_count; // number of overlay ids that have additional information
  101. extern int overlay_number[]; // what overlay id?
  102. extern CString overlay_name[]; // what name?
  103. extern BOOL overlay_trail[]; // is it handled as trail?
  104. extern BOOL overlay_trdebug[];
  105. extern BOOL yr_only[];
  106. extern CString currentOwner;
  107. extern map<CString, XCString> CCStrings;
  108. // tileset ids
  109. extern int cliffset;
  110. extern int cliffset_start;
  111. extern int rampset;
  112. extern int rampsmoothset;
  113. extern int slopesetpiecesset;
  114. extern int waterset;
  115. extern int shoreset;
  116. extern int ramp2set;
  117. extern int pave2set;
  118. extern int ramp2set_start;
  119. extern int pave2set_start;
  120. extern int rampset_start;
  121. extern int cliff2set;
  122. extern int cliff2set_start;
  123. extern int cliffwater2set;
  124. // ra2 or TS mode?
  125. extern int editor_mode;
  126. extern int yuri_mode;
  127. // debug
  128. extern int last_succeeded_operation;
  129. #endif