mirror of
https://github.com/SMGCommunity/Petari.git
synced 2026-11-10 04:41:32 -10:00
* (Cleanup) offset comments for DinoPackun * (Cleanup) offset comments for SkeletalFishBoss * (Cleanup) offset comments for CameraTranslators * (Cleanup) offset comments for Demos * (Cleanup) offset comments for Enemies * (Cleanup) offset comments for Gravities * (Cleanup) offset comments for LiveActors * (Cleanup) offset comments for Maps * (Cleanup) offset comments for MapObjs * (Cleanup) offset comments for NameObjs * (Cleanup) offset comments for NPCs * (Cleanup) offset comments for Player * (Cleanup) offset comments for Scenes * (Cleanup) offset comments for System * (Cleanup) offset comments for Utils * (Cleanup) offset comments for JSystem * (Cleanup) offset comments for MetroTRK * forgot the union comments * (Cleanup) offset comments for MSL_C * (Cleanup) offset comments for nw4r * (Cleanup) offset comments for the SDK * (Cleanup) offset comments for all that was left
40 lines
1.3 KiB
C++
40 lines
1.3 KiB
C++
#pragma once
|
|
|
|
#include "Game/System/ArchiveHolder.hpp"
|
|
#include "Game/System/FileHolder.hpp"
|
|
#include "Game/System/FileLoaderThread.hpp"
|
|
#include <JSystem/JKernel/JKRDvdRipper.hpp>
|
|
#include <JSystem/JKernel/JKRHeap.hpp>
|
|
#include <cstdio>
|
|
#include <revolution.h>
|
|
|
|
class JKRArchive;
|
|
|
|
class FileLoader {
|
|
public:
|
|
FileLoader();
|
|
|
|
void requestLoadToMainRAM(const char*, u8*, JKRHeap*, JKRDvdRipper::EAllocDirection, bool);
|
|
void requestMountArchive(const char*, JKRHeap*, bool);
|
|
bool isLoaded(const char*) const;
|
|
bool isMountedArchive(const char*) const;
|
|
void* receiveFile(const char*);
|
|
JKRMemArchive* receiveArchive(const char*);
|
|
void receiveAllRequestedFile();
|
|
JKRMemArchive* createAndAddArchive(void*, JKRHeap*, const char*);
|
|
void getMountedArchiveAndHeap(const char*, JKRArchive**, JKRHeap**) const;
|
|
void clearRequestFileInfo(bool);
|
|
void removeHolderIfIsEqualHeap(JKRHeap*);
|
|
void removeFile(const char*);
|
|
bool isNeedToLoad(const char*) const;
|
|
const RequestFileInfo* getRequestFileInfoConst(const char*) const;
|
|
RequestFileInfo* addRequest(const char*);
|
|
|
|
/* 0x00 */ FileLoaderThread* mLoaderThread;
|
|
/* 0x04 */ OSMutex mMutex;
|
|
/* 0x1C */ RequestFileInfo* mRequestFileInfos;
|
|
/* 0x20 */ s32 mRequestedFileCount;
|
|
/* 0x24 */ FileHolder* mFileHolder;
|
|
/* 0x28 */ ArchiveHolder* mArchiveHolder;
|
|
};
|