/* draw.h - Header for draw.c */

#ifndef DRAW_H_INC
#define DRAW_H_INC

#include <string.h>
#include <time.h>
#include "enemy.h"
#include "player.h"
#include "bullet.h"
#include "powerup.h"

#define ITOFIX(x) ((x)<<16)
#define FIXTOI(x) ((x)>>16)

#define USED 0
#define X 1
#define Y 2
#define TTL 3

#define ORIGINAL 0
#define REDGRID 1
#define GREENGRID 2
#define BLUEGRID 3
#define STARFIELD 4
#define DRAW_ALGS 5

extern BITMAP *bg;
extern BITMAP *menu_bg;
extern BITMAP *player;
extern BITMAP *plainplayer;
extern BITMAP *player_mask;
extern BITMAP *bullet1;
extern BITMAP *hud;
extern BITMAP *enemy_img[ENEMIES];
extern BITMAP *powerup_img[POWERUPS];

extern FONT *numbers;

extern int offsetx, offsety;
extern int draw_alg;
extern int colour[DRAW_ALGS];
extern int inv_col[DRAW_ALGS];

void init_colours(void);
void init_noise(int passes);
void update_offset(void);
void draw_game(BITMAP *canvas, int menu);
void update_bg(int menu);
void update_player_img(void);
void load_images(void);
void display_text(char *buff, int x, int y);
void update_texts(void);
void draw_texts(BITMAP *canvas, int menu);

#endif
