cl_cross macos update

This commit is contained in:
pierow 2021-02-03 01:20:48 -05:00
parent 9a4a291b41
commit 086c9a4aa6
3 changed files with 16 additions and 16 deletions

View file

@ -25,12 +25,12 @@ class CHudCrosshairs : public CHudBase
cvar_t* cl_cross_line_left; cvar_t* cl_cross_line_left;
cvar_t* cl_cross_line_right; cvar_t* cl_cross_line_right;
#ifdef __APPLE__ //#ifdef __APPLE__
//Remove when OSX builds with c++11 // //Remove when OSX builds with c++11
#else //#else
float old_circle_radius; float old_circle_radius;
std::vector<Vector2D> circle_points; std::vector<Vector2D> circle_points;
#endif //#endif
public: public:
virtual int Init(); virtual int Init();

View file

@ -75,9 +75,9 @@ void HudGL::rectangle(const Vector2D& corner_a, const Vector2D& corner_b) const
glEnd(); glEnd();
} }
#ifdef __APPLE__ //#ifdef __APPLE__
//Remove when OSX builds with c++11 ////Remove when OSX builds with c++11
#else //#else
std::vector<Vector2D> HudGL::compute_circle(float radius) { std::vector<Vector2D> HudGL::compute_circle(float radius) {
// Maximum allowed distance between the circle and the rendered line segment. // Maximum allowed distance between the circle and the rendered line segment.
const float MAX_ERROR = 0.1f; const float MAX_ERROR = 0.1f;
@ -94,4 +94,4 @@ std::vector<Vector2D> HudGL::compute_circle(float radius) {
return points; return points;
} }
#endif //#endif

View file

@ -9,16 +9,16 @@ public:
void color(unsigned char r, unsigned char g, unsigned char b, unsigned char a) const; void color(unsigned char r, unsigned char g, unsigned char b, unsigned char a) const;
void line_width(float width) const; void line_width(float width) const;
void line(const Vector2D& start, const Vector2D& end) const; void line(const Vector2D& start, const Vector2D& end) const;
#ifdef __APPLE__ //#ifdef __APPLE__
//Remove when OSX builds with c++11 // //Remove when OSX builds with c++11
#else //#else
void circle(const Vector2D& center, const std::vector<Vector2D>& points) const; void circle(const Vector2D& center, const std::vector<Vector2D>& points) const;
#endif //#endif
void rectangle(const Vector2D& corner_a, const Vector2D& corner_b) const; void rectangle(const Vector2D& corner_a, const Vector2D& corner_b) const;
#ifdef __APPLE__ //#ifdef __APPLE__
//Remove when OSX builds with c++11 // //Remove when OSX builds with c++11
#else //#else
static std::vector<Vector2D> compute_circle(float radius); static std::vector<Vector2D> compute_circle(float radius);
#endif //#endif
}; };