forked from jaildesigner-jailgames/jaildoctors_dilemma
Revert "Eliminados todos los std:: del código"
This reverts commit 4a2d27dc59.
This commit is contained in:
@@ -35,8 +35,8 @@ Game::Game(SDL_Renderer *renderer, Screen *screen, Resource *resource, Asset *as
|
||||
itemTracker = new ItemTracker();
|
||||
roomTracker = new RoomTracker();
|
||||
room = new Room(resource->getRoom(currentRoom), renderer, screen, asset, options, itemTracker, &board.items, false, debug);
|
||||
const string playerPNG = options->cheat.altSkin ? "player2.png" : "player.png";
|
||||
const string playerANI = options->cheat.altSkin ? "player2.ani" : "player.ani";
|
||||
const std::string playerPNG = options->cheat.altSkin ? "player2.png" : "player.png";
|
||||
const std::string playerANI = options->cheat.altSkin ? "player2.ani" : "player.ani";
|
||||
const player_t player = {spawnPoint, playerPNG, playerANI, renderer, resource, asset, options, input, room, debug};
|
||||
this->player = new Player(player);
|
||||
eventHandler = new SDL_Event();
|
||||
@@ -51,7 +51,7 @@ Game::Game(SDL_Renderer *renderer, Screen *screen, Resource *resource, Asset *as
|
||||
{
|
||||
if (options->console)
|
||||
{
|
||||
cout << "Error: roomNameTexture could not be created!\nSDL Error: " << SDL_GetError() << endl;
|
||||
std::cout << "Error: roomNameTexture could not be created!\nSDL Error: " << SDL_GetError() << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -322,9 +322,9 @@ void Game::render()
|
||||
// Pasa la información de debug
|
||||
void Game::updateDebugInfo()
|
||||
{
|
||||
debug->add("X = " + to_string((int)player->x) + ", Y = " + to_string((int)player->y));
|
||||
debug->add("VX = " + to_string(player->vx).substr(0, 4) + ", VY = " + to_string(player->vy).substr(0, 4));
|
||||
debug->add("STATE = " + to_string(player->state));
|
||||
debug->add("X = " + std::to_string((int)player->x) + ", Y = " + std::to_string((int)player->y));
|
||||
debug->add("VX = " + std::to_string(player->vx).substr(0, 4) + ", VY = " + std::to_string(player->vy).substr(0, 4));
|
||||
debug->add("STATE = " + std::to_string(player->state));
|
||||
}
|
||||
|
||||
// Pone la información de debug en pantalla
|
||||
@@ -365,7 +365,7 @@ void Game::renderRoomName()
|
||||
}
|
||||
|
||||
// Cambia de habitación
|
||||
bool Game::changeRoom(string file)
|
||||
bool Game::changeRoom(std::string file)
|
||||
{
|
||||
// En las habitaciones los limites tienen la cadena del fichero o un 0 en caso de no limitar con nada
|
||||
if (file == "0")
|
||||
@@ -413,7 +413,7 @@ void Game::checkPlayerOnBorder()
|
||||
{
|
||||
if (player->getOnBorder())
|
||||
{
|
||||
const string roomName = room->getRoom(player->getBorder());
|
||||
const std::string roomName = room->getRoom(player->getBorder());
|
||||
if (changeRoom(roomName))
|
||||
{
|
||||
player->switchBorders();
|
||||
@@ -490,8 +490,8 @@ void Game::killPlayer()
|
||||
|
||||
// Crea la nueva habitación y el nuevo jugador
|
||||
room = new Room(resource->getRoom(currentRoom), renderer, screen, asset, options, itemTracker, &board.items, board.jailEnabled, debug);
|
||||
const string playerPNG = options->cheat.altSkin ? "player2.png" : "player.png";
|
||||
const string playerANI = options->cheat.altSkin ? "player2.ani" : "player.ani";
|
||||
const std::string playerPNG = options->cheat.altSkin ? "player2.png" : "player.png";
|
||||
const std::string playerANI = options->cheat.altSkin ? "player2.ani" : "player.ani";
|
||||
const player_t player = {spawnPoint, playerPNG, playerANI, renderer, resource, asset, options, input, room, debug};
|
||||
this->player = new Player(player);
|
||||
|
||||
@@ -505,7 +505,7 @@ void Game::reLoadTextures()
|
||||
{
|
||||
if (options->console)
|
||||
{
|
||||
cout << "** RELOAD REQUESTED" << endl;
|
||||
std::cout << "** RELOAD REQUESTED" << std::endl;
|
||||
}
|
||||
player->reLoadTexture();
|
||||
room->reLoadTexture();
|
||||
@@ -518,7 +518,7 @@ void Game::switchPalette()
|
||||
{
|
||||
if (options->console)
|
||||
{
|
||||
cout << "** PALETTE SWITCH REQUESTED" << endl;
|
||||
std::cout << "** PALETTE SWITCH REQUESTED" << std::endl;
|
||||
}
|
||||
|
||||
// Modifica la variable
|
||||
@@ -608,7 +608,7 @@ bool Game::checkEndGame()
|
||||
int Game::getTotalItems()
|
||||
{
|
||||
int items = 0;
|
||||
vector<res_room_t> *rooms = new vector<res_room_t>;
|
||||
std::vector<res_room_t> *rooms = new std::vector<res_room_t>;
|
||||
rooms = resource->getAllRooms();
|
||||
|
||||
for (auto room : *rooms)
|
||||
@@ -622,7 +622,7 @@ int Game::getTotalItems()
|
||||
// Va a la habitación designada
|
||||
void Game::goToRoom(int border)
|
||||
{
|
||||
const string roomName = room->getRoom(border);
|
||||
const std::string roomName = room->getRoom(border);
|
||||
if (changeRoom(roomName))
|
||||
{
|
||||
currentRoom = roomName;
|
||||
@@ -682,7 +682,7 @@ void Game::checkRestoringJail()
|
||||
// Inicializa el diccionario de las estadísticas
|
||||
void Game::initStats()
|
||||
{
|
||||
vector<res_room_t> *rooms = new vector<res_room_t>;
|
||||
std::vector<res_room_t> *rooms = new std::vector<res_room_t>;
|
||||
rooms = resource->getAllRooms();
|
||||
|
||||
for (auto room : *rooms)
|
||||
|
||||
Reference in New Issue
Block a user