mirror of
https://github.com/rvtr/ctr_Repair.git
synced 2025-10-31 13:51:08 -04:00
66 lines
1.6 KiB
C++
66 lines
1.6 KiB
C++
/*---------------------------------------------------------------------------*
|
|
Project: Horizon
|
|
File: irp.h
|
|
|
|
Copyright (C)2009 Nintendo Co., Ltd. All rights reserved.
|
|
|
|
These coded instructions, statements, and computer programs contain
|
|
proprietary information of Nintendo of America Inc. and/or Nintendo
|
|
Company Ltd., and are protected by Federal copyright law. They may
|
|
not be disclosed to third parties or copied or duplicated in any form,
|
|
in whole or in part, without the prior written consent of Nintendo.
|
|
|
|
$Rev$
|
|
*---------------------------------------------------------------------------*/
|
|
|
|
#ifndef SAVEDATA_H_
|
|
#define SAVEDATA_H_
|
|
|
|
#include <nn/types.h>
|
|
#include <nn/Result.h>
|
|
//#include <nn/am/am_ApiSystemMenu.h>
|
|
#include "../my_defs.h"
|
|
#include "savefile.h"
|
|
|
|
|
|
class SaveData
|
|
{
|
|
public:
|
|
s64 FileSize;
|
|
nn::Result LastNnResult;
|
|
char PrdCode[20];
|
|
private:
|
|
nn::fs::FileReader reader;
|
|
nn::fs::FileWriter writer;
|
|
int s_lv;
|
|
wchar_t *pPathTop;
|
|
tArcInfo m_info;
|
|
bool s_serch;
|
|
u8 pad[3];//padding
|
|
public:
|
|
SaveData();
|
|
~SaveData();
|
|
myResult Mount();
|
|
void Unmount();
|
|
myResult GetPath(wchar_t *path);
|
|
void ResetPath();
|
|
bool Open(wchar_t *path);
|
|
void Finalize();
|
|
void Close();
|
|
void CloseW();
|
|
s32 Read(char *buffer,size_t size);
|
|
myResult IsExist();
|
|
bool GetInfo(tArcInfo *pinfo);
|
|
myResult Format(tArcInfo *pinfo);
|
|
bool OpenW(wchar_t *path,s64 size,bool *mkdir);
|
|
s32 Write(char *buffer,size_t size);
|
|
bool Commit();
|
|
bool GetPrdCode();
|
|
#ifdef USE_SYS_SAVE
|
|
void Delete();
|
|
#endif
|
|
};
|
|
|
|
|
|
#endif
|