-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCGraphicGrid.h
50 lines (32 loc) · 1020 Bytes
/
CGraphicGrid.h
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
45
46
47
48
49
50
#ifndef _CGRAPHICGRID_H_
#define _CGRAPHICGRID_H_
#include <vector>
#include "CGraphicCell.h"
#include "CCell.h"
#include "CCellGrid.h"
class CGraphicGrid : public CDrawable
{
public:
static SDL_Surface* SurfGrid;
private:
uint16_t gridRows;
uint16_t gridCols;
int pixW;
int pixH;
int spacing;
std::vector< std::vector< CGraphicCell* > > GCellGrid;
private:
CGraphicGrid();
public:
CGraphicGrid( CCellGrid* CGrid, int gCellSize = 4 );
~CGraphicGrid();
int getWidth() { return pixW; }
int getHeight() { return pixH; }
int getSpacing() { return spacing; }
uint16_t getGridRows() { return gridRows; }
uint16_t getGridCols() { return gridCols; }
CGraphicCell* getCellAt( int row, int col );
void setAt( int row, int col, CGraphicCell::GCellState state );
void OnDraw( SDL_Surface* Dest, SDL_Rect* DestRect = NULL );
};
#endif // _CGRAPHICGRID_H_