forked from jaildesigner-jailgames/jaildoctors_dilemma
Quitados todos los printf menos uno
This commit is contained in:
@@ -15,8 +15,6 @@ std::vector<int> loadRoomTileFile(std::string file_path)
|
||||
if (file.good())
|
||||
{
|
||||
// Procesa el fichero linea a linea
|
||||
// printf("Reading file %s\n", filename.c_str());
|
||||
|
||||
while (std::getline(file, line))
|
||||
{ // Lee el fichero linea a linea
|
||||
if (line.find("data encoding") != std::string::npos)
|
||||
@@ -39,13 +37,13 @@ std::vector<int> loadRoomTileFile(std::string file_path)
|
||||
}
|
||||
|
||||
// Cierra el fichero
|
||||
printf("TileMap loaded: %s\n", filename.c_str());
|
||||
std::cout << "TileMap loaded: " << filename.c_str() << std::endl;
|
||||
file.close();
|
||||
}
|
||||
|
||||
else
|
||||
{ // El fichero no se puede abrir
|
||||
printf("Warning: Unable to open %s file\n", filename.c_str());
|
||||
std::cout << "Warning: Unable to open " << filename.c_str() << " file" << std::endl;
|
||||
}
|
||||
|
||||
return tileMapFile;
|
||||
@@ -86,7 +84,7 @@ room_t loadRoomFile(std::string file_path)
|
||||
// Procesa las dos subcadenas
|
||||
if (!setEnemy(&enemy, line.substr(0, pos), line.substr(pos + 1, line.length())))
|
||||
{
|
||||
printf("Warning: file %s\n, unknown parameter \"%s\"\n", filename.c_str(), line.substr(0, pos).c_str());
|
||||
std::cout << "Warning: file " << filename.c_str() << "\n, unknown parameter \"" << line.substr(0, pos).c_str() << "\"" << std::endl;
|
||||
}
|
||||
} while (line != "[/enemy]");
|
||||
|
||||
@@ -112,7 +110,7 @@ room_t loadRoomFile(std::string file_path)
|
||||
// Procesa las dos subcadenas
|
||||
if (!setItem(&item, line.substr(0, pos), line.substr(pos + 1, line.length())))
|
||||
{
|
||||
printf("Warning: file %s\n, unknown parameter \"%s\"\n", filename.c_str(), line.substr(0, pos).c_str());
|
||||
std::cout << "Warning: file " << filename.c_str() << "\n, unknown parameter \"" << line.substr(0, pos).c_str() << "\"" << std::endl;
|
||||
}
|
||||
|
||||
} while (line != "[/item]");
|
||||
@@ -129,19 +127,19 @@ room_t loadRoomFile(std::string file_path)
|
||||
// Procesa las dos subcadenas
|
||||
if (!setVars(&room, line.substr(0, pos), line.substr(pos + 1, line.length())))
|
||||
{
|
||||
printf("Warning: file %s, unknown parameter \"%s\"\n", filename.c_str(), line.substr(0, pos).c_str());
|
||||
std::cout << "Warning: file " << filename.c_str() << "\n, unknown parameter \"" << line.substr(0, pos).c_str() << "\"" << std::endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Cierra el fichero
|
||||
printf("Room loaded: %s\n", filename.c_str());
|
||||
std::cout << "Room loaded: " << filename.c_str() << std::endl;
|
||||
file.close();
|
||||
}
|
||||
// El fichero no se puede abrir
|
||||
else
|
||||
{
|
||||
printf("Warning: Unable to open %s file\n", filename.c_str());
|
||||
std::cout << "Warning: Unable to open " << filename.c_str() << " file" << std::endl;
|
||||
}
|
||||
|
||||
return room;
|
||||
@@ -435,7 +433,7 @@ Room::Room(room_t *room, SDL_Renderer *renderer, Screen *screen, Asset *asset, o
|
||||
mapTexture = SDL_CreateTexture(renderer, SDL_PIXELFORMAT_RGBA8888, SDL_TEXTUREACCESS_TARGET, GAMECANVAS_WIDTH, GAMECANVAS_HEIGHT);
|
||||
if (mapTexture == nullptr)
|
||||
{
|
||||
printf("Error: mapTexture could not be created!\nSDL Error: %s\n", SDL_GetError());
|
||||
std::cout << "Error: mapTexture could not be created!\nSDL Error: " << SDL_GetError() << std::endl;
|
||||
}
|
||||
SDL_SetTextureBlendMode(mapTexture, SDL_BLENDMODE_BLEND);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user