resonance 1.0.1
Loading...
Searching...
No Matches
metfreqloader.h
Go to the documentation of this file.
1#pragma once
2
3#include <vector>
4
5#include "os/asynccallback.h"
6#include "os/hxstr.h"
7
9
26public:
35 MetFreqLoader(const HxStr &path, std::vector<MetPersonaData *> *pIdentities);
36
45 virtual ~MetFreqLoader();
46
62 virtual void Done(int nHandle, int nFile, void *pBuffer, int nLength, int nStatus);
63
74 bool PollAssets();
75
85 void Start();
86
96 int IsLoaded();
97
98private:
106 void ParseIdentities(const void *pBuffer, int nLength);
107
108 std::vector<MetPersonaData *> *mIdentities; // +0x04
109 HxStr mPath; // +0x08
110 int mHandle; // +0x10, the queued read, or zero
111 int mLoaded; // +0x14
112 int mStarted; // +0x18
113};
Receiver notified once a queued asynchronous read has finished.
Definition asynccallback.h:18
Heap-allocated NUL-terminated string.
Definition hxstr.h:41
bool PollAssets()
Report whether the FreQ maker assets are resident.
MetFreqLoader(const HxStr &path, std::vector< MetPersonaData * > *pIdentities)
Record the file to read and the list to fill.
virtual void Done(int nHandle, int nFile, void *pBuffer, int nLength, int nStatus)
Parse the completed read into personas and release the buffer.
void Start()
Wait for the FreQ maker assets and queue the read of the persona file.
int IsLoaded()
Pump the asynchronous layer and report whether Done() has run.
virtual ~MetFreqLoader()
Release the path.
Saved record of one player persona.
Definition metpersonadata.h:39