#include "TinyLibrary.hpp"
#include "BgChip.h"
#include "TitleImage.h"
#include "MessageImage.h"
#include "Character.h"
#include "BgMapData.h"
#include "TwinkleBeep04_11KHz_8bit_mono.h"
#include "hiyoko_01.h"
#include "jump_01_take2.h"
#include "Knockdown.h"
#include "Resource.hpp"

Data data[DATA_MAX] = 
{
	// buffer, size
	{NULL, 0}
};

ImageData image_data[IMAGE_MAX] =
{
	// buffer, width, height
	{NULL, 10, 10},
	{BgChip_1, 10, 10},
	{BgChip_2, 10, 10},
	{BgChip_3, 10, 10},
	{BgChip_4, 10, 10},
	{BgChip_5, 10, 10},
	{BgChip_6, 10, 10},
	{BgChip_7, 10, 10},
	{TitleImage, 96, 64},
	{Logo, 96, 64},
	{SuperOteme, 96, 64},
	{Start, 48, 8},
	{StageClear, 96, 8},
	{Congratulations, 96, 8},
	{Continue, 72, 8},
	{Stage, 40, 8},
	{Number_0, 8, 8},
	{Number_1, 8, 8},
	{Number_2, 8, 8},
	{Number_3, 8, 8},
	{Number_4, 8, 8},
	{Number_5, 8, 8},
	{Number_6, 8, 8},
	{Number_7, 8, 8},
	{Number_8, 8, 8},
	{Number_9, 8, 8},
	{Meteor_1, 10, 10},
	{Meteor_2, 10, 10},
	{Meteor_3, 10, 10},
	{Meteor_4, 10, 10},
	{Meteor_5, 10, 10},
	{Meteor_6, 10, 10},
	{Meteor_7, 10, 10},
	{Hiyoko_1, 10, 10},
	{Hiyoko_2, 10, 10},
	{Hiyoko_3, 10, 10},
	{Hiyoko_4, 10, 10},
};

BgMapData bg_map_data[BG_MAP_MAX] = 
{
	// buffer, width, height, back_red, back_green, back_blue
	{&bg_map_1[5], static_cast<int>(bg_map_1[0]), static_cast<int>(bg_map_1[1]), static_cast<int>(bg_map_1[2]), static_cast<int>(bg_map_1[3]), static_cast<int>(bg_map_1[4])},
	{&bg_map_2[5], static_cast<int>(bg_map_2[0]), static_cast<int>(bg_map_2[1]), static_cast<int>(bg_map_2[2]), static_cast<int>(bg_map_2[3]), static_cast<int>(bg_map_2[4])},
	{&bg_map_3[5], static_cast<int>(bg_map_3[0]), static_cast<int>(bg_map_3[1]), static_cast<int>(bg_map_3[2]), static_cast<int>(bg_map_3[3]), static_cast<int>(bg_map_3[4])},
};

SoundData sound_data[SOUND_MAX] = 
{
	// buffer, size
	{TwinkleBeep04_11KHz_8bit_mono_wave, sizeof(TwinkleBeep04_11KHz_8bit_mono_wave)},
	{hiyoko_01_wave, sizeof(hiyoko_01_wave)},
	{jump_01_take2_wave, sizeof(jump_01_take2_wave)},
	{Knockdown_wave, sizeof(Knockdown_wave)},
};

Data* GetData(int number)
{
	return &data[number];
}

ImageData* GetImageData(int number)
{
	return &image_data[number];
}

BgMapData* GetBgMapData(int number)
{
	return &bg_map_data[number];
}

SoundData* GetSoundData(int number)
{
	return &sound_data[number];
}
