31 lines
684 B
C++
31 lines
684 B
C++
// Copyright (c) 2022 Dominic Masters
|
|
//
|
|
// This software is released under the MIT License.
|
|
// https://opensource.org/licenses/MIT
|
|
|
|
#pragma once
|
|
#include "../Asset.hpp"
|
|
#include "../AssetLoader.hpp"
|
|
|
|
namespace Dawn {
|
|
struct AssetLanguageValue {
|
|
size_t begin;
|
|
size_t length;
|
|
};
|
|
|
|
class LanguageAsset : public Asset {
|
|
protected:
|
|
AssetLoader loader;
|
|
uint8_t state = 0x00;
|
|
std::map<std::string, struct AssetLanguageValue> values;
|
|
uint8_t buffer[1024];
|
|
|
|
public:
|
|
LanguageAsset(AssetManager *man, std::string name);
|
|
|
|
void updateSync() override;
|
|
void updateAsync() override;
|
|
|
|
std::string getValue(std::string key);
|
|
};
|
|
} |