bool Room::change_area(const apstring &filename) { int room_num; ifstream area(filename.c_str(),ios::no_create); if(area.fail()) { return false; } if(!(area>>room_num)) { return false; } if(!(getline(area,roomn))) { return false; } if(!(getline(area,roomd))) { return false; } if(!(getexits(area))) { return false; } return true; }
void print_tile(tile_t *cur_tile) { /* May remain in subsequent cycles for web interface purposes. Will possibly also show printout of players and mobs in a tile */ printf("Tile is part of the %s, its name is '%s', and its position is (%d, %d)\nIt has exits %s\n", get_map_name(cur_tile->type), get_name(cur_tile), cur_tile->x, cur_tile->y, exitstr(getexits(cur_tile))); }