Browse Source

Include tgmath.h and cmath headers.

half-secret
Andrey Akhmichin 5 years ago
parent
commit
a9f37f6d74
  1. 2
      cl_dll/GameStudioModelRenderer.cpp
  2. 2
      cl_dll/GameStudioModelRenderer_Sample.cpp
  3. 2
      cl_dll/StudioModelRenderer.cpp
  4. 6
      cl_dll/health.cpp
  5. 3
      cl_dll/hud_redraw.cpp
  6. 2
      cl_dll/hud_update.cpp
  7. 6
      cl_dll/util.cpp
  8. 6
      cl_dll/util_vector.h
  9. 7
      common/mathlib.h
  10. 8
      dlls/extdll.h
  11. 6
      pm_shared/pm_debug.c
  12. 6
      pm_shared/pm_math.c
  13. 14
      pm_shared/pm_shared.c

2
cl_dll/GameStudioModelRenderer.cpp

@ -19,7 +19,7 @@ @@ -19,7 +19,7 @@
#include <stdio.h>
#include <string.h>
#include <memory.h>
#include <math.h>
#include <cmath>
#include "studio_util.h"
#include "r_studioint.h"

2
cl_dll/GameStudioModelRenderer_Sample.cpp

@ -19,7 +19,7 @@ @@ -19,7 +19,7 @@
#include <stdio.h>
#include <string.h>
#include <memory.h>
#include <math.h>
#include <cmath>
#include "studio_util.h"
#include "r_studioint.h"

2
cl_dll/StudioModelRenderer.cpp

@ -21,7 +21,7 @@ @@ -21,7 +21,7 @@
#include <stdio.h>
#include <string.h>
#include <memory.h>
#include <math.h>
#include <cmath>
#include "studio_util.h"
#include "r_studioint.h"

6
cl_dll/health.cpp

@ -18,9 +18,9 @@ @@ -18,9 +18,9 @@
// implementation of CHudHealth class
//
#include "stdio.h"
#include "stdlib.h"
#include "math.h"
#include <stdio.h>
#include <stdlib.h>
#include <cmath>
#include "hud.h"
#include "cl_util.h"

3
cl_dll/hud_redraw.cpp

@ -15,7 +15,8 @@ @@ -15,7 +15,8 @@
//
// hud_redraw.cpp
//
#include <math.h>
#include <cmath>
#include "hud.h"
#include "cl_util.h"
//#include "triangleapi.h"

2
cl_dll/hud_update.cpp

@ -16,7 +16,7 @@ @@ -16,7 +16,7 @@
// hud_update.cpp
//
#include <math.h>
#include <cmath>
#include "hud.h"
#include "cl_util.h"
#include <stdlib.h>

6
cl_dll/util.cpp

@ -18,9 +18,9 @@ @@ -18,9 +18,9 @@
// implementation of class-less helper functions
//
#include "stdio.h"
#include "stdlib.h"
#include "math.h"
#include <stdio.h>
#include <stdlib.h>
#include <cmath>
#include "hud.h"
#include "cl_util.h"

6
cl_dll/util_vector.h

@ -20,9 +20,9 @@ @@ -20,9 +20,9 @@
#define UTIL_VECTOR_H
// Misc C-runtime library headers
#include "stdio.h"
#include "stdlib.h"
#include "math.h"
#include <stdio.h>
#include <stdlib.h>
#include <cmath>
// Header file containing definition of globalvars_t and entvars_t
typedef unsigned int func_t; //

7
common/mathlib.h

@ -16,7 +16,14 @@ @@ -16,7 +16,14 @@
#pragma once
#ifndef MATHLIB_H
#define MATHLIB_H
#ifndef __cplusplus
#include <math.h>
#ifdef HAVE_TGMATH_H
#include <tgmath.h>
#endif // HAVE_TGMATH_H
#else // __cplusplus
#include <cmath>
#endif // __cplusplus
typedef float vec_t;
typedef vec_t vec2_t[2];

8
dlls/extdll.h

@ -60,10 +60,10 @@ typedef int BOOL; @@ -60,10 +60,10 @@ typedef int BOOL;
#endif //_WIN32
// Misc C-runtime library headers
#include "stdio.h"
#include "stdlib.h"
#include "stddef.h"
#include "math.h"
#include <stdio.h>
#include <stdlib.h>
#include <stddef.h>
#include <cmath>
#ifndef M_PI_F
#define M_PI_F (float)M_PI

6
pm_shared/pm_debug.c

@ -12,8 +12,12 @@ @@ -12,8 +12,12 @@
* without written permission from Valve LLC.
*
****/
#include <math.h>
#include "mathlib.h"
#ifdef HAVE_TGMATH_H
#include <tgmath.h>
#endif
#include "const.h"
#include "usercmd.h"
#include "pm_defs.h"

6
pm_shared/pm_math.c

@ -13,10 +13,12 @@ @@ -13,10 +13,12 @@
*
****/
// pm_math.c -- math primitives
#include <math.h>
#include "mathlib.h"
#ifdef HAVE_TGMATH_H
#include <tgmath.h>
#endif
#include "const.h"
#include <math.h>
// up / down
#define PITCH 0

14
pm_shared/pm_shared.c

@ -14,18 +14,22 @@ @@ -14,18 +14,22 @@
****/
#include <assert.h>
//#include <stdio.h> // NULL
#include <math.h> // sqrt
#include <string.h> // strcpy
#include <stdlib.h> // atoi
#include <ctype.h> // isspace
#include "mathlib.h"
#ifdef HAVE_TGMATH_H
#include <tgmath.h>
#endif
#include "const.h"
#include "usercmd.h"
#include "pm_defs.h"
#include "pm_shared.h"
#include "pm_movevars.h"
#include "pm_debug.h"
//#include <stdio.h> // NULL
#include <math.h> // sqrt
#include <string.h> // strcpy
#include <stdlib.h> // atoi
#include <ctype.h> // isspace
int g_bhopcap = 1;

Loading…
Cancel
Save