blob: 4e4b57f1927c300d0b688c62a3628a6bf1c4bb4f (
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
|
#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(){return w;}
WINDOW * getSuper(){return super;}
bool getHasSuper(){return hasSuper;}
int getHeight(){return height;}
int getWidth(){return width;}
int getRow(){return row;}
int getCol(){return col;}
void fillWindow();
void refresh();
void move(int nRow, int nCol);
void center(Character &ch);
private:
int height, width;
int row, col;
bool hasSuper;
bool colored = false;
WINDOW * w;
WINDOW * super;
vector <string> m;
};
#endif
|