Files
Aerofoil/PortabilityLayer/ResourceManager.h

35 lines
805 B
C
Raw Normal View History

2019-11-11 00:11:59 -05:00
#pragma once
#include "VirtualDirectory.h"
class PLPasStr;
namespace PortabilityLayer
{
struct MMHandleBlock;
2019-12-29 22:12:11 -05:00
struct ResourceCompiledRef;
2019-11-11 00:11:59 -05:00
class ResTypeID;
class ResourceManager
{
public:
virtual void Init() = 0;
virtual void Shutdown() = 0;
virtual void SetResLoad(bool load) = 0;
2019-12-29 06:38:18 -05:00
virtual short OpenResFork(VirtualDirectory_t virtualDir, const PLPasStr &filename) = 0;
2019-12-29 22:12:11 -05:00
virtual void CloseResFile(short ref) = 0;
2019-11-11 00:11:59 -05:00
virtual MMHandleBlock *GetResource(const ResTypeID &resType, int id) = 0;
virtual short GetCurrentResFile() const = 0;
virtual void SetCurrentResFile(short ref) = 0;
2019-12-29 22:12:11 -05:00
virtual void DissociateHandle(MMHandleBlock *hdl) const = 0;
virtual const ResourceCompiledRef *ResourceForHandle(MMHandleBlock *hdl) const = 0;
2019-11-11 00:11:59 -05:00
static ResourceManager *GetInstance();
};
}