fix tab/spaces

This commit is contained in:
Justin C. Miller
2018-04-10 01:03:52 -07:00
parent eaa9d2ba53
commit 067ff3af89
8 changed files with 62 additions and 64 deletions

View File

@@ -45,15 +45,12 @@ font::load(void const *data)
}
font::font() :
m_height(0),
m_width(0),
m_count(0),
m_data(nullptr)
{}
font::font(unsigned height, unsigned width, unsigned count, uint8_t const *data) :
m_height(height),
m_width(width),
m_size(width, height),
m_count(count),
m_data(data)
{}
@@ -63,8 +60,8 @@ font::draw_glyph(
screen &s,
uint32_t glyph,
screen::pixel_t color,
screen::coord_t x,
screen::coord_t y) const
unsigned x,
unsigned y) const
{
unsigned bwidth = (m_width+7)/8;
uint8_t const *data = m_data + (glyph * glyph_bytes());

View File

@@ -18,8 +18,8 @@ public:
screen &s,
uint32_t glyph,
screen::pixel_t color,
screen::coord_t x,
screen::coord_t y) const;
unsigned x,
unsigned y) const;
private:
font();

View File

@@ -13,16 +13,17 @@ public:
coord_t hres, coord_t vres,
pixel_t rmask, pixel_t gmask, pixel_t bmask);
void fill(pixel_t color);
void draw_pixel(coord_t x, coord_t y, pixel_t color);
screen() = delete;
screen(const screen &) = delete;
void fill(pixel_t color);
void draw_pixel(unsigned x, unsigned y, pixel_t color);
struct color_masks {
pixel_t r, g, b;
color_masks(pixel_t r, pixel_t g, pixel_t b);
};
screen() = delete;
screen(const screen &) = delete;
struct resolution {
coord_t w, h;