From 9d300eb1f837fc571106f0bf857c99750838e8ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miloslav=20=C4=8C=C3=AD=C5=BE?= Date: Sat, 15 Sep 2018 17:06:23 +0200 Subject: [PATCH] Reorders structs --- raycastlib.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/raycastlib.h b/raycastlib.h index bccfaec..8d8db9e 100644 --- a/raycastlib.h +++ b/raycastlib.h @@ -117,8 +117,8 @@ /// Position in 2D space. typedef struct { - Unit y; Unit x; + Unit y; } Vector2D; typedef struct @@ -129,16 +129,16 @@ 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 no collision happened. */ + uint8_t direction; ///< Direction of hit. 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 will be the floor height). */ Unit type; /**< Integer identifying type of square (number returned by type function, e.g. texture index).*/ - uint8_t direction; ///< Direction of hit. Unit doorRoll; ///< Holds value of door roll. } HitResult;