#ifndef _SCREEN_H_
#define _SCREEN_H_

#include <gctypes.h>

#define GBWIDTH  160
#define GBHEIGHT 144
#define SGBWIDTH  256
#define SGBHEIGHT 224

extern int isVPAL;
extern int screen_w, screen_h;

/*gb image screen data*/
extern float gb_screen_scale;


/*primitives*/
/*	from driver*/
inline u16 screen_color_from_rgb(u8 r, u8 g, u8 b);
void screen_init();
void screen_render();
void screen_clear();
void screen_put_pixel(int x, int y, u16 color);
/*	generic*/
void screen_render_ingame();
void screen_draw_line(short int x1, short int y1, short int x2, short int y2, u16 color);
void screen_draw_rectangle(int x, int y, int hight, int widht, u16 color, int filled);
void screen_draw_triangle(int x, int y, int xa, int ya, int xb, int yb, u16 color);
void screen_draw_image(int xpos, int ypos, int width, int high, const u16 data[], float rad_ang, float rapport);
void screen_draw_imagex2(int xpos, int ypos, int width, int high, const u16 data[]);
void screen_draw_imagex3(int xpos, int ypos, int width, int high, const u16 data[]);
/*gb drawing*/
void screen_bitblt_sgb(unsigned long x, unsigned long y, u16 *d);
void screen_bitblt_gb(unsigned long x, unsigned long y, u16 *d);

/*Text*/
void screen_draw_char(int x, int y, unsigned char character, u16 color);
void screen_print(int x, int y, const char *msg, u16 color);
void screen_printf(int x, int y, u16 color, const char *str, ...);

#endif
