blob: 1cdf063fbbec718cc7c360a1a700cc5b3ad564f2 (
plain)
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
|
#ifndef frame_h
#define frame_h
#include <ncurses.h>
#include "Character.hpp"
#include <string>
#include <fstream>
#include <iostream>
#include <vector>
using namespace std;
class Frame
{
public:
Frame(string location, int nRow, int nCol); // main window with seeded map
Frame(Frame &super, int rows, int cols, int nRow, int nCol); // viewport
~Frame();
WINDOW * getWin();
WINDOW * getSuper();
bool getHasSuper();
int getHeight();
int getWidth();
int getRow();
int getCol();
void fillWindow();
void refresh();
void move(int nRow, int nCol);
void add(Character &c);
void add(Character &c, int nRow, int nCol);
void erase(Character &c);
void center(Character &ch);
private:
int height, width;
int row, col;
bool hasSuper;
bool colored = false;
WINDOW * w;
WINDOW * super;
vector <string> m;
};
#endif
|