#pragma once

#include "../../engine/file.h"
#include "../../engine/shader.h"
#include "../../engine/font.h"
#include "../../engine/texture.h"
#include "../../engine/sound.h"
#include "../../engine/music.h"

#define SHADER_COUNT SHADER_COLOR_QUAD + 1
typedef enum ShaderType
{
	SHADER_TEXTURE_QUAD,
	SHADER_COLOR_QUAD
} ShaderType;

typedef struct ShaderPaths
{
	const char* vertex;
	const char* fragment;
} ShaderPaths;

static const ShaderPaths SHADER_PATHS[SHADER_COUNT] =
{
	{
		.vertex = "res/shader/texture_quad.vs",
		.fragment = "res/shader/texture_quad.fs"
	},
	{
		.vertex = "res/shader/color_quad.vs",
		.fragment = "res/shader/color_quad.fs"
	}
};

#define TEXTURE_COUNT TEXTURE_GOODIES + 1
typedef enum TextureType
{
	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
} TextureType;

static const char* TEXTURE_PATHS[TEXTURE_COUNT] =
{
	"res/gfx/play/cursor.png",
	"res/gfx/play/redirectArrow.png",
	"res/gfx/play/icons.png",
	"res/gfx/play/streak.png",
	"res/gfx/play/streakSquare.png",
	"res/gfx/play/shadow.png",
	"res/gfx/play/player.png",
	"res/gfx/play/elemental.png",
	"res/gfx/play/cupper.png",
	"res/gfx/play/chipper.png",
	"res/gfx/play/crumbler.png",
	"res/gfx/play/custarpedo.png",
	"res/gfx/play/excorsant.png",
	"res/gfx/play/rock_candy_micheal.png",
	"res/gfx/play/neapolitotem.png",
	"res/gfx/play/ez_ache.png",
	"res/gfx/play/creper.png",
	"res/gfx/play/gum_mk_ii.png",
	"res/gfx/play/snake.png",
	"res/gfx/play/chip.png",
	"res/gfx/play/gumball.png",
	"res/gfx/play/goodies.png"
};

#define FONT_COUNT FONT_HUD + 1
typedef enum FontType
{
	FONT_NORMAL,
	FONT_STAT_DISPLAY,
	FONT_DAMAGE_NUMBER,
	FONT_HUD
} FontType;

static const char* FONT_PATHS[FONT_COUNT] =
{
	"res/font/upheaval.ttf",
	"res/font/upheaval.ttf",
	"res/font/upheaval.ttf",
	"res/font/upheaval.ttf",
};

static const u32 FONT_SIZES[FONT_COUNT] =
{
	64,
	32,
	32,
	32
};

#define SOUND_COUNT SOUND_EZ_ACHE_READY + 1
typedef enum SoundType
{
	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
} SoundType;

static const char* SOUND_PATHS[SOUND_COUNT] =
{
	"res/sound/select.ogg",
	"res/sound/bleep.ogg",
	"res/sound/snakeShoot.ogg",
	"res/sound/playerHurt.ogg",
	"res/sound/playerKill.ogg",
	"res/sound/hurt.ogg",
	"res/sound/redirect.ogg",
	"res/sound/lock.ogg",
	"res/sound/unlock.ogg",
	"res/sound/goodie.ogg",
	"res/sound/gulp.ogg",
	"res/sound/grow.ogg",
	"res/sound/heart.ogg",
	"res/sound/upgrade.ogg",
	"res/sound/cupperHop.ogg",
	"res/sound/cupperKill.ogg",
	"res/sound/chipperKill.ogg",
	"res/sound/chipShoot.ogg",
	"res/sound/chipKill.ogg",
	"res/sound/crumblerWhoosh.ogg",
	"res/sound/crumblerSmash.ogg",
	"res/sound/crumblerKill.ogg",
	"res/sound/custarpedoFly.ogg",
	"res/sound/custarpedoKill.ogg",
	"res/sound/excorsantSpin.ogg",
	"res/sound/excorsantKill.ogg",
	"res/sound/ezAcheReady.ogg",
};

#define MUSIC_COUNT MUSIC_GAME_OVER + 1
typedef enum MusicType
{
	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
} MusicType;

static const char* MUSIC_PATHS[MUSIC_COUNT] =
{
	"res/music/chill.ogg",
	"res/music/combatOne.ogg",
	"res/music/combatTwo.ogg",
	"res/music/combatThree.ogg",
	"res/music/waveCompleteOne.ogg",
	"res/music/waveCompleteTwo.ogg",
	"res/music/waveCompleteThree.ogg",
	"res/music/gameOver.ogg",
};

typedef struct Game Game;

typedef struct Resources
{
	Shader shaders[SHADER_COUNT];
	Texture textures[TEXTURE_COUNT];
	Music music[MUSIC_COUNT];
	Sound sounds[SOUND_COUNT]; 
	Font fonts[FONT_COUNT];
} Resources;
