summaryrefslogtreecommitdiff
path: root/inc/Frame.hpp
blob: 26a736443063c180f01b9ddb8f24ce133971437b (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
#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);
        vector <Location> getImpassable(){return impassable;}

    private:
        int height, width;
        int row, col;
        bool hasSuper;
        bool filled;
        WINDOW * w;
        WINDOW * super;
        vector <string> m;
        vector <Location> impassable;
};

#endif