aboutsummaryrefslogtreecommitdiff
path: root/include/smgrid.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/smgrid.hpp')
-rw-r--r--include/smgrid.hpp44
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 &copy);
+ ~smGrid();
+ smGrid& operator =(const smGrid &copy);
+ 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