shared_ptr -> std::shared_ptr
This is one of the first commits in a plan to remove all `using namespace std;` lines in the entire codebase as it is considered anti-pattern today.
This commit is contained in:
@@ -21,7 +21,7 @@ float Camera::za = 0.0f;
|
||||
float Camera::xa2 = 0.0f;
|
||||
float Camera::za2 = 0.0f;
|
||||
|
||||
void Camera::prepare(shared_ptr<Player> player, bool mirror)
|
||||
void Camera::prepare(std::shared_ptr<Player> player, bool mirror)
|
||||
{
|
||||
glGetFloat(GL_MODELVIEW_MATRIX, modelview);
|
||||
glGetFloat(GL_PROJECTION_MATRIX, projection);
|
||||
@@ -88,12 +88,12 @@ void Camera::prepare(shared_ptr<Player> player, bool mirror)
|
||||
ya = cosf(xRot * PI / 180.0f);
|
||||
}
|
||||
|
||||
TilePos *Camera::getCameraTilePos(shared_ptr<Mob> player, double alpha)
|
||||
TilePos *Camera::getCameraTilePos(std::shared_ptr<Mob> player, double alpha)
|
||||
{
|
||||
return new TilePos(getCameraPos(player, alpha));
|
||||
}
|
||||
|
||||
Vec3 *Camera::getCameraPos(shared_ptr<Mob> player, double alpha)
|
||||
Vec3 *Camera::getCameraPos(std::shared_ptr<Mob> player, double alpha)
|
||||
{
|
||||
double xx = player->xo + (player->x - player->xo) * alpha;
|
||||
double yy = player->yo + (player->y - player->yo) * alpha + player->getHeadHeight();
|
||||
@@ -106,7 +106,7 @@ Vec3 *Camera::getCameraPos(shared_ptr<Mob> player, double alpha)
|
||||
return Vec3::newTemp(xt, yt, zt);
|
||||
}
|
||||
|
||||
int Camera::getBlockAt(Level *level, shared_ptr<Mob> player, float alpha)
|
||||
int Camera::getBlockAt(Level *level, std::shared_ptr<Mob> player, float alpha)
|
||||
{
|
||||
Vec3 *p = Camera::getCameraPos(player, alpha);
|
||||
TilePos tp = TilePos(p);
|
||||
|
||||
Reference in New Issue
Block a user