summaryrefslogtreecommitdiff
path: root/gfx.h
blob: f2eb889bc1bfcad78a1dcb2f0decb6337ed0c0f8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#ifndef GFX_H
#define GFX_H
#include <SDL2/SDL.h>
#include <SDL2/SDL_opengl.h>
#include <SDL2/SDL_ttf.h>
#include <iostream>
#include <string>
//these are all global variables,
extern SDL_Window *mwindow; // main window were everything foes
extern SDL_DisplayMode * screen;
extern SDL_GLContext context;
extern SDL_Renderer * renderp;
extern TTF_Font * fontp;
extern int maxx;
extern int maxy;
int initgfx(int x, int y, const char * title);
int cleargfx();
int quitgfx();
int updategfx();
int drawimg(SDL_Rect r, SDL_Texture  * tex);
int drawimg(int x, int y, int w, int h,SDL_Texture * tex);
int drawimg(int x, int y, int w, int h, const char * file);
SDL_Texture * loadtexture(const char * file);
int drawrect(int x, int y, int w, int h, const char *);
int drawrect (int x, int y, int w, int h,int r, int g, int b, int a);
int drawtext(int x, int y,const char * text, SDL_Color c);
#endif