Remove extra newlines
This commit is contained in:
@@ -8,82 +8,65 @@
|
||||
typedef struct BH_Hashmap BH_Hashmap;
|
||||
|
||||
|
||||
|
||||
BH_Hashmap *BH_HashmapNew(BH_EqualCallback equal,
|
||||
BH_HashCallback hash);
|
||||
|
||||
|
||||
|
||||
void BH_HashmapFree(BH_Hashmap *hashmap);
|
||||
|
||||
|
||||
|
||||
void BH_HashmapClear(BH_Hashmap *hashmap);
|
||||
|
||||
|
||||
|
||||
int BH_HashmapReserve(BH_Hashmap *hashmap,
|
||||
size_t size);
|
||||
|
||||
|
||||
|
||||
int BH_HashmapInsert(BH_Hashmap *hashmap,
|
||||
void *key,
|
||||
void *value);
|
||||
|
||||
|
||||
|
||||
void BH_HashmapRemove(BH_Hashmap *hashmap,
|
||||
void *key);
|
||||
|
||||
|
||||
|
||||
int BH_HashmapAt(BH_Hashmap *hashmap,
|
||||
void *key,
|
||||
void **value);
|
||||
|
||||
|
||||
|
||||
int BH_HashmapEmpty(BH_Hashmap *hashmap);
|
||||
|
||||
|
||||
|
||||
size_t BH_HashmapSize(BH_Hashmap *hashmap);
|
||||
|
||||
|
||||
|
||||
size_t BH_HashmapCapacity(BH_Hashmap *hashmap);
|
||||
|
||||
|
||||
|
||||
float BH_HashmapFactor(BH_Hashmap *hashmap);
|
||||
|
||||
|
||||
|
||||
void BH_HashmapSetFactor(BH_Hashmap *hashmap,
|
||||
float factor);
|
||||
|
||||
|
||||
|
||||
void *BH_HashmapIterAt(BH_Hashmap *hashmap,
|
||||
void *key);
|
||||
|
||||
|
||||
|
||||
void *BH_HashmapIterNext(BH_Hashmap *hashmap,
|
||||
void *iter);
|
||||
|
||||
|
||||
|
||||
void BH_HashmapIterRemove(BH_Hashmap *hashmap,
|
||||
void *iter);
|
||||
|
||||
|
||||
|
||||
void *BH_HashmapIterKey(void *iter);
|
||||
|
||||
|
||||
|
||||
void *BH_HashmapIterValue(void *iter);
|
||||
|
||||
|
||||
|
||||
@@ -12,7 +12,6 @@ void BH_Box2fUnion(const float aMin[2],
|
||||
float outMax[2]);
|
||||
|
||||
|
||||
|
||||
int BH_Box2fIntersect(const float aMin[2],
|
||||
const float aMax[2],
|
||||
const float bMin[2],
|
||||
@@ -21,13 +20,11 @@ int BH_Box2fIntersect(const float aMin[2],
|
||||
float outMax[2]);
|
||||
|
||||
|
||||
|
||||
int BH_Box2fContains(const float aMin[2],
|
||||
const float aMax[2],
|
||||
const float point[2]);
|
||||
|
||||
|
||||
|
||||
int BH_Box2fEnclose(const float *points,
|
||||
size_t size,
|
||||
float outMin[2],
|
||||
|
||||
@@ -12,7 +12,6 @@ void BH_Box3fUnion(const float aMin[3],
|
||||
float outMax[3]);
|
||||
|
||||
|
||||
|
||||
int BH_Box3fIntersect(const float aMin[3],
|
||||
const float aMax[3],
|
||||
const float bMin[3],
|
||||
@@ -21,13 +20,11 @@ int BH_Box3fIntersect(const float aMin[3],
|
||||
float outMax[3]);
|
||||
|
||||
|
||||
|
||||
int BH_Box3fContains(const float aMin[3],
|
||||
const float aMax[3],
|
||||
const float point[3]);
|
||||
|
||||
|
||||
|
||||
int BH_Box3fEnclose(const float *points,
|
||||
size_t size,
|
||||
float outMin[3],
|
||||
|
||||
@@ -9,12 +9,10 @@ int BH_LineFromPoints(const float a[2],
|
||||
float out[3]);
|
||||
|
||||
|
||||
|
||||
float BH_LineDistance(const float line[3],
|
||||
const float point[2]);
|
||||
|
||||
|
||||
|
||||
void BH_LineClosestPoint(const float line[3],
|
||||
const float point[2],
|
||||
float out[2]);
|
||||
|
||||
@@ -7,72 +7,59 @@
|
||||
void BH_Mat3fIdentity(float out[9]);
|
||||
|
||||
|
||||
|
||||
void BH_Mat3fAdd(const float a[9],
|
||||
const float b[9],
|
||||
float out[9]);
|
||||
|
||||
|
||||
|
||||
void BH_Mat3fSub(const float a[9],
|
||||
const float b[9],
|
||||
float out[9]);
|
||||
|
||||
|
||||
|
||||
void BH_Mat3fMul(const float a[9],
|
||||
const float b[9],
|
||||
float out[9]);
|
||||
|
||||
|
||||
|
||||
void BH_Mat3fScale(const float a[9],
|
||||
float b,
|
||||
float out[9]);
|
||||
|
||||
|
||||
|
||||
void BH_Mat3fTranspose(const float in[9],
|
||||
float out[9]);
|
||||
|
||||
|
||||
|
||||
float BH_Mat3fTrace(const float in[9]);
|
||||
|
||||
|
||||
|
||||
float BH_Mat3fDet(const float in[9]);
|
||||
|
||||
|
||||
|
||||
int BH_Mat3fInverse(const float in[9],
|
||||
float out[9]);
|
||||
|
||||
|
||||
|
||||
void BH_Mat3fFromScale(float x,
|
||||
float y,
|
||||
float out[9]);
|
||||
|
||||
|
||||
|
||||
void BH_Mat3fFromTranslation(float x,
|
||||
float y,
|
||||
float out[9]);
|
||||
|
||||
|
||||
|
||||
void BH_Mat3fFromRotation(float angle,
|
||||
float out[9]);
|
||||
|
||||
|
||||
|
||||
void BH_Mat3fApplyVec3f(float a[9],
|
||||
float b[3],
|
||||
float out[3]);
|
||||
|
||||
|
||||
|
||||
void BH_Mat3fApplyVec2f(float a[9],
|
||||
float b[2],
|
||||
float out[2]);
|
||||
|
||||
@@ -7,96 +7,79 @@
|
||||
void BH_Mat4fIdentity(float out[16]);
|
||||
|
||||
|
||||
|
||||
void BH_Mat4fAdd(const float a[16],
|
||||
const float b[16],
|
||||
float out[16]);
|
||||
|
||||
|
||||
|
||||
void BH_Mat4fSub(const float a[16],
|
||||
const float b[16],
|
||||
float out[16]);
|
||||
|
||||
|
||||
|
||||
void BH_Mat4fMul(const float a[16],
|
||||
const float b[16],
|
||||
float out[16]);
|
||||
|
||||
|
||||
|
||||
void BH_Mat4fScale(const float a[16],
|
||||
float b,
|
||||
float out[16]);
|
||||
|
||||
|
||||
|
||||
void BH_Mat4fTranspose(const float in[16],
|
||||
float out[16]);
|
||||
|
||||
|
||||
|
||||
float BH_Mat4fTrace(const float in[16]);
|
||||
|
||||
|
||||
|
||||
float BH_Mat4fDet(const float in[16]);
|
||||
|
||||
|
||||
|
||||
int BH_Mat4fInverse(const float in[16],
|
||||
float out[16]);
|
||||
|
||||
|
||||
|
||||
void BH_Mat4fFromScale(float x,
|
||||
float y,
|
||||
float z,
|
||||
float out[16]);
|
||||
|
||||
|
||||
|
||||
void BH_Mat4fFromTranslation(float x,
|
||||
float y,
|
||||
float z,
|
||||
float out[16]);
|
||||
|
||||
|
||||
|
||||
void BH_Mat4fFromRotationX(float angle,
|
||||
float out[16]);
|
||||
|
||||
|
||||
|
||||
void BH_Mat4fFromRotationY(float angle,
|
||||
float out[16]);
|
||||
|
||||
|
||||
|
||||
void BH_Mat4fFromRotationZ(float angle,
|
||||
float out[16]);
|
||||
|
||||
|
||||
|
||||
void BH_Mat4fFromAxis(const float axis[3],
|
||||
float angle,
|
||||
float out[16]);
|
||||
|
||||
|
||||
|
||||
void BH_Mat4fFromEuler(float roll,
|
||||
float pitch,
|
||||
float yaw,
|
||||
float out[16]);
|
||||
|
||||
|
||||
|
||||
void BH_Mat4fFromQuat4f(const float in[4],
|
||||
float out[16]);
|
||||
|
||||
|
||||
|
||||
void BH_Mat4fFromOrtho(float xMin,
|
||||
float xMax,
|
||||
float yMin,
|
||||
@@ -106,7 +89,6 @@ void BH_Mat4fFromOrtho(float xMin,
|
||||
float out[16]);
|
||||
|
||||
|
||||
|
||||
void BH_Mat4fFromFrustum(float fov,
|
||||
float aspect,
|
||||
float zMin,
|
||||
@@ -114,20 +96,17 @@ void BH_Mat4fFromFrustum(float fov,
|
||||
float out[16]);
|
||||
|
||||
|
||||
|
||||
void BH_Mat4fFromLookAt(const float position[3],
|
||||
const float at[3],
|
||||
const float up[3],
|
||||
float out[16]);
|
||||
|
||||
|
||||
|
||||
void BH_Mat4fApplyVec4f(const float a[16],
|
||||
const float b[4],
|
||||
float out[4]);
|
||||
|
||||
|
||||
|
||||
void BH_Mat4fApplyVec3f(const float a[16],
|
||||
const float b[3],
|
||||
float out[3]);
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
float BH_Lerpf(float a, float b, float t);
|
||||
|
||||
|
||||
|
||||
void BH_Triangle3fBarycentric(const float a[3],
|
||||
const float b[3],
|
||||
const float c[3],
|
||||
|
||||
@@ -10,12 +10,10 @@ int BH_PlaneFromPoints(const float a[3],
|
||||
float out[4]);
|
||||
|
||||
|
||||
|
||||
float BH_PlaneDistance(const float plane[4],
|
||||
const float point[3]);
|
||||
|
||||
|
||||
|
||||
void BH_PlaneClosestPoint(const float plane[4],
|
||||
const float point[3],
|
||||
float out[3]);
|
||||
|
||||
@@ -9,95 +9,78 @@
|
||||
BH_Vec4fAdd(a, b, out)
|
||||
|
||||
|
||||
|
||||
#define BH_Quat4fSub(a, b, out) \
|
||||
BH_Vec4fSub(a, b, out)
|
||||
|
||||
|
||||
|
||||
#define BH_Quat4fScale(a, b, out) \
|
||||
BH_Vec4fScale(a, b, out)
|
||||
|
||||
|
||||
|
||||
#define BH_Quat4fNegate(in, out) \
|
||||
BH_Vec4fNegate(in, out)
|
||||
|
||||
|
||||
|
||||
#define BH_Quat4fDot(a, b) \
|
||||
BH_Vec4fDot(a, b)
|
||||
|
||||
|
||||
|
||||
#define BH_Quat4fLength(in) \
|
||||
BH_Vec4fLength(in)
|
||||
|
||||
|
||||
|
||||
#define BH_Quat4fNormal(in, out) \
|
||||
BH_Vec4fNormal(in, out)
|
||||
|
||||
|
||||
|
||||
#define BH_Quat4fLerp(a, b, t, out) \
|
||||
BH_Vec4fLerp(a, b, t, out)
|
||||
|
||||
|
||||
|
||||
void BH_Quat4fIdentity(float out[4]);
|
||||
|
||||
|
||||
|
||||
void BH_Quat4fConjugate(const float in[4],
|
||||
float out[4]);
|
||||
|
||||
|
||||
|
||||
void BH_Quat4fInverse(const float in[4],
|
||||
float out[4]);
|
||||
|
||||
|
||||
|
||||
void BH_Quat4fMul(const float a[4],
|
||||
const float b[4],
|
||||
float out[4]);
|
||||
|
||||
|
||||
|
||||
void BH_Quat4fSlerp(const float a[4],
|
||||
const float b[4],
|
||||
float t,
|
||||
float out[4]);
|
||||
|
||||
|
||||
|
||||
void BH_Quat4fFromEuler(float roll,
|
||||
float pitch,
|
||||
float yaw,
|
||||
float out[4]);
|
||||
|
||||
|
||||
|
||||
void BH_Quat4fFromAxis(const float axis[3],
|
||||
float angle,
|
||||
float out[4]);
|
||||
|
||||
|
||||
|
||||
void BH_Quat4fToEuler(const float in[4],
|
||||
float *roll,
|
||||
float *pitch,
|
||||
float *yaw);
|
||||
|
||||
|
||||
|
||||
void BH_Quat4fToAxis(const float in[4],
|
||||
float axis[3],
|
||||
float *angle);
|
||||
|
||||
|
||||
|
||||
void BH_Quat4fToMat4f(const float in[4],
|
||||
float out[16]);
|
||||
|
||||
|
||||
@@ -11,7 +11,6 @@ int BH_Ray2fIntersectLine(const float start[2],
|
||||
float out[2]);
|
||||
|
||||
|
||||
|
||||
int BH_Ray2fIntersectTime(const float aStart[2],
|
||||
const float aDirection[2],
|
||||
const float bStart[2],
|
||||
@@ -20,7 +19,6 @@ int BH_Ray2fIntersectTime(const float aStart[2],
|
||||
float *time2);
|
||||
|
||||
|
||||
|
||||
int BH_Ray2fIntersectRay(const float aStart[2],
|
||||
const float aDirection[2],
|
||||
const float bStart[2],
|
||||
@@ -29,7 +27,6 @@ int BH_Ray2fIntersectRay(const float aStart[2],
|
||||
float out[2]);
|
||||
|
||||
|
||||
|
||||
int BH_Ray2fIntersectSegment(const float aStart[2],
|
||||
const float aDirection[2],
|
||||
const float bStart[2],
|
||||
@@ -38,7 +35,6 @@ int BH_Ray2fIntersectSegment(const float aStart[2],
|
||||
float out[2]);
|
||||
|
||||
|
||||
|
||||
int BH_Segment2fIntersectLine(const float start[2],
|
||||
const float end[2],
|
||||
const float line[3],
|
||||
@@ -46,7 +42,6 @@ int BH_Segment2fIntersectLine(const float start[2],
|
||||
float out[2]);
|
||||
|
||||
|
||||
|
||||
int BH_Segment2fIntersectSegment(const float aStart[2],
|
||||
const float aEnd[2],
|
||||
const float bStart[2],
|
||||
@@ -55,7 +50,6 @@ int BH_Segment2fIntersectSegment(const float aStart[2],
|
||||
float out[2]);
|
||||
|
||||
|
||||
|
||||
int BH_Ray2fIntersectBox2f(const float aStart[2],
|
||||
const float aDirection[2],
|
||||
const float bMin[2],
|
||||
@@ -64,7 +58,6 @@ int BH_Ray2fIntersectBox2f(const float aStart[2],
|
||||
float out[2]);
|
||||
|
||||
|
||||
|
||||
int BH_Segment2fIntersectBox2f(const float aStart[2],
|
||||
const float aEnd[2],
|
||||
const float bMin[2],
|
||||
|
||||
@@ -11,7 +11,6 @@ int BH_Ray3fIntersectPlane(const float start[3],
|
||||
float out[3]);
|
||||
|
||||
|
||||
|
||||
int BH_Ray3fIntersectTriangle(const float start[3],
|
||||
const float direction[3],
|
||||
const float a[3],
|
||||
@@ -21,7 +20,6 @@ int BH_Ray3fIntersectTriangle(const float start[3],
|
||||
float out[3]);
|
||||
|
||||
|
||||
|
||||
int BH_Segment3fIntersectPlane(const float start[3],
|
||||
const float end[3],
|
||||
const float plane[4],
|
||||
@@ -29,7 +27,6 @@ int BH_Segment3fIntersectPlane(const float start[3],
|
||||
float out[3]);
|
||||
|
||||
|
||||
|
||||
int BH_Segment3fIntersectTriangle(const float start[3],
|
||||
const float end[3],
|
||||
const float a[3],
|
||||
@@ -47,7 +44,6 @@ int BH_Ray3fIntersectBox3f(const float aStart[3],
|
||||
float out[3]);
|
||||
|
||||
|
||||
|
||||
int BH_Segment3fIntersectBox3f(const float aStart[3],
|
||||
const float aEnd[3],
|
||||
const float bMin[3],
|
||||
|
||||
@@ -8,86 +8,71 @@ void BH_Vec2fAdd(const float a[2],
|
||||
float out[2]);
|
||||
|
||||
|
||||
|
||||
void BH_Vec2fSub(const float a[2],
|
||||
const float b[2],
|
||||
float out[2]);
|
||||
|
||||
|
||||
|
||||
void BH_Vec2fMul(const float a[2],
|
||||
const float b[2],
|
||||
float out[2]);
|
||||
|
||||
|
||||
|
||||
void BH_Vec2fScale(const float a[2],
|
||||
float b,
|
||||
float out[2]);
|
||||
|
||||
|
||||
|
||||
void BH_Vec2fMulAdd(const float a[2],
|
||||
const float b[2],
|
||||
const float c[2],
|
||||
float out[2]);
|
||||
|
||||
|
||||
|
||||
void BH_Vec2fNegate(const float in[2],
|
||||
float out[2]);
|
||||
|
||||
|
||||
|
||||
float BH_Vec2fDot(const float a[2],
|
||||
const float b[2]);
|
||||
|
||||
|
||||
|
||||
float BH_Vec2fCross(const float a[2],
|
||||
const float b[2]);
|
||||
|
||||
|
||||
|
||||
float BH_Vec2fLength(const float in[2]);
|
||||
|
||||
|
||||
|
||||
void BH_Vec2fNormal(const float in[2],
|
||||
float out[2]);
|
||||
|
||||
|
||||
|
||||
float BH_Vec2fNormalEx(const float in[2],
|
||||
float out[2]);
|
||||
|
||||
|
||||
|
||||
void BH_Vec2fMin(const float a[2],
|
||||
const float b[2],
|
||||
float out[2]);
|
||||
|
||||
|
||||
|
||||
void BH_Vec2fMax(const float a[2],
|
||||
const float b[2],
|
||||
float out[2]);
|
||||
|
||||
|
||||
|
||||
void BH_Vec2fLerp(const float a[2],
|
||||
const float b[2],
|
||||
float t,
|
||||
float out[2]);
|
||||
|
||||
|
||||
|
||||
void BH_Vec2fProject(const float a[2],
|
||||
const float b[2],
|
||||
float out[2]);
|
||||
|
||||
|
||||
|
||||
void BH_Vec2fBarycentric(const float a[2],
|
||||
const float b[2],
|
||||
const float c[2],
|
||||
@@ -96,5 +81,4 @@ void BH_Vec2fBarycentric(const float a[2],
|
||||
float out[2]);
|
||||
|
||||
|
||||
|
||||
#endif /* BH_MATH_VEC2F */
|
||||
|
||||
@@ -8,43 +8,36 @@ void BH_Vec2iAdd(const int a[2],
|
||||
int out[2]);
|
||||
|
||||
|
||||
|
||||
void BH_Vec2iSub(const int a[2],
|
||||
const int b[2],
|
||||
int out[2]);
|
||||
|
||||
|
||||
|
||||
void BH_Vec2iMul(const int a[2],
|
||||
const int b[2],
|
||||
int out[2]);
|
||||
|
||||
|
||||
|
||||
void BH_Vec2iScale(const int a[2],
|
||||
int b,
|
||||
int out[2]);
|
||||
|
||||
|
||||
|
||||
void BH_Vec2iMulAdd(const int a[2],
|
||||
const int b[2],
|
||||
const int c[2],
|
||||
int out[2]);
|
||||
|
||||
|
||||
|
||||
void BH_Vec2iNegate(const int in[2],
|
||||
int out[2]);
|
||||
|
||||
|
||||
|
||||
void BH_Vec2iMin(const int a[2],
|
||||
const int b[2],
|
||||
int out[2]);
|
||||
|
||||
|
||||
|
||||
void BH_Vec2iMax(const int a[2],
|
||||
const int b[2],
|
||||
int out[2]);
|
||||
|
||||
@@ -4,80 +4,66 @@
|
||||
#include "../Common.h"
|
||||
|
||||
|
||||
|
||||
void BH_Vec3fAdd(const float a[3],
|
||||
const float b[3],
|
||||
float out[3]);
|
||||
|
||||
|
||||
|
||||
void BH_Vec3fSub(const float a[3],
|
||||
const float b[3],
|
||||
float out[3]);
|
||||
|
||||
|
||||
|
||||
void BH_Vec3fMul(const float a[3],
|
||||
const float b[3],
|
||||
float out[3]);
|
||||
|
||||
|
||||
|
||||
void BH_Vec3fScale(const float a[3],
|
||||
float b,
|
||||
float out[3]);
|
||||
|
||||
|
||||
|
||||
void BH_Vec3fMulAdd(const float a[3],
|
||||
const float b[3],
|
||||
const float c[3],
|
||||
float out[3]);
|
||||
|
||||
|
||||
|
||||
void BH_Vec3fNegate(const float in[3],
|
||||
float out[3]);
|
||||
|
||||
|
||||
|
||||
float BH_Vec3fDot(const float a[3],
|
||||
const float b[3]);
|
||||
|
||||
|
||||
|
||||
void BH_Vec3fCross(const float a[3],
|
||||
const float b[3],
|
||||
float out[3]);
|
||||
|
||||
|
||||
|
||||
float BH_Vec3fLength(const float in[3]);
|
||||
|
||||
|
||||
|
||||
void BH_Vec3fNormal(const float in[3],
|
||||
float out[3]);
|
||||
|
||||
|
||||
|
||||
float BH_Vec3fNormalEx(const float in[3],
|
||||
float out[3]);
|
||||
|
||||
|
||||
|
||||
void BH_Vec3fMin(const float a[3],
|
||||
const float b[3],
|
||||
float out[3]);
|
||||
|
||||
|
||||
|
||||
void BH_Vec3fMax(const float a[3],
|
||||
const float b[3],
|
||||
float out[3]);
|
||||
|
||||
|
||||
|
||||
void BH_Vec3fLerp(const float a[3],
|
||||
const float b[3],
|
||||
float t,
|
||||
|
||||
@@ -8,43 +8,36 @@ void BH_Vec3iAdd(const int a[3],
|
||||
int out[3]);
|
||||
|
||||
|
||||
|
||||
void BH_Vec3iSub(const int a[3],
|
||||
const int b[3],
|
||||
int out[3]);
|
||||
|
||||
|
||||
|
||||
void BH_Vec3iMul(const int a[3],
|
||||
const int b[3],
|
||||
int out[3]);
|
||||
|
||||
|
||||
|
||||
void BH_Vec3iScale(const int a[3],
|
||||
int b,
|
||||
int out[3]);
|
||||
|
||||
|
||||
|
||||
void BH_Vec3iMulAdd(const int a[3],
|
||||
const int b[3],
|
||||
const int c[3],
|
||||
int out[3]);
|
||||
|
||||
|
||||
|
||||
void BH_Vec3iNegate(const int in[3],
|
||||
int out[3]);
|
||||
|
||||
|
||||
|
||||
void BH_Vec3iMin(const int a[3],
|
||||
const int b[3],
|
||||
int out[3]);
|
||||
|
||||
|
||||
|
||||
void BH_Vec3iMax(const int a[3],
|
||||
const int b[3],
|
||||
int out[3]);
|
||||
|
||||
@@ -9,43 +9,36 @@ void BH_Vec4iAdd(const int a[4],
|
||||
int out[4]);
|
||||
|
||||
|
||||
|
||||
void BH_Vec4iSub(const int a[4],
|
||||
const int b[4],
|
||||
int out[4]);
|
||||
|
||||
|
||||
|
||||
void BH_Vec4iMul(const int a[4],
|
||||
const int b[4],
|
||||
int out[4]);
|
||||
|
||||
|
||||
|
||||
void BH_Vec4iScale(const int a[4],
|
||||
int b,
|
||||
int out[4]);
|
||||
|
||||
|
||||
|
||||
void BH_Vec4iMulAdd(const int a[4],
|
||||
const int b[4],
|
||||
const int c[4],
|
||||
int out[4]);
|
||||
|
||||
|
||||
|
||||
void BH_Vec4iNegate(const int in[4],
|
||||
int out[4]);
|
||||
|
||||
|
||||
|
||||
void BH_Vec4iMin(const int a[4],
|
||||
const int b[4],
|
||||
int out[4]);
|
||||
|
||||
|
||||
|
||||
void BH_Vec4iMax(const int a[4],
|
||||
const int b[4],
|
||||
int out[4]);
|
||||
|
||||
@@ -8,55 +8,43 @@
|
||||
typedef struct BH_Queue BH_Queue;
|
||||
|
||||
|
||||
|
||||
BH_Queue *BH_QueueNew(void);
|
||||
|
||||
|
||||
|
||||
void BH_QueueFree(BH_Queue *queue);
|
||||
|
||||
|
||||
|
||||
void BH_QueueClear(BH_Queue *queue);
|
||||
|
||||
|
||||
|
||||
int BH_QueueReserve(BH_Queue *queue,
|
||||
size_t size);
|
||||
|
||||
|
||||
|
||||
int BH_QueueInsert(BH_Queue *queue,
|
||||
void *value);
|
||||
|
||||
|
||||
|
||||
void BH_QueueRemove(BH_Queue *queue);
|
||||
|
||||
|
||||
|
||||
int BH_QueueFront(BH_Queue *queue,
|
||||
void **value);
|
||||
|
||||
|
||||
|
||||
int BH_QueueEmpty(BH_Queue *queue);
|
||||
|
||||
|
||||
|
||||
size_t BH_QueueSize(BH_Queue *queue);
|
||||
|
||||
|
||||
|
||||
size_t BH_QueueCapacity(BH_Queue *queue);
|
||||
|
||||
|
||||
|
||||
void *BH_QueueIterNext(BH_Queue *queue,
|
||||
void *iter);
|
||||
|
||||
|
||||
|
||||
void *BH_QueueIterValue(void *iter);
|
||||
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
#include "Common.h"
|
||||
|
||||
|
||||
|
||||
int BH_StringFromDouble(char *string,
|
||||
size_t size,
|
||||
double value,
|
||||
@@ -14,7 +13,6 @@ int BH_StringFromDouble(char *string,
|
||||
size_t *actual);
|
||||
|
||||
|
||||
|
||||
int BH_StringFromInt8s(char *string,
|
||||
size_t size,
|
||||
int8_t value,
|
||||
@@ -22,7 +20,6 @@ int BH_StringFromInt8s(char *string,
|
||||
size_t *actual);
|
||||
|
||||
|
||||
|
||||
int BH_StringFromInt16s(char *string,
|
||||
size_t size,
|
||||
int16_t value,
|
||||
@@ -30,7 +27,6 @@ int BH_StringFromInt16s(char *string,
|
||||
size_t *actual);
|
||||
|
||||
|
||||
|
||||
int BH_StringFromInt32s(char *string,
|
||||
size_t size,
|
||||
int32_t value,
|
||||
@@ -38,7 +34,6 @@ int BH_StringFromInt32s(char *string,
|
||||
size_t *actual);
|
||||
|
||||
|
||||
|
||||
int BH_StringFromInt64s(char *string,
|
||||
size_t size,
|
||||
int64_t value,
|
||||
@@ -46,7 +41,6 @@ int BH_StringFromInt64s(char *string,
|
||||
size_t *actual);
|
||||
|
||||
|
||||
|
||||
int BH_StringFromInt8u(char *string,
|
||||
size_t size,
|
||||
uint8_t value,
|
||||
@@ -54,7 +48,6 @@ int BH_StringFromInt8u(char *string,
|
||||
size_t *actual);
|
||||
|
||||
|
||||
|
||||
int BH_StringFromInt16u(char *string,
|
||||
size_t size,
|
||||
uint16_t value,
|
||||
@@ -62,7 +55,6 @@ int BH_StringFromInt16u(char *string,
|
||||
size_t *actual);
|
||||
|
||||
|
||||
|
||||
int BH_StringFromInt32u(char *string,
|
||||
size_t size,
|
||||
uint32_t value,
|
||||
@@ -70,7 +62,6 @@ int BH_StringFromInt32u(char *string,
|
||||
size_t *actual);
|
||||
|
||||
|
||||
|
||||
int BH_StringFromInt64u(char *string,
|
||||
size_t size,
|
||||
uint64_t value,
|
||||
@@ -78,58 +69,48 @@ int BH_StringFromInt64u(char *string,
|
||||
size_t *actual);
|
||||
|
||||
|
||||
|
||||
double BH_StringToDouble(const char *string,
|
||||
size_t *size);
|
||||
|
||||
|
||||
|
||||
int8_t BH_StringToInt8s(const char *string,
|
||||
size_t *size,
|
||||
int base);
|
||||
|
||||
|
||||
|
||||
int16_t BH_StringToInt16s(const char *string,
|
||||
size_t *size,
|
||||
int base);
|
||||
|
||||
|
||||
|
||||
int32_t BH_StringToInt32s(const char *string,
|
||||
size_t *size,
|
||||
int base);
|
||||
|
||||
|
||||
|
||||
int64_t BH_StringToInt64s(const char *string,
|
||||
size_t *size,
|
||||
int base);
|
||||
|
||||
|
||||
|
||||
uint8_t BH_StringToInt8u(const char *string,
|
||||
size_t *size,
|
||||
int base);
|
||||
|
||||
|
||||
|
||||
uint16_t BH_StringToInt16u(const char *string,
|
||||
size_t *size,
|
||||
int base);
|
||||
|
||||
|
||||
|
||||
uint32_t BH_StringToInt32u(const char *string,
|
||||
size_t *size,
|
||||
int base);
|
||||
|
||||
|
||||
|
||||
uint64_t BH_StringToInt64u(const char *string,
|
||||
size_t *size,
|
||||
int base);
|
||||
|
||||
|
||||
|
||||
#endif /* BH_STRING_H */
|
||||
|
||||
@@ -16,113 +16,87 @@ typedef struct BH_Condition BH_Condition;
|
||||
typedef int (*BH_ThreadCallback)(void *);
|
||||
|
||||
|
||||
|
||||
BH_Thread *BH_ThreadNew(size_t stack,
|
||||
BH_ThreadCallback callback,
|
||||
void *data);
|
||||
|
||||
|
||||
|
||||
int BH_ThreadJoin(BH_Thread *thread);
|
||||
|
||||
|
||||
|
||||
int BH_ThreadDetach(BH_Thread *thread);
|
||||
|
||||
|
||||
|
||||
BH_Mutex *BH_MutexNew(void);
|
||||
|
||||
|
||||
|
||||
void BH_MutexFree(BH_Mutex *mutex);
|
||||
|
||||
|
||||
|
||||
int BH_MutexLock(BH_Mutex *mutex);
|
||||
|
||||
|
||||
|
||||
int BH_MutexUnlock(BH_Mutex *mutex);
|
||||
|
||||
|
||||
|
||||
int BH_MutexLockTry(BH_Mutex *mutex);
|
||||
|
||||
|
||||
|
||||
BH_Semaphore *BH_SemaphoreNew(int value);
|
||||
|
||||
|
||||
|
||||
void BH_SemaphoreFree(BH_Semaphore *semaphore);
|
||||
|
||||
|
||||
|
||||
int BH_SemaphorePost(BH_Semaphore *semaphore);
|
||||
|
||||
|
||||
|
||||
int BH_SemaphoreWait(BH_Semaphore *semaphore);
|
||||
|
||||
|
||||
|
||||
int BH_SemaphoreWaitTry(BH_Semaphore *semaphore);
|
||||
|
||||
|
||||
|
||||
int BH_SemaphoreWaitFor(BH_Semaphore *semaphore,
|
||||
uint32_t timeout);
|
||||
|
||||
|
||||
|
||||
BH_Condition *BH_ConditionNew(void);
|
||||
|
||||
|
||||
|
||||
void BH_ConditionFree(BH_Condition *condition);
|
||||
|
||||
|
||||
|
||||
int BH_ConditionWait(BH_Condition *condition,
|
||||
BH_Mutex *mutex);
|
||||
|
||||
|
||||
|
||||
int BH_ConditionWaitFor(BH_Condition *condition,
|
||||
BH_Mutex *mutex,
|
||||
uint32_t timeout);
|
||||
|
||||
|
||||
|
||||
int BH_ConditionSignal(BH_Condition *condition);
|
||||
|
||||
|
||||
|
||||
int BH_ConditionBroadcast(BH_Condition *condition);
|
||||
|
||||
|
||||
|
||||
void BH_SpinlockLock(int *lock);
|
||||
|
||||
|
||||
|
||||
int BH_SpinlockLockTry(int *lock);
|
||||
|
||||
|
||||
|
||||
void BH_SpinlockUnlock(int *lock);
|
||||
|
||||
|
||||
|
||||
int BH_TssCreate(BH_GenericCallback callback);
|
||||
|
||||
|
||||
|
||||
void *BH_TssRead(int index);
|
||||
|
||||
|
||||
|
||||
void BH_TssWrite(int index,
|
||||
void *value);
|
||||
|
||||
|
||||
@@ -5,60 +5,49 @@
|
||||
#include "Common.h"
|
||||
|
||||
|
||||
|
||||
uint32_t BH_UnicodeLower(uint32_t unit);
|
||||
|
||||
|
||||
|
||||
uint32_t BH_UnicodeUpper(uint32_t unit);
|
||||
|
||||
|
||||
|
||||
size_t BH_UnicodeDecodeUtf8(const char *string,
|
||||
size_t size,
|
||||
uint32_t *unit);
|
||||
|
||||
|
||||
|
||||
size_t BH_UnicodeEncodeUtf8(uint32_t unit,
|
||||
char *string);
|
||||
|
||||
|
||||
|
||||
size_t BH_UnicodeDecodeUtf16LE(const char *string,
|
||||
size_t size,
|
||||
uint32_t *unit);
|
||||
|
||||
|
||||
|
||||
size_t BH_UnicodeDecodeUtf16BE(const char *string,
|
||||
size_t size,
|
||||
uint32_t *unit);
|
||||
|
||||
|
||||
|
||||
size_t BH_UnicodeEncodeUtf16LE(uint32_t unit,
|
||||
char *string);
|
||||
|
||||
|
||||
|
||||
size_t BH_UnicodeEncodeUtf16BE(uint32_t unit,
|
||||
char *string);
|
||||
|
||||
|
||||
|
||||
size_t BH_UnicodeDecodeUtf32LE(const char *string,
|
||||
size_t size,
|
||||
uint32_t *unit);
|
||||
|
||||
|
||||
|
||||
size_t BH_UnicodeDecodeUtf32BE(const char *string,
|
||||
size_t size,
|
||||
uint32_t *unit);
|
||||
|
||||
|
||||
|
||||
size_t BH_UnicodeEncodeUtf32LE(uint32_t unit,
|
||||
char *string);
|
||||
|
||||
|
||||
@@ -12,114 +12,89 @@
|
||||
#define BH_FP_NEGATIVE 0x0020
|
||||
|
||||
|
||||
|
||||
int BH_ClassifyDouble(double value);
|
||||
|
||||
|
||||
|
||||
uint16_t BH_Read16LEu(const char *buffer);
|
||||
|
||||
|
||||
|
||||
int16_t BH_Read16LEs(const char *buffer);
|
||||
|
||||
|
||||
|
||||
uint32_t BH_Read32LEu(const char *buffer);
|
||||
|
||||
|
||||
|
||||
int32_t BH_Read32LEs(const char *buffer);
|
||||
|
||||
|
||||
|
||||
uint64_t BH_Read64LEu(const char *buffer);
|
||||
|
||||
|
||||
|
||||
int64_t BH_Read64LEs(const char *buffer);
|
||||
|
||||
|
||||
|
||||
uint16_t BH_Read16BEu(const char *buffer);
|
||||
|
||||
|
||||
|
||||
int16_t BH_Read16BEs(const char *buffer);
|
||||
|
||||
|
||||
|
||||
uint32_t BH_Read32BEu(const char *buffer);
|
||||
|
||||
|
||||
|
||||
int32_t BH_Read32BEs(const char *buffer);
|
||||
|
||||
|
||||
|
||||
uint64_t BH_Read64BEu(const char *buffer);
|
||||
|
||||
|
||||
|
||||
int64_t BH_Read64BEs(const char *buffer);
|
||||
|
||||
|
||||
|
||||
void BH_Write16LEu(char *buffer,
|
||||
uint16_t value);
|
||||
|
||||
|
||||
|
||||
void BH_Write16LEs(char *buffer,
|
||||
int16_t value);
|
||||
|
||||
|
||||
|
||||
void BH_Write32LEu(char *buffer,
|
||||
uint32_t value);
|
||||
|
||||
|
||||
|
||||
void BH_Write32LEs(char *buffer,
|
||||
int32_t value);
|
||||
|
||||
|
||||
|
||||
void BH_Write64LEu(char *buffer,
|
||||
uint64_t value);
|
||||
|
||||
|
||||
|
||||
void BH_Write64LEs(char *buffer,
|
||||
int64_t value);
|
||||
|
||||
|
||||
|
||||
void BH_Write16BEu(char *buffer,
|
||||
uint16_t value);
|
||||
|
||||
|
||||
|
||||
void BH_Write16BEs(char *buffer,
|
||||
int16_t value);
|
||||
|
||||
|
||||
|
||||
void BH_Write32BEu(char *buffer,
|
||||
uint32_t value);
|
||||
|
||||
|
||||
|
||||
void BH_Write32BEs(char *buffer,
|
||||
int32_t value);
|
||||
|
||||
|
||||
|
||||
void BH_Write64BEu(char *buffer,
|
||||
uint64_t value);
|
||||
|
||||
|
||||
|
||||
void BH_Write64BEs(char *buffer,
|
||||
int64_t value);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user