#ifndef COMMON_H
#define COMMON_H

#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <stdint.h>
#include <time.h>
#include <math.h>
#include <SDL2/SDL.h>
#include <SDL2/SDL_mixer.h>

#define APP_TITLE "Curiosity 143"
#define APP_WIDTH 960
#define APP_HEIGHT 640

//#define DEBUG_GOD_MODE
//#define DEBUG_DRAW_LEVEL_COLLISION
//#define DEBUG_DRAW_ACTORS
//#define DEBUG_DRAW_ROBO_COLLISION_REGION

typedef struct point_s
{
    int x;
    int y;
} point_t;

typedef struct vector_s
{
    float x;
    float y;
} vector_t;

typedef struct rgba_s
{
    uint8_t r;
    uint8_t g;
    uint8_t b;
    uint8_t a;
} rgba_t;

typedef enum key_e
{
    KEY_UP    = 0,
    KEY_RIGHT = 1,
    KEY_DOWN  = 2,
    KEY_LEFT  = 3,
    KEY_SPACE = 4,
    KEY_ESC   = 5,
    MAX_KEYS  = 6
} key_t;

typedef struct mouse_button_s
{
    bool press;
    bool down;
    bool up;
} mouse_button_t;

typedef struct key_state_e
{
    bool down;
    bool press;
    bool up;
} key_state_t;

extern rgba_t         bg_color;
extern rgba_t         bg_black_color;
extern mouse_button_t mouse_button;

#endif
