MCPcopy Create free account
hub / github.com/doldecomp/mkdd / checkFree

Function checkFree

src/Osako/CardAgent.cpp:630–666  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

628 }
629
630 void checkFree()
631 {
632 s32 byteNotUsed = CardMgr::msaCardData[msChan].mByteNotUsed;
633 u32 fileSize = mspSaveFile->getFileSize();
634 if (byteNotUsed < fileSize)
635 {
636 msState = 4;
637 msSelectAt = 11;
638 mspPrintMemoryCard->init(PrintMemoryCard::mcNoSpaceGoIPL);
639 return;
640 }
641
642 if (CardMgr::msaCardData[msChan].mFilesNotUsed > 0)
643 {
644 msState = 4;
645 switch (msCommand)
646 {
647 case mcCommand2:
648 msSelectAt = 10;
649 mspPrintMemoryCard->init(PrintMemoryCard::mcMakeFile);
650 break;
651 case mcCommand5:
652 CardMgr::createFile(msChan, mspSaveFile);
653 msState = 8;
654 break;
655 default:
656#line 726
657 JUT_PANIC("checkFree");
658 break;
659 }
660 return;
661 }
662
663 msState = 4;
664 msSelectAt = 12;
665 mspPrintMemoryCard->init(PrintMemoryCard::mcTooManyFilesGoIPL);
666 }
667
668 void open()
669 {

Callers 2

waitCheckFunction · 0.85
openFunction · 0.85

Calls 3

createFileFunction · 0.85
getFileSizeMethod · 0.45
initMethod · 0.45

Tested by

no test coverage detected