Decompile much of musyx

This commit is contained in:
gamemasterplc 2023-12-30 09:01:00 -06:00
parent 572a5e5a58
commit 36c41780cf
9 changed files with 100 additions and 22 deletions

18
include/float.h Normal file
View file

@ -0,0 +1,18 @@
#ifndef _FLOAT_H_
#define _FLOAT_H_
#ifdef __cplusplus
extern "C" {
#endif
#define FLT_MAX 3.402823466e+38f
#define FLT_EPSILON 1.192092896e-07f
#define FLT_MIN 1.175494351e-38f
#define DBL_EPSILON 1.1920929e-07
#ifdef __cplusplus
}
#endif
#endif

View file

@ -3,6 +3,10 @@
#define M_PI 3.141592653589793
#ifndef _MATH_INLINE
#define _MATH_INLINE static inline
#endif
#ifdef MATH_EXPORT_CONST
extern inline float sqrtf(float x)
{
@ -36,6 +40,7 @@ extern inline float sqrtf(float x)
return x;
}
#endif
double atan(double x);
double copysign(double x, double y);
double cos(double x);
@ -58,4 +63,14 @@ float acosf(float x);
#define abs(x) __abs(x)
_MATH_INLINE float fabsf(float x) { return (float)fabs((double)x); }
_MATH_INLINE float sinf(float x) { return (float)sin((double)x); }
_MATH_INLINE float cosf(float x) { return (float)cos((double)x); }
_MATH_INLINE float atan2f(float y, float x) { return (float)atan2((double)y, (double)x); }
_MATH_INLINE float fmodf(float x, float m) { return (float)fmod((double)x, (double)m); }
_MATH_INLINE float floorf(float x) { return floor(x); }
_MATH_INLINE float powf(float __x, float __y) { return pow(__x, __y); }
#endif

23
include/stddef.h Normal file
View file

@ -0,0 +1,23 @@
#ifndef _STDDEF_H_
#define _STDDEF_H_
#ifdef __cplusplus
extern "C" {
#endif
#define offsetof(type, member) ((size_t) & (((type*)0)->member))
/* These break 1.2.5 */
//typedef __typeof__(sizeof(0)) size_t;
//typedef __typeof__((char*)0 - (char*)0) ptrdiff_t;
typedef unsigned long size_t;
typedef long ptrdiff_t;
#ifndef NULL
#define NULL 0L
#endif
#ifdef __cplusplus
}
#endif
#endif

14
include/stdint.h Normal file
View file

@ -0,0 +1,14 @@
#ifndef _STDINT_H_
#define _STDINT_H_
#ifdef __cplusplus
extern "C" {
#endif
typedef unsigned long int uintptr_t;
#ifdef __cplusplus
}
#endif
#endif