2024-04-28 20:19:37 -03:00
|
|
|
#ifndef XNA_CONTENT_READER_HPP
|
|
|
|
#define XNA_CONTENT_READER_HPP
|
|
|
|
|
|
|
|
#include "../default.hpp"
|
2024-05-01 19:09:43 -03:00
|
|
|
#include "../csharp/binary.hpp"
|
2024-04-28 20:19:37 -03:00
|
|
|
|
|
|
|
namespace xna {
|
2024-05-01 19:09:43 -03:00
|
|
|
class ContentReader : public BinaryReader{
|
2024-04-28 20:19:37 -03:00
|
|
|
public:
|
2024-05-01 19:09:43 -03:00
|
|
|
static sptr<ContentReader> Create(ContentManager* contentManager, Stream* input, String const& assetName);
|
|
|
|
|
|
|
|
template <typename T>
|
|
|
|
sptr<T> ReadAsset() {
|
|
|
|
return nullptr;
|
|
|
|
}
|
2024-04-28 20:19:37 -03:00
|
|
|
|
|
|
|
private:
|
2024-05-01 19:09:43 -03:00
|
|
|
ContentReader(ContentManager* contentManager, sptr<Stream>const& input, String const& assetName)
|
|
|
|
: BinaryReader(input), _contentManager(contentManager), _assetName(assetName){}
|
|
|
|
|
|
|
|
static sptr<Stream> PrepareStream(sptr<Stream>& input, String const* assetName, Int& graphicsProfile);
|
|
|
|
|
|
|
|
Int ReadHeader();
|
|
|
|
|
|
|
|
private:
|
|
|
|
ContentManager* _contentManager = nullptr;
|
|
|
|
String _assetName;
|
2024-04-28 20:19:37 -03:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|