From 2100744d7340f5cefe02f675fbb656b460bd8c34 Mon Sep 17 00:00:00 2001 From: Jonathan Davies Date: Sun, 15 Mar 2026 15:44:03 +0000 Subject: [PATCH] Format ledmap arrays to match keyboard layout structure Use a single combined tree-sitter query with two patterns to match both LAYOUT calls and ledmap identifiers in document order, so they are processed in a unified loop without re-parsing the document. The ledmap identifier is matched simply and the init_declarator located by walking up the tree, since tree-sitter-c mis-parses PROGMEM as the declarator name (putting "ledmap" in an ERROR node). Co-Authored-By: Claude Opus 4.6 --- src/main.rs | 281 ++++++++++++++---- testdata/moonlander/keymaps/default/keymap.c | 141 +++++---- .../integration_test__fmt_moonlander.snap | 67 ++++- ...gration_test__fmt_moonlander_no_clang.snap | 67 ++++- 4 files changed, 417 insertions(+), 139 deletions(-) diff --git a/src/main.rs b/src/main.rs index a146f36..11785e7 100644 --- a/src/main.rs +++ b/src/main.rs @@ -112,6 +112,69 @@ fn key_rows(text: &str, keys: &[Node<'_>]) -> Vec> { rows } +/// Write a grid of rows with aligned columns, centering shorter rows. +fn write_grid( + output: &mut impl Write, + rows: &mut [Vec], + indent: &str, + split_spaces: usize, +) { + let column_count = rows.iter().map(|r| r.len()).max().unwrap_or(0); + + // Pad shorter rows on the left + for row in rows.iter_mut() { + let fill = column_count - row.len(); + for _ in 0..fill / 2 { + row.insert(0, "".into()) + } + } + + let column_sizes: Vec<_> = (0..column_count) + .map(|i| { + rows.iter() + .map(|row| row.get(i).map(String::len).unwrap_or(0)) + .max() + .unwrap_or(0) + }) + .collect(); + + for row in rows.iter() { + write!(output, "{indent}{indent}").unwrap(); + for (i, col) in row.iter().enumerate() { + if i == column_count / 2 { + write!(output, "{}", " ".repeat(split_spaces)).unwrap(); + } + let separator = if i + 1 < row.len() { " " } else { "" }; + let width = if i + 1 < row.len() { + column_sizes[i] + } else { + 0 + }; + write!(output, "{col:width$}{separator}").unwrap(); + } + writeln!(output).unwrap(); + } +} + +/// Build ledmap rows from flat tuples using the given row structure (items per row). +fn build_ledmap_rows(text: &str, tuples: &[Node<'_>], row_structure: &[usize]) -> Vec> { + let mut rows = vec![]; + let mut idx = 0; + for &cols_in_row in row_structure { + let mut row = vec![]; + for _ in 0..cols_in_row { + if idx < tuples.len() { + let s = node_to_text(text, &tuples[idx]); + let suffix = if idx == tuples.len() - 1 { "" } else { "," }; + row.push(s + suffix); + idx += 1; + } + } + rows.push(row); + } + rows +} + fn format(text: &str, output: &mut impl Write, cli: &Cli) { let language = tree_sitter_c::LANGUAGE.into(); let mut parser = tree_sitter::Parser::new(); @@ -119,104 +182,199 @@ fn format(text: &str, output: &mut impl Write, cli: &Cli) { .set_language(&language) .expect("Error loading C parser"); + // Two top-level patterns returned in document order by QueryCursor::matches(): + // Pattern 0: LAYOUT call expressions (structured match) + // Pattern 1: "ledmap" identifier (simple match — tree-sitter-c mis-parses + // PROGMEM as the declarator name, so "ledmap" ends up in an ERROR + // node and can't be matched structurally) let query = tree_sitter::Query::new( &language, - r#"(call_expression (identifier) @id (#match? @id "^LAYOUT") (argument_list) @args) @call"#, + r#" + (call_expression + (identifier) @id (#match? @id "^LAYOUT") + (argument_list) @args) @call + + ((identifier) @id (#eq? @id "ledmap")) + "#, ) .unwrap(); let id_idx = query.capture_index_for_name("id").unwrap(); let args_idx = query.capture_index_for_name("args").unwrap(); let call_idx = query.capture_index_for_name("call").unwrap(); - // First, extract all the layouts before clang-format + // First pass: extract LAYOUT row structures before clang-format let tree = parser.parse(text, None).unwrap(); let mut layouts = vec![]; + let mut layout_structures: Vec> = vec![]; let mut qc = tree_sitter::QueryCursor::new(); let mut it = qc.matches(&query, tree.root_node(), text.as_bytes()); while let Some(m) = it.next() { + if m.pattern_index != 0 { + continue; + } let args_node = m.nodes_for_capture_index(args_idx).next().unwrap(); - let mut qc = args_node.walk(); - let keys: Vec<_> = args_node.named_children(&mut qc).collect(); + let mut wc = args_node.walk(); + let keys: Vec<_> = args_node.named_children(&mut wc).collect(); let rows = key_rows(text, &keys); + layout_structures.push(rows.iter().map(|row| row.len()).collect()); layouts.push(rows); } + layouts.reverse(); // so we can pop // Run clang-format on the document let text = &clang_format(cli, text); - // Parse again, post-clang-format + // Second pass: format both LAYOUTs and ledmaps in document order let tree = parser.parse(text, None).unwrap(); - let lines: Vec<_> = text.lines().collect(); let mut qc = tree_sitter::QueryCursor::new(); let mut it = qc.matches(&query, tree.root_node(), text.as_bytes()); let mut last_byte = 0; while let Some(m) = it.next() { - let name = m.nodes_for_capture_index(id_idx).next().unwrap(); - let (indent, _) = lines[name.start_position().row] - .split_once(|c: char| !c.is_whitespace()) - .unwrap(); - let indent = if indent.is_empty() { " " } else { indent }; - let name = node_to_text(text, &name); - log::trace!("Parsed call_expression: {name}"); - log::trace!("Printing prefix to layout: {name}"); - - // Print everything before the call expression - let args_node = m.nodes_for_capture_index(args_idx).next().unwrap(); - let prefix = &text.as_bytes()[last_byte..args_node.start_byte()]; - let prefix = str::from_utf8(prefix).expect("Text is not utf-8"); - write!(output, "{prefix}").expect("Failed to write layout prefix"); + let name_node = m.nodes_for_capture_index(id_idx).next().unwrap(); + + if m.pattern_index == 0 { + // LAYOUT formatting + let call_node = m.nodes_for_capture_index(call_idx).next().unwrap(); + let args_node = m.nodes_for_capture_index(args_idx).next().unwrap(); + + let (indent, _) = lines[name_node.start_position().row] + .split_once(|c: char| !c.is_whitespace()) + .unwrap_or((" ", "")); + let indent = if indent.is_empty() { " " } else { indent }; + + let name = node_to_text(text, &name_node); + log::trace!("Parsed call_expression: {name}"); + + let prefix = &text.as_bytes()[last_byte..args_node.start_byte()]; + write!(output, "{}", str::from_utf8(prefix).unwrap()).unwrap(); + + let mut rows = layouts.pop().unwrap(); + writeln!(output, "(").unwrap(); + write_grid(output, &mut rows, indent, cli.split_spaces.unwrap_or(0)); + write!(output, "{indent})").unwrap(); + + last_byte = call_node.end_byte(); + } else { + // ledmap: walk up from the identifier to find init_declarator + initializer_list + let decl = { + let mut current = name_node.parent(); + loop { + match current { + Some(node) if node.kind() == "init_declarator" => break Some(node), + Some(node) => current = node.parent(), + None => break None, + } + } + }; + let decl = match decl { + Some(d) => d, + None => continue, + }; + let mut cursor = decl.walk(); + let init_list = match decl + .children(&mut cursor) + .find(|c| c.kind() == "initializer_list") + { + Some(il) => il, + None => continue, + }; + + // Skip if this "ledmap" is a reference inside an expression (e.g. + // `&ledmap[layer][i][0]`), not the actual declarator. The identifier + // must appear before the initializer_list (i.e. on the left of `=`). + if name_node.start_byte() >= init_list.start_byte() { + continue; + } - // Print the formatted key list inside parens - let mut rows = layouts.pop().unwrap(); - let column_count = rows.iter().map(|r| r.len()).max().expect("No rows"); + log::debug!("Found ledmap, formatting it"); - log::trace!("Rows: {rows:?}"); + let (indent, _) = lines[name_node.start_position().row] + .split_once(|c: char| !c.is_whitespace()) + .unwrap_or((" ", "")); + let indent = if indent.is_empty() { " " } else { indent }; - // Pad shorter rows on the left - for row in rows.iter_mut() { - let fill = column_count - row.len(); - for _ in 0..fill / 2 { - row.insert(0, "".into()) - } - } + let prefix = &text.as_bytes()[last_byte..init_list.start_byte()]; + write!(output, "{}", str::from_utf8(prefix).unwrap()).unwrap(); + + writeln!(output, "{{").unwrap(); + + let mut layer_cursor = init_list.walk(); + let layers: Vec<_> = init_list.named_children(&mut layer_cursor).collect(); - log::trace!("Padded rows: {rows:?}"); - - let column_sizes: Vec<_> = (0..column_count) - .map(|i| { - rows.iter() - .map(|row| row.get(i).map(String::len).unwrap_or(0)) - .max() - .unwrap_or(0) - }) - .collect(); - - log::trace!("Column sizes: {column_sizes:?}"); - - writeln!(output, "(").unwrap(); - for row in rows { - log::trace!("Writing row: {row:?}"); - write!(output, "{indent}{indent}").unwrap(); - for (i, col) in row.iter().enumerate() { - if i == column_count / 2 { - write!(output, "{}", " ".repeat(cli.split_spaces.unwrap_or(0))).unwrap(); + for (layer_i, layer) in layers.iter().enumerate() { + let mut parts_cursor = layer.walk(); + let mut layer_designator = None; + let mut layer_init = None; + + for part in layer.children(&mut parts_cursor) { + if part.kind() == "subscript_designator" { + layer_designator = Some(node_to_text(text, &part)); + } else if part.kind() == "initializer_list" { + layer_init = Some(part); + } } - let separator = if i + 1 < row.len() { " " } else { "" }; - let width = if i + 1 < row.len() { - column_sizes[i] + + let (designator, inner_init) = match (layer_designator, layer_init) { + (Some(d), Some(i)) => (d, i), + _ => continue, + }; + + let mut tuple_cursor = inner_init.walk(); + let tuples: Vec<_> = inner_init.named_children(&mut tuple_cursor).collect(); + + let layer_num: Option = designator + .trim_matches(|c| c == '[' || c == ']') + .parse() + .ok(); + + let row_structure = layer_num.and_then(|n| layout_structures.get(n)); + let matches_layout = row_structure + .map(|rs| rs.iter().sum::() == tuples.len()) + .unwrap_or(false); + + let mut rows = if matches_layout { + build_ledmap_rows(text, &tuples, row_structure.unwrap()) } else { - 0 + if let Some(rs) = row_structure { + log::warn!( + "Ledmap layer {} has {} tuples but layout has {} keys, using fixed formatting", + designator, + tuples.len(), + rs.iter().sum::() + ); + } + let cols = layout_structures + .first() + .and_then(|rs| rs.iter().max().copied()) + .unwrap_or(6); + build_ledmap_rows(text, &tuples, &vec![cols; tuples.len().div_ceil(cols)]) }; - write!(output, "{col:width$}{separator}").unwrap(); + + write!(output, "{indent}{designator} = {{").unwrap(); + writeln!(output).unwrap(); + write_grid(output, &mut rows, indent, cli.split_spaces.unwrap_or(0)); + write!(output, "{indent}}}").unwrap(); + if layer_i < layers.len() - 1 { + writeln!(output, ",").unwrap(); + writeln!(output).unwrap(); + } else { + writeln!(output).unwrap(); + } } - writeln!(output).unwrap(); - } - write!(output, "{indent})").unwrap(); - let call_node = m.nodes_for_capture_index(call_idx).next().unwrap(); - last_byte = call_node.end_byte(); + write!(output, "}};").unwrap(); + + // Advance past the init_declarator and its trailing semicolon + let after_decl = &text.as_bytes()[decl.end_byte()..]; + let skip = after_decl + .iter() + .position(|&b| b == b';') + .map(|p| p + 1) + .unwrap_or(0); + last_byte = decl.end_byte() + skip; + } } log::debug!("Writing suffix"); @@ -228,6 +386,7 @@ fn format(text: &str, output: &mut impl Write, cli: &Cli) { log::info!("Formatting complete!"); } + fn node_to_text(text: &str, node: &tree_sitter::Node) -> String { node.utf8_text(text.as_bytes()) .expect("Failed to get text from node") diff --git a/testdata/moonlander/keymaps/default/keymap.c b/testdata/moonlander/keymaps/default/keymap.c index d436fb6..f114beb 100644 --- a/testdata/moonlander/keymaps/default/keymap.c +++ b/testdata/moonlander/keymaps/default/keymap.c @@ -14,52 +14,52 @@ enum custom_keycodes { RGB_SLD = ML_SAFE_RANGE, }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [LYR_BSE] = LAYOUT_moonlander( - TG(LYR_GAM), KC_1, KC_2, KC_3, KC_4, KC_5, RGB_TOG, TOGGLE_LAYER_COLOR, KC_6, KC_7, KC_8, KC_9, KC_0, TG(5), - _______, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_PAGE_UP, LSFT(KC_INSERT), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_PIPE, - KC_ESCAPE, LALT_T(KC_A), LGUI_T(KC_S), LCTL_T(KC_D), LSFT_T(KC_F), KC_G, KC_PGDN, KC_DELETE, KC_H, RSFT_T(KC_J), RCTL_T(KC_K), RGUI_T(KC_L), RALT_T(KC_SCLN), KC_QUOTE, - KC_LEFT_SHIFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLASH, KC_RIGHT_SHIFT, - _______, _______, _______, LT(3,KC_LEFT), LT(4,KC_RIGHT), KC_LEFT_GUI, RGUI_T(KC_TAB), KC_UP, KC_DOWN, _______, _______, _______, - KC_SPACE, LCTL_T(KC_TAB), MO(5), KC_TAB, KC_BSPC, LT(2,KC_ENTER) + TG(LYR_GAM), KC_1, KC_2, KC_3, KC_4, KC_5, RGB_TOG, TOGGLE_LAYER_COLOR, KC_6, KC_7, KC_8, KC_9, KC_0, TG(5), + _______, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_PAGE_UP, LSFT(KC_INSERT), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_PIPE, + KC_ESCAPE, LALT_T(KC_A), LGUI_T(KC_S), LCTL_T(KC_D), LSFT_T(KC_F), KC_G, KC_PGDN, KC_DELETE, KC_H, RSFT_T(KC_J), RCTL_T(KC_K), RGUI_T(KC_L), RALT_T(KC_SCLN), KC_QUOTE, + KC_LEFT_SHIFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLASH, KC_RIGHT_SHIFT, + _______, _______, _______, LT(3,KC_LEFT), LT(4,KC_RIGHT), KC_LEFT_GUI, RGUI_T(KC_TAB), KC_UP, KC_DOWN, _______, _______, _______, + KC_SPACE, LCTL_T(KC_TAB), MO(5), KC_TAB, KC_BSPC, LT(2,KC_ENTER) ), [LYR_GAM] = LAYOUT_moonlander( - _______, _______, _______, _______, _______, _______, QK_BOOT, _______, _______, _______, _______, _______, _______, _______, - KC_TAB, _______, KC_W, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - KC_ESCAPE, KC_A, KC_S, KC_D, KC_F, _______, _______, _______, _______, _______, _______, _______, _______, _______, - KC_LEFT_SHIFT , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - KC_LEFT_ALT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - KC_SPACE, KC_LEFT_CTRL, MO(LYR_FUN), _______, _______, _______ + _______, _______, _______, _______, _______, _______, QK_BOOT, _______, _______, _______, _______, _______, _______, _______, + KC_TAB, _______, KC_W, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_ESCAPE, KC_A, KC_S, KC_D, KC_F, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_LEFT_SHIFT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_LEFT_ALT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_SPACE, KC_LEFT_CTRL, MO(LYR_FUN), _______, _______, _______ ), [LYR_SYM] = LAYOUT_moonlander( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0, _______, - _______, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_EQUAL, _______, _______, KC_TILD, KC_UNDS, KC_MINUS, KC_ASTR, KC_AMPR, KC_GRAVE, - KC_LCBR, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_PLUS, KC_AT, KC_EXLM, _______, _______, KC_BSLS, KC_RCBR, - _______, _______, _______, KC_AUDIO_VOL_DOWN, KC_AUDIO_VOL_UP, _______, _______, KC_BRIGHTNESS_UP, KC_BRIGHTNESS_DOWN, _______, _______, _______, - _______, CW_TOGG, _______, _______, _______, _______ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + _______, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_EQUAL, _______, _______, KC_TILD, KC_UNDS, KC_MINUS, KC_ASTR, KC_AMPR, KC_GRAVE, + KC_LCBR, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_PLUS, KC_AT, KC_EXLM, _______, _______, KC_BSLS, KC_RCBR, + _______, _______, _______, KC_AUDIO_VOL_DOWN, KC_AUDIO_VOL_UP, _______, _______, KC_BRIGHTNESS_UP, KC_BRIGHTNESS_DOWN, _______, _______, _______, + _______, CW_TOGG, _______, _______, _______, _______ ), [LYR_NAV] = LAYOUT_moonlander( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, QK_BOOT, - _______, KC_MS_WH_DOWN, KC_MS_UP, KC_MS_WH_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, _______, _______, _______, _______, _______, KC_MS_BTN1, KC_MS_BTN2, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, KC_MEDIA_PREV_TRACK, KC_MEDIA_NEXT_TRACK, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, KC_AUDIO_VOL_DOWN, KC_AUDIO_MUTE, _______, _______, - KC_MS_BTN1, KC_MS_BTN2, KC_MS_BTN3, KC_MS_BTN3, KC_MS_BTN2, KC_MS_BTN1 + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, QK_BOOT, + _______, KC_MS_WH_DOWN, KC_MS_UP, KC_MS_WH_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, _______, _______, _______, _______, _______, KC_MS_BTN1, KC_MS_BTN2, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MEDIA_PREV_TRACK, KC_MEDIA_NEXT_TRACK, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_AUDIO_VOL_DOWN, KC_AUDIO_MUTE, _______, _______, + KC_MS_BTN1, KC_MS_BTN2, KC_MS_BTN3, KC_MS_BTN3, KC_MS_BTN2, KC_MS_BTN1 ), [LYR_NUM] = LAYOUT_moonlander( - _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_SLASH, KC_ASTR, KC_MINUS, _______, _______, - _______, KC_KP_7, KC_KP_8, KC_KP_9, _______, _______, _______, _______, _______, KC_7, KC_8, KC_9, _______, _______, - KC_KP_0, KC_KP_4, KC_KP_5, KC_KP_6, _______, _______, _______, _______, KC_0, KC_4, KC_5, KC_6, KC_PLUS, _______, - KC_KP_DOT, KC_KP_1, KC_KP_2, KC_KP_3, _______, _______, _______, KC_1, KC_2, KC_3, KC_ENTER, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DOT, _______, _______, - _______, _______, _______, _______, _______, _______ + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_SLASH, KC_ASTR, KC_MINUS, _______, _______, + _______, KC_KP_7, KC_KP_8, KC_KP_9, _______, _______, _______, _______, _______, KC_7, KC_8, KC_9, _______, _______, + KC_KP_0, KC_KP_4, KC_KP_5, KC_KP_6, _______, _______, _______, _______, KC_0, KC_4, KC_5, KC_6, KC_PLUS, _______, + KC_KP_DOT, KC_KP_1, KC_KP_2, KC_KP_3, _______, _______, _______, KC_1, KC_2, KC_3, KC_ENTER, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DOT, _______, _______, + _______, _______, _______, _______, _______, _______ ), [LYR_FUN] = LAYOUT_moonlander( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, _______, _______, _______, _______, _______, _______, - _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, _______, _______, _______, _______, _______, _______, _______, - _______, KC_F11, KC_F12, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_F11, KC_F12, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______ ), }; @@ -76,20 +76,61 @@ extern rgb_config_t rgb_matrix_config; void keyboard_post_init_user(void) { rgb_matrix_enable(); } const uint8_t PROGMEM ledmap[][RGB_MATRIX_LED_COUNT][3] = { - [0] = {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {146, 224, 255}, {146, 224, 255}, {146, 224, 255}, {0, 0, 0}, {0, 0, 0}, {146, 224, 255}, {146, 224, 255}, {146, 224, 255}, {0, 0, 0}, {0, 0, 0}, {146, 224, 255}, {146, 224, 255}, {146, 224, 255}, {32, 255, 234}, {0, 0, 0}, {146, 224, 255}, {146, 224, 255}, {146, 224, 255}, {31, 255, 255}, {0, 0, 0}, {146, 224, 255}, {146, 224, 255}, {146, 224, 255}, {0, 0, 0}, {12, 225, 241}, {12, 225, 241}, {146, 224, 255}, {146, 224, 255}, {12, 225, 241}, {0, 204, 255}, - {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {146, 224, 255}, {146, 224, 255}, {146, 224, 255}, {0, 0, 0}, {0, 0, 0}, {146, 224, 255}, {146, 224, 255}, {146, 224, 255}, {0, 0, 0}, {0, 0, 0}, {146, 224, 255}, {146, 224, 255}, {146, 224, 255}, {0, 0, 0}, {0, 0, 0}, {146, 224, 255}, {146, 224, 255}, {146, 224, 255}, {0, 0, 0}, {0, 0, 0}, {146, 224, 255}, {146, 224, 255}, {146, 224, 255}, {0, 0, 0}, {12, 225, 241}, {12, 225, 241}, {146, 224, 255}, {146, 224, 255}, {12, 225, 241}, {0, 204, 255}}, - - [1] = {{0, 0, 0}, {0, 0, 0}, {15, 166, 195}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {169, 120, 255}, {169, 120, 255}, {169, 120, 255}, {0, 0, 0}, {0, 0, 0}, {169, 120, 255}, {169, 120, 255}, {169, 120, 255}, {0, 0, 0}, {0, 0, 0}, {169, 120, 255}, {169, 120, 255}, {169, 120, 255}, {12, 225, 241}, {0, 0, 0}, {169, 120, 255}, {169, 120, 255}, {169, 120, 255}, {12, 225, 241}, {0, 0, 0}, {169, 120, 255}, {169, 120, 255}, {169, 120, 255}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, - {0, 0, 0}, {169, 120, 255}, {169, 120, 255}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {169, 120, 255}, {169, 120, 255}, {0, 0, 0}, {0, 0, 0}, {169, 120, 255}, {169, 120, 255}, {169, 120, 255}, {0, 0, 0}, {0, 0, 0}, {169, 120, 255}, {169, 120, 255}, {0, 0, 0}, {31, 255, 255}, {0, 0, 0}, {169, 120, 255}, {169, 120, 255}, {169, 120, 255}, {31, 255, 255}, {0, 0, 0}, {169, 120, 255}, {169, 120, 255}, {169, 120, 255}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}}, - - [2] = {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {12, 225, 241}, {32, 255, 234}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {32, 255, 234}, {32, 255, 234}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {12, 225, 241}, {32, 255, 234}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {169, 120, 255}, {169, 120, 255}, {169, 120, 255}, {0, 0, 0}, {12, 225, 241}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {169, 120, 255}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {169, 120, 255}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {169, 120, 255}, {169, 120, 255}, {169, 120, 255}, {0, 0, 0}}, - - [3] = {{0, 0, 0}, {0, 0, 0}, {32, 255, 234}, {12, 225, 241}, {0, 0, 0}, {0, 0, 0}, {32, 255, 234}, {32, 255, 234}, {32, 255, 234}, {0, 0, 0}, {0, 0, 0}, {32, 255, 234}, {32, 255, 234}, {32, 255, 234}, {0, 0, 0}, {0, 0, 0}, {32, 255, 234}, {32, 255, 234}, {32, 255, 234}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {12, 225, 241}, {12, 225, 241}, {0, 0, 0}, {12, 225, 241}, {32, 255, 234}, {32, 255, 234}, {32, 255, 234}, {0, 0, 0}, {12, 225, 241}, {32, 255, 234}, {32, 255, 234}, {32, 255, 234}, {0, 0, 0}, {12, 225, 241}, {32, 255, 234}, {32, 255, 234}, {32, 255, 234}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {32, 255, 234}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}}, - - [4] = {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {139, 219, 208}, {139, 219, 208}, {139, 219, 208}, {0, 0, 0}, {0, 0, 0}, {139, 219, 208}, {139, 219, 208}, {139, 219, 208}, {0, 0, 0}, {0, 0, 0}, {139, 219, 208}, {139, 219, 208}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {139, 219, 208}, {139, 219, 208}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {139, 219, 208}, {139, 219, 208}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}}, - - [5] = {{0, 0, 0}, {113, 186, 145}, {113, 186, 145}, {113, 186, 145}, {0, 0, 0}, {0, 0, 0}, {113, 186, 145}, {113, 186, 145}, {113, 186, 145}, {0, 0, 0}, {0, 0, 0}, {113, 186, 145}, {113, 186, 145}, {113, 186, 145}, {0, 0, 0}, {0, 0, 0}, {113, 186, 145}, {113, 186, 145}, {113, 186, 145}, {0, 0, 0}, {0, 0, 0}, {113, 186, 145}, {113, 186, 145}, {113, 186, 145}, {0, 0, 0}, {0, 0, 0}, {113, 186, 145}, {113, 186, 145}, {113, 186, 145}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {113, 186, 145}, {113, 186, 145}, {113, 186, 145}, {113, 186, 145}, {25, 218, 204}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}}, - + [0] = { + {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {146, 224, 255}, {146, 224, 255}, {146, 224, 255}, {0, 0, 0}, {0, 0, 0}, {146, 224, 255}, {146, 224, 255}, {146, 224, 255}, + {0, 0, 0}, {0, 0, 0}, {146, 224, 255}, {146, 224, 255}, {146, 224, 255}, {32, 255, 234}, {0, 0, 0}, {146, 224, 255}, {146, 224, 255}, {146, 224, 255}, {31, 255, 255}, {0, 0, 0}, {146, 224, 255}, {146, 224, 255}, + {146, 224, 255}, {0, 0, 0}, + + {12, 225, 241}, {12, 225, 241}, {146, 224, 255}, {146, 224, 255}, {12, 225, 241}, {0, 204, 255}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, + {146, 224, 255}, {146, 224, 255}, {146, 224, 255}, {0, 0, 0}, {0, 0, 0}, {146, 224, 255}, {146, 224, 255}, {146, 224, 255}, {0, 0, 0}, {0, 0, 0}, {146, 224, 255}, {146, 224, 255}, + {146, 224, 255}, {0, 0, 0}, {0, 0, 0}, {146, 224, 255}, {146, 224, 255}, {146, 224, 255}, {0, 0, 0}, {0, 0, 0}, {146, 224, 255}, {146, 224, 255}, {146, 224, 255}, {0, 0, 0}, + {12, 225, 241}, {12, 225, 241}, {146, 224, 255}, {146, 224, 255}, {12, 225, 241}, {0, 204, 255} + }, + + [1] = { + {0, 0, 0}, {0, 0, 0}, {15, 166, 195}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {169, 120, 255}, {169, 120, 255}, {169, 120, 255}, {0, 0, 0}, {0, 0, 0}, {169, 120, 255}, {169, 120, 255}, {169, 120, 255}, + {0, 0, 0}, {0, 0, 0}, {169, 120, 255}, {169, 120, 255}, {169, 120, 255}, {12, 225, 241}, {0, 0, 0}, {169, 120, 255}, {169, 120, 255}, {169, 120, 255}, {12, 225, 241}, {0, 0, 0}, {169, 120, 255}, {169, 120, 255}, + {169, 120, 255}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {169, 120, 255}, {169, 120, 255}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, + {0, 0, 0}, {169, 120, 255}, {169, 120, 255}, {0, 0, 0}, {0, 0, 0}, {169, 120, 255}, {169, 120, 255}, {169, 120, 255}, {0, 0, 0}, {0, 0, 0}, {169, 120, 255}, {169, 120, 255}, + {0, 0, 0}, {31, 255, 255}, {0, 0, 0}, {169, 120, 255}, {169, 120, 255}, {169, 120, 255}, {31, 255, 255}, {0, 0, 0}, {169, 120, 255}, {169, 120, 255}, {169, 120, 255}, {0, 0, 0}, + {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0} + }, + + [2] = { + {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {12, 225, 241}, {32, 255, 234}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {32, 255, 234}, {32, 255, 234}, {0, 0, 0}, + {0, 0, 0}, {0, 0, 0}, {12, 225, 241}, {32, 255, 234}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, + {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {169, 120, 255}, {169, 120, 255}, {169, 120, 255}, {0, 0, 0}, {12, 225, 241}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, + {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {169, 120, 255}, + {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {169, 120, 255}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, + {0, 0, 0}, {0, 0, 0}, {169, 120, 255}, {169, 120, 255}, {169, 120, 255}, {0, 0, 0} + }, + + [3] = { + {0, 0, 0}, {0, 0, 0}, {32, 255, 234}, {12, 225, 241}, {0, 0, 0}, {0, 0, 0}, {32, 255, 234}, {32, 255, 234}, {32, 255, 234}, {0, 0, 0}, {0, 0, 0}, {32, 255, 234}, {32, 255, 234}, {32, 255, 234}, + {0, 0, 0}, {0, 0, 0}, {32, 255, 234}, {32, 255, 234}, {32, 255, 234}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, + {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, + {0, 0, 0}, {12, 225, 241}, {12, 225, 241}, {0, 0, 0}, {12, 225, 241}, {32, 255, 234}, {32, 255, 234}, {32, 255, 234}, {0, 0, 0}, {12, 225, 241}, {32, 255, 234}, {32, 255, 234}, + {32, 255, 234}, {0, 0, 0}, {12, 225, 241}, {32, 255, 234}, {32, 255, 234}, {32, 255, 234}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {32, 255, 234}, {0, 0, 0}, {0, 0, 0}, + {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0} + }, + + [4] = { + {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {139, 219, 208}, {139, 219, 208}, {139, 219, 208}, {0, 0, 0}, {0, 0, 0}, {139, 219, 208}, {139, 219, 208}, {139, 219, 208}, + {0, 0, 0}, {0, 0, 0}, {139, 219, 208}, {139, 219, 208}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {139, 219, 208}, {139, 219, 208}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {139, 219, 208}, {139, 219, 208}, + {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, + {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, + {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, + {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0} + }, + + [5] = { + {0, 0, 0}, {113, 186, 145}, {113, 186, 145}, {113, 186, 145}, {0, 0, 0}, {0, 0, 0}, {113, 186, 145}, {113, 186, 145}, {113, 186, 145}, {0, 0, 0}, {0, 0, 0}, {113, 186, 145}, {113, 186, 145}, {113, 186, 145}, + {0, 0, 0}, {0, 0, 0}, {113, 186, 145}, {113, 186, 145}, {113, 186, 145}, {0, 0, 0}, {0, 0, 0}, {113, 186, 145}, {113, 186, 145}, {113, 186, 145}, {0, 0, 0}, {0, 0, 0}, {113, 186, 145}, {113, 186, 145}, + {113, 186, 145}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {113, 186, 145}, {113, 186, 145}, {113, 186, 145}, {113, 186, 145}, {25, 218, 204}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, + {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, + {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, + {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0} + } }; void set_layer_color(int layer) { diff --git a/tests/snapshots/integration_test__fmt_moonlander.snap b/tests/snapshots/integration_test__fmt_moonlander.snap index 80ce87f..5e94613 100644 --- a/tests/snapshots/integration_test__fmt_moonlander.snap +++ b/tests/snapshots/integration_test__fmt_moonlander.snap @@ -84,20 +84,59 @@ void keyboard_post_init_user(void) { } const uint8_t PROGMEM ledmap[][RGB_MATRIX_LED_COUNT][3] = { - [0] = {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {146, 224, 255}, {146, 224, 255}, {146, 224, 255}, {0, 0, 0}, {0, 0, 0}, {146, 224, 255}, {146, 224, 255}, {146, 224, 255}, {0, 0, 0}, {0, 0, 0}, {146, 224, 255}, {146, 224, 255}, {146, 224, 255}, {32, 255, 234}, {0, 0, 0}, {146, 224, 255}, {146, 224, 255}, {146, 224, 255}, {31, 255, 255}, {0, 0, 0}, {146, 224, 255}, {146, 224, 255}, {146, 224, 255}, {0, 0, 0}, {12, 225, 241}, {12, 225, 241}, {146, 224, 255}, {146, 224, 255}, {12, 225, 241}, {0, 204, 255}, - {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {146, 224, 255}, {146, 224, 255}, {146, 224, 255}, {0, 0, 0}, {0, 0, 0}, {146, 224, 255}, {146, 224, 255}, {146, 224, 255}, {0, 0, 0}, {0, 0, 0}, {146, 224, 255}, {146, 224, 255}, {146, 224, 255}, {0, 0, 0}, {0, 0, 0}, {146, 224, 255}, {146, 224, 255}, {146, 224, 255}, {0, 0, 0}, {0, 0, 0}, {146, 224, 255}, {146, 224, 255}, {146, 224, 255}, {0, 0, 0}, {12, 225, 241}, {12, 225, 241}, {146, 224, 255}, {146, 224, 255}, {12, 225, 241}, {0, 204, 255}}, - - [1] = {{0, 0, 0}, {0, 0, 0}, {15, 166, 195}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {169, 120, 255}, {169, 120, 255}, {169, 120, 255}, {0, 0, 0}, {0, 0, 0}, {169, 120, 255}, {169, 120, 255}, {169, 120, 255}, {0, 0, 0}, {0, 0, 0}, {169, 120, 255}, {169, 120, 255}, {169, 120, 255}, {12, 225, 241}, {0, 0, 0}, {169, 120, 255}, {169, 120, 255}, {169, 120, 255}, {12, 225, 241}, {0, 0, 0}, {169, 120, 255}, {169, 120, 255}, {169, 120, 255}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, - {0, 0, 0}, {169, 120, 255}, {169, 120, 255}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {169, 120, 255}, {169, 120, 255}, {0, 0, 0}, {0, 0, 0}, {169, 120, 255}, {169, 120, 255}, {169, 120, 255}, {0, 0, 0}, {0, 0, 0}, {169, 120, 255}, {169, 120, 255}, {0, 0, 0}, {31, 255, 255}, {0, 0, 0}, {169, 120, 255}, {169, 120, 255}, {169, 120, 255}, {31, 255, 255}, {0, 0, 0}, {169, 120, 255}, {169, 120, 255}, {169, 120, 255}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}}, - - [2] = {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {12, 225, 241}, {32, 255, 234}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {32, 255, 234}, {32, 255, 234}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {12, 225, 241}, {32, 255, 234}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {169, 120, 255}, {169, 120, 255}, {169, 120, 255}, {0, 0, 0}, {12, 225, 241}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {169, 120, 255}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {169, 120, 255}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {169, 120, 255}, {169, 120, 255}, {169, 120, 255}, {0, 0, 0}}, - - [3] = {{0, 0, 0}, {0, 0, 0}, {32, 255, 234}, {12, 225, 241}, {0, 0, 0}, {0, 0, 0}, {32, 255, 234}, {32, 255, 234}, {32, 255, 234}, {0, 0, 0}, {0, 0, 0}, {32, 255, 234}, {32, 255, 234}, {32, 255, 234}, {0, 0, 0}, {0, 0, 0}, {32, 255, 234}, {32, 255, 234}, {32, 255, 234}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {12, 225, 241}, {12, 225, 241}, {0, 0, 0}, {12, 225, 241}, {32, 255, 234}, {32, 255, 234}, {32, 255, 234}, {0, 0, 0}, {12, 225, 241}, {32, 255, 234}, {32, 255, 234}, {32, 255, 234}, {0, 0, 0}, {12, 225, 241}, {32, 255, 234}, {32, 255, 234}, {32, 255, 234}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {32, 255, 234}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}}, - - [4] = {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {139, 219, 208}, {139, 219, 208}, {139, 219, 208}, {0, 0, 0}, {0, 0, 0}, {139, 219, 208}, {139, 219, 208}, {139, 219, 208}, {0, 0, 0}, {0, 0, 0}, {139, 219, 208}, {139, 219, 208}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {139, 219, 208}, {139, 219, 208}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {139, 219, 208}, {139, 219, 208}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}}, - - [5] = {{0, 0, 0}, {113, 186, 145}, {113, 186, 145}, {113, 186, 145}, {0, 0, 0}, {0, 0, 0}, {113, 186, 145}, {113, 186, 145}, {113, 186, 145}, {0, 0, 0}, {0, 0, 0}, {113, 186, 145}, {113, 186, 145}, {113, 186, 145}, {0, 0, 0}, {0, 0, 0}, {113, 186, 145}, {113, 186, 145}, {113, 186, 145}, {0, 0, 0}, {0, 0, 0}, {113, 186, 145}, {113, 186, 145}, {113, 186, 145}, {0, 0, 0}, {0, 0, 0}, {113, 186, 145}, {113, 186, 145}, {113, 186, 145}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {113, 186, 145}, {113, 186, 145}, {113, 186, 145}, {113, 186, 145}, {25, 218, 204}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}}, - + [0] = { + {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {146, 224, 255}, {146, 224, 255}, {146, 224, 255}, {0, 0, 0}, {0, 0, 0}, {146, 224, 255}, {146, 224, 255}, {146, 224, 255}, + {0, 0, 0}, {0, 0, 0}, {146, 224, 255}, {146, 224, 255}, {146, 224, 255}, {32, 255, 234}, {0, 0, 0}, {146, 224, 255}, {146, 224, 255}, {146, 224, 255}, {31, 255, 255}, {0, 0, 0}, {146, 224, 255}, {146, 224, 255}, + {146, 224, 255}, {0, 0, 0}, {12, 225, 241}, {12, 225, 241}, {146, 224, 255}, {146, 224, 255}, {12, 225, 241}, {0, 204, 255}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, + {146, 224, 255}, {146, 224, 255}, {146, 224, 255}, {0, 0, 0}, {0, 0, 0}, {146, 224, 255}, {146, 224, 255}, {146, 224, 255}, {0, 0, 0}, {0, 0, 0}, {146, 224, 255}, {146, 224, 255}, + {146, 224, 255}, {0, 0, 0}, {0, 0, 0}, {146, 224, 255}, {146, 224, 255}, {146, 224, 255}, {0, 0, 0}, {0, 0, 0}, {146, 224, 255}, {146, 224, 255}, {146, 224, 255}, {0, 0, 0}, + {12, 225, 241}, {12, 225, 241}, {146, 224, 255}, {146, 224, 255}, {12, 225, 241}, {0, 204, 255} + }, + + [1] = { + {0, 0, 0}, {0, 0, 0}, {15, 166, 195}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {169, 120, 255}, {169, 120, 255}, {169, 120, 255}, {0, 0, 0}, {0, 0, 0}, {169, 120, 255}, {169, 120, 255}, {169, 120, 255}, + {0, 0, 0}, {0, 0, 0}, {169, 120, 255}, {169, 120, 255}, {169, 120, 255}, {12, 225, 241}, {0, 0, 0}, {169, 120, 255}, {169, 120, 255}, {169, 120, 255}, {12, 225, 241}, {0, 0, 0}, {169, 120, 255}, {169, 120, 255}, + {169, 120, 255}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {169, 120, 255}, {169, 120, 255}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, + {0, 0, 0}, {169, 120, 255}, {169, 120, 255}, {0, 0, 0}, {0, 0, 0}, {169, 120, 255}, {169, 120, 255}, {169, 120, 255}, {0, 0, 0}, {0, 0, 0}, {169, 120, 255}, {169, 120, 255}, + {0, 0, 0}, {31, 255, 255}, {0, 0, 0}, {169, 120, 255}, {169, 120, 255}, {169, 120, 255}, {31, 255, 255}, {0, 0, 0}, {169, 120, 255}, {169, 120, 255}, {169, 120, 255}, {0, 0, 0}, + {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0} + }, + + [2] = { + {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {12, 225, 241}, {32, 255, 234}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {32, 255, 234}, {32, 255, 234}, {0, 0, 0}, + {0, 0, 0}, {0, 0, 0}, {12, 225, 241}, {32, 255, 234}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, + {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {169, 120, 255}, {169, 120, 255}, {169, 120, 255}, {0, 0, 0}, {12, 225, 241}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, + {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {169, 120, 255}, + {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {169, 120, 255}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, + {0, 0, 0}, {0, 0, 0}, {169, 120, 255}, {169, 120, 255}, {169, 120, 255}, {0, 0, 0} + }, + + [3] = { + {0, 0, 0}, {0, 0, 0}, {32, 255, 234}, {12, 225, 241}, {0, 0, 0}, {0, 0, 0}, {32, 255, 234}, {32, 255, 234}, {32, 255, 234}, {0, 0, 0}, {0, 0, 0}, {32, 255, 234}, {32, 255, 234}, {32, 255, 234}, + {0, 0, 0}, {0, 0, 0}, {32, 255, 234}, {32, 255, 234}, {32, 255, 234}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, + {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, + {0, 0, 0}, {12, 225, 241}, {12, 225, 241}, {0, 0, 0}, {12, 225, 241}, {32, 255, 234}, {32, 255, 234}, {32, 255, 234}, {0, 0, 0}, {12, 225, 241}, {32, 255, 234}, {32, 255, 234}, + {32, 255, 234}, {0, 0, 0}, {12, 225, 241}, {32, 255, 234}, {32, 255, 234}, {32, 255, 234}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {32, 255, 234}, {0, 0, 0}, {0, 0, 0}, + {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0} + }, + + [4] = { + {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {139, 219, 208}, {139, 219, 208}, {139, 219, 208}, {0, 0, 0}, {0, 0, 0}, {139, 219, 208}, {139, 219, 208}, {139, 219, 208}, + {0, 0, 0}, {0, 0, 0}, {139, 219, 208}, {139, 219, 208}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {139, 219, 208}, {139, 219, 208}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {139, 219, 208}, {139, 219, 208}, + {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, + {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, + {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, + {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0} + }, + + [5] = { + {0, 0, 0}, {113, 186, 145}, {113, 186, 145}, {113, 186, 145}, {0, 0, 0}, {0, 0, 0}, {113, 186, 145}, {113, 186, 145}, {113, 186, 145}, {0, 0, 0}, {0, 0, 0}, {113, 186, 145}, {113, 186, 145}, {113, 186, 145}, + {0, 0, 0}, {0, 0, 0}, {113, 186, 145}, {113, 186, 145}, {113, 186, 145}, {0, 0, 0}, {0, 0, 0}, {113, 186, 145}, {113, 186, 145}, {113, 186, 145}, {0, 0, 0}, {0, 0, 0}, {113, 186, 145}, {113, 186, 145}, + {113, 186, 145}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {113, 186, 145}, {113, 186, 145}, {113, 186, 145}, {113, 186, 145}, {25, 218, 204}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, + {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, + {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, + {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0} + } }; void set_layer_color(int layer) { diff --git a/tests/snapshots/integration_test__fmt_moonlander_no_clang.snap b/tests/snapshots/integration_test__fmt_moonlander_no_clang.snap index cab2608..101b978 100644 --- a/tests/snapshots/integration_test__fmt_moonlander_no_clang.snap +++ b/tests/snapshots/integration_test__fmt_moonlander_no_clang.snap @@ -80,20 +80,59 @@ extern rgb_config_t rgb_matrix_config; void keyboard_post_init_user(void) { rgb_matrix_enable(); } const uint8_t PROGMEM ledmap[][RGB_MATRIX_LED_COUNT][3] = { - [0] = {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {146, 224, 255}, {146, 224, 255}, {146, 224, 255}, {0, 0, 0}, {0, 0, 0}, {146, 224, 255}, {146, 224, 255}, {146, 224, 255}, {0, 0, 0}, {0, 0, 0}, {146, 224, 255}, {146, 224, 255}, {146, 224, 255}, {32, 255, 234}, {0, 0, 0}, {146, 224, 255}, {146, 224, 255}, {146, 224, 255}, {31, 255, 255}, {0, 0, 0}, {146, 224, 255}, {146, 224, 255}, {146, 224, 255}, {0, 0, 0}, {12, 225, 241}, {12, 225, 241}, {146, 224, 255}, {146, 224, 255}, {12, 225, 241}, {0, 204, 255}, - {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {146, 224, 255}, {146, 224, 255}, {146, 224, 255}, {0, 0, 0}, {0, 0, 0}, {146, 224, 255}, {146, 224, 255}, {146, 224, 255}, {0, 0, 0}, {0, 0, 0}, {146, 224, 255}, {146, 224, 255}, {146, 224, 255}, {0, 0, 0}, {0, 0, 0}, {146, 224, 255}, {146, 224, 255}, {146, 224, 255}, {0, 0, 0}, {0, 0, 0}, {146, 224, 255}, {146, 224, 255}, {146, 224, 255}, {0, 0, 0}, {12, 225, 241}, {12, 225, 241}, {146, 224, 255}, {146, 224, 255}, {12, 225, 241}, {0, 204, 255}}, - - [1] = {{0, 0, 0}, {0, 0, 0}, {15, 166, 195}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {169, 120, 255}, {169, 120, 255}, {169, 120, 255}, {0, 0, 0}, {0, 0, 0}, {169, 120, 255}, {169, 120, 255}, {169, 120, 255}, {0, 0, 0}, {0, 0, 0}, {169, 120, 255}, {169, 120, 255}, {169, 120, 255}, {12, 225, 241}, {0, 0, 0}, {169, 120, 255}, {169, 120, 255}, {169, 120, 255}, {12, 225, 241}, {0, 0, 0}, {169, 120, 255}, {169, 120, 255}, {169, 120, 255}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, - {0, 0, 0}, {169, 120, 255}, {169, 120, 255}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {169, 120, 255}, {169, 120, 255}, {0, 0, 0}, {0, 0, 0}, {169, 120, 255}, {169, 120, 255}, {169, 120, 255}, {0, 0, 0}, {0, 0, 0}, {169, 120, 255}, {169, 120, 255}, {0, 0, 0}, {31, 255, 255}, {0, 0, 0}, {169, 120, 255}, {169, 120, 255}, {169, 120, 255}, {31, 255, 255}, {0, 0, 0}, {169, 120, 255}, {169, 120, 255}, {169, 120, 255}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}}, - - [2] = {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {12, 225, 241}, {32, 255, 234}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {32, 255, 234}, {32, 255, 234}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {12, 225, 241}, {32, 255, 234}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {169, 120, 255}, {169, 120, 255}, {169, 120, 255}, {0, 0, 0}, {12, 225, 241}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {169, 120, 255}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {169, 120, 255}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {169, 120, 255}, {169, 120, 255}, {169, 120, 255}, {0, 0, 0}}, - - [3] = {{0, 0, 0}, {0, 0, 0}, {32, 255, 234}, {12, 225, 241}, {0, 0, 0}, {0, 0, 0}, {32, 255, 234}, {32, 255, 234}, {32, 255, 234}, {0, 0, 0}, {0, 0, 0}, {32, 255, 234}, {32, 255, 234}, {32, 255, 234}, {0, 0, 0}, {0, 0, 0}, {32, 255, 234}, {32, 255, 234}, {32, 255, 234}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {12, 225, 241}, {12, 225, 241}, {0, 0, 0}, {12, 225, 241}, {32, 255, 234}, {32, 255, 234}, {32, 255, 234}, {0, 0, 0}, {12, 225, 241}, {32, 255, 234}, {32, 255, 234}, {32, 255, 234}, {0, 0, 0}, {12, 225, 241}, {32, 255, 234}, {32, 255, 234}, {32, 255, 234}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {32, 255, 234}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}}, - - [4] = {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {139, 219, 208}, {139, 219, 208}, {139, 219, 208}, {0, 0, 0}, {0, 0, 0}, {139, 219, 208}, {139, 219, 208}, {139, 219, 208}, {0, 0, 0}, {0, 0, 0}, {139, 219, 208}, {139, 219, 208}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {139, 219, 208}, {139, 219, 208}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {139, 219, 208}, {139, 219, 208}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}}, - - [5] = {{0, 0, 0}, {113, 186, 145}, {113, 186, 145}, {113, 186, 145}, {0, 0, 0}, {0, 0, 0}, {113, 186, 145}, {113, 186, 145}, {113, 186, 145}, {0, 0, 0}, {0, 0, 0}, {113, 186, 145}, {113, 186, 145}, {113, 186, 145}, {0, 0, 0}, {0, 0, 0}, {113, 186, 145}, {113, 186, 145}, {113, 186, 145}, {0, 0, 0}, {0, 0, 0}, {113, 186, 145}, {113, 186, 145}, {113, 186, 145}, {0, 0, 0}, {0, 0, 0}, {113, 186, 145}, {113, 186, 145}, {113, 186, 145}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {113, 186, 145}, {113, 186, 145}, {113, 186, 145}, {113, 186, 145}, {25, 218, 204}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}}, - + [0] = { + {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {146, 224, 255}, {146, 224, 255}, {146, 224, 255}, {0, 0, 0}, {0, 0, 0}, {146, 224, 255}, {146, 224, 255}, {146, 224, 255}, + {0, 0, 0}, {0, 0, 0}, {146, 224, 255}, {146, 224, 255}, {146, 224, 255}, {32, 255, 234}, {0, 0, 0}, {146, 224, 255}, {146, 224, 255}, {146, 224, 255}, {31, 255, 255}, {0, 0, 0}, {146, 224, 255}, {146, 224, 255}, + {146, 224, 255}, {0, 0, 0}, {12, 225, 241}, {12, 225, 241}, {146, 224, 255}, {146, 224, 255}, {12, 225, 241}, {0, 204, 255}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, + {146, 224, 255}, {146, 224, 255}, {146, 224, 255}, {0, 0, 0}, {0, 0, 0}, {146, 224, 255}, {146, 224, 255}, {146, 224, 255}, {0, 0, 0}, {0, 0, 0}, {146, 224, 255}, {146, 224, 255}, + {146, 224, 255}, {0, 0, 0}, {0, 0, 0}, {146, 224, 255}, {146, 224, 255}, {146, 224, 255}, {0, 0, 0}, {0, 0, 0}, {146, 224, 255}, {146, 224, 255}, {146, 224, 255}, {0, 0, 0}, + {12, 225, 241}, {12, 225, 241}, {146, 224, 255}, {146, 224, 255}, {12, 225, 241}, {0, 204, 255} + }, + + [1] = { + {0, 0, 0}, {0, 0, 0}, {15, 166, 195}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {169, 120, 255}, {169, 120, 255}, {169, 120, 255}, {0, 0, 0}, {0, 0, 0}, {169, 120, 255}, {169, 120, 255}, {169, 120, 255}, + {0, 0, 0}, {0, 0, 0}, {169, 120, 255}, {169, 120, 255}, {169, 120, 255}, {12, 225, 241}, {0, 0, 0}, {169, 120, 255}, {169, 120, 255}, {169, 120, 255}, {12, 225, 241}, {0, 0, 0}, {169, 120, 255}, {169, 120, 255}, + {169, 120, 255}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {169, 120, 255}, {169, 120, 255}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, + {0, 0, 0}, {169, 120, 255}, {169, 120, 255}, {0, 0, 0}, {0, 0, 0}, {169, 120, 255}, {169, 120, 255}, {169, 120, 255}, {0, 0, 0}, {0, 0, 0}, {169, 120, 255}, {169, 120, 255}, + {0, 0, 0}, {31, 255, 255}, {0, 0, 0}, {169, 120, 255}, {169, 120, 255}, {169, 120, 255}, {31, 255, 255}, {0, 0, 0}, {169, 120, 255}, {169, 120, 255}, {169, 120, 255}, {0, 0, 0}, + {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0} + }, + + [2] = { + {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {12, 225, 241}, {32, 255, 234}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {32, 255, 234}, {32, 255, 234}, {0, 0, 0}, + {0, 0, 0}, {0, 0, 0}, {12, 225, 241}, {32, 255, 234}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, + {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {169, 120, 255}, {169, 120, 255}, {169, 120, 255}, {0, 0, 0}, {12, 225, 241}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, + {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {169, 120, 255}, + {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {169, 120, 255}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, + {0, 0, 0}, {0, 0, 0}, {169, 120, 255}, {169, 120, 255}, {169, 120, 255}, {0, 0, 0} + }, + + [3] = { + {0, 0, 0}, {0, 0, 0}, {32, 255, 234}, {12, 225, 241}, {0, 0, 0}, {0, 0, 0}, {32, 255, 234}, {32, 255, 234}, {32, 255, 234}, {0, 0, 0}, {0, 0, 0}, {32, 255, 234}, {32, 255, 234}, {32, 255, 234}, + {0, 0, 0}, {0, 0, 0}, {32, 255, 234}, {32, 255, 234}, {32, 255, 234}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, + {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, + {0, 0, 0}, {12, 225, 241}, {12, 225, 241}, {0, 0, 0}, {12, 225, 241}, {32, 255, 234}, {32, 255, 234}, {32, 255, 234}, {0, 0, 0}, {12, 225, 241}, {32, 255, 234}, {32, 255, 234}, + {32, 255, 234}, {0, 0, 0}, {12, 225, 241}, {32, 255, 234}, {32, 255, 234}, {32, 255, 234}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {32, 255, 234}, {0, 0, 0}, {0, 0, 0}, + {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0} + }, + + [4] = { + {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {139, 219, 208}, {139, 219, 208}, {139, 219, 208}, {0, 0, 0}, {0, 0, 0}, {139, 219, 208}, {139, 219, 208}, {139, 219, 208}, + {0, 0, 0}, {0, 0, 0}, {139, 219, 208}, {139, 219, 208}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {139, 219, 208}, {139, 219, 208}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {139, 219, 208}, {139, 219, 208}, + {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, + {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, + {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, + {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0} + }, + + [5] = { + {0, 0, 0}, {113, 186, 145}, {113, 186, 145}, {113, 186, 145}, {0, 0, 0}, {0, 0, 0}, {113, 186, 145}, {113, 186, 145}, {113, 186, 145}, {0, 0, 0}, {0, 0, 0}, {113, 186, 145}, {113, 186, 145}, {113, 186, 145}, + {0, 0, 0}, {0, 0, 0}, {113, 186, 145}, {113, 186, 145}, {113, 186, 145}, {0, 0, 0}, {0, 0, 0}, {113, 186, 145}, {113, 186, 145}, {113, 186, 145}, {0, 0, 0}, {0, 0, 0}, {113, 186, 145}, {113, 186, 145}, + {113, 186, 145}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {113, 186, 145}, {113, 186, 145}, {113, 186, 145}, {113, 186, 145}, {25, 218, 204}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, + {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, + {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, + {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0} + } }; void set_layer_color(int layer) {