Working on save-load system and UI
This commit is contained in:
1 parent
901142385d
commit
d7db0faea3
29 files changed
+708
-180
No files matched your search
+2
-2
@@ -10,7 +10,6 @@
|
||||
#include "utils/Utils.h"
|
||||
#include "TextModel.h"
|
||||
|
||||
|
||||
namespace ZL {
|
||||
|
||||
const float ATTACK_COOLDOWN_TIME = 1.6f;
|
||||
@@ -63,7 +62,8 @@ std::unique_ptr<Character> Character::createFromState(CharacterState st, Rendere
|
||||
auto loadTex = [&](const std::string& path) -> std::shared_ptr<Texture> {
|
||||
if (path.empty()) return nullptr;
|
||||
try {
|
||||
return std::make_shared<Texture>(CreateTextureDataFromPng(path, zip));
|
||||
//return std::make_shared<Texture>(CreateTextureDataFromPng(path, zip));
|
||||
return renderer.textureManager.LoadFromPng(path, zip);
|
||||
} catch (const std::exception& e) {
|
||||
std::cerr << "Character::createFromState: failed to load texture '" << path << "': " << e.what() << std::endl;
|
||||
return nullptr;
|
||||
|
||||
Reference in new issue
Block a user