Añadidos parametros al programa

This commit is contained in:
2022-11-02 08:36:00 +01:00
parent 12255750f6
commit 8232055d22
13 changed files with 292 additions and 93 deletions

View File

@@ -14,8 +14,11 @@ void Resource::loadTextures(std::vector<std::string> list)
{
for (auto l : list)
{
std::cout << "\nLOAD TEXTURE: " << l << std::endl;
std::cout << "png: " << asset->get(l) << std::endl;
if (options->console)
{
std::cout << "\nLOAD TEXTURE: " << l << std::endl;
std::cout << "png: " << asset->get(l) << std::endl;
}
res_texture_t t;
t.name = l;
@@ -33,9 +36,12 @@ void Resource::loadAnimations(std::vector<std::string> list)
const size_t lastIndex = l.find_last_of(".");
const std::string pngFile = l.substr(0, lastIndex) + ".png";
std::cout << "\nLOAD ANIMATION: " << l << std::endl;
std::cout << "png: " << asset->get(pngFile) << std::endl;
std::cout << "ani: " << asset->get(l) << std::endl;
if (options->console)
{
std::cout << "\nLOAD ANIMATION: " << l << std::endl;
std::cout << "png: " << asset->get(pngFile) << std::endl;
std::cout << "ani: " << asset->get(l) << std::endl;
}
res_animation_t as;
as.name = l;
@@ -196,7 +202,10 @@ Texture *Resource::getTexture(std::string name)
}
}
std::cout << "NOT FOUND ON CACHE: " << name << std::endl;
if (options->console)
{
std::cout << "NOT FOUND ON CACHE: " << name << std::endl;
}
return nullptr;
}
@@ -214,7 +223,10 @@ animatedSprite_t *Resource::getAnimation(std::string name)
}
}
std::cout << "NOT FOUND ON CACHE: " << name << std::endl;
if (options->console)
{
std::cout << "NOT FOUND ON CACHE: " << name << std::endl;
}
return nullptr;
}
@@ -230,7 +242,10 @@ textFile_t *Resource::getOffset(std::string name)
}
}
std::cout << "NOT FOUND ON CACHE: " << name << std::endl;
if (options->console)
{
std::cout << "NOT FOUND ON CACHE: " << name << std::endl;
}
return nullptr;
}
@@ -246,7 +261,10 @@ std::vector<int> *Resource::getTileMap(std::string name)
}
}
std::cout << "NOT FOUND ON CACHE: " << name << std::endl;
if (options->console)
{
std::cout << "NOT FOUND ON CACHE: " << name << std::endl;
}
return nullptr;
}
@@ -262,6 +280,9 @@ room_t *Resource::getRoom(std::string name)
}
}
std::cout << "NOT FOUND ON CACHE: " << name << std::endl;
if (options->console)
{
std::cout << "NOT FOUND ON CACHE: " << name << std::endl;
}
return nullptr;
}