De moment ja compila i executa, encara que no troba alguns fitxers

This commit is contained in:
2025-02-25 23:03:16 +01:00
parent 32c31a8cb6
commit a07a08adb7
45 changed files with 537 additions and 680 deletions

View File

@@ -1,14 +1,14 @@
#include "resource.h"
#include <algorithm> // Para find_if
#include <iostream> // Para basic_ostream, operator<<, endl, cout, cerr
#include <stdexcept> // Para runtime_error
#include <utility> // Para pair
#include "asset.h" // Para Asset, AssetType
#include "jail_audio.h" // Para JA_LoadMusic, JA_LoadSound
#include "screen.h" // Para Screen
#include "text.h" // Para Text, loadTextFile
struct JA_Music_t; // lines 10-10
struct JA_Sound_t; // lines 11-11
#include <algorithm> // for find_if
#include <iostream> // for basic_ostream, operator<<, endl, cout, cerr
#include <stdexcept> // for runtime_error
#include "asset.h" // for Asset, AssetType
#include "jail_audio.h" // for JA_DeleteMusic, JA_DeleteSound, JA_LoadMusic
#include "screen.h" // for Screen
#include "text.h" // for Text, loadTextFile
#include "utils.h" // for getFileName, printWithDots
struct JA_Music_t; // lines 10-10
struct JA_Sound_t; // lines 11-11
// [SINGLETON] Hay que definir las variables estáticas, desde el .h sólo la hemos declarado
Resource *Resource::resource_ = nullptr;
@@ -140,7 +140,7 @@ std::shared_ptr<Text> Resource::getText(const std::string &name)
}
std::cerr << "Error: Text no encontrado " << name << std::endl;
throw std::runtime_error("Text no encontrado: " + name);
throw std::runtime_error("Texto no encontrado: " + name);
}
// Obtiene la animación a partir de un nombre