mirror of
https://github.com/lihop/godot-xterm.git
synced 2025-05-04 12:14:24 +02:00
parent
399acf00c7
commit
007182b117
11 changed files with 56 additions and 97 deletions
0
addons/godot_xterm/native/src/.gdignore
Normal file
0
addons/godot_xterm/native/src/.gdignore
Normal file
|
@ -8,28 +8,7 @@
|
|||
|
||||
using namespace godot;
|
||||
|
||||
// Use xterm default for default color palette.
|
||||
const uint8_t Terminal::default_color_palette[TSM_COLOR_NUM][3] = {
|
||||
[TSM_COLOR_BLACK] = {0x00, 0x00, 0x00},
|
||||
[TSM_COLOR_RED] = {0x80, 0x00, 0x00},
|
||||
[TSM_COLOR_GREEN] = {0x00, 0x80, 0x00},
|
||||
[TSM_COLOR_YELLOW] = {0x80, 0x80, 0x00},
|
||||
[TSM_COLOR_BLUE] = {0x00, 0x00, 0x80},
|
||||
[TSM_COLOR_MAGENTA] = {0x80, 0x00, 0x80},
|
||||
[TSM_COLOR_CYAN] = {0x00, 0x80, 0x80},
|
||||
[TSM_COLOR_LIGHT_GREY] = {0xc0, 0xc0, 0xc0},
|
||||
[TSM_COLOR_DARK_GREY] = {0x80, 0x80, 0x80},
|
||||
[TSM_COLOR_LIGHT_RED] = {0xff, 0x00, 0x00},
|
||||
[TSM_COLOR_LIGHT_GREEN] = {0x00, 0xff, 0x00},
|
||||
[TSM_COLOR_LIGHT_YELLOW] = {0xff, 0xff, 0x00},
|
||||
[TSM_COLOR_LIGHT_BLUE] = {0x00, 0x00, 0xff},
|
||||
[TSM_COLOR_LIGHT_MAGENTA] = {0xff, 0x00, 0xff},
|
||||
[TSM_COLOR_LIGHT_CYAN] = {0x00, 0xff, 0xff},
|
||||
[TSM_COLOR_WHITE] = {0xff, 0xff, 0xff},
|
||||
|
||||
[TSM_COLOR_FOREGROUND] = {0xff, 0xff, 0xff},
|
||||
[TSM_COLOR_BACKGROUND] = {0x00, 0x00, 0x00},
|
||||
};
|
||||
const struct Terminal::cell Terminal::empty_cell = {{0, 0, 0, 0, 0}, {}};
|
||||
|
||||
const std::map<std::pair<int64_t, int64_t>, uint32_t> Terminal::keymap = {
|
||||
|
||||
|
@ -387,9 +366,6 @@ void Terminal::_draw()
|
|||
|
||||
void Terminal::update_color_palette()
|
||||
{
|
||||
// Start with a copy of the default color palette
|
||||
memcpy(color_palette, Terminal::default_color_palette, sizeof(Terminal::default_color_palette));
|
||||
|
||||
/* Generate color palette based on theme */
|
||||
|
||||
// Converts a color from the Control's theme to one that can
|
||||
|
|
|
@ -20,7 +20,8 @@ namespace godot
|
|||
{
|
||||
char ch[5];
|
||||
struct tsm_screen_attr attr;
|
||||
} empty_cell = {ch : {0, 0, 0, 0, 0}, attr : {}};
|
||||
};
|
||||
static const struct cell empty_cell;
|
||||
|
||||
public:
|
||||
typedef std::vector<std::vector<struct cell>> Cells;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue