This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
#include <algorithm>
|
||||
|
||||
#include "../Common/Compression.h"
|
||||
#include "../Utils/AssetManager.h"
|
||||
|
||||
|
||||
PiecesFiles::PiecesFiles() {
|
||||
@@ -140,7 +141,7 @@ bool PiecesFiles::loadPieces(int polyominoSize, std::vector<Piece>& pieces, std:
|
||||
}
|
||||
|
||||
bool PiecesFiles::getFilePath(int polyominoSize, std::string& filePath) const {
|
||||
std::string dataFolderPath = "data/pieces/";
|
||||
auto dataFolderPath = AssetManager::getResourcePath("data/pieces");
|
||||
|
||||
if (!std::filesystem::exists(dataFolderPath)) {
|
||||
std::filesystem::create_directories(dataFolderPath);
|
||||
@@ -150,6 +151,6 @@ bool PiecesFiles::getFilePath(int polyominoSize, std::string& filePath) const {
|
||||
return false;
|
||||
}
|
||||
|
||||
filePath = dataFolderPath + std::to_string(polyominoSize) + "minos.bin";
|
||||
filePath = dataFolderPath / (std::to_string(polyominoSize) + "minos.bin");
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user