diff options
| author | kotorifan <kotorifan05@gmail.com> | 2026-04-27 17:02:49 +0200 |
|---|---|---|
| committer | kotorifan <kotorifan05@gmail.com> | 2026-04-27 17:02:49 +0200 |
| commit | 1ff5ed07b840f4f5de81592f7a9b04debf38c447 (patch) | |
| tree | a25b2cccd860522d944f1e19fd186462ff842a9c /src/common.h | |
| parent | c8ec0d2d0c57c42499f9ea95ef0ddd6ef3764f26 (diff) | |
| download | trashbinphysics-1ff5ed07b840f4f5de81592f7a9b04debf38c447.tar.gz | |
SAT works now
Diffstat (limited to 'src/common.h')
| -rw-r--r-- | src/common.h | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/src/common.h b/src/common.h index b56d70f..7664233 100644 --- a/src/common.h +++ b/src/common.h @@ -1,4 +1,8 @@ -// common.h +/** + * @file common.h + * @brief Functions and values used throughout most files + * @date 2026-04-27 +*/ #ifndef COMMON_H #define COMMON_H @@ -10,14 +14,6 @@ typedef int_least16_t i16; typedef uint_least32_t u32; typedef int_least32_t i32; -/* #define SHAPE_ENUM_SIZE 4 */ -/* typedef enum { */ -/* SHAPE_CIRCLE, */ -/* SHAPE_SQUARE, */ -/* SHAPE_RECTANGLE, */ -/* SHAPE_TRIANGLE */ -/* } shape_t; */ - typedef struct { Color color; float elast; @@ -33,6 +29,9 @@ typedef struct { float mass; Vector2* vertices; Vector2* edges; + float line_thickness; + u32 vertex_n; // number of vertices + u32 edge_n; // number of edges } object_t; @@ -50,8 +49,6 @@ typedef struct { #define ARR_LEN(arr) (sizeof(arr)/sizeof(arr[0])) -#define RANDOM_SHAPE() ((shape_t)(GetRandomValue(0, SHAPE_ENUM_SIZE - 1))) - #define RANDOM_COLOR() ((Color) { \ GetRandomValue(0, 255), \ GetRandomValue(0, 255), \ |
