NOISSUE use new mojang assets locations

This commit is contained in:
Petr Mrázek
2016-03-21 02:19:23 +01:00
parent 2929ca7413
commit d587720010
9 changed files with 104 additions and 60 deletions

View File

@@ -17,22 +17,32 @@
#include <QString>
#include <QMap>
#include "net/NetAction.h"
#include "net/NetJob.h"
struct AssetObject
{
QString getRelPath();
QUrl getUrl();
QString getLocalPath();
NetActionPtr getDownloadAction();
QString hash;
qint64 size;
};
struct AssetsIndex
{
NetJobPtr getDownloadJob();
QString id;
QMap<QString, AssetObject> objects;
bool isVirtual = false;
};
namespace AssetsUtils
{
bool loadAssetsIndexJson(QString file, AssetsIndex* index);
bool loadAssetsIndexJson(QString id, QString file, AssetsIndex* index);
/// Reconstruct a virtual assets folder for the given assets ID and return the folder
QDir reconstructAssets(QString assetsId);
}