RPXLoadingModule/src/globals.h

57 lines
1.8 KiB
C
Raw Normal View History

#include "utils/utils.h"
#include <content_redirection/redirection.h>
#include <coreinit/filesystem.h>
2022-02-04 16:35:35 +01:00
#include <coreinit/mutex.h>
#include <wums.h>
#include <wut.h>
2021-01-01 01:39:28 +01:00
#define WUHB_ROMFS_NAME "wuhbrom"
#define WUHB_ROMFS_PATH WUHB_ROMFS_NAME ":"
#define WUHB_ROMFS_CONTENT_PATH WUHB_ROMFS_PATH "/content"
typedef struct WUT_PACKED MetaInformation_t {
char shortname[64];
char longname[64];
char author[64];
2021-02-19 20:32:44 +01:00
} MetaInformation;
WUT_CHECK_SIZE(MetaInformation_t, 0xC0);
typedef struct ContentRedirectionInformation_t {
2021-02-19 20:32:44 +01:00
bool isMounted;
2021-04-05 19:54:50 +02:00
char toMountPath[255];
char mountedPath[255];
2021-02-19 20:32:44 +01:00
} BundleMountInformation;
#define ICON_SIZE 65580
typedef struct WUT_PACKED RPXReplacementInfo_t {
bool willRPXBeReplaced;
2021-02-19 20:32:44 +01:00
bool isRPXReplaced;
MetaInformation metaInformation;
WUT_UNKNOWN_BYTES(0x3E);
char iconCache[ROUNDUP(ICON_SIZE, 0x040)];
2021-04-05 19:54:50 +02:00
} RPXReplacementInfo;
// make sure the iconCache is aligned to 0x40
WUT_CHECK_OFFSET(RPXReplacementInfo, 0x100, iconCache);
2021-04-05 19:54:50 +02:00
typedef struct ContentReplacementInfo_t {
BundleMountInformation bundleMountInformation;
char replacementPath[0x280];
2021-04-05 19:54:50 +02:00
} ContentReplacementInfo;
typedef struct ContentReplacementWithFallback_t {
char replacementPath[0x280];
} ContentReplacementWithFallback;
2021-04-05 19:54:50 +02:00
typedef struct RPXLoader_ReplacementInformation_t {
RPXReplacementInfo rpxReplacementInfo;
ContentReplacementInfo contentReplacementInfo;
ContentReplacementWithFallback contentReplacementWithFallbackInfo;
char lastFileLoaded[0x280];
2021-02-19 20:32:44 +01:00
} RPXLoader_ReplacementInformation;
extern RPXLoader_ReplacementInformation gReplacementInfo;
extern CRLayerHandle contentLayerHandle;
2024-03-30 08:32:53 +01:00
extern CRLayerHandle saveLayerHandle;
extern std::string gActiveSaveRedirectionPath;