#ifndef THINGS_H
#define THINGS_H

#include "vector.h"
#include "render.h"

#define MAXBULLETS 256
#define MAXBALLS 1024
#define MAXWASTE 512
#define MAXBASES 8

#define PLAYER  0
#define ENEMY   1
#define BULLET  2
#define BONUS   3
#define WASTE   4
#define OTHER   255

#define INACTIVE    0
#define	ACTIVE  	1
#define CHOICE      2
#define	HIT         4
#define	CRITICAL    8

#define BALLVELX 2
#define BALLVELY 3
#define MINBALLSIZE 0

#define MAXENERGY 10000
#define ENERGYLOSS MAXENERGY/25

typedef struct thing
{
    vector pos;
    vector vel;

    float mass;
    int radius;
    int size;

    char type;
    char color;
    bool exists;
} thing;

typedef struct base
{
	vector pos;
	int radius;
	int energy;
	colorARGB col;
	float glow;
	int condition;
}base;

void InitThings();
void ShowThings(unsigned int *vram);
void ClearThings(unsigned int *vram);
void RunThings();
void CreateShoot();
void CreateBall(vector *pos, vector *vel, int size, int radius, int color);
void CreateWaste(vector *pos, vector *vel, int color);
#endif
