MCPcopy Create free account
hub / github.com/bfbbdecomp/bfbb / xSGWrapup

Function xSGWrapup

src/SB/Core/x/xsavegame.cpp:555–636  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

553}
554
555S32 xSGWrapup(st_XSAVEGAME_DATA* xsgdata)
556{
557 S32 result = 1;
558 S32 rc = 0;
559
560 if (xsgdata->stage & 0x40000000)
561 {
562 result = 0;
563 }
564 else if (!(xsgdata->stage & 1))
565 {
566 result = 0;
567 }
568 else if (!(xsgdata->stage & 0x10))
569 {
570 result = 0;
571 xsgdata->stage |= 0x40000000;
572 }
573
574 if (xsgdata->mode != XSG_MODE_LOAD)
575 {
576 return result;
577 }
578 if (result == 0)
579 {
580 return result;
581 }
582
583 if (result != 0)
584 {
585 rc = xSG_ld_readhead(xsgdata);
586 }
587 if (rc < 0)
588 {
589 xsgdata->stage |= 0x40000000;
590 return -1;
591 }
592
593 if (rc == 0)
594 {
595 result = 0;
596 }
597 if (result != 0)
598 {
599 rc = xSG_ld_validate(xsgdata);
600 }
601
602 if (rc < 0)
603 {
604 xsgdata->stage |= 0x40000000;
605 return -1;
606 }
607
608 if (rc == 0)
609 {
610 result = 0;
611 }
612 if (result != 0)

Callers 3

zSaveLoad_DoAutoSaveFunction · 0.50
zSaveLoad_SaveGameFunction · 0.50
zSaveLoad_LoadGameFunction · 0.50

Calls 4

xSG_ld_validateFunction · 0.85
xSG_ld_readheadFunction · 0.70
xSG_ld_findcltblkFunction · 0.70
xSG_ld_fliploadFunction · 0.70

Tested by

no test coverage detected