logo

qmk_firmware

custom branch of QMK firmware git clone https://anongit.hacktivis.me/git/qmk_firmware.git

dino.h (3553B)


  1. /* Copyright 2020 ademey "MsMustard"
  2. *
  3. * This program is free software: you can redistribute it and/or modify
  4. * it under the terms of the GNU General Public License as published by
  5. * the Free Software Foundation, either version 2 of the License, or
  6. * (at your option) any later version.
  7. *
  8. * This program is distributed in the hope that it will be useful,
  9. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. * GNU General Public License for more details.
  12. *
  13. * You should have received a copy of the GNU General Public License
  14. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  15. */
  16. #ifndef DISABLE_TERRAZZO_EFFECT_DINO
  17. TERRAZZO_EFFECT(DINO)
  18. # ifdef TERRAZZO_EFFECT_IMPLS
  19. static uint8_t dino_frames[2][56] = {
  20. {
  21. 0, 0, 0, 9, 9, 9, 9,
  22. 0, 0, 0, 9, 0, 9, 9,
  23. 9, 0, 0, 9, 9, 9, 9,
  24. 9, 9, 9, 9, 9, 0, 0,
  25. 9, 9, 9, 9, 9, 0, 0,
  26. 0, 9, 9, 9, 0, 0, 0,
  27. 0, 9, 0, 9, 9, 0, 0,
  28. 0, 9, 9, 0, 0, 0, 0
  29. },
  30. {
  31. 0, 0, 0, 9, 9, 9, 9,
  32. 0, 0, 0, 9, 0, 9, 9,
  33. 9, 0, 0, 9, 9, 9, 9,
  34. 9, 9, 9, 9, 9, 0, 0,
  35. 9, 9, 9, 9, 9, 0, 0,
  36. 0, 9, 9, 9, 0, 0, 0,
  37. 0, 9, 0, 9, 0, 0, 0,
  38. 0, 0, 0, 9, 9, 0, 0
  39. }
  40. };
  41. static uint8_t dino_reverse[2][56] = {
  42. {
  43. 9, 9, 9, 9, 0, 0, 0,
  44. 9, 9, 0, 9, 0, 0, 0,
  45. 9, 9, 9, 9, 0, 0, 9,
  46. 0, 0, 9, 9, 9, 9, 9,
  47. 0, 0, 9, 9, 9, 9, 9,
  48. 0, 0, 0, 9, 9, 9, 0,
  49. 0, 0, 9, 9, 0, 9, 0,
  50. 0, 0, 0, 0, 9, 9, 0
  51. },
  52. {
  53. 9, 9, 9, 9, 0, 0, 0,
  54. 9, 9, 0, 9, 0, 0, 0,
  55. 9, 9, 9, 9, 0, 0, 9,
  56. 0, 0, 9, 9, 9, 9, 9,
  57. 0, 0, 9, 9, 9, 9, 9,
  58. 0, 0, 0, 9, 9, 9, 0,
  59. 0, 0, 0, 9, 0, 9, 0,
  60. 0, 0, 9, 9, 0, 0, 0
  61. }
  62. };
  63. static uint8_t dino_bg[10][42] = {
  64. {
  65. 0, 0, 0, 0, 0, 0, 0,
  66. 0, 0, 0, 0, 0, 4, 0,
  67. 0, 0, 0, 0, 0, 4, 0,
  68. 0, 1, 1, 0, 0, 0, 4,
  69. 1, 0, 0, 1, 1, 1, 1,
  70. 0, 0, 0, 0, 0, 0, 0
  71. },
  72. {
  73. 0, 0, 0, 0, 0, 0, 4,
  74. 0, 0, 0, 0, 4, 0, 4,
  75. 0, 0, 0, 0, 4, 0, 4,
  76. 1, 1, 0, 0, 0, 4, 4,
  77. 0, 0, 1, 1, 1, 1, 4,
  78. 0, 0, 0, 0, 0, 0, 4
  79. },
  80. {
  81. 0, 0, 0, 0, 0, 4, 0,
  82. 0, 0, 0, 4, 0, 4, 0,
  83. 0, 0, 0, 4, 0, 4, 4,
  84. 1, 0, 0, 0, 4, 4, 0,
  85. 0, 1, 1, 1, 1, 4, 0,
  86. 0, 0, 0, 0, 0, 4, 0
  87. },
  88. {
  89. 0, 0, 0, 0, 4, 0, 0,
  90. 0, 0, 4, 0, 4, 0, 4,
  91. 0, 0, 4, 0, 4, 4, 4,
  92. 0, 0, 0, 4, 4, 0, 0,
  93. 1, 1, 1, 1, 4, 1, 1,
  94. 0, 0, 0, 0, 4, 0, 0
  95. },
  96. {
  97. 0, 0, 0, 4, 0, 0, 0,
  98. 0, 4, 0, 4, 0, 4, 0,
  99. 0, 4, 0, 4, 4, 4, 0,
  100. 0, 0, 4, 4, 0, 0, 0,
  101. 1, 1, 1, 4, 1, 1, 1,
  102. 0, 0, 0, 4, 0, 0, 0
  103. },
  104. {
  105. 0, 0, 4, 0, 0, 0, 0,
  106. 4, 0, 4, 0, 4, 0, 0,
  107. 4, 0, 4, 4, 4, 0, 0,
  108. 0, 4, 4, 0, 0, 0, 1,
  109. 1, 1, 4, 1, 1, 1, 0,
  110. 0, 0, 4, 0, 0, 0, 0
  111. },
  112. {
  113. 0, 4, 0, 0, 0, 0, 0,
  114. 0, 4, 0, 4, 0, 0, 0,
  115. 0, 4, 4, 4, 0, 0, 0,
  116. 4, 4, 0, 0, 0, 1, 1,
  117. 1, 4, 1, 1, 1, 0, 0,
  118. 0, 4, 0, 0, 0, 0, 0
  119. },
  120. {
  121. 4, 0, 0, 0, 0, 0, 0,
  122. 4, 0, 4, 0, 0, 0, 0,
  123. 4, 4, 4, 0, 0, 0, 0,
  124. 4, 0, 0, 0, 1, 1, 0,
  125. 4, 1, 1, 1, 0, 0, 1,
  126. 4, 0, 0, 0, 0, 0, 0
  127. },
  128. {
  129. 0, 0, 0, 0, 0, 0, 0,
  130. 0, 4, 0, 0, 0, 0, 0,
  131. 4, 4, 0, 0, 0, 0, 0,
  132. 0, 0, 0, 1, 1, 0, 0,
  133. 1, 1, 1, 0, 0, 1, 1,
  134. 0, 0, 0, 0, 0, 0, 0
  135. },
  136. {
  137. 0, 0, 0, 0, 0, 0, 0,
  138. 4, 0, 0, 0, 0, 0, 4,
  139. 4, 0, 0, 0, 0, 0, 4,
  140. 0, 0, 1, 1, 0, 0, 0,
  141. 1, 1, 0, 0, 1, 1, 1,
  142. 0, 0, 0, 0, 0, 0, 0
  143. }
  144. };
  145. void DINO(uint8_t i, bool dir) {
  146. led_matrix_set_value_all(0);
  147. if (dir) {
  148. terrazzo_draw_at(0, 7, 7, 8, dino_frames[i % 2]);
  149. } else {
  150. terrazzo_draw_at(0, 7, 7, 8, dino_reverse[i % 2]);
  151. }
  152. terrazzo_draw_at(0, 0, 7, 6, dino_bg[i % 10]);
  153. }
  154. # endif
  155. #endif