Update spcomp and includes to latest 1.10-fork
disable warning 241: Array-based enum structs will be removed in 1.11
This commit is contained in:
Vendored
+43
-43
@@ -9,7 +9,7 @@
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, version 3.0, as published by the
|
||||
* Free Software Foundation.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
@@ -38,84 +38,84 @@
|
||||
/**
|
||||
* Calculates a vector's length.
|
||||
*
|
||||
* @param vec Vector.
|
||||
* @param squared If true, the result will be squared (for optimization).
|
||||
* @return Vector length (magnitude).
|
||||
* @param vec Vector.
|
||||
* @param squared If true, the result will be squared (for optimization).
|
||||
* @return Vector length (magnitude).
|
||||
*/
|
||||
native float GetVectorLength(const float vec[3], bool squared=false);
|
||||
|
||||
/**
|
||||
* Calculates the distance between two vectors.
|
||||
*
|
||||
* @param vec1 First vector.
|
||||
* @param vec2 Second vector.
|
||||
* @param squared If true, the result will be squared (for optimization).
|
||||
* @return Vector distance.
|
||||
* @param vec1 First vector.
|
||||
* @param vec2 Second vector.
|
||||
* @param squared If true, the result will be squared (for optimization).
|
||||
* @return Vector distance.
|
||||
*/
|
||||
native float GetVectorDistance(const float vec1[3], const float vec2[3], bool squared=false);
|
||||
|
||||
/**
|
||||
* Calculates the dot product of two vectors.
|
||||
*
|
||||
* @param vec1 First vector.
|
||||
* @param vec2 Second vector.
|
||||
* @return Dot product of the two vectors.
|
||||
* @param vec1 First vector.
|
||||
* @param vec2 Second vector.
|
||||
* @return Dot product of the two vectors.
|
||||
*/
|
||||
native float GetVectorDotProduct(const float vec1[3], const float vec2[3]);
|
||||
|
||||
/**
|
||||
* Computes the cross product of two vectors. Any input array can be the same
|
||||
* Computes the cross product of two vectors. Any input array can be the same
|
||||
* as the output array.
|
||||
*
|
||||
* @param vec1 First vector.
|
||||
* @param vec2 Second vector.
|
||||
* @param result Resultant vector.
|
||||
* @param vec1 First vector.
|
||||
* @param vec2 Second vector.
|
||||
* @param result Resultant vector.
|
||||
*/
|
||||
native void GetVectorCrossProduct(const float vec1[3], const float vec2[3], float result[3]);
|
||||
|
||||
/**
|
||||
* Normalizes a vector. The input array can be the same as the output array.
|
||||
*
|
||||
* @param vec Vector.
|
||||
* @param result Resultant vector.
|
||||
* @return Vector length.
|
||||
* @param vec Vector.
|
||||
* @param result Resultant vector.
|
||||
* @return Vector length.
|
||||
*/
|
||||
native float NormalizeVector(const float vec[3], float result[3]);
|
||||
|
||||
/**
|
||||
* Returns vectors in the direction of an angle.
|
||||
*
|
||||
* @param angle Angle.
|
||||
* @param fwd Forward vector buffer or NULL_VECTOR.
|
||||
* @param right Right vector buffer or NULL_VECTOR.
|
||||
* @param up Up vector buffer or NULL_VECTOR.
|
||||
* @param angle Angle.
|
||||
* @param fwd Forward vector buffer or NULL_VECTOR.
|
||||
* @param right Right vector buffer or NULL_VECTOR.
|
||||
* @param up Up vector buffer or NULL_VECTOR.
|
||||
*/
|
||||
native void GetAngleVectors(const float angle[3], float fwd[3], float right[3], float up[3]);
|
||||
|
||||
/**
|
||||
* Returns angles from a vector.
|
||||
*
|
||||
* @param vec Vector.
|
||||
* @param angle Angle buffer.
|
||||
* @param vec Vector.
|
||||
* @param angle Angle buffer.
|
||||
*/
|
||||
native void GetVectorAngles(const float vec[3], float angle[3]);
|
||||
|
||||
/**
|
||||
* Returns direction vectors from a vector.
|
||||
*
|
||||
* @param vec Vector.
|
||||
* @param right Right vector buffer or NULL_VECTOR.
|
||||
* @param up Up vector buffer or NULL_VECTOR.
|
||||
* @param vec Vector.
|
||||
* @param right Right vector buffer or NULL_VECTOR.
|
||||
* @param up Up vector buffer or NULL_VECTOR.
|
||||
*/
|
||||
native void GetVectorVectors(const float vec[3], float right[3], float up[3]);
|
||||
|
||||
/**
|
||||
* Adds two vectors. It is safe to use either input buffer as an output
|
||||
* Adds two vectors. It is safe to use either input buffer as an output
|
||||
* buffer.
|
||||
*
|
||||
* @param vec1 First vector.
|
||||
* @param vec2 Second vector.
|
||||
* @param result Result buffer.
|
||||
*
|
||||
* @param vec1 First vector.
|
||||
* @param vec2 Second vector.
|
||||
* @param result Result buffer.
|
||||
*/
|
||||
stock void AddVectors(const float vec1[3], const float vec2[3], float result[3])
|
||||
{
|
||||
@@ -125,12 +125,12 @@ stock void AddVectors(const float vec1[3], const float vec2[3], float result[3])
|
||||
}
|
||||
|
||||
/**
|
||||
* Subtracts a vector from another vector. It is safe to use either input
|
||||
* Subtracts a vector from another vector. It is safe to use either input
|
||||
* buffer as an output buffer.
|
||||
*
|
||||
* @param vec1 First vector.
|
||||
* @param vec2 Second vector to subtract from first.
|
||||
* @param result Result buffer.
|
||||
*
|
||||
* @param vec1 First vector.
|
||||
* @param vec2 Second vector to subtract from first.
|
||||
* @param result Result buffer.
|
||||
*/
|
||||
stock void SubtractVectors(const float vec1[3], const float vec2[3], float result[3])
|
||||
{
|
||||
@@ -142,8 +142,8 @@ stock void SubtractVectors(const float vec1[3], const float vec2[3], float resul
|
||||
/**
|
||||
* Scales a vector.
|
||||
*
|
||||
* @param vec Vector.
|
||||
* @param scale Scale value.
|
||||
* @param vec Vector.
|
||||
* @param scale Scale value.
|
||||
*/
|
||||
stock void ScaleVector(float vec[3], float scale)
|
||||
{
|
||||
@@ -155,7 +155,7 @@ stock void ScaleVector(float vec[3], float scale)
|
||||
/**
|
||||
* Negatives a vector.
|
||||
*
|
||||
* @param vec Vector.
|
||||
* @param vec Vector.
|
||||
*/
|
||||
stock void NegateVector(float vec[3])
|
||||
{
|
||||
@@ -167,9 +167,9 @@ stock void NegateVector(float vec[3])
|
||||
/**
|
||||
* Builds a vector from two points by subtracting the points.
|
||||
*
|
||||
* @param pt1 First point (to be subtracted from the second).
|
||||
* @param pt2 Second point.
|
||||
* @param output Output vector buffer.
|
||||
* @param pt1 First point (to be subtracted from the second).
|
||||
* @param pt2 Second point.
|
||||
* @param output Output vector buffer.
|
||||
*/
|
||||
stock void MakeVectorFromPoints(const float pt1[3], const float pt2[3], float output[3])
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user