* Load the tile from binary. * @param buffer Pointer to buffer. * @param serKey Serialization key. */
| 109 | * @param serKey Serialization key. |
| 110 | */ |
| 111 | void Tile::loadBinary(Uint8 *buffer, Tile::SerializationKey& serKey) |
| 112 | { |
| 113 | _mapDataID[0] = unserializeInt(&buffer, serKey._mapDataID); |
| 114 | _mapDataID[1] = unserializeInt(&buffer, serKey._mapDataID); |
| 115 | _mapDataID[2] = unserializeInt(&buffer, serKey._mapDataID); |
| 116 | _mapDataID[3] = unserializeInt(&buffer, serKey._mapDataID); |
| 117 | _mapDataSetID[0] = unserializeInt(&buffer, serKey._mapDataSetID); |
| 118 | _mapDataSetID[1] = unserializeInt(&buffer, serKey._mapDataSetID); |
| 119 | _mapDataSetID[2] = unserializeInt(&buffer, serKey._mapDataSetID); |
| 120 | _mapDataSetID[3] = unserializeInt(&buffer, serKey._mapDataSetID); |
| 121 | |
| 122 | _smoke = unserializeInt(&buffer, serKey._smoke); |
| 123 | _fire = unserializeInt(&buffer, serKey._fire); |
| 124 | |
| 125 | Uint8 boolFields = unserializeInt(&buffer, serKey.boolFields); |
| 126 | _discovered[0] = (boolFields & 1) ? true : false; |
| 127 | _discovered[1] = (boolFields & 2) ? true : false; |
| 128 | _discovered[2] = (boolFields & 4) ? true : false; |
| 129 | _currentFrame[1] = (boolFields & 8) ? 7 : 0; |
| 130 | _currentFrame[2] = (boolFields & 0x10) ? 7 : 0; |
| 131 | } |
| 132 | |
| 133 | |
| 134 | /** |