1
0
Fork 0
mirror of https://git.coom.tech/drummyfish/raycastlib.git synced 2024-11-23 20:49:57 +01:00

Reorders structs

This commit is contained in:
Miloslav Číž 2018-09-15 17:06:23 +02:00
parent 8def7d7868
commit 9d300eb1f8

View file

@ -117,8 +117,8 @@
/// Position in 2D space. /// Position in 2D space.
typedef struct typedef struct
{ {
Unit y;
Unit x; Unit x;
Unit y;
} Vector2D; } Vector2D;
typedef struct typedef struct
@ -129,16 +129,16 @@ typedef struct
typedef struct typedef struct
{ {
Vector2D square; ///< Collided square coordinates.
Vector2D position; ///< Exact collision position in Units.
Unit distance; /**< Euclidean distance to the hit position, or -1 if Unit distance; /**< Euclidean distance to the hit position, or -1 if
no collision happened. */ no collision happened. */
uint8_t direction; ///< Direction of hit.
Unit textureCoord; ///< Normalized (0 to UNITS_PER_SQUARE - 1) tex coord. Unit textureCoord; ///< Normalized (0 to UNITS_PER_SQUARE - 1) tex coord.
Vector2D square; ///< Collided square coordinates.
Vector2D position; ///< Exact collision position in Units.
Unit arrayValue; /** Value returned by array function (most often this Unit arrayValue; /** Value returned by array function (most often this
will be the floor height). */ will be the floor height). */
Unit type; /**< Integer identifying type of square (number Unit type; /**< Integer identifying type of square (number
returned by type function, e.g. texture index).*/ returned by type function, e.g. texture index).*/
uint8_t direction; ///< Direction of hit.
Unit doorRoll; ///< Holds value of door roll. Unit doorRoll; ///< Holds value of door roll.
} HitResult; } HitResult;