From d689f76110ee20e45d6531eac31bf72461ed504b Mon Sep 17 00:00:00 2001 From: Anne Demey Date: Fri, 23 Oct 2020 17:14:17 -0500 Subject: [Keyboard] Add Terrazzo Keyboard (#10408) * Ciao Terrazzo! * Keymap updates * Adding info json Cleaning up keymap files Readme updates with template * Coding style updates * Removing vscode files * PR feedback updates * biton32 -> get_highest_layer update Adding license headers --- keyboards/terrazzo/terrazzo_effects/dino.h | 162 +++++++++++++++++++++++++++++ 1 file changed, 162 insertions(+) create mode 100644 keyboards/terrazzo/terrazzo_effects/dino.h (limited to 'keyboards/terrazzo/terrazzo_effects/dino.h') diff --git a/keyboards/terrazzo/terrazzo_effects/dino.h b/keyboards/terrazzo/terrazzo_effects/dino.h new file mode 100644 index 0000000000..747ef6178e --- /dev/null +++ b/keyboards/terrazzo/terrazzo_effects/dino.h @@ -0,0 +1,162 @@ +/* Copyright 2020 ademey "MsMustard" + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef DISABLE_TERRAZZO_EFFECT_DINO +TERRAZZO_EFFECT(DINO) +# ifdef TERRAZZO_EFFECT_IMPLS + +static uint8_t dino_frames[2][56] = { +{ + 0, 0, 0, 9, 9, 9, 9, + 0, 0, 0, 9, 0, 9, 9, + 9, 0, 0, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 0, 0, + 9, 9, 9, 9, 9, 0, 0, + 0, 9, 9, 9, 0, 0, 0, + 0, 9, 0, 9, 9, 0, 0, + 0, 9, 9, 0, 0, 0, 0 +}, +{ + 0, 0, 0, 9, 9, 9, 9, + 0, 0, 0, 9, 0, 9, 9, + 9, 0, 0, 9, 9, 9, 9, + 9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+ 1, 1, 1, 1, 4, 1, 1, + 0, 0, 0, 0, 4, 0, 0 +}, +{ + 0, 0, 0, 4, 0, 0, 0, + 0, 4, 0, 4, 0, 4, 0, + 0, 4, 0, 4, 4, 4, 0, + 0, 0, 4, 4, 0, 0, 0, + 1, 1, 1, 4, 1, 1, 1, + 0, 0, 0, 4, 0, 0, 0 +}, +{ + 0, 0, 4, 0, 0, 0, 0, + 4, 0, 4, 0, 4, 0, 0, + 4, 0, 4, 4, 4, 0, 0, + 0, 4, 4, 0, 0, 0, 1, + 1, 1, 4, 1, 1, 1, 0, + 0, 0, 4, 0, 0, 0, 0 +}, +{ + 0, 4, 0, 0, 0, 0, 0, + 0, 4, 0, 4, 0, 0, 0, + 0, 4, 4, 4, 0, 0, 0, + 4, 4, 0, 0, 0, 1, 1, + 1, 4, 1, 1, 1, 0, 0, + 0, 4, 0, 0, 0, 0, 0 +}, +{ + 4, 0, 0, 0, 0, 0, 0, + 4, 0, 4, 0, 0, 0, 0, + 4, 4, 4, 0, 0, 0, 0, + 4, 0, 0, 0, 1, 1, 0, + 4, 1, 1, 1, 0, 0, 1, + 4, 0, 0, 0, 0, 0, 0 +}, +{ + 0, 0, 0, 0, 0, 0, 0, + 0, 4, 0, 0, 0, 0, 0, + 4, 4, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 0, 0, + 1, 1, 1, 0, 0, 1, 1, + 0, 0, 0, 0, 0, 0, 0 +}, +{ + 0, 0, 0, 0, 0, 0, 0, + 4, 0, 0, 0, 0, 0, 4, + 4, 0, 0, 0, 0, 0, 4, + 0, 0, 1, 1, 0, 0, 0, + 1, 1, 0, 0, 1, 1, 1, + 0, 0, 0, 0, 0, 0, 0 +} +}; + +void DINO(uint8_t i, bool dir) { + led_matrix_set_index_value_all(0); + if (dir) { + terrazzo_draw_at(0, 7, 7, 8, dino_frames[i % 2]); + } else { + terrazzo_draw_at(0, 7, 7, 8, dino_reverse[i % 2]); + + } + terrazzo_draw_at(0, 0, 7, 6, dino_bg[i % 10]); +} + +# endif +#endif \ No newline at end of file -- cgit v1.2.3