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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
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
|