diff options
author | Chris Xiong <chirs241097@gmail.com> | 2015-10-06 21:28:40 +0800 |
---|---|---|
committer | Chris Xiong <chirs241097@gmail.com> | 2015-10-06 21:28:40 +0800 |
commit | 038b31f0158a0018dbf2eceb71026cc4e665faa9 (patch) | |
tree | a373ddab7bc162e477e28a780b0d729660ff8634 /include/smgrid.hpp | |
parent | a8077292d5d9118866f7358c11a90c855e1b1b02 (diff) | |
download | SMELT-038b31f0158a0018dbf2eceb71026cc4e665faa9.tar.xz |
Add the SMELT files...
Please, do not laugh too loudly.
Diffstat (limited to 'include/smgrid.hpp')
-rw-r--r-- | include/smgrid.hpp | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/include/smgrid.hpp b/include/smgrid.hpp new file mode 100644 index 0000000..ce1aabb --- /dev/null +++ b/include/smgrid.hpp @@ -0,0 +1,44 @@ +// -*- C++ -*- +/* + * Simple MultimEdia LiTerator(SMELT) + * by Chris Xiong 2015 + * Distortion grid header + * + * WARNING: This library is in development and interfaces would be very + * unstable. + * + */ +#ifndef SMGRID_H +#define SMGRID_H +#include "smelt.hpp" + +#define GRID_REFNODE 0 +#define GRID_REFTOPLEFT 1 +#define GRID_REFCENTER 2 +#define GRID_REFCURRENT 3 + +class smGrid +{ +private: + smGrid(); + static SMELT *sm; + smVertex *pos; + int cc,rc; + float cw,ch; + float tx,ty,w,h; + smQuad quad; +public: + smGrid(int _cc,int _rc); + smGrid(const smGrid ©); + ~smGrid(); + smGrid& operator =(const smGrid ©); + void render(float x,float y); + void clear(DWORD color=0xFFFFFFFF); + void setTexture(SMTEX tex); + void setTextureRect4f(float _x,float _y,float _w,float _h); + void setTextureRectv(smTexRect rect); + void setBlend(int blend); + void setColor(int c,int r,DWORD col); + void setPos(int c,int r,float x,float y,float z,int ref); +}; +#endif |