1 /*************************************************************************** 2 * Copyright (C) 2009 by Andrey Afletdinov <fheroes2@gmail.com> * 3 * * 4 * Part of the Free Heroes2 Engine: * 5 * http://sourceforge.net/projects/fheroes2 * 6 * * 7 * This program is free software; you can redistribute it and/or modify * 8 * it under the terms of the GNU General Public License as published by * 9 * the Free Software Foundation; either version 2 of the License, or * 10 * (at your option) any later version. * 11 * * 12 * This program is distributed in the hope that it will be useful, * 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 15 * GNU General Public License for more details. * 16 * * 17 * You should have received a copy of the GNU General Public License * 18 * along with this program; if not, write to the * 19 * Free Software Foundation, Inc., * 20 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * 21 ***************************************************************************/ 22 #ifndef H2MP2_H 23 #define H2MP2_H 24 25 #include <cstddef> 26 27 #include "types.h" 28 29 namespace MP2 30 { 31 enum MP2Info 32 { 33 MP2OFFSETDATA = 428, 34 SIZEOFMP2TILE = 20, 35 SIZEOFMP2ADDON = 15, 36 SIZEOFMP2CASTLE = 70, 37 SIZEOFMP2HEROES = 76, 38 SIZEOFMP2SIGN = 10, 39 SIZEOFMP2RUMOR = 9, 40 SIZEOFMP2EVENT = 50, 41 SIZEOFMP2RIDDLE = 138 42 }; 43 44 // origin mp2 tile 45 struct mp2tile_t 46 { 47 uint16_t surfaceType; // Tile index representing a type of surface: ocean, grass, snow, swamp, lava, desert, dirt, wasteland, beach. 48 49 uint8_t objectName1; // Ground (bottom) level object type (first 2 bits) and object tile set (6 bits). Tile set refers to ICN ID. 50 uint8_t level1IcnImageIndex; // ICN image index (image index for corresponding ICN Id) for ground (bottom) object. 255 means it's an empty object. 51 uint8_t quantity1; // Bitfield, first 3 bits are flags, rest is used as quantity 52 uint8_t quantity2; // Used as a part of quantity, field size is actually 13 bits. Has most significant bits 53 uint8_t objectName2; // Top level object type (first 2 bits) and object tile set (6 bits). Tile set refers to ICN ID. 54 uint8_t level2IcnImageIndex; // ICN image index (image index for corresponding ICN Id) for top level object. 255 means it's an empty object. 55 56 // First 2 bits responsible for tile shape (0 - 3). Subsequent 3 bits are still unknown. Possible values are 1 and 5. They are set only for tiles with transition 57 // between land and sea. They can be related to passabilities. 58 uint8_t flags; 59 60 uint8_t mapObjectType; // Object type. Please refer to MapObjectType enumeration. 61 62 uint16_t nextAddonIndex; // Next add-on index. Zero value means it's the last addon chunk. 63 64 // Ground (bottom) level object UID. An object can allocate more than 1 tile. Each tile could have multiple objects pieces. 65 // UID is used to find all pieces/addons which belong to the same object. 66 // In Editor first object will have UID as 0. Then second object placed on the map will have UID 0 + number of pieces / tiles per previous object and etc. 67 uint32_t level1ObjectUID; 68 69 // Top level object UID. An object can allocate more than 1 tile. Each tile could have multiple objects pieces. 70 // UID is used to find all pieces/addons which belong to the same object. 71 // In Editor first object will have UID as 0. Then second object placed on the map will have UID 0 + number of pieces / tiles per previous object and etc. 72 uint32_t level2ObjectUID; 73 }; 74 75 // origin mp2 addons tile 76 struct mp2addon_t 77 { 78 uint16_t nextAddonIndex; // Next add-on index. Zero value means it's the last addon chunk. 79 80 uint8_t objectNameN1; // level 1.N. Last bit indicates if object is animated. Second-last controls overlay 81 uint8_t indexNameN1; // level 1.N or 0xFF 82 uint8_t quantityN; // Bitfield containing metadata 83 uint8_t objectNameN2; // level 2.N 84 uint8_t indexNameN2; // level 1.N or 0xFF 85 86 // Ground (bottom) level object UID. An object can allocate more than 1 tile. Each tile could have multiple objects pieces. 87 // UID is used to find all pieces/addons which belong to the same object. 88 // In Editor first object will have UID as 0. Then second object placed on the map will have UID 0 + number of pieces / tiles per previous object and etc. 89 uint32_t level1ObjectUID; 90 91 // Top level object UID. An object can allocate more than 1 tile. Each tile could have multiple objects pieces. 92 // UID is used to find all pieces/addons which belong to the same object. 93 // In Editor first object will have UID as 0. Then second object placed on the map will have UID 0 + number of pieces / tiles per previous object and etc. 94 uint32_t level2ObjectUID; 95 }; 96 97 // origin mp2 castle 98 // 0x0046 - size 99 struct mp2castle_t 100 { 101 u8 color; // 00 blue, 01 green, 02 red, 03 yellow, 04 orange, 05 purpl, ff unknown 102 bool customBuilding; 103 u16 building; 104 /* 105 0000 0000 0000 0010 Thieve's Guild 106 0000 0000 0000 0100 Tavern 107 0000 0000 0000 1000 Shipyard 108 0000 0000 0001 0000 Well 109 0000 0000 1000 0000 Statue 110 0000 0001 0000 0000 Left Turret 111 0000 0010 0000 0000 Right Turret 112 0000 0100 0000 0000 Marketplace 113 0000 1000 0000 0000 Farm, Garbage He, Crystal Gar, Waterfall, Orchard, Skull Pile 114 0001 0000 0000 0000 Moat 115 0010 0000 0000 0000 Fortification, Coliseum, Rainbow, Dungeon, Library, Storm 116 */ 117 u16 dwelling; 118 /* 119 0000 0000 0000 1000 dweling1 120 0000 0000 0001 0000 dweling2 121 0000 0000 0010 0000 dweling3 122 0000 0000 0100 0000 dweling4 123 0000 0000 1000 0000 dweling5 124 0000 0001 0000 0000 dweling6 125 0000 0010 0000 0000 upgDweling2 126 0000 0100 0000 0000 upgDweling3 127 0000 1000 0000 0000 upgDweling4 128 0001 0000 0000 0000 upgDweling5 129 0010 0000 0000 0000 upgDweling6 130 */ 131 u8 magicTower; 132 bool customTroops; 133 u8 monster1; 134 u8 monster2; 135 u8 monster3; 136 u8 monster4; 137 u8 monster5; 138 u16 count1; 139 u16 count2; 140 u16 count3; 141 u16 count4; 142 u16 count5; 143 bool capitan; 144 bool customCastleName; 145 char castleName[13]; // name + '\0' 146 u8 type; // 00 knight, 01 barb, 02 sorc, 03 warl, 04 wiz, 05 necr, 06 rnd 147 bool castle; 148 u8 allowCastle; // 00 TRUE, 01 FALSE 149 u8 unknown[29]; 150 }; 151 152 // origin mp2 heroes 153 // 0x004c - size 154 struct mp2heroes_t 155 { 156 u8 unknown; 157 bool customTroops; 158 u8 monster1; // 0xff none 159 u8 monster2; // 0xff none 160 u8 monster3; // 0xff none 161 u8 monster4; // 0xff none 162 u8 monster5; // 0xff none 163 u16 countMonter1; 164 u16 countMonter2; 165 u16 countMonter3; 166 u16 countMonter4; 167 u16 countMonter5; 168 u8 customPortrate; 169 u8 portrate; 170 u8 artifact1; // 0xff none 171 u8 artifact2; // 0xff none 172 u8 artifact3; // 0xff none 173 u8 unknown2; // 0 174 u32 exerience; 175 bool customSkill; 176 u8 skill1; // 0xff none 177 u8 skill2; // pathfinding, archery, logistic, scouting, 178 u8 skill3; // diplomacy, navigation, leadership, wisdom, 179 u8 skill4; // mysticism, luck, ballistics, eagle, necromance, estate 180 u8 skill5; 181 u8 skill6; 182 u8 skill7; 183 u8 skill8; 184 u8 skillLevel1; 185 u8 skillLevel2; 186 u8 skillLevel3; 187 u8 skillLevel4; 188 u8 skillLevel5; 189 u8 skillLevel6; 190 u8 skillLevel7; 191 u8 skillLevel8; 192 u8 unknown3; // 0 193 u8 customName; 194 char name[13]; // name + '\0' 195 bool patrol; 196 u8 countSquare; // for patrol 197 u8 unknown4[15]; // 0 198 }; 199 200 // origin mp2 sign or bottle 201 struct mp2info_t 202 { 203 u8 id; // 0x01 204 u8 zero[8]; // 8 byte 0x00 205 char text; // message + '/0' 206 }; 207 208 // origin mp2 event for coord 209 struct mp2eventcoord_t 210 { 211 u8 id; // 0x01 212 u32 wood; 213 u32 mercury; 214 u32 ore; 215 u32 sulfur; 216 u32 crystal; 217 u32 gems; 218 u32 golds; 219 u16 artifact; // 0xffff - none 220 bool computer; // allow events for computer 221 bool cancel; // cancel event after first visit 222 u8 zero[10]; // 10 byte 0x00 223 bool blue; 224 bool green; 225 bool red; 226 bool yellow; 227 bool orange; 228 bool purple; 229 char text; // message + '/0' 230 }; 231 232 // origin mp2 event for day 233 struct mp2eventday_t 234 { 235 u8 id; // 0x00 236 u32 wood; 237 u32 mercury; 238 u32 ore; 239 u32 sulfur; 240 u32 crystal; 241 u32 gems; 242 u32 golds; 243 u16 artifact; // always 0xffff - none 244 u16 computer; // allow events for computer 245 u16 first; // day of first occurent 246 u16 subsequent; // subsequent occurrences 247 u8 zero[6]; // 6 byte 0x00 and end 0x01 248 bool blue; 249 bool green; 250 bool red; 251 bool yellow; 252 bool orange; 253 bool purple; 254 char text; // message + '/0' 255 }; 256 257 // origin mp2 rumor 258 struct mp2rumor_t 259 { 260 u8 id; // 0x00 261 u8 zero[7]; // 7 byte 0x00 262 char text; // message + '/0' 263 }; 264 265 // origin mp2 riddle sphinx 266 struct mp2riddle_t 267 { 268 u8 id; // 0x00 269 u32 wood; 270 u32 mercury; 271 u32 ore; 272 u32 sulfur; 273 u32 crystal; 274 u32 gems; 275 u32 golds; 276 u16 artifact; // 0xffff - none 277 u8 count; // count answers (1, 8) 278 char answer1[13]; 279 char answer2[13]; 280 char answer3[13]; 281 char answer4[13]; 282 char answer5[13]; 283 char answer6[13]; 284 char answer7[13]; 285 char answer8[13]; 286 char text; // message + '/0' 287 }; 288 289 /////////////////////////////////////////////////////////////////////////////// 290 // First bit indicates if you can interact with object 291 enum MapObjectType 292 { 293 OBJ_ZERO = 0x00, 294 OBJN_ALCHEMYLAB = 0x01, 295 OBJ_UNKNW_02 = 0x02, 296 OBJ_UNKNW_03 = 0x03, 297 OBJN_SKELETON = 0x04, 298 OBJN_DAEMONCAVE = 0x05, 299 OBJ_UNKNW_06 = 0x06, 300 OBJN_FAERIERING = 0x07, 301 OBJ_UNKNW_08 = 0x08, 302 OBJ_UNKNW_09 = 0x09, 303 OBJN_GAZEBO = 0x0A, 304 OBJ_UNKNW_0B = 0x0B, 305 OBJN_GRAVEYARD = 0x0C, 306 OBJN_ARCHERHOUSE = 0x0D, 307 OBJ_UNKNW_0E = 0x0E, 308 OBJN_DWARFCOTT = 0x0F, 309 310 OBJN_PEASANTHUT = 0x10, 311 OBJ_UNKNW_11 = 0x11, 312 OBJ_UNKNW_12 = 0x12, 313 OBJ_UNKNW_13 = 0x13, 314 OBJN_DRAGONCITY = 0x14, 315 OBJN_LIGHTHOUSE = 0x15, 316 OBJN_WATERWHEEL = 0x16, 317 OBJN_MINES = 0x17, 318 OBJ_UNKNW_18 = 0x18, 319 OBJN_OBELISK = 0x19, 320 OBJN_OASIS = 0x1A, 321 OBJ_UNKNW_1B = 0x1B, 322 OBJ_COAST = 0x1C, 323 OBJN_SAWMILL = 0x1D, 324 OBJN_ORACLE = 0x1E, 325 OBJ_UNKNW_1F = 0x1F, 326 327 OBJN_SHIPWRECK = 0x20, 328 OBJ_UNKNW_21 = 0x21, 329 OBJN_DESERTTENT = 0x22, 330 OBJN_CASTLE = 0x23, 331 OBJN_STONELITHS = 0x24, 332 OBJN_WAGONCAMP = 0x25, 333 OBJ_UNKNW_26 = 0x26, 334 OBJ_UNKNW_27 = 0x27, 335 OBJN_WINDMILL = 0x28, 336 OBJ_UNKNW_29 = 0x29, 337 OBJ_UNKNW_2A = 0x2A, 338 OBJ_UNKNW_2B = 0x2B, 339 OBJ_UNKNW_2C = 0x2C, 340 OBJ_UNKNW_2D = 0x2D, 341 OBJ_UNKNW_2E = 0x2E, 342 OBJ_UNKNW_2F = 0x2F, 343 344 OBJN_RNDTOWN = 0x30, 345 OBJN_RNDCASTLE = 0x31, 346 OBJ_UNKNW_32 = 0x32, 347 OBJ_UNKNW_33 = 0x33, 348 OBJ_UNKNW_34 = 0x34, 349 OBJ_UNKNW_35 = 0x35, 350 OBJ_UNKNW_36 = 0x36, 351 OBJ_UNKNW_37 = 0x37, 352 OBJ_NOTHINGSPECIAL = 0x38, 353 OBJ_NOTHINGSPECIAL2 = 0x39, 354 OBJN_WATCHTOWER = 0x3A, 355 OBJN_TREEHOUSE = 0x3B, 356 OBJN_TREECITY = 0x3C, 357 OBJN_RUINS = 0x3D, 358 OBJN_FORT = 0x3E, 359 OBJN_TRADINGPOST = 0x3F, 360 361 OBJN_ABANDONEDMINE = 0x40, 362 OBJ_UNKNW_41 = 0x41, 363 OBJ_UNKNW_42 = 0x42, 364 OBJ_UNKNW_43 = 0x43, 365 OBJN_TREEKNOWLEDGE = 0x44, 366 OBJN_DOCTORHUT = 0x45, 367 OBJN_TEMPLE = 0x46, 368 OBJN_HILLFORT = 0x47, 369 OBJN_HALFLINGHOLE = 0x48, 370 OBJN_MERCENARYCAMP = 0x49, 371 OBJ_UNKNW_4A = 0x4A, 372 OBJ_UNKNW_4B = 0x4B, 373 OBJN_PYRAMID = 0x4C, 374 OBJN_CITYDEAD = 0x4D, 375 OBJN_EXCAVATION = 0x4E, 376 OBJN_SPHINX = 0x4F, 377 378 OBJ_UNKNW_50 = 0x50, 379 OBJ_TARPIT = 0x51, 380 OBJN_ARTESIANSPRING = 0x52, 381 OBJN_TROLLBRIDGE = 0x53, 382 OBJN_WATERINGHOLE = 0x54, 383 OBJN_WITCHSHUT = 0x55, 384 OBJN_XANADU = 0x56, 385 OBJN_CAVE = 0x57, 386 OBJ_UNKNW_58 = 0x58, 387 OBJN_MAGELLANMAPS = 0x59, 388 OBJ_UNKNW_5A = 0x5A, 389 OBJN_DERELICTSHIP = 0x5B, 390 OBJ_UNKNW_5C = 0x5C, 391 OBJ_UNKNW_5D = 0x5D, 392 OBJN_MAGICWELL = 0x5E, 393 OBJ_UNKNW_5F = 0x5F, 394 395 OBJN_OBSERVATIONTOWER = 0x60, 396 OBJN_FREEMANFOUNDRY = 0x61, 397 OBJ_UNKNW_62 = 0x62, 398 OBJ_TREES = 0x63, 399 OBJ_MOUNTS = 0x64, 400 OBJ_VOLCANO = 0x65, 401 OBJ_FLOWERS = 0x66, 402 OBJ_STONES = 0x67, 403 OBJ_WATERLAKE = 0x68, 404 OBJ_MANDRAKE = 0x69, 405 OBJ_DEADTREE = 0x6A, 406 OBJ_STUMP = 0x6B, 407 OBJ_CRATER = 0x6C, 408 OBJ_CACTUS = 0x6D, 409 OBJ_MOUND = 0x6E, 410 OBJ_DUNE = 0x6F, 411 412 OBJ_LAVAPOOL = 0x70, 413 OBJ_SHRUB = 0x71, 414 OBJN_ARENA = 0x72, 415 OBJN_BARROWMOUNDS = 0x73, 416 OBJN_MERMAID = 0x74, 417 OBJN_SIRENS = 0x75, 418 OBJN_HUTMAGI = 0x76, 419 OBJN_EYEMAGI = 0x77, 420 OBJN_TRAVELLERTENT = 0x78, 421 OBJ_UNKNW_79 = 0x79, 422 OBJ_UNKNW_7A = 0x7A, 423 OBJN_JAIL = 0x7B, 424 OBJN_FIREALTAR = 0x7C, 425 OBJN_AIRALTAR = 0x7D, 426 OBJN_EARTHALTAR = 0x7E, 427 OBJN_WATERALTAR = 0x7F, 428 429 OBJ_WATERCHEST = 0x80, 430 OBJ_ALCHEMYLAB = 0x81, 431 OBJ_SIGN = 0x82, 432 OBJ_BUOY = 0x83, 433 OBJ_SKELETON = 0x84, 434 OBJ_DAEMONCAVE = 0x85, 435 OBJ_TREASURECHEST = 0x86, 436 OBJ_FAERIERING = 0x87, 437 OBJ_CAMPFIRE = 0x88, 438 OBJ_FOUNTAIN = 0x89, 439 OBJ_GAZEBO = 0x8A, 440 OBJ_ANCIENTLAMP = 0x8B, 441 OBJ_GRAVEYARD = 0x8C, 442 OBJ_ARCHERHOUSE = 0x8D, 443 OBJ_GOBLINHUT = 0x8E, 444 OBJ_DWARFCOTT = 0x8F, 445 446 OBJ_PEASANTHUT = 0x90, 447 OBJ_UNKNW_91 = 0x91, 448 OBJ_UNKNW_92 = 0x92, 449 OBJ_EVENT = 0x93, 450 OBJ_DRAGONCITY = 0x94, 451 OBJ_LIGHTHOUSE = 0x95, 452 OBJ_WATERWHEEL = 0x96, 453 OBJ_MINES = 0x97, 454 OBJ_MONSTER = 0x98, 455 OBJ_OBELISK = 0x99, 456 OBJ_OASIS = 0x9A, 457 OBJ_RESOURCE = 0x9B, 458 OBJ_UNKNW_9C = 0x9C, 459 OBJ_SAWMILL = 0x9D, 460 OBJ_ORACLE = 0x9E, 461 OBJ_SHRINE1 = 0x9F, 462 463 OBJ_SHIPWRECK = 0xA0, 464 OBJ_UNKNW_A1 = 0xA1, 465 OBJ_DESERTTENT = 0xA2, 466 OBJ_CASTLE = 0xA3, 467 OBJ_STONELITHS = 0xA4, 468 OBJ_WAGONCAMP = 0xA5, 469 OBJ_UNKNW_A6 = 0xA6, 470 OBJ_WHIRLPOOL = 0xA7, 471 OBJ_WINDMILL = 0xA8, 472 OBJ_ARTIFACT = 0xA9, 473 OBJ_UNKNW_AA = 0xAA, 474 OBJ_BOAT = 0xAB, 475 OBJ_RNDULTIMATEARTIFACT = 0xAC, 476 OBJ_RNDARTIFACT = 0xAD, 477 OBJ_RNDRESOURCE = 0xAE, 478 OBJ_RNDMONSTER = 0xAF, 479 480 OBJ_RNDTOWN = 0xB0, 481 OBJ_RNDCASTLE = 0xB1, 482 OBJ_UNKNW_B2 = 0xB2, 483 OBJ_RNDMONSTER1 = 0xB3, 484 OBJ_RNDMONSTER2 = 0xB4, 485 OBJ_RNDMONSTER3 = 0xB5, 486 OBJ_RNDMONSTER4 = 0xB6, 487 OBJ_HEROES = 0xB7, 488 OBJ_UNKNW_B8 = 0xB8, 489 OBJ_UNKNW_B9 = 0xB9, 490 OBJ_WATCHTOWER = 0xBA, 491 OBJ_TREEHOUSE = 0xBB, 492 OBJ_TREECITY = 0xBC, 493 OBJ_RUINS = 0xBD, 494 OBJ_FORT = 0xBE, 495 OBJ_TRADINGPOST = 0xBF, 496 497 OBJ_ABANDONEDMINE = 0xC0, 498 OBJ_THATCHEDHUT = 0xC1, 499 OBJ_STANDINGSTONES = 0xC2, 500 OBJ_IDOL = 0xC3, 501 OBJ_TREEKNOWLEDGE = 0xC4, 502 OBJ_DOCTORHUT = 0xC5, 503 OBJ_TEMPLE = 0xC6, 504 OBJ_HILLFORT = 0xC7, 505 OBJ_HALFLINGHOLE = 0xC8, 506 OBJ_MERCENARYCAMP = 0xC9, 507 OBJ_SHRINE2 = 0xCA, 508 OBJ_SHRINE3 = 0xCB, 509 OBJ_PYRAMID = 0xCC, 510 OBJ_CITYDEAD = 0xCD, 511 OBJ_EXCAVATION = 0xCE, 512 OBJ_SPHINX = 0xCF, 513 514 OBJ_WAGON = 0xD0, 515 OBJ_UNKNW_D1 = 0xD1, 516 OBJ_ARTESIANSPRING = 0xD2, 517 OBJ_TROLLBRIDGE = 0xD3, 518 OBJ_WATERINGHOLE = 0xD4, 519 OBJ_WITCHSHUT = 0xD5, 520 OBJ_XANADU = 0xD6, 521 OBJ_CAVE = 0xD7, 522 OBJ_LEANTO = 0xD8, 523 OBJ_MAGELLANMAPS = 0xD9, 524 OBJ_FLOTSAM = 0xDA, 525 OBJ_DERELICTSHIP = 0xDB, 526 OBJ_SHIPWRECKSURVIROR = 0xDC, 527 OBJ_BOTTLE = 0xDD, 528 OBJ_MAGICWELL = 0xDE, 529 OBJ_MAGICGARDEN = 0xDF, 530 531 OBJ_OBSERVATIONTOWER = 0xE0, 532 OBJ_FREEMANFOUNDRY = 0xE1, 533 OBJ_UNKNW_E2 = 0xE2, 534 OBJ_UNKNW_E3 = 0xE3, 535 OBJ_UNKNW_E4 = 0xE4, 536 OBJ_UNKNW_E5 = 0xE5, 537 OBJ_UNKNW_E6 = 0xE6, 538 OBJ_UNKNW_E7 = 0xE7, 539 OBJ_UNKNW_E8 = 0xE8, 540 OBJ_REEFS = 0xE9, 541 OBJN_ALCHEMYTOWER = 0xEA, 542 OBJN_STABLES = 0xEB, 543 OBJ_MERMAID = 0xEC, 544 OBJ_SIRENS = 0xED, 545 OBJ_HUTMAGI = 0xEE, 546 OBJ_EYEMAGI = 0xEF, 547 548 OBJ_ALCHEMYTOWER = 0xF0, 549 OBJ_STABLES = 0xF1, 550 OBJ_ARENA = 0xF2, 551 OBJ_BARROWMOUNDS = 0xF3, 552 OBJ_RNDARTIFACT1 = 0xF4, 553 OBJ_RNDARTIFACT2 = 0xF5, 554 OBJ_RNDARTIFACT3 = 0xF6, 555 OBJ_BARRIER = 0xF7, 556 OBJ_TRAVELLERTENT = 0xF8, 557 OBJ_UNKNW_F9 = 0xF9, 558 OBJ_UNKNW_FA = 0xFA, 559 OBJ_JAIL = 0xFB, 560 OBJ_FIREALTAR = 0xFC, 561 OBJ_AIRALTAR = 0xFD, 562 OBJ_EARTHALTAR = 0xFE, 563 OBJ_WATERALTAR = 0xFF 564 }; 565 566 // Return Icn ID related to this tileset value. 567 int GetICNObject( const uint8_t tileset ); 568 569 const char * StringObject( const MapObjectType objectType ); 570 571 // This function returns plural forms only for certain object types. 572 const char * getPluralObjectName( const MapObjectType objectType, const size_t count ); 573 574 bool isHiddenForPuzzle( uint8_t tileset, uint8_t index ); 575 576 // The method check whether the object is an action object depending on its location. For example, castle can't be located on water. 577 bool isActionObject( const MapObjectType objectType, const bool locatesOnWater ); 578 579 // The method checks if the object is an action independent form its location. 580 bool isActionObject( const MapObjectType objectType ); 581 582 // Returns proper object type if the object is an action object. Otherwise it returns the object type itself. 583 MapObjectType getBaseActionObjectType( const MapObjectType objectType ); 584 585 bool isWaterActionObject( const MapObjectType objectType ); 586 587 bool isQuantityObject( const MapObjectType objectType ); 588 bool isCaptureObject( const MapObjectType objectType ); 589 bool isPickupObject( const MapObjectType objectType ); 590 bool isArtifactObject( const MapObjectType objectType ); 591 bool isHeroUpgradeObject( const MapObjectType objectType ); 592 bool isMonsterDwelling( const MapObjectType objectType ); 593 bool isRemoveObject( const MapObjectType objectType ); 594 bool isAbandonedMine( const MapObjectType objectType ); 595 bool isProtectedObject( const MapObjectType objectType ); 596 597 bool isNeedStayFront( const MapObjectType objectType ); 598 599 bool isAccessibleFromBeach( const MapObjectType objectType ); 600 601 bool isDayLife( const MapObjectType objectType ); 602 bool isWeekLife( const MapObjectType objectType ); 603 bool isMonthLife( const MapObjectType objectType ); 604 bool isBattleLife( const MapObjectType objectType ); 605 606 // Make sure that you pass a valid action object. 607 int getActionObjectDirection( const MapObjectType objectType ); 608 } 609 610 #endif 611