mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 11:01:49 +00:00
debug::Logger
This commit is contained in:
parent
f298d6ef1d
commit
0c411cf227
16 changed files with 233 additions and 51 deletions
|
|
@ -8,12 +8,15 @@
|
|||
|
||||
#include "../constants.h"
|
||||
#include "../data/dynamic.h"
|
||||
#include "../debug/Logger.h"
|
||||
#include "../files/files.h"
|
||||
#include "../files/engine_paths.h"
|
||||
#include "../content/Content.h"
|
||||
#include "../content/ContentPack.h"
|
||||
#include "../logic/scripting/scripting.h"
|
||||
|
||||
static debug::Logger logger("assets-loader");
|
||||
|
||||
AssetsLoader::AssetsLoader(Assets* assets, const ResPaths* paths)
|
||||
: assets(assets), paths(paths)
|
||||
{
|
||||
|
|
@ -39,11 +42,10 @@ bool AssetsLoader::hasNext() const {
|
|||
|
||||
bool AssetsLoader::loadNext() {
|
||||
const aloader_entry& entry = entries.front();
|
||||
std::cout << " loading " << entry.filename << " as " << entry.alias << std::endl;
|
||||
std::cout.flush();
|
||||
logger.info() << "loading " << entry.filename << " as " << entry.alias;
|
||||
auto found = loaders.find(entry.tag);
|
||||
if (found == loaders.end()) {
|
||||
std::cerr << "unknown asset tag " << static_cast<int>(entry.tag) << std::endl;
|
||||
logger.error() << "unknown asset tag " << static_cast<int>(entry.tag);
|
||||
return false;
|
||||
}
|
||||
aloader_func loader = found->second;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue