7 int pal,
int sizex,
int sizey) {
8 const int num_x_tiles = 16;
9 const int img_width = 512;
10 int draw_id = srcx + (srcy * 32);
11 for (
int yl = 0; yl < sizey * 8; yl++) {
12 for (
int xl = 0; xl < 4; xl++) {
17 int tx = ((draw_id / num_x_tiles) * img_width) + ((draw_id & 0xF) << 2);
22 int index = x + (y * 172) + (mx * 2) + (my * 172);
23 if ((pixel & 0x0F) != 0) {
27 if (((pixel >> 4) & 0x0F) != 0) {
29 (uint8_t)(((pixel >> 4) & 0x0F) + (0 * 4));
36 for (
const auto& c : str) {
42 std::vector<uint8_t> text;
48 for (
const uint8_t& value : text) {
55 int srcy = value >> 4;
56 int srcx = value & 0xF;
65 }
else if (value ==
kLine1) {
71 }
else if (value ==
kLine2) {
74 }
else if (value ==
kLine3) {
77 }
else if (value == 0x6B || value == 0x6D || value == 0x6E ||
78 value == 0x77 || value == 0x78 || value == 0x79 ||
83 }
else if (value == 0x6C)
89 }
else if (value == 0x6A) {
92 const std::string name =
"(NAME)";
98 std::cerr <<
"Invalid dictionary entry: " << pos << std::endl;
Editors are the view controllers for the application.
uint8_t FindMatchingCharacter(char value)
constexpr uint8_t kScrollVertical
DictionaryEntry FindRealDictionaryEntry(uint8_t value, std::vector< DictionaryEntry > dictionary)
constexpr uint8_t DICTOFF
Main namespace for the application.
std::vector< uint8_t > Data
std::vector< uint8_t > current_preview_data_
void DrawMessagePreview(const MessageData &message)
std::array< uint8_t, kWidthArraySize > width_array
std::vector< uint8_t > font_gfx16_data_2_
void DrawCharacterToPreview(char c)
void DrawStringToPreview(const std::string &str)
std::vector< DictionaryEntry > all_dictionaries_
void DrawTileToPreview(int x, int y, int srcx, int srcy, int pal, int sizex=1, int sizey=1)