- dest.write(static_cast<char const *>(static_cast<void const *>(head)), sizeof(head));
- dest.write(static_cast<char const *>(static_cast<void const *>(spos)), sizeof(spos));
+ uint8_t lives = 3;
+ {
+ std::map<char, std::string>::const_iterator iter = level_params.find('L');
+ if(iter != level_params.end()) {
+ unsigned x;
+ std::istringstream parser(iter->second);
+ if(parser >> x) {
+ lives = static_cast<uint8_t>(x);
+ }
+ }
+ }
+
+ dest.write(static_cast<char const *>(static_cast<void const *>(head )), sizeof(head ));
+ dest.write(static_cast<char const *>(static_cast<void const *>(spos )), sizeof(spos ));
+ dest.write(static_cast<char const *>(static_cast<void const *>(&lives)), sizeof(lives));