1
1
Fork 0
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

54 lines
1.1 KiB

#ifndef _DEFDRAW
#define _DEFDRAW
#include <SDL2/SDL.h>
#include <SDL2/SDL_ttf.h>
#include "c-colours/colours.h"
#include "vect.h"
#include "environment.h"
#include "game.h"
#define SHOWCOLLISION 0
#define SHOWFORCES 0
typedef enum {
PLAYER
} draw_type;
void render_texture_at(struct SDL_Renderer * ren, struct SDL_Texture * texture,int x, int y) ;
/* draw a texture at x.y */
SDL_Texture * load_image(SDL_Renderer * ren, char fname[]);
/* Load an image into a texture */
void draw_player(SDL_Renderer * ren, int x, int y, bool red);
/* draw the player as a coloured rect */
//void queue_draw_item(void * object, draw_type kind);
void add_to_view(draw_type kind, void * object);
void redraw_buffer(SDL_Renderer * ren);
void draw_text_default(SDL_Renderer *ren, Vect pos, struct colour colour, char *text);
enum FontNames {
DEFAULT,
LARGE
};
void load_fonts(void);
void draw_text(SDL_Renderer *ren, enum FontNames fontID, Vect pos, struct colour colour, char *text);
int draw_end_screen(SDL_Renderer *ren);
extern Vect viewport_pos;
extern int width, height;
extern bool high_contrast_mode;
#endif