mirror of
https://github.com/Pixinn/Rgb2Hires.git
synced 2024-06-11 05:29:29 +00:00
39 lines
814 B
C++
39 lines
814 B
C++
#ifndef _TILE_H_
|
|
#define _TILE_H_
|
|
|
|
#include "ImageQuantized.h"
|
|
#include "HiRes.h"
|
|
|
|
namespace RgbToHires
|
|
{
|
|
|
|
static constexpr unsigned NB_BLOCKS_PER_TILE = 2u;
|
|
static constexpr unsigned NB_LINES_PER_TILE = 16u;
|
|
|
|
/// @brief A 14x16 tile in hires
|
|
class Tile
|
|
{
|
|
public:
|
|
/// @brief Constructs the tile from the upper left corner of a 140x192 quantized image
|
|
Tile(const ImageQuantized&, const unsigned col, const unsigned line);
|
|
~Tile() = default;
|
|
|
|
/// @brief Returns asm code corresponding to the tile: the lines are not interleaved!
|
|
std::string getHiresAsm() const;
|
|
|
|
private:
|
|
using LineHr = std::vector<BlockHr>;
|
|
using Blob = std::array<LineHr, NB_LINES_PER_TILE>;
|
|
|
|
Blob _blob; ///< A tile of ordered hires data
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|