1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-15 00:05:02 +02:00

Remove bitmasks of PlayerColor's. Add encode/decode methods

This commit is contained in:
Ivan Savenko
2023-08-25 21:40:19 +03:00
parent f79492e5b0
commit a30e7ba321
13 changed files with 56 additions and 142 deletions

View File

@ -692,7 +692,7 @@ void CMapLoaderH3M::readDisposedHeroes()
map->disposedHeroes[g].heroId = reader->readHero().getNum();
map->disposedHeroes[g].portrait = reader->readHeroPortrait();
map->disposedHeroes[g].name = readLocalizedString(TextIdentifier("header", "heroes", map->disposedHeroes[g].heroId));
map->disposedHeroes[g].players = reader->readUInt8();
reader->readBitmaskPlayers(map->disposedHeroes[g].players, false);
}
}
}
@ -995,7 +995,7 @@ CGObjectInstance * CMapLoaderH3M::readEvent(const int3 & mapPosition)
readBoxContent(object, mapPosition);
object->availableFor = reader->readUInt8();
reader->readBitmaskPlayers(object->availableFor, false);
object->computerActivate = reader->readBool();
object->removeAfterVisit = reader->readBool();