mirror of
https://github.com/borgesdan/xn65
synced 2024-12-29 21:54:47 +01:00
13 lines
374 B
C++
13 lines
374 B
C++
#include "xna/content/manager.hpp"
|
|
|
|
namespace xna {
|
|
sptr<Stream> ContentManager::OpenStream(String const& assetName) const {
|
|
const String filePath = _rootDirectory + "\\" + assetName + contentExtension;
|
|
const auto stream = snew<FileStream>(filePath, FileMode::Open);
|
|
|
|
if (stream->IsClosed())
|
|
return nullptr;
|
|
|
|
return reinterpret_pointer_cast<Stream>(stream);
|
|
}
|
|
} |