using namespace std en todos los ficheros

This commit is contained in:
2023-05-23 17:40:12 +02:00
parent 5a5bbf7f73
commit c31bfc6cae
15 changed files with 218 additions and 197 deletions

View File

@@ -7,6 +7,8 @@
#ifndef TEXTURE_H
#define TEXTURE_H
using namespace std;
class Texture
{
private:
@@ -17,17 +19,17 @@ private:
// Variables
int width; // Ancho de la imagen
int height; // Alto de la imagen
std::string path; // Ruta de la imagen de la textura
string path; // Ruta de la imagen de la textura
public:
// Constructor
Texture(SDL_Renderer *renderer, std::string path = "", bool verbose = false);
Texture(SDL_Renderer *renderer, string path = "", bool verbose = false);
// Destructor
~Texture();
// Carga una imagen desde un fichero
bool loadFromFile(std::string path, SDL_Renderer *renderer, bool verbose = false);
bool loadFromFile(string path, SDL_Renderer *renderer, bool verbose = false);
// Crea una textura en blanco
bool createBlank(SDL_Renderer *renderer, int width, int height, SDL_TextureAccess = SDL_TEXTUREACCESS_STREAMING);