#pragma once

#include "../STATE_COMMON.h"

#include "../../ecs/ecs.h"

#include "../../ecs/entity/play/entity_player.h"
#include "../../ecs/entity/play/entity_goodie_display.h"
#include "../../ecs/entity/play/entity_elemental.h"
#include "../../ecs/entity/play/entity_spawner.h"
#include "../../ecs/entity/play/entity_timer_display.h"
#include "../../ecs/entity/play/entity_combat_timer_display.h"
#include "../../ecs/entity/play/entity_wave_display.h"
#include "../../ecs/entity/play/entity_heart_display.h"
#include "../../ecs/entity/play/entity_wave_timer_display.h"
#include "../../ecs/entity/play/entity_shop_button.h"
#include "../../ecs/entity/entity_cursor.h"

static const vec3 PLAY_PLAYER_POSITION = {960.0f, 1000.0f, 0.0f};
static const vec3 PLAY_ELEMENTAL_POSITION = {960.0f, 500.0f, 0.0f};

#define PLAY_SHADER_COUNT 2
static const ShaderType PLAY_SHADERS[PLAY_SHADER_COUNT] =
{
	SHADER_TEXTURE_QUAD,
	SHADER_COLOR_QUAD
};

#define PLAY_TEXTURE_COUNT 22
static const TextureType PLAY_TEXTURES[PLAY_TEXTURE_COUNT] =
{
	TEXTURE_CURSOR,
	TEXTURE_REDIRECT_ARROW,
	TEXTURE_ICONS,
	TEXTURE_STREAK,
	TEXTURE_STREAK_SQUARE,
	TEXTURE_SHADOW,
	TEXTURE_PLAYER,
	TEXTURE_ELEMENTAL,
	TEXTURE_CUPPER,
	TEXTURE_CHIPPER,
	TEXTURE_CRUMBLER,
	TEXTURE_CUSTARPEDO,
	TEXTURE_EXCORSANT,
	TEXTURE_ROCK_CANDY_MICHEAL,
	TEXTURE_NEAPOLITOTEM,
	TEXTURE_EZ_ACHE,
	TEXTURE_CREPER,
	TEXTURE_GUM_MK_II,
	TEXTURE_SNAKE,
	TEXTURE_CHIP,
	TEXTURE_GUMBALL,
	TEXTURE_GOODIES
};

#define PLAY_FONT_COUNT 4
static const FontType PLAY_FONTS[PLAY_FONT_COUNT] =
{
	FONT_NORMAL,
	FONT_STAT_DISPLAY,
	FONT_DAMAGE_NUMBER,
	FONT_HUD
};

#define PLAY_SOUND_COUNT 27
static const SoundType PLAY_SOUNDS[PLAY_SOUND_COUNT] = 
{
	SOUND_SELECT,
	SOUND_BLEEP,
	SOUND_SNAKE_SHOOT,
	SOUND_PLAYER_HURT,
	SOUND_PLAYER_KILL,
	SOUND_HURT,
	SOUND_REDIRECT,
	SOUND_LOCK,
	SOUND_UNLOCK,
	SOUND_GOODIE,
	SOUND_GULP,
	SOUND_GROW,
	SOUND_HEART,
	SOUND_UPGRADE,
	SOUND_CUPPER_HOP,
	SOUND_CUPPER_KILL,
	SOUND_CHIPPER_KILL,
	SOUND_CHIP_SHOOT,
	SOUND_CHIP_KILL,
	SOUND_CRUMBLER_WHOOSH,
	SOUND_CRUMBLER_SMASH,
	SOUND_CRUMBLER_KILL,
	SOUND_CUSTARPEDO_FLY,
	SOUND_CUSTARPEDO_KILL,
	SOUND_EXCORSANT_SPIN,
	SOUND_EXCORSANT_KILL,
	SOUND_EZ_ACHE_READY
};

#define PLAY_MUSIC_COUNT 8
static const MusicType PLAY_MUSIC[PLAY_MUSIC_COUNT] =
{
	MUSIC_CHILL,
	MUSIC_COMBAT_ONE,
	MUSIC_COMBAT_TWO,
	MUSIC_COMBAT_THREE,
	MUSIC_WAVE_COMPLETE_ONE,
	MUSIC_WAVE_COMPLETE_TWO,
	MUSIC_WAVE_COMPLETE_THREE,
	MUSIC_GAME_OVER
};

void play_init(Play* play, State* state);
