23 #ifndef SAXBOPHONE_SAXBOSPIRAL_SAXBOSPIRAL_H 24 #define SAXBOPHONE_SAXBOSPIRAL_SAXBOSPIRAL_H 113 typedef int8_t sxbp_rotation_t; 115 #define SXBP_CLOCKWISE 1 116 #define SXBP_ANTI_CLOCKWISE -1 124 typedef uint32_t sxbp_length_t; 134 sxbp_direction_t direction : 2;
224 clock_t current_clock_ticks;
232 clock_t elapsed_clock_ticks;
uint8_t * bytes
pointer to array of bytes
Definition: saxbospiral.h:238
bool sxbp_version_less_than(sxbp_version_t a, sxbp_version_t b)
Checks if a version is less than another.
Definition: saxbospiral.c:28
const char * string
String form of the version (vX.Y.Z)
Definition: saxbospiral.h:48
uint32_t seconds_accuracy
stores the number of seconds' accuracy of the seconds_spent field
Definition: saxbospiral.h:219
uint8_t sxbp_direction_t
Type for representing one of the cartesian directions.
Definition: saxbospiral.h:101
const sxbp_version_t LIB_SXBP_VERSION
Stores the current version of libsxbp.
Definition: saxbospiral.c:21
struct sxbp_co_ord_array_t sxbp_co_ord_array_t
Struct type for holding a dynamically allocated array of co-ordinates.
Definition: saxbospiral.h:93
struct sxbp_tuple_t sxbp_tuple_t
A generic Tuple type for storing a vector-based quantity.
A generic Tuple type for storing a vector-based quantity.
Definition: saxbospiral.h:145
uint32_t sxbp_length_t
Type for representing the length of a line segment of a spiral.
Definition: saxbospiral.h:124
size_t size
size of the array in number of items
Definition: saxbospiral.h:164
uint16_t minor
The minor version number of the version.
Definition: saxbospiral.h:44
struct sxbp_line_t sxbp_line_t
Represents one line segment in the spiral structure.
uint16_t patch
The patch version number of the version.
Definition: saxbospiral.h:46
uint32_t size
count of lines in the spiral
Definition: saxbospiral.h:191
sxbp_co_ord_array_t co_ords
the co-ord array containing the cached co-ords
Definition: saxbospiral.h:175
size_t validity
the index of the spiral line for which this set of cached co-ords is valid up to
Definition: saxbospiral.h:178
sxbp_tuple_t sxbp_vector_t
A Vector type used for representing directions.
Definition: saxbospiral.h:153
bool collides
whether this spiral collides or not
Definition: saxbospiral.h:200
const sxbp_vector_t SXBP_VECTOR_DIRECTIONS[4]
Vector direction constants.
Definition: saxbospiral.c:61
sxbp_co_ord_t * items
pointer to the array of co-ordinates
Definition: saxbospiral.h:162
int32_t sxbp_tuple_item_t
Type for storing one of the items of a tuple.
Definition: saxbospiral.h:140
Definition: saxbospiral.h:91
Struct type for holding a dynamically allocated array of co-ordinates.
Definition: saxbospiral.h:160
A simple buffer type for storing arrays of bytes.
Definition: saxbospiral.h:236
Definition: saxbospiral.h:92
sxbp_line_t * lines
dynamic array of lines in the spiral
Definition: saxbospiral.h:193
Represents one line segment in the spiral structure.
Definition: saxbospiral.h:132
struct sxbp_spiral_t sxbp_spiral_t
Struct type representing a Spiral figure, in any state of completion.
sxbp_tuple_item_t x
The x (across) value of the tuple.
Definition: saxbospiral.h:147
Definition: saxbospiral.h:89
bool sxbp_version_greater_than(sxbp_version_t a, sxbp_version_t b)
Checks if a version is greater than another.
Definition: saxbospiral.c:41
uint32_t solved_count
the count of lines solved so far (index of next line to solve)
Definition: saxbospiral.h:207
sxbp_tuple_t sxbp_co_ord_t
A co-ord type used for representing cartesian co-ordinates.
Definition: saxbospiral.h:155
Struct type representing a Spiral figure, in any state of completion.
Definition: saxbospiral.h:189
bool sxbp_version_equal_to(sxbp_version_t a, sxbp_version_t b)
Checks if a version is equal to another.
Definition: saxbospiral.c:54
struct sxbp_version_t sxbp_version_t
Used to represent a version of libsxbp.
struct sxbp_buffer_t sxbp_buffer_t
A simple buffer type for storing arrays of bytes.
size_t size
the size of the array of bytes
Definition: saxbospiral.h:240
Struct type for holding a cached set of co-ords.
Definition: saxbospiral.h:173
uint16_t major
The major version number of the version.
Definition: saxbospiral.h:42
Used to represent a version of libsxbp.
Definition: saxbospiral.h:40
sxbp_tuple_item_t y
The y (down) value of the tuple.
Definition: saxbospiral.h:149
Definition: saxbospiral.h:88
Definition: saxbospiral.h:90
struct sxbp_co_ord_cache_t sxbp_co_ord_cache_t
Struct type for holding a cached set of co-ords.
uint32_t seconds_spent
the count of seconds spent solving the spiral
Definition: saxbospiral.h:214
sxbp_status_t
Represents the success or failure status of an executed function.
Definition: saxbospiral.h:87