
#ifndef BONUS_LIST_HH_
#define BONUS_LIST_HH_

#include "../factory/particle.h"
#include "../factory/surface.h"
#include "../factory/vertex.h"
#include "bonus.h"
#include "pad.hh"

#define BONUS_COUNT_ITEM		16
#define BONUS_COUNT_SOUND_FIXED	1
#define BONUS_COUNT_SOUND		(BONUS_COUNT_SOUND_FIXED + BONUS_COUNT_TYPE)
#define BONUS_COUNT_TEXTURE		(BONUS_COUNT_TYPE)

#define BONUS_DIST_INACTIVE		5

struct	s_ball_list;

enum	e_bonus_sound
{
	BONUS_SOUND_LOOT
};

enum	e_bonus_state
{
	BONUS_STATE_INACTIVE,
	BONUS_STATE_ALIVE
};

struct  s_bonus_list
{
	struct s_bonus		list[BONUS_COUNT_ITEM];
	enum e_bonus_state	state[BONUS_COUNT_ITEM];
	struct s_particle*	particle;
	unsigned int		sound[BONUS_COUNT_SOUND];
	GLuint				texture[BONUS_COUNT_TEXTURE];
	float				x1;
	float				x2;
	float				y1;
	float				y2;
};

void	bonus_list_collide (struct s_bonus_list*, struct s_pad*, struct s_ball_list*);
void	bonus_list_define (struct s_bonus_list*, struct s_particle*, struct s_surface*, float, float, float, float);
void	bonus_list_draw (struct s_bonus_list*);
void	bonus_list_insert (struct s_bonus_list*, float, float);
void	bonus_list_loop (struct s_bonus_list*);
void	bonus_list_move (struct s_bonus_list*);

#endif
