mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-08 21:47:42 +00:00
Char16 refactor and GuiSys bug fixes
This commit is contained in:
@@ -29,7 +29,7 @@ ECardResult CMemoryCardDriver::SFileInfo::Close()
|
||||
ECardResult CMemoryCardDriver::SFileInfo::StartRead()
|
||||
{
|
||||
CMemoryCardSys::CardStat stat = {};
|
||||
ECardResult result = CMemoryCardSys::GetStatus(x0_fileInfo, stat);
|
||||
ECardResult result = CMemoryCardSys::GetStatus(x0_fileInfo.slot, x0_fileInfo.getFileNo(), stat);
|
||||
if (result != ECardResult::READY)
|
||||
return result;
|
||||
|
||||
@@ -78,7 +78,7 @@ ECardResult CMemoryCardDriver::SFileInfo::FileRead()
|
||||
ECardResult CMemoryCardDriver::SFileInfo::GetSaveDataOffset(u32& offOut)
|
||||
{
|
||||
CMemoryCardSys::CardStat stat = {};
|
||||
ECardResult result = CMemoryCardSys::GetStatus(x0_fileInfo, stat);
|
||||
ECardResult result = CMemoryCardSys::GetStatus(x0_fileInfo.slot, x0_fileInfo.getFileNo(), stat);
|
||||
if (result != ECardResult::READY)
|
||||
{
|
||||
offOut = -1;
|
||||
@@ -189,7 +189,8 @@ void CMemoryCardDriver::ReadFinished()
|
||||
{
|
||||
CMemoryCardSys::CardStat stat = {};
|
||||
SFileInfo& fileInfo = x100_mcFileInfos[x194_fileIdx].second;
|
||||
if (CMemoryCardSys::GetStatus(fileInfo.x0_fileInfo, stat) != ECardResult::READY)
|
||||
if (CMemoryCardSys::GetStatus(fileInfo.x0_fileInfo.slot,
|
||||
fileInfo.x0_fileInfo.getFileNo(), stat) != ECardResult::READY)
|
||||
{
|
||||
NoCardFound();
|
||||
return;
|
||||
@@ -201,7 +202,8 @@ void CMemoryCardDriver::ReadFinished()
|
||||
r.readBytesToBuf(x30_systemData, 174);
|
||||
|
||||
for (int i=0 ; i<3 ; ++i)
|
||||
xe4_fileSlots[i] = LoadSaveFile(r);
|
||||
if (header.x4_savePresent[i])
|
||||
xe4_fileSlots[i] = LoadSaveFile(r);
|
||||
|
||||
if (x19d_inGame)
|
||||
ImportPersistentOptions();
|
||||
@@ -245,7 +247,8 @@ void CMemoryCardDriver::IndexFiles()
|
||||
else if (result == ECardResult::READY)
|
||||
{
|
||||
CMemoryCardSys::CardStat stat = {};
|
||||
if (CMemoryCardSys::GetStatus(info.second.x0_fileInfo, stat) ==
|
||||
if (CMemoryCardSys::GetStatus(info.second.x0_fileInfo.slot,
|
||||
info.second.x0_fileInfo.getFileNo(), stat) ==
|
||||
ECardResult::READY)
|
||||
{
|
||||
u32 comment = stat.GetCommentAddr();
|
||||
@@ -278,11 +281,13 @@ void CMemoryCardDriver::IndexFiles()
|
||||
if (x100_mcFileInfos[1].first == EFileState::File)
|
||||
{
|
||||
CMemoryCardSys::CardStat stat = {};
|
||||
if (CMemoryCardSys::GetStatus(x100_mcFileInfos[0].second.x0_fileInfo, stat) ==
|
||||
if (CMemoryCardSys::GetStatus(x100_mcFileInfos[0].second.x0_fileInfo.slot,
|
||||
x100_mcFileInfos[0].second.x0_fileInfo.getFileNo(), stat) ==
|
||||
ECardResult::READY)
|
||||
{
|
||||
u32 timeA = stat.GetTime();
|
||||
if (CMemoryCardSys::GetStatus(x100_mcFileInfos[1].second.x0_fileInfo, stat) ==
|
||||
if (CMemoryCardSys::GetStatus(x100_mcFileInfos[1].second.x0_fileInfo.slot,
|
||||
x100_mcFileInfos[1].second.x0_fileInfo.getFileNo(), stat) ==
|
||||
ECardResult::READY)
|
||||
{
|
||||
u32 timeB = stat.GetTime();
|
||||
|
||||
Reference in New Issue
Block a user