58 lines
1.9 KiB
C++
58 lines
1.9 KiB
C++
#pragma once
|
|
|
|
#include "beatmap.h"
|
|
|
|
#include <memory>
|
|
#include <nlohmann/json.hpp>
|
|
|
|
#include "beatset.h"
|
|
|
|
using json = nlohmann::json;
|
|
|
|
namespace Beatsaber {
|
|
|
|
class BeatMapImpl : public BeatMap, protected std::enable_shared_from_this<BeatMapImpl> {
|
|
|
|
protected:
|
|
const std::string path;
|
|
const bool isZip;
|
|
|
|
json infobase;
|
|
std::vector<std::shared_ptr<BeatSet>> beatSets;
|
|
|
|
bool load();
|
|
|
|
public:
|
|
BeatMapImpl(const std::string& path, bool isZip);
|
|
~BeatMapImpl();
|
|
|
|
virtual std::string getVersion() const override;
|
|
virtual std::string getSongName() const override;
|
|
virtual std::string getSubName() const override;
|
|
virtual std::string getSongAuthorName() const override;
|
|
virtual std::string getMapperName() const override;
|
|
virtual double getBPM() const override;
|
|
virtual double getTimeOffset() const override;
|
|
virtual double getSchuffle() const override;
|
|
virtual double getSchufflePeriod() const override;
|
|
virtual double getPreviewStart() const override;
|
|
virtual double getPreviewDuration() const override;
|
|
virtual std::string getSongFilename() const override;
|
|
virtual std::string getImageFilename() const override;
|
|
virtual std::string getEnvName() const override;
|
|
virtual std::string get360EnvName() const override;
|
|
virtual std::string getCustomData() const override;
|
|
|
|
virtual const std::vector<std::shared_ptr<BeatSet>>& getBeatSets() const override;
|
|
virtual std::uint32_t getBeatSetCount() const override;
|
|
virtual const std::shared_ptr<BeatSet> getBeatSet(BeatmapCharacteristic::BeatmapCharacteristic characteristic = BeatmapCharacteristic::STANDARD) const override;
|
|
virtual std::shared_ptr<BeatSet> getBeatSet(BeatmapCharacteristic::BeatmapCharacteristic characteristic = BeatmapCharacteristic::STANDARD) override;
|
|
|
|
virtual void printDebug() const override;
|
|
|
|
friend std::unique_ptr<BeatMap> BeatMap::loadFromFolder(const std::string& folderPath);
|
|
friend std::unique_ptr<BeatMap> BeatMap::loadFromZip(const std::string& zipPath);
|
|
};
|
|
|
|
}
|