yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
message_preview.h
Go to the documentation of this file.
1#ifndef YAZEE_MESSAGE_PREVIEW_H_
2#define YAZEE_MESSAGE_PREVIEW_H_
3
4#include <string>
5#include <vector>
6
8
9namespace yaze {
10namespace editor {
11
12constexpr int kCurrentMessageWidth = 172;
13constexpr int kCurrentMessageHeight = 4096;
14// Dialogue uses BG3 palette 6; the HUD palette contains eight 4-color rows.
15constexpr int kDialogueFontPalette = 6;
16
22 void DrawTileToPreview(int x, int y, int srcx, int srcy, int pal,
23 int sizex = 1, int sizey = 1);
24
25 void DrawStringToPreview(const std::string& str);
26 void DrawCharacterToPreview(char c);
27 void DrawCharacterToPreview(const std::vector<uint8_t>& text);
28
29 void DrawMessagePreview(const MessageData& message);
30
31 bool skip_next = false;
32 int text_line = 0;
34 int shown_lines = 0;
35
36 // Line numbers where scroll breaks occur (populated during preview render)
37 std::vector<int> scroll_marker_lines;
38
39 std::array<uint8_t, kWidthArraySize> width_array = {0};
40 std::vector<uint8_t> font_gfx16_data_;
41 std::vector<uint8_t> font_gfx16_data_2_;
42 std::vector<uint8_t> current_preview_data_;
43 std::vector<DictionaryEntry> all_dictionaries_;
44};
45
46} // namespace editor
47} // namespace yaze
48
49#endif // YAZEE_MESSAGE_PREVIEW_H_
constexpr int kDialogueFontPalette
constexpr int kCurrentMessageWidth
constexpr int kCurrentMessageHeight
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_
std::vector< uint8_t > font_gfx16_data_
std::vector< int > scroll_marker_lines
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)