
#ifndef BONUS_H_
#define BONUS_H_

#ifdef __cplusplus
extern "C" {
#endif

#include "../factory/coord.h"
#include "../factory/particle.h"
#include "../factory/vertex.h"
#include "../util/collide.h"
#include "../util/mobile.h"

#define BONUS_ANGLE_GRAVITY	(COORD_PI / -2.0f)
#define BONUS_ANGLE_INITIAL	(COORD_PI / 2.0f)
#define BONUS_ANGLE_RANDOM	(COORD_PI / 16.0f)
#define BONUS_ANGLE_ROTATE	0.1f

#define BONUS_COUNT_TYPE	7

#define BONUS_DELAY_EFFECT	25

#define BONUS_SIZE_DEPTH	0.5f
#define BONUS_SIZE_HEIGHT	0.5f
#define BONUS_SIZE_WIDTH	0.5f

#define BONUS_SPEED_INITIAL	0.01f

#define BONUS_TEMP_WEIGHT	0.00001f

enum	e_bonus_type
{
	BONUS_TYPE_BALL_ONESHOT,
	BONUS_TYPE_BALL_SPLIT,
	BONUS_TYPE_BALL_TRAVERSE,
	BONUS_TYPE_BALL_TYPE_HEAVY,
	BONUS_TYPE_BALL_TYPE_LIGHT,
	BONUS_TYPE_PAD_DEC,
	BONUS_TYPE_PAD_INC
};

struct	s_bonus
{
	struct s_coord		coord;
	float				effect;
	float				dx;
	float				dy;
	float				dz;
	struct s_mobile		mobile;
	GLuint				texture;
	enum e_bonus_type	type;
};

char	bonus_collide (struct s_bonus*, float, float, float, float, float, float, float, float);
void	bonus_define (struct s_bonus*, float, float, enum e_bonus_type, GLuint);
void	bonus_draw (struct s_bonus*);
void	bonus_loop (struct s_bonus*, struct s_particle*);
void	bonus_move (struct s_bonus*);

#ifdef __cplusplus
}
#endif

#endif
