From 8eb0808fecb8c57eff877fddf38db91b1f067921 Mon Sep 17 00:00:00 2001 From: knolax <1339802534.kk@gmail.com> Date: Tue, 28 Feb 2017 11:07:10 -0500 Subject: initial commit, this is the gfx library which serves as a crappy wrapper for SDL. --- gfx.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 gfx.h (limited to 'gfx.h') diff --git a/gfx.h b/gfx.h new file mode 100644 index 0000000..f2eb889 --- /dev/null +++ b/gfx.h @@ -0,0 +1,27 @@ +#ifndef GFX_H +#define GFX_H +#include +#include +#include +#include +#include +//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 -- cgit v1.1