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.
39 lines
795 B
39 lines
795 B
#ifndef _DEFDRAW |
|
#define _DEFDRAW |
|
|
|
#include <SDL2/SDL.h> |
|
|
|
#include "garbo.h" |
|
#include "c-colours/colours.h" |
|
#include "vect.h" |
|
#include "game.h" |
|
#include "environment.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); |
|
|
|
extern Vect viewport_pos; |
|
|
|
extern int width, height; |
|
|
|
|
|
|
|
#endif
|
|
|