equal
deleted
inserted
replaced
216 * @return Return the value of the index |
216 * @return Return the value of the index |
217 */ |
217 */ |
218 static uint SlReadSimpleGamma() |
218 static uint SlReadSimpleGamma() |
219 { |
219 { |
220 uint i = SlReadByte(); |
220 uint i = SlReadByte(); |
221 if (HASBIT(i, 7)) { |
221 if (HasBit(i, 7)) { |
222 i &= ~0x80; |
222 i &= ~0x80; |
223 if (HASBIT(i, 6)) { |
223 if (HasBit(i, 6)) { |
224 i &= ~0x40; |
224 i &= ~0x40; |
225 if (HASBIT(i, 5)) { |
225 if (HasBit(i, 5)) { |
226 i &= ~0x20; |
226 i &= ~0x20; |
227 if (HASBIT(i, 4)) |
227 if (HasBit(i, 4)) |
228 SlError(STR_GAME_SAVELOAD_ERROR_BROKEN_SAVEGAME, "Unsupported gamma"); |
228 SlError(STR_GAME_SAVELOAD_ERROR_BROKEN_SAVEGAME, "Unsupported gamma"); |
229 i = (i << 8) | SlReadByte(); |
229 i = (i << 8) | SlReadByte(); |
230 } |
230 } |
231 i = (i << 8) | SlReadByte(); |
231 i = (i << 8) | SlReadByte(); |
232 } |
232 } |