From 761604f9e4815e8f4355637ebb46052314cbed86 Mon Sep 17 00:00:00 2001 From: vimene Date: Wed, 10 Dec 2025 20:40:42 +0100 Subject: renamed .h to .hpp --- src/fb/chfb.cpp | 10 +++++----- src/fb/chfb.h | 38 -------------------------------------- src/fb/chfb.hpp | 38 ++++++++++++++++++++++++++++++++++++++ src/fb/pixfb.cpp | 10 +++++----- src/fb/pixfb.h | 40 ---------------------------------------- src/fb/pixfb.hpp | 40 ++++++++++++++++++++++++++++++++++++++++ 6 files changed, 88 insertions(+), 88 deletions(-) delete mode 100644 src/fb/chfb.h create mode 100644 src/fb/chfb.hpp delete mode 100644 src/fb/pixfb.h create mode 100644 src/fb/pixfb.hpp (limited to 'src/fb') diff --git a/src/fb/chfb.cpp b/src/fb/chfb.cpp index 8068d8f..9f293ed 100644 --- a/src/fb/chfb.cpp +++ b/src/fb/chfb.cpp @@ -1,10 +1,10 @@ -#include "fb/chfb.h" +#include "fb/chfb.hpp" #include #include -#include "math/vector.h" -#include "math/quat.h" -#include "o3d/vertex_data.h" -#include "o3d/camera.h" +#include "math/vector.hpp" +#include "math/quat.hpp" +#include "o3d/vertex_data.hpp" +#include "o3d/camera.hpp" using namespace engine::fb; using diff --git a/src/fb/chfb.h b/src/fb/chfb.h deleted file mode 100644 index a866fef..0000000 --- a/src/fb/chfb.h +++ /dev/null @@ -1,38 +0,0 @@ -#ifndef FB_CHFB_H -#define FB_CHFB_H - -#include -#include "math/vector.h" -#include "o3d/vertex_data.h" - -namespace engine::fb { - -using engine::math::Vector3, engine::o3d::VertexData; - -class CharacterFrameBuffer { - public: - CharacterFrameBuffer(unsigned int w, unsigned int h); - void resize(unsigned int w, unsigned int h); - void clear(); - void draw_point(int x, int y, const Vector3& loc, const VertexData& vd, const Vector3& normal); - - constexpr unsigned int width() const & { - return w; - } - - constexpr unsigned int height() const & { - return h; - } - - constexpr const char* chars() const & { - return chars_vector.data(); - } - - private: - unsigned int w, h; - std::vector chars_vector; -}; - -} - -#endif // FB_CHFB_H diff --git a/src/fb/chfb.hpp b/src/fb/chfb.hpp new file mode 100644 index 0000000..8e47d6b --- /dev/null +++ b/src/fb/chfb.hpp @@ -0,0 +1,38 @@ +#ifndef FB_CHFB_H +#define FB_CHFB_H + +#include +#include "math/vector.hpp" +#include "o3d/vertex_data.hpp" + +namespace engine::fb { + +using engine::math::Vector3, engine::o3d::VertexData; + +class CharacterFrameBuffer { + public: + CharacterFrameBuffer(unsigned int w, unsigned int h); + void resize(unsigned int w, unsigned int h); + void clear(); + void draw_point(int x, int y, const Vector3& loc, const VertexData& vd, const Vector3& normal); + + constexpr unsigned int width() const & { + return w; + } + + constexpr unsigned int height() const & { + return h; + } + + constexpr const char* chars() const & { + return chars_vector.data(); + } + + private: + unsigned int w, h; + std::vector chars_vector; +}; + +} + +#endif // FB_CHFB_H diff --git a/src/fb/pixfb.cpp b/src/fb/pixfb.cpp index d49566e..55c356f 100644 --- a/src/fb/pixfb.cpp +++ b/src/fb/pixfb.cpp @@ -1,10 +1,10 @@ -#include "fb/pixfb.h" +#include "fb/pixfb.hpp" #include #include -#include "math/vector.h" -#include "math/quat.h" -#include "o3d/vertex_data.h" -#include "o3d/camera.h" +#include "math/vector.hpp" +#include "math/quat.hpp" +#include "o3d/vertex_data.hpp" +#include "o3d/camera.hpp" using namespace engine::fb; using diff --git a/src/fb/pixfb.h b/src/fb/pixfb.h deleted file mode 100644 index 81a7ac3..0000000 --- a/src/fb/pixfb.h +++ /dev/null @@ -1,40 +0,0 @@ -#ifndef FB_PIXFB_H -#define FB_PIXFB_H - -#include -#include -#include "math/vector.h" -#include "o3d/vertex_data.h" - -namespace engine::fb { - -using engine::math::Vector3, engine::o3d::VertexData; - -class PixelFrameBuffer { - public: - PixelFrameBuffer(unsigned int w, unsigned int h); - void resize(unsigned int w, unsigned int h); - void clear(); - void draw_point(int x, int y, const Vector3& loc, const VertexData& vd, const Vector3& normal); - - constexpr unsigned int width() const & { - return w; - } - - constexpr unsigned int height() const & { - return h; - } - - constexpr const uint32_t* pixels() const & { - return pixels_vector.data(); - } - - private: - unsigned int w, h; - std::vector pixels_vector; - int face_ind; -}; - -} - -#endif // FB_PIXFB_H diff --git a/src/fb/pixfb.hpp b/src/fb/pixfb.hpp new file mode 100644 index 0000000..f7a7acb --- /dev/null +++ b/src/fb/pixfb.hpp @@ -0,0 +1,40 @@ +#ifndef FB_PIXFB_H +#define FB_PIXFB_H + +#include +#include +#include "math/vector.hpp" +#include "o3d/vertex_data.hpp" + +namespace engine::fb { + +using engine::math::Vector3, engine::o3d::VertexData; + +class PixelFrameBuffer { + public: + PixelFrameBuffer(unsigned int w, unsigned int h); + void resize(unsigned int w, unsigned int h); + void clear(); + void draw_point(int x, int y, const Vector3& loc, const VertexData& vd, const Vector3& normal); + + constexpr unsigned int width() const & { + return w; + } + + constexpr unsigned int height() const & { + return h; + } + + constexpr const uint32_t* pixels() const & { + return pixels_vector.data(); + } + + private: + unsigned int w, h; + std::vector pixels_vector; + int face_ind; +}; + +} + +#endif // FB_PIXFB_H -- cgit v1.2.3