| 1298 | } |
| 1299 | } |
| 1300 | void freadint(unsigned int& value, FILE* file) |
| 1301 | { |
| 1302 | int rv = 0; |
| 1303 | for(int i=0;i<4;i++) |
| 1304 | { |
| 1305 | int r = 0; |
| 1306 | if ( fread(&r, 1, 1, file) == 0) |
| 1307 | { |
| 1308 | break; |
| 1309 | } |
| 1310 | rv |= r << (i*8); |
| 1311 | } |
| 1312 | value = rv; |
| 1313 | } |
| 1314 | |
| 1315 | // writes all records to an already-open file |
| 1316 | void LuaSaveData::ExportRecords(void* fileV) const |