#ifndef TWN_TYPES_H
#define TWN_TYPES_H

#include <stdint.h>

/* plain data aggregates that are accepted between public procedure boundaries */


/* a point in some space (floating point) */
typedef struct Vec2 {
    float x;
    float y;
} Vec2;


/* a point in some three dimension space (floating point) */
/* y goes up, x goes to the right */
typedef struct Vec3 {
    float x;
    float y;
    float z;
} Vec3;


/* 32-bit color data */
typedef struct Color {
    uint8_t r;
    uint8_t g;
    uint8_t b;
    uint8_t a;
} Color;


/* a rectangle with the origin at the upper left (floating point) */
typedef struct Rect {
    float x;
    float y;
    float w;
    float h;
} Rect;


/* data packet exchanged between parties, assumed immutable */
/* length is whole number */
typedef struct String {
    char *data;
    float length;
} String;


#endif