#pragma once

#include "../../component/action/component_action_shoot.h"
#include "../../component/component_character.h"
#include "../../component/control/component_control_player.h"
#include "../../component/stat/component_ammo.h"
#include "../../component/stat/component_goodies.h"
#include "../../component/stat/component_redirects.h"
#include "../../component/stat/component_upgrades.h"
#include "../../component/stat/component_game_entity_type.h"
#include "../../ecs_component.h"

#include "entity_snake.h"

#define PLAYER_CONTROL_MOVE_SPEED 1
#define PLAYER_FRICTION 0.875
#define PLAYER_VELOCITY_MAX 8
#define PLAYER_ACTION_SHOOT_SPEED 15
#define PLAYER_ACTION_SHOOT_HEIGHT 25.0f
#define PLAYER_ACTION_SHOOT_OFFSET 100.0f
#define PLAYER_CONTROL_SHOOT_COOLDOWN 12
#define PLAYER_CONTROL_REDIRECT_ANGLE_THRESHOLD 15 // Degrees
#define PLAYER_AMMO_START 5
#define PLAYER_HEALTH_MAX 3
#define PLAYER_REDIRECTS_START 5
#define PLAYER_GAME_ENTITY_TYPE GAME_ENTITY_PLAYER
#define PLAYER_ALLEGIANCE ALLEGIANCE_PLAYER

static const ivec2 PLAYER_FRAME_SIZE = {512, 512};
static const ivec2 PLAYER_ATLAS_SIZE = {1, 1};
static const vec2 PLAYER_SIZE = {75.0f, 150.0f};
static const vec2 PLAYER_PHYSICS_SIZE = {60.0f, 20.0f};

void entity_player_init(ECS* ecs, u32 id, vec3 position);
