| 1217 | } |
| 1218 | |
| 1219 | S32 xSG_ld_readhead(st_XSAVEGAME_DATA* xsgdata) |
| 1220 | { |
| 1221 | S32 result = 1; |
| 1222 | S32 ival = 0; |
| 1223 | bool not_ok = 0; |
| 1224 | |
| 1225 | xsgdata->walkpos = xsgdata->loadbuf; |
| 1226 | xsgdata->walkremain = xsgdata->loadsize; |
| 1227 | xSGReadData(xsgdata, NULL, &ival, 1); |
| 1228 | |
| 1229 | if (ival != 'GDAT') |
| 1230 | { |
| 1231 | result = 0; |
| 1232 | not_ok = 1; |
| 1233 | } |
| 1234 | |
| 1235 | xSGReadData(xsgdata, NULL, &ival, 1); |
| 1236 | if (ival != 1) |
| 1237 | { |
| 1238 | result = 0; |
| 1239 | not_ok = 1; |
| 1240 | } |
| 1241 | |
| 1242 | xSGReadData(xsgdata, NULL, &ival, 1); |
| 1243 | xsgdata->readsize = ival; |
| 1244 | |
| 1245 | xSGReadData(xsgdata, NULL, &ival, 1); |
| 1246 | xsgdata->file_chksum = ival; |
| 1247 | if (not_ok) |
| 1248 | { |
| 1249 | return -1; |
| 1250 | } |
| 1251 | return result; |
| 1252 | } |
| 1253 | |
| 1254 | S32 xSG_ld_validate(st_XSAVEGAME_DATA* xsgdata) |
| 1255 | { |
no test coverage detected