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

Function zSaveLoad_CardCheckGamesSingle

src/SB/Game/zSaveLoad.cpp:952–985  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

950}
951
952S32 zSaveLoad_CardCheckGamesSingle(S32 cardNumber)
953{
954 st_XSAVEGAME_DATA* ldinst = xSGInit(XSG_MODE_LOAD);
955 S32 tgtmax;
956 int rc = 0;
957
958 switch (xSGTgtCount(ldinst, &tgtmax))
959 {
960 case 2:
961 rc = zSaveLoad_CardCheckGamesSingle_doCheck(ldinst, cardNumber);
962 if (rc != 0)
963 {
964 rc = 1;
965 }
966 break;
967 case 1:
968 S32 idx = xSGTgtPhysSlotIdx(ldinst, 0);
969 if (idx != cardNumber)
970 {
971 rc = 5;
972 }
973 if (!(idx ^ cardNumber))
974 {
975 rc = zSaveLoad_CardCheckGamesSingle_doCheck(ldinst, 0);
976 }
977 break;
978 case 0:
979 rc = 5;
980 break;
981 }
982
983 xSGDone(ldinst);
984 return rc;
985}
986
987S32 zSaveLoad_CardCheckSlotEmpty_hasGame_doCheck(st_XSAVEGAME_DATA* xsgdata, S32 cardNumber,
988 S32 gameNumber)

Callers 1

zSaveLoad_CardCheckGamesFunction · 0.70

Calls 5

xSGTgtPhysSlotIdxFunction · 0.85
xSGInitFunction · 0.50
xSGTgtCountFunction · 0.50
xSGDoneFunction · 0.50

Tested by

no test coverage detected