aboutsummaryrefslogtreecommitdiff
path: root/src/fb/chfb.h
blob: 280f6d8cc1f7226f54c908725cdcd199b96724e4 (plain) (blame)
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
#ifndef FB_CHFB_H
#define FB_CHFB_H

#include <vector>
#include "fb/fb.h"

namespace engine::fb {

class CharacterFrameBuffer : public FrameBuffer {
    public:
        CharacterFrameBuffer(unsigned int w, unsigned int h);
        void resize(unsigned int w, unsigned int h);
        unsigned int width() const;
        unsigned int height() const;
        const char* chars() const;
        void clear();
        void draw_point(int x, int y, engine::math::Vector3 loc, const engine::o3d::VertexData& vd);

    private:
        unsigned int w, h;
        std::vector<char> chars_vector;

        char face_char(int face_inf) const;
};

}

#endif // FB_CHFB_H