diff options
Diffstat (limited to 'src/fb/chfb.cpp')
-rw-r--r-- | src/fb/chfb.cpp | 25 |
1 files changed, 6 insertions, 19 deletions
diff --git a/src/fb/chfb.cpp b/src/fb/chfb.cpp index 029d619..cfd7635 100644 --- a/src/fb/chfb.cpp +++ b/src/fb/chfb.cpp @@ -4,6 +4,7 @@ #include "o3d/vertex_data.h" using namespace engine::fb; +using engine::math::Vector3, engine::o3d::VertexData; CharacterFrameBuffer::CharacterFrameBuffer(unsigned int w, unsigned int h) { resize(w, h); @@ -16,29 +17,15 @@ void CharacterFrameBuffer::resize(unsigned int w, unsigned int h) { clear(); } -unsigned int CharacterFrameBuffer::width() const { - return w; -} - -unsigned int CharacterFrameBuffer::height() const { - return h; -} - -const char* CharacterFrameBuffer::chars() const { - return chars_vector.data(); -} - void CharacterFrameBuffer::clear() { std::fill(chars_vector.begin(), chars_vector.end(), ' '); } -void CharacterFrameBuffer::draw_point(int x, int y, engine::math::Vector3 loc, const engine::o3d::VertexData& vd) { +void CharacterFrameBuffer::draw_point(int x, int y, const Vector3& loc, const VertexData& vd, const engine::math::Vector3& normal) { + (void) x; + (void) y; (void) loc; (void) vd; - chars_vector[x + y * w] = face_char(0); -} - -char CharacterFrameBuffer::face_char(int face_ind) const { - int n = 1 + face_ind / 2; - return (n < 10 ? '0' : 'A' - 10) + n; + (void) normal; + chars_vector[x + y * w] = 'A'; } |