rpcsx/rpcs3/Loader/TRP.h
Alexandro Sánchez Bach cf4501fe41 cellGame, cellSysutil and TRP installer improved
* TRP Loader and sceNpTrophyRegisterContext improved.
* cellSysutil constants moved to cellSysutil.h
* cellGameBootCheck bug fixed that makes size->hddFreeSizeKB be 0.
* Added system language selector (this is *not* RPCS3's language).
cellSysutilGetSystemParamInt(0x111) will return the selected language.

NOTE: The problems caused by the last commit (pull request #104 merged)
are not yet fixed.
2014-03-17 20:34:19 +01:00

42 lines
795 B
C++

#pragma once
#include "Loader.h"
struct TRPHeader
{
be_t<u32> trp_magic;
be_t<u32> trp_version;
be_t<u64> trp_file_size;
be_t<u32> trp_files_count;
be_t<u32> trp_element_size;
be_t<u32> trp_unknown;
unsigned char sha1[20];
unsigned char padding[16];
};
struct TRPEntry
{
char name[32];
be_t<u64> offset;
be_t<u64> size;
be_t<u32> unknown;
char padding[12];
};
class TRPLoader
{
vfsStream& trp_f;
TRPHeader m_header;
std::vector<TRPEntry> m_entries;
public:
TRPLoader(vfsStream& f);
~TRPLoader();
virtual bool Install(std::string dest, bool show = false);
virtual bool LoadHeader(bool show = false);
virtual bool ContainsEntry(char *filename);
virtual void RemoveEntry(char *filename);
virtual void RenameEntry(char *oldname, char *newname);
virtual bool Close();
};