| 760 | } |
| 761 | |
| 762 | S32 zSaveLoad_CardCheckSingle(S32 cardNumber) |
| 763 | { |
| 764 | st_XSAVEGAME_DATA* ldinst = xSGInit(XSG_MODE_LOAD); |
| 765 | S32 wrongDevice; |
| 766 | S32 tgtmax; |
| 767 | |
| 768 | switch (xSGTgtCount(ldinst, &tgtmax)) |
| 769 | { |
| 770 | case 2: |
| 771 | xSGDone(ldinst); |
| 772 | return 1; |
| 773 | case 1: |
| 774 | int idx = xSGTgtPhysSlotIdx(ldinst, 0); |
| 775 | xSGDone(ldinst); |
| 776 | wrongDevice = iSGCheckForWrongDevice(); |
| 777 | if (wrongDevice >= 0 && wrongDevice == cardNumber) |
| 778 | { |
| 779 | return 9; |
| 780 | } |
| 781 | else |
| 782 | { |
| 783 | if (idx == cardNumber) |
| 784 | { |
| 785 | return 1; |
| 786 | } |
| 787 | else |
| 788 | { |
| 789 | return 0; |
| 790 | } |
| 791 | } |
| 792 | case 0: |
| 793 | wrongDevice = iSGCheckForWrongDevice(); |
| 794 | if (wrongDevice >= 0) |
| 795 | { |
| 796 | xSGDone(ldinst); |
| 797 | return wrongDevice == cardNumber ? 9 : 0; |
| 798 | } |
| 799 | xSGDone(ldinst); |
| 800 | return 0; |
| 801 | } |
| 802 | return -1; |
| 803 | } |
| 804 | |
| 805 | S32 zSaveLoad_CardCheckFormattedSingle(S32 cardNumber) |
| 806 | { |
no test coverage detected