Advertisement
Guest User

adventure

a guest
Oct 25th, 2016
302
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 76.22 KB | None | 0 0
  1. #include <SPI.h>
  2. #include <Gamebuino.h>
  3. Gamebuino gb;
  4.  
  5. const byte tilemap1[] PROGMEM = {17,11,
  6. 8,8,
  7. 2, 2, 2, 2, 2, 2, 2,19,30,26,26,26,26,26,26,26, 2,
  8. 2, 2, 2, 2, 2, 2, 2,19, 8,26,26,26,26,26,26,26,20,
  9. 2, 2, 2, 2, 2, 2, 2,19, 8,26,26,25,25,25,25,25,20,
  10. 2, 2, 2, 2, 2, 2,18, 4, 8,25,26,56,57,58,59,60,20,
  11. 2, 2, 2, 2, 2, 4, 8, 8, 8,65,25,51,52,53,54,55,20,
  12. 2, 2, 2, 2, 4, 8, 8, 8, 8, 8, 8,46,47,48,49,50,20, /////////112x64 pix res
  13. 18,18,18, 4, 8, 8, 8, 8, 8, 8,8, 8,79, 8, 8, 8, 3,
  14. 28, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,29,
  15. 21,21, 6, 8, 8, 8,22,23,24, 8, 8, 8, 8, 8, 5,21,21,
  16. 2, 2,19, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,20, 2, 2,
  17. 2, 2, 2,21,21,21,21,21,21,21,21,21,21,21, 2, 2, 2};
  18.  
  19. const byte tilemap2[] PROGMEM = {17,11,
  20. 8,8,
  21. 2, 2, 2, 2, 2, 2, 2,19,30,30, 3,18,18,18,18,18, 2,
  22. 2, 2, 2, 2, 2, 2, 2,19, 8, 8,27,27,27,27,27,27,20,
  23. 2, 2, 2, 2, 2, 2, 2,19, 8, 8,26,26,26,26,26,26,20,
  24. 2, 2, 2, 2, 2, 2,18, 4, 8, 8,25,26,26,26,26,26,20,
  25. 2, 2, 2, 2, 2, 4, 8, 8, 8, 8, 8,26,26,26,26,26,20,
  26. 2, 2, 2, 2, 4, 8, 8, 8, 8, 8, 8,26,26,26,26,26,20, /////////112x64 pix res
  27. 18,18,18, 4, 8, 8, 8,27, 8, 8, 8, 8,25,25,25,25, 3,
  28. 28, 8, 8, 8, 8, 8,27,26,27, 8, 8, 8, 8, 8, 8, 8,29,
  29. 21,21, 6, 8, 8,27,26,26,26,27, 8, 8, 8, 8, 5,21,21,
  30. 2, 2,19, 8, 8,25,25,25,25,25, 8, 8, 8, 8,20, 2, 2,
  31. 2, 2, 2,21,21,21,21,21,21,21,21,21,21,21, 2, 2, 2};
  32.  
  33. const byte tilemap3[] PROGMEM = {17,11,
  34. 8,8,
  35. 2, 2, 2, 2, 2, 2, 2, 2,18,18,18,18,18,18,18,18, 2,
  36. 2, 2, 2, 2, 2, 2, 2,19, 8, 8, 8, 8, 8, 8, 8, 8,20,
  37. 2, 2, 2, 2, 2, 2, 2,19, 8, 8, 8, 8, 8, 8, 8, 8,20,
  38. 2,18,18,18,18,18,18, 4, 8, 8, 8, 8, 5,21,21,21, 2,
  39. 19, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 5, 2, 2, 2, 2, 2,
  40. 19, 8, 8, 8, 8, 8, 8, 8, 8, 8, 5, 2, 2, 2, 2, 2, 2, /////////112x64 pix res
  41. 19, 8, 8, 5,21,21,21, 6, 8, 8,20, 2, 2, 2, 2, 2, 2,
  42. 19, 8, 8,20, 2, 2, 2,19, 8, 8,20, 2, 2, 2, 2, 2, 2,
  43. 19,34, 8,20, 2, 2, 2,19, 8, 8,20, 2, 2, 2, 2, 2, 2,
  44. 2,21,21, 2, 2, 2, 2,19, 8, 8,20, 2, 2, 2, 2, 2, 2,
  45. 2, 2, 2, 2, 2, 2, 2,19,28,28,20, 2, 2, 2, 2, 2, 2};
  46.  
  47. const byte tilemap4[] PROGMEM = {17,11,
  48. 8,8,
  49. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  50. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  51. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  52. 2,18,18,18,18,18, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  53. 19, 8, 8, 8,36, 8,20, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  54. 19, 8, 8, 8, 8, 8,20, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, /////////112x64 pix res
  55. 19, 8, 8, 5,21,21, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  56. 19, 8, 8,20, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  57. 19,35, 8,20, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  58. 2,21,21, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  59. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2};
  60.  
  61. const byte tilemap7[] PROGMEM = {12,11,
  62. 8,8,
  63. 45,45,45,45,45,45,45,45,45,45,45,45,
  64. 45,45,37,37,37,37,37,37,37,45,45,45,
  65. 45,41,61,61,61,61,66,62,61,40,45,45,
  66. 45,41, 8, 8, 8, 8,67,63, 8,40,45,45,
  67. 45,41, 8, 8, 8, 8, 8,64, 8,40,45,45,
  68. 45,41, 8, 8, 8, 8, 8, 8, 8,40,45,45, /////////112x64 pix res
  69. 45,41, 8, 8, 8, 8, 8, 8, 8,40,45,45,
  70. 45,41,77,78, 8, 8, 8, 8, 8,40,45,45,
  71. 45,41,75,76, 8, 8, 8, 8, 8,40,45,45,
  72. 45,41, 8, 8, 8, 8, 8, 8, 8,40,45,45,
  73. 45,45,42,42,44,28,43,42,42,45,45,45,};
  74.  
  75. const byte tilemap6[] PROGMEM = {20,20,
  76. 8,8,
  77. 2,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18, 2, 2, 2, 2,
  78. 19,56,57,58,59,60, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,20, 2, 2, 2,
  79. 19,51,52,53,54,55, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 3, 2, 2, 2,
  80. 19,46,47,48,49,50, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,27,20, 2, 2,
  81. 19, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,27,27,26, 3, 2, 2,
  82. 19, 8, 8, 8, 8, 8, 8, 8, 8,56,57,58,59,60,25,26,26,27, 3, 2,
  83. 19, 8, 8, 8, 8, 8, 8, 8, 8,51,52,53,54,55, 8,25,26,26,27,20,
  84. 19, 8, 8, 8, 8, 8, 8, 8, 8,46,47,80,49,50, 8, 8,25,26,26,20,
  85. 19, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,25,26,20,
  86. 19, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,25,20,
  87. 19, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,20,
  88. 19, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,20,
  89. 2, 6, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,20,
  90. 2, 2, 6, 8, 5,21, 6, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,20,
  91. 2,18, 4, 8, 3,18, 2,21, 6, 8, 8, 8, 8,56,57,58,59,60, 8,20,
  92. 19,27, 8, 8, 8, 8,20, 2,19, 8, 8, 8, 8,51,52,53,54,55,27,20,
  93. 19,25, 8, 8, 8, 8,20, 2, 2, 6, 8, 8, 8,46,47,48,49,50,25,20,
  94. 19, 8, 8, 8, 8, 8,20, 2, 2, 2, 6, 8, 8, 8, 8, 8, 8, 8, 8,20,
  95. 2,21, 6, 8, 5,21, 2, 2, 2, 2, 2,21, 6, 8, 8, 8, 8, 8, 8,20,
  96. 2, 2,19,28,20, 2, 2, 2, 2, 2, 2, 2, 2,21,21,21,21,21,21, 2,};
  97.  
  98.  
  99.  
  100. /////////////ELLIE'S (my daughters) ROOM////////////
  101. const byte tilemap5[] PROGMEM = {17,11,
  102. 8,8,
  103. 45,45,45,37,37,37,37,37,37,37,37,37,37,37,45,45,45,
  104. 45,45,41,61,61,61,61,61,61,61,61,66,61,61,40,45,45,
  105. 45,45,41,65, 8, 8, 8, 8, 8, 8, 8,67,73,74,40,45,45,
  106. 45,45,41, 8, 8, 8, 8, 8, 8, 8, 8, 8,75,76,40,45,45,
  107. 45,45,41, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,40,45,45,
  108. 45,45,41, 8, 8,77,78, 8, 8, 8, 8, 8, 8, 8,40,45,45, /////////112x64 pix res
  109. 45,45,41, 8, 8,75,76, 8, 8, 8, 8, 8, 8, 8,40,45,45,
  110. 45,45,41, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,40,45,45,
  111. 45,45,41, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,40,45,45,
  112. 45,45,41, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,40,45,45,
  113. 45,45,45,42,42,42,42,44,28,43,42,42,42,42,45,45,45,};
  114.  
  115.  
  116.  
  117. const byte bush[] PROGMEM = {B00101100,B01010010,B10001001,B01000010,B10010001,B01001010,B00100100,B01111110,}; //
  118. const byte port_noir[] PROGMEM = {B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,}; //
  119. const byte rock_terrain_master[] PROGMEM = {B00000010,B00010000,B01000000,B00000010,B00010000,B00001000,B01000001,B00000100,}; //
  120. const byte rock_valley_ne[] PROGMEM = {B10100000,B11001001,B01110000,B00001100,B00000101,B00000100,B00000110,B00000011,}; //
  121. const byte rock_valley_nw[] PROGMEM = {B00000101,B10010011,B00001110,B00110000,B10100000,B00100000,B01100000,B11000000,}; //
  122. const byte rock_valley_se[] PROGMEM = {B00000011,B00000110,B00000100,B00000101,B00001100,B01110000,B11001001,B10100000,}; //
  123. const byte rock_valley_sw[] PROGMEM = {B11000000,B01100000,B00100000,B10100000,B00110000,B00001110,B10010011,B00000101,}; //
  124. const byte turtle_rock[] PROGMEM = {B01101100,B10110010,B11010001,B01010101,B01010010,B10011001,B10000001,B11111110,}; //
  125. const byte void_tile[] PROGMEM = {B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,};
  126. const byte water_left_bottom[] PROGMEM = {B10001111,B10000000,B11110000,B10000000,B10001111,B10000000,B11110000,B11111111,}; //
  127. const byte water_left_middle[] PROGMEM = {B10001111,B10000000,B11110000,B10000000,B10001111,B10000000,B11110000,B10000000,}; //
  128. const byte water_left_top[] PROGMEM = {B11111111,B10000000,B11110000,B10001111,B10000000,B10000000,B11110000,B10000000,}; //
  129. const byte water_right_bottom[] PROGMEM = {B1110001,B00000001,B0000111,B00000001,B11110001,B00000001,B00001111,B11111111,}; //
  130. const byte water_right_middle[] PROGMEM = {B11110001,B00000001,B00001111,B00000001,B11110001,B00000001,B00001111,B00000001,}; //
  131. const byte water_right_top[] PROGMEM = {B11111111,B00000001,B00001111,B00000001,B11110001,B00000001,B00001111,B00000001,}; //
  132. const byte water_middle_bottom[] PROGMEM = {B11110000,B00000000,B00001111,B00000000,B11110000,B00000000,B00001111,B11111111,}; //
  133. const byte water_middle_middle[] PROGMEM = {B11110000,B00000000,B00001111,B00000000,B11110000,B00000000,B00001111,B00000000,}; //
  134. const byte water_middle_top[] PROGMEM = {B11111111,B00000000,B11110000,B00000000,B00001111,B00000000,B11110000,B00000000,}; //
  135.  
  136. const byte rock_s[] PROGMEM = {B00010010,B00000000,B01001000,B00000100,B00100001,B10001100,B01110010,B10000001,};
  137. const byte rock_e[] PROGMEM = {B00000101,B00100010,B00001010,B10000010,B00100100,B00010100,B10000010,B00001001,};
  138. const byte rock_n[] PROGMEM = {B10000001,B01110010,B10001100,B00100001,B00000100,B01001000,B00000000,B00010010,};
  139. const byte rock_w[] PROGMEM = {B10100000,B01000100,B01010000,B01000001,B00100100,B00101000,B01000001,B10010000,};
  140. const byte bush_left[] PROGMEM = {B00111011,B01000100,B10100000,B10010100,B01000010,B10000000,B10001000,B01110111,};
  141. const byte bush_middle[] PROGMEM = {B10111101,B01000010,B00001000,B10000100,B00010000,B00100001,B10001000,B01110111,};
  142. const byte bush_right[] PROGMEM = {B11011100,B00100010,B00000101,B00101001,B01000010,B00000001,B00010001,B11101110,};
  143. const byte tree_base[] PROGMEM = {B01010100,B01000100,B10100010,B10001010,B10000010,B01101100,B00101000,B00101000,};
  144. const byte tree_repeat[] PROGMEM = {B01010100,B01000100,B10000010,B10010010,B10101010,B01101100,B00101000,B01000100,};
  145. const byte tree_top[] PROGMEM = {B00000000,B00000000,B00000000,B00010000,B00101000,B00101000,B00101000,B01000100,};
  146. const byte exit_1[] PROGMEM = {B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,};
  147. const byte exit_2[] PROGMEM = {B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,};
  148. const byte exit_3[] PROGMEM = {B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,};
  149. const byte exit_4[] PROGMEM = {B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,};
  150. const byte exit_5[] PROGMEM = {B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,};
  151. const byte exit_6[] PROGMEM = {B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,};
  152. const byte cave_ladder[] PROGMEM = {B11000011,B11011011,B11000011,B11011011,B11000011,B11011011,B11000011,B11011011,};
  153. const byte ladder[] PROGMEM = {B00111100,B00100100,B00111100,B00100100,B00111100,B00100100,B00111100,B00100100,};
  154. const byte tombstone[] PROGMEM = {B00111100,B01000010,B10000001,B10111001,B10000001,B10101101,B10000001,B11111111,};
  155. const byte WallB[] PROGMEM = {B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B00000000,B11111111,};
  156. const byte WallBL[] PROGMEM = {B10111111,B10111111,B10111111,B10111111,B10111111,B10111111,B10000000,B11111111,};
  157. const byte WallBR[] PROGMEM = {B11111101,B11111101,B11111101,B11111101,B11111101,B11111101,B00000001,B11111111,};
  158. const byte WallL[] PROGMEM = {B10111111,B10111111,B10111111,B10111111,B10111111,B10111111,B10111111,B10111111,};
  159. const byte WallR[] PROGMEM = {B11111101,B11111101,B11111101,B11111101,B11111101,B11111101,B11111101,B11111101,};
  160. const byte WallT[] PROGMEM = {B11111111,B00000000,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,};
  161. const byte WallTL[] PROGMEM = {B11111111,B10000000,B10111111,B10111111,B10111111,B10111111,B10111111,B10111111,};
  162. const byte WallTR[] PROGMEM = {B11111111,B00000001,B11111101,B11111101,B11111101,B11111101,B11111101,B11111101,};
  163. const byte blackwall[] PROGMEM = {B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,};
  164. const byte houseB1[] PROGMEM = {B01010011,B01010010,B01010010,B01010001,B11110000,B10011111,B10010010,B11111111,};
  165. const byte houseB2[] PROGMEM = {B11111000,B01001000,B01001000,B11110000,B00000000,B11111111,B01001000,B11111111,};
  166. const byte houseB3[] PROGMEM = {B00111100,B01100110,B11000011,B10011001,B10000001,B10000101,B10000001,B11111111,};
  167. const byte houseB4[] PROGMEM = {B00011111,B00010010,B00010010,B00001111,B00000000,B11111111,B00010010,B11111111,};
  168. const byte houseB5[] PROGMEM = {B11001010,B01001010,B01001010,B10001010,B00001111,B11111001,B01001001,B11111111,};
  169. const byte houseT1[] PROGMEM = {B11111111,B01010010,B01011111,B01010000,B01010000,B11110001,B10010010,B11110010,};
  170. const byte houseT2[] PROGMEM = {B11111111,B01001001,B11111111,B00000000,B00000000,B11110000,B01001000,B01001000,};
  171. const byte houseT3[] PROGMEM = {B11111111,B00100100,B11111111,B00000000,B01111110,B10100101,B11111111,B00000000,};
  172. const byte houseT4[] PROGMEM = {B11111111,B10010010,B11111111,B00000000,B00000000,B00001111,B00010010,B00010010,};
  173. const byte houseT5[] PROGMEM = {B11111111,B01001010,B11111010,B00001010,B00001010,B10001111,B01001001,B01001111,};
  174. const byte roof1[] PROGMEM = {B00000000,B00011111,B00110010,B00101101,B01000000,B01010010,B11101101,B10000000,};
  175. const byte roof2[] PROGMEM = {B00000000,B11111111,B01001001,B10110110,B00000000,B01001001,B10110110,B00000000,};
  176. const byte roof3[] PROGMEM = {B00000000,B11111111,B00100100,B11011011,B00000000,B00100100,B11011011,B00000000,};
  177. const byte roof4[] PROGMEM = {B00000111,B11111100,B10010111,B01101100,B00000100,B10010111,B01101101,B00000000,};
  178. const byte roof5[] PROGMEM = {B10000000,B11111000,B11001100,B10110100,B10000010,B11001010,B10110111,B00000001,};
  179. const byte wallpaper[] PROGMEM = {B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B11111111,};
  180. const byte bedbottom[] PROGMEM = {B10111101,B11000011,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,};
  181. const byte bedmid[] PROGMEM = {B11111111,B10000001,B10000001,B10000001,B10111101,B11000011,B10000001,B10000001,};
  182. const byte bedtop[] PROGMEM = {B00000000,B00000000,B00000000,B00111100,B11000011,B10000001,B10111101,B10100101,};
  183. const byte menu1[] PROGMEM = {88,49,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111100,B00000000,B00001100,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,B00000000,B00010001,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111000,B10000000,B00100110,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000110,B01000000,B00101000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000001,B01000000,B01001000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000001,B00100000,B01010000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B10100000,B01010000,B11111111,B11111000,B00111111,B11111110,B00001111,B11111111,B10000011,B11111111,B11100000,B10100000,B01010000,B10000000,B00001000,B00100000,B00000010,B00001000,B00000000,B10000010,B00000000,B00100000,B10100000,B01010000,B10000000,B00001000,B00100000,B00000010,B00001000,B00000000,B10000010,B00000000,B00100000,B10100000,B01010000,B10000000,B00001000,B00100000,B00000010,B00001000,B00000000,B10000010,B00000000,B00100000,B10100000,B01010000,B10000000,B00001000,B00100000,B00000010,B00001000,B00000000,B10000010,B00000000,B00100000,B10100000,B01010000,B10000000,B00001000,B00100000,B00000010,B00001000,B00000000,B10000010,B00000000,B00100000,B10100000,B01010000,B10000000,B00001000,B00100000,B00000010,B00001000,B00000000,B10000010,B00000000,B00100000,B10100000,B01010000,B10000000,B00001000,B00100000,B00000010,B00001000,B00000000,B10000010,B00000000,B00100000,B10100000,B01010000,B10000000,B00001000,B00100000,B00000010,B00001000,B00000000,B10000010,B00000000,B00100000,B10100000,B01010000,B10000000,B00001000,B00100000,B00000010,B00001000,B00000000,B10000010,B00000000,B00100000,B10100000,B01010000,B10000000,B00001000,B00100000,B00000010,B00001000,B00000000,B10000010,B00000000,B00100000,B10100000,B01010000,B10000000,B00001000,B00100000,B00000010,B00001000,B00000000,B10000010,B00000000,B00100000,B10100000,B01010000,B11111111,B11111000,B00111111,B11111110,B00001111,B11111111,B10000011,B11111111,B11100000,B10100000,B01010000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B10100000,B01010000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B10100000,B01010000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B10100000,B01010000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B10100000,B01010000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B10100000,B01010000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B10100000,B01010000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B10100000,B01010000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B10100000,B01010000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B10100000,B01010000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B10100000,B01010000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B10100000,B01010000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B10100000,B01010000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B10100000,B01010000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B10100000,B01010000,B00000000,B00000001,B11111111,B11111111,B11111111,B11111111,B11111000,B00000000,B00000000,B10100000,B01010000,B00000000,B00000010,B00000000,B00000000,B00000000,B00000000,B00000100,B00000000,B00000000,B10100000,B01001000,B00000000,B00000100,B11111111,B11111111,B11111111,B11111111,B11110010,B00000000,B00000001,B00100000,B00101000,B00000000,B00000101,B00000000,B00000000,B00000000,B00000000,B00001010,B00000000,B00000001,B01000000,B00100110,B00000000,B00000101,B01110000,B00000000,B00000010,B00000000,B00001010,B00000000,B00000110,B01000000,B00010001,B11111111,B11111101,B00100110,B01010011,B01100111,B00100110,B10101011,B11111111,B11111000,B10000000,B00001100,B00000000,B00000001,B00100101,B01010110,B01010010,B01010100,B11101000,B00000000,B00000011,B00000000,B00000011,B11111111,B11111101,B01110101,B00100011,B01010010,B00100100,B00101011,B11111111,B11111100,B00000000,B00000000,B00000000,B00000101,B00000000,B00000000,B00000000,B00000000,B11001010,B00000000,B00000000,B00000000,B00000000,B00000000,B00000101,B00000000,B00000000,B00000000,B00000000,B00001010,B00000000,B00000000,B00000000,B00000000,B00000000,B00000100,B11111111,B11111111,B11111111,B11111111,B11110010,B00000000,B00000000,B00000000,B00000000,B00000000,B00000010,B00000000,B00000000,B00000000,B00000000,B00000100,B00000000,B00000000,B00000000,B00000000,B00000000,B00000001,B11111111,B11111111,B11111111,B11111111,B11111000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,};
  184. const byte menu2[] PROGMEM = {88,49,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111100,B00000000,B00001110,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000111,B00000000,B00011001,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111001,B10000000,B00010111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111110,B10000000,B00110111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111110,B11000000,B00101111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B01000000,B00101111,B00000000,B00000111,B11000000,B00000001,B11110000,B00000000,B01111100,B00000000,B00011111,B01000000,B00101111,B01111111,B11110111,B11011111,B11111101,B11110111,B11111111,B01111101,B11111111,B11011111,B01000000,B00101111,B01111111,B11110111,B11011111,B11111101,B11110111,B11111111,B01111101,B11111111,B11011111,B01000000,B00101111,B01111111,B11110111,B11011111,B11111101,B11110111,B11111111,B01111101,B11111111,B11011111,B01000000,B00101111,B01111111,B11110111,B11011111,B11111101,B11110111,B11111111,B01111101,B11111111,B11011111,B01000000,B00101111,B01111111,B11110111,B11011111,B11111101,B11110111,B11111111,B01111101,B11111111,B11011111,B01000000,B00101111,B01111111,B11110111,B11011111,B11111101,B11110111,B11111111,B01111101,B11111111,B11011111,B01000000,B00101111,B01111111,B11110111,B11011111,B11111101,B11110111,B11111111,B01111101,B11111111,B11011111,B01000000,B00101111,B01111111,B11110111,B11011111,B11111101,B11110111,B11111111,B01111101,B11111111,B11011111,B01000000,B00101111,B01111111,B11110111,B11011111,B11111101,B11110111,B11111111,B01111101,B11111111,B11011111,B01000000,B00101111,B01111111,B11110111,B11011111,B11111101,B11110111,B11111111,B01111101,B11111111,B11011111,B01000000,B00101111,B01111111,B11110111,B11011111,B11111101,B11110111,B11111111,B01111101,B11111111,B11011111,B01000000,B00101111,B00000000,B00000111,B11000000,B00000001,B11110000,B00000000,B01111100,B00000000,B00011111,B01000000,B00101111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B01000000,B00101111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B01000000,B00101111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B01000000,B00101111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B01000000,B00101111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B01000000,B00101111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B01000000,B00101111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B01000000,B00101111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B01000000,B00101111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B01000000,B00101111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B01000000,B00101111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B01000000,B00101111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B01000000,B00101111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B01000000,B00101111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B01000000,B00101111,B11111111,B11111110,B00000000,B00000000,B00000000,B00000000,B00000111,B11111111,B11111111,B01000000,B00101111,B11111111,B11111101,B11111111,B11111111,B11111111,B11111111,B11111011,B11111111,B11111111,B01000000,B00110111,B11111111,B11111011,B00000000,B00000000,B00000000,B00000000,B00001101,B11111111,B11111110,B11000000,B00010111,B11111111,B11111010,B11111111,B11111111,B11111111,B11111111,B11110101,B11111111,B11111110,B10000000,B00011001,B11111111,B11111010,B10001111,B11111111,B11111101,B11111111,B11110101,B11111111,B11111001,B10000000,B00001110,B00000000,B00000010,B11011001,B10101100,B10011000,B11011001,B01010100,B00000000,B00000111,B00000000,B00000011,B11111111,B11111110,B11011010,B10101001,B10101101,B10101011,B00010111,B11111111,B11111100,B00000000,B00000000,B00000000,B00000010,B10001010,B11011100,B10101101,B11011011,B11010100,B00000000,B00000000,B00000000,B00000000,B00000000,B00000010,B11111111,B11111111,B11111111,B11111111,B00110100,B00000000,B00000000,B00000000,B00000000,B00000000,B00000010,B11111111,B11111111,B11111111,B11111111,B11110100,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,B00000000,B00000000,B00000000,B00000000,B00001100,B00000000,B00000000,B00000000,B00000000,B00000000,B00000001,B11111111,B11111111,B11111111,B11111111,B11111000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,};
  185. const byte key[] PROGMEM = {16,21,B11111111,B11111000,B10000000,B00001000,B10000000,B00001000,B10000000,B00001000,B10000001,B11001000,B10000001,B01001000,B10001011,B11001000,B10010111,B00001000,B10001110,B00001000,B10001100,B00001000,B10000000,B00001000,B10000000,B00001000,B11111111,B11111000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01000000,B00000000,B01010011,B01010000,B01100110,B01110000,B01010011,B00010000,B00000000,B01100000,};
  186. const byte key2[] PROGMEM = {16,21,B11111111,B11111000,B10000000,B00001000,B10000000,B00001000,B10000000,B00001000,B10000001,B11001000,B10000001,B01001000,B10001011,B11001000,B10010111,B00001000,B10001110,B00001000,B10001100,B00001000,B10000000,B00001000,B10000000,B00001000,B11111111,B11111000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01000000,B00000000,B01010011,B01010000,B01100110,B01110000,B01010011,B00010000,B00000000,B01100000,};
  187. const byte chest[] PROGMEM = {B00000000,B00000000,B01111110,B10000001,B11111111,B10011001,B10000001,B11111111,};
  188. const byte bedsidebottom[] PROGMEM = {B10000001,B10111101,B10100101,B10111101,B10000001,B11111111,B00000000,B00000000,};
  189. const byte bedsidetop[] PROGMEM = {B00000000,B00000000,B00000000,B11111111,B10000001,B10000001,B10000001,B11111111,};
  190. const byte sox[] PROGMEM = {16,21,B01111111,B11111100,B01000000,B00000100,B01000000,B00000100,B01000001,B11100100,B01000001,B00100100,B01000001,B11100100,B01000111,B00100100,B01001000,B00100100,B01001000,B01000100,B01000111,B10000100,B01000000,B00000100,B01000000,B00000100,B01111111,B11111100,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01100000,B00001000,B10000100,B01101010,B00101010,B10001100,B11000100,B01101010,B00000000,B00000000,};
  191. const byte narrativeblack[] PROGMEM = {88,48,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111100,B00000000,B00001100,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,B00000000,B00010001,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111000,B10000000,B00100110,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000110,B01000000,B00101000,B00011111,B11111000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000001,B01000000,B01001000,B00100000,B00000100,B00000000,B00000000,B00000101,B00000000,B00000000,B00000000,B00000001,B00100000,B01010000,B01000000,B00000010,B00000000,B01010000,B00000101,B00000000,B00000000,B00000000,B00000000,B10100000,B01010000,B10000000,B00000001,B11111000,B01010011,B01010101,B00000000,B00000000,B00000000,B00000000,B10100000,B01010000,B11100000,B00000000,B00000100,B01110110,B01110000,B00000000,B00000000,B00000000,B00000000,B10100000,B01010000,B10011111,B11111110,B00011000,B01010011,B00010101,B01010100,B00000000,B00000000,B00000000,B10100000,B01010000,B10000000,B00000001,B11100000,B00000000,B01100000,B00000000,B00000000,B00000000,B00000000,B10100000,B01010000,B10010000,B00001001,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B10100000,B01010000,B10100000,B00000101,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B10100000,B01010000,B10000000,B00000001,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B10100000,B01010000,B10000000,B00000001,B00000000,B01000100,B00000000,B00000000,B00000001,B00000000,B00000000,B10100000,B01010000,B10001000,B00010001,B00000000,B01101101,B01000110,B10001001,B10100001,B10001100,B11000000,B10100000,B01010001,B10011000,B00011001,B10000000,B01010101,B11000101,B01010101,B01010001,B01010100,B10000000,B10100000,B01010010,B10000000,B10000001,B01000000,B01000100,B01000101,B01001001,B01010001,B01001101,B10000000,B10100000,B01010010,B10000001,B10000001,B01000000,B00000001,B10000000,B00000000,B00000000,B00000000,B00000000,B10100000,B01010001,B10000000,B00000001,B10000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B10100000,B01010000,B10000000,B00000001,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B10100000,B01010000,B01000011,B11000010,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B10100000,B01010000,B00100011,B11000100,B00000000,B00000000,B00000000,B00000000,B00010000,B00000000,B00100000,B10100000,B01010000,B00010000,B00001000,B00000000,B01100100,B11000110,B00010010,B10111000,B01101100,B01100000,B10100000,B01010000,B00001100,B00110000,B00000000,B01101010,B10101100,B00101010,B10010000,B10101010,B10100000,B10100000,B01010000,B00000011,B11000000,B00000000,B00100100,B10100110,B00010001,B10010000,B01101010,B01100000,B10100000,B01010000,B00000000,B00000000,B00000000,B01100000,B00000000,B00000000,B00000000,B00000000,B00000000,B10100000,B01010000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B10100000,B01010000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01000000,B10100000,B01010000,B01000000,B00010000,B00000100,B00100100,B00000000,B01000000,B00000000,B00000000,B01000000,B10100000,B01010000,B01001000,B11010100,B11001100,B01110110,B00110000,B11001000,B10011000,B00000001,B01010000,B10100000,B01010000,B01010101,B00011001,B10010100,B00100101,B01100001,B01010101,B01010000,B00000000,B11100000,B10100000,B01010000,B01001000,B11010100,B11001100,B00100101,B00110000,B11001000,B10010000,B00000000,B01000000,B10100000,B01010000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000001,B11100000,B10100000,B01010000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000010,B00010000,B10100000,B01010000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000100,B11001000,B10100000,B01010000,B00000000,B00000100,B01000000,B00000000,B00001000,B00001000,B00000000,B00000101,B00101000,B10100000,B01010000,B00110010,B01010100,B11000010,B10010010,B10001100,B01101011,B00000000,B00000101,B11101000,B10100000,B01010000,B01000101,B01010101,B01000011,B10101010,B10001010,B11001010,B10000000,B00000101,B00101000,B10100000,B01010000,B00110010,B00110100,B11000000,B10010001,B10001010,B01101011,B00101010,B10000010,B00010000,B10100000,B01001000,B00000000,B00000000,B00000011,B00000000,B00000000,B00000010,B00000000,B00000001,B11100001,B00100000,B00101000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000001,B01000000,B00100110,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000110,B01000000,B00010001,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111000,B10000000,B00001100,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,B00000000,B00000011,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111100,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,};
  192. const byte narrativeblack2[] PROGMEM = {88,48,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111100,B00000000,B00001100,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,B00000000,B00010001,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111000,B10000000,B00100110,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000110,B01000000,B00101000,B00011111,B11111000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000001,B01000000,B01001000,B00100000,B00000100,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000001,B00100000,B01010000,B01000000,B00000010,B00000000,B00000000,B00000010,B10000000,B10000100,B10000000,B00000000,B10100000,B01010000,B10000000,B00000001,B11111000,B01101000,B11000100,B00110001,B10001110,B11000110,B00000000,B10100000,B01010000,B11100000,B00000000,B00000100,B01010101,B10000110,B10101010,B10000100,B10101100,B00000000,B10100000,B01010000,B10011111,B11111110,B00011000,B01010100,B11000100,B10101001,B10000100,B10100110,B00000000,B10100000,B01010000,B10000000,B00000001,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B10100000,B01010000,B10010000,B00001001,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B10100000,B01010000,B10100000,B00000101,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B10100000,B01010000,B10000000,B00000001,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B10100000,B01010000,B10000000,B00000001,B00000000,B00000000,B00000000,B00000010,B00000000,B00011000,B11000000,B10100000,B01010000,B10001000,B00010001,B00000000,B00110110,B00110110,B01100010,B10011010,B10000100,B00100000,B10100000,B01010001,B10011000,B00011001,B10000000,B00100101,B01010100,B11000011,B00110011,B10000000,B00000000,B10100000,B01010010,B10000000,B10000001,B01000000,B01100110,B00110100,B01100010,B10011000,B10001000,B01000000,B10100000,B01010010,B10000001,B10000001,B01000000,B00000100,B00000000,B00000000,B00000011,B00000000,B00000000,B10100000,B01010001,B10000000,B00000001,B10000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B10100000,B01010000,B10000000,B00000001,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B10100000,B01010000,B01000011,B11000010,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B10100000,B01010000,B00100011,B11000100,B00000000,B00000100,B00000000,B00000000,B00000000,B00001010,B00000000,B10100000,B01010000,B00010000,B00001000,B00000000,B00110110,B00110001,B10001001,B10110100,B01101010,B10100000,B10100000,B01010000,B00001100,B00110000,B00000000,B00100101,B01100001,B01010101,B00101010,B10101010,B11100000,B10100000,B01010000,B00000011,B11000000,B00000000,B01100101,B00110001,B01001001,B00101010,B01101010,B00100000,B10100000,B01010000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B11000000,B10100000,B01010000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B10100000,B01010000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01000000,B10100000,B01010000,B01000100,B01000000,B00000100,B10000000,B00000000,B00000000,B00100000,B00000000,B01000000,B10100000,B01010000,B01100000,B11001100,B11000001,B11000011,B01100100,B10101100,B01100000,B00000001,B01010000,B10100000,B01010000,B01010101,B01011000,B10000100,B10000101,B01001010,B10101010,B10100000,B00000000,B11100000,B10100000,B01010000,B01010100,B11001101,B10000100,B10000011,B01000100,B01101010,B01100000,B00000000,B01000000,B10100000,B01010000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000001,B11100000,B10100000,B01010000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000010,B00010000,B10100000,B01010000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000100,B11001000,B10100000,B01010000,B01000000,B00000000,B00000000,B00000000,B00000000,B00100000,B00000000,B01010101,B00101000,B10100000,B01010000,B01100011,B01100110,B00011001,B00110100,B01101000,B10110001,B10110011,B01010101,B11101000,B10100000,B01010000,B01010110,B01001100,B00010010,B10101010,B11001010,B10101011,B00100110,B00000101,B00101000,B10100000,B01010000,B01010011,B01000110,B00110001,B00101010,B01100101,B00101001,B10100011,B01010010,B00010000,B10100000,B01001000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000001,B11100001,B00100000,B00101000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000001,B01000000,B00100110,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000110,B01000000,B00010001,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111000,B10000000,B00001100,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,B00000000,B00000011,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111100,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,};
  193. const byte narrativewhite[] PROGMEM = {88,48,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11110000,B11111100,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,B11110000,B11110011,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111100,B11110000,B11101110,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000111,B01110000,B11011001,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111001,B10110000,B11010111,B11100000,B00000111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111110,B10110000,B10110111,B11011111,B11111011,B11111111,B11111111,B11111010,B11111111,B11111111,B11111111,B11111110,B11010000,B10101111,B10111111,B11111101,B11111111,B10101111,B11111010,B11111111,B11111111,B11111111,B11111111,B01010000,B10101111,B01111111,B11111110,B00000111,B10101100,B10101010,B11111111,B11111111,B11111111,B11111111,B01010000,B10101111,B00011111,B11111111,B11111011,B10001001,B10001111,B11111111,B11111111,B11111111,B11111111,B01010000,B10101111,B01100000,B00000001,B11100111,B10101100,B11101010,B10101011,B11111111,B11111111,B11111111,B01010000,B10101111,B01111111,B11111110,B00011111,B11111111,B10011111,B11111111,B11111111,B11111111,B11111111,B01010000,B10101111,B01101111,B11110110,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B01010000,B10101111,B01011111,B11111010,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B01010000,B10101111,B01111111,B11111110,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B01010000,B10101111,B01111111,B11111110,B11111111,B10111011,B11111111,B11111111,B11111110,B11111111,B11111111,B01010000,B10101111,B01110111,B11101110,B11111111,B10010010,B10111001,B01110110,B01011110,B01110011,B00111111,B01010000,B10101110,B01100111,B11100110,B01111111,B10101010,B00111010,B10101010,B10101110,B10101011,B01111111,B01010000,B10101101,B01111111,B01111110,B10111111,B10111011,B10111010,B10110110,B10101110,B10110010,B01111111,B01010000,B10101101,B01111110,B01111110,B10111111,B11111110,B01111111,B11111111,B11111111,B11111111,B11111111,B01010000,B10101110,B01111111,B11111110,B01111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B01010000,B10101111,B01111111,B11111110,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B01010000,B10101111,B10111100,B00111101,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B01010000,B10101111,B11011100,B00111011,B11111111,B11111111,B11111111,B11111111,B11101111,B11111111,B11011111,B01010000,B10101111,B11101111,B11110111,B11111111,B10011011,B00111001,B11101101,B01000111,B10010011,B10011111,B01010000,B10101111,B11110011,B11001111,B11111111,B10010101,B01010011,B11010101,B01101111,B01010101,B01011111,B01010000,B10101111,B11111100,B00111111,B11111111,B11011011,B01011001,B11101110,B01101111,B10010101,B10011111,B01010000,B10101111,B11111111,B11111111,B11111111,B10011111,B11111111,B11111111,B11111111,B11111111,B11111111,B01010000,B10101111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B01010000,B10101111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B10111111,B01010000,B10101111,B10111111,B11101111,B11111011,B11011011,B11111111,B10111111,B11111111,B11111111,B10111111,B01010000,B10101111,B10110111,B00101011,B00110011,B10001001,B11001111,B00110111,B01100111,B11111110,B10101111,B01010000,B10101111,B10101010,B11100110,B01101011,B11011010,B10011110,B10101010,B10101111,B11111111,B00011111,B01010000,B10101111,B10110111,B00101011,B00110011,B11011010,B11001111,B00110111,B01101111,B11111111,B10111111,B01010000,B10101111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111110,B00011111,B01010000,B10101111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111101,B11101111,B01010000,B10101111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111011,B00110111,B01010000,B10101111,B11111111,B11111011,B10111111,B11111111,B11110111,B11110111,B11111111,B11111010,B11010111,B01010000,B10101111,B11001101,B10101011,B00111101,B01101101,B01110011,B10010100,B11111111,B11111010,B00010111,B01010000,B10101111,B10111010,B10101010,B10111100,B01010101,B01110101,B00110101,B01111111,B11111010,B11010111,B01010000,B10101111,B11001101,B11001011,B00111111,B01101110,B01110101,B10010100,B11010101,B01111101,B11101111,B01010000,B10110111,B11111111,B11111111,B11111100,B11111111,B11111111,B11111101,B11111111,B11111110,B00011110,B11010000,B11010111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111110,B10110000,B11011001,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111001,B10110000,B11101110,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000111,B01110000,B11110011,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111100,B11110000,B11111100,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,B11110000,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11110000,};
  194. const byte narrativewhite2[] PROGMEM = {88,48,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11110000,B11111100,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,B11110000,B11110011,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111100,B11110000,B11101110,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000111,B01110000,B11011001,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111001,B10110000,B11010111,B11100000,B00000111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111110,B10110000,B10110111,B11011111,B11111011,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111110,B11010000,B10101111,B10111111,B11111101,B11111111,B11111111,B11111101,B01111111,B01111011,B01111111,B11111111,B01010000,B10101111,B01111111,B11111110,B00000111,B10010111,B00111011,B11001110,B01110001,B00111001,B11111111,B01010000,B10101111,B00011111,B11111111,B11111011,B10101010,B01111001,B01010101,B01111011,B01010011,B11111111,B01010000,B10101111,B01100000,B00000001,B11100111,B10101011,B00111011,B01010110,B01111011,B01011001,B11111111,B01010000,B10101111,B01111111,B11111110,B00011111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B01010000,B10101111,B01101111,B11110110,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B01010000,B10101111,B01011111,B11111010,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B01010000,B10101111,B01111111,B11111110,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B01010000,B10101111,B01111111,B11111110,B11111111,B11111111,B11111111,B11111101,B11111111,B11100111,B00111111,B01010000,B10101111,B01110111,B11101110,B11111111,B11001001,B11001001,B10011101,B01100101,B01111011,B11011111,B01010000,B10101110,B01100111,B11100110,B01111111,B11011010,B10101011,B00111100,B11001100,B01111111,B11111111,B01010000,B10101101,B01111111,B01111110,B10111111,B10011001,B11001011,B10011101,B01100111,B01110111,B10111111,B01010000,B10101101,B01111110,B01111110,B10111111,B11111011,B11111111,B11111111,B11111100,B11111111,B11111111,B01010000,B10101110,B01111111,B11111110,B01111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B01010000,B10101111,B01111111,B11111110,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B01010000,B10101111,B10111100,B00111101,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B01010000,B10101111,B11011100,B00111011,B11111111,B11111011,B11111111,B11111111,B11111111,B11110101,B11111111,B01010000,B10101111,B11101111,B11110111,B11111111,B11001001,B11001110,B01110110,B01001011,B10010101,B01011111,B01010000,B10101111,B11110011,B11001111,B11111111,B11011010,B10011110,B10101010,B11010101,B01010101,B00011111,B01010000,B10101111,B11111100,B00111111,B11111111,B10011010,B11001110,B10110110,B11010101,B10010101,B11011111,B01010000,B10101111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B00111111,B01010000,B10101111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B01010000,B10101111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B10111111,B01010000,B10101111,B10111011,B10111111,B11111011,B01111111,B11111111,B11111111,B11011111,B11111111,B10111111,B01010000,B10101111,B10011111,B00110011,B00111110,B00111100,B10011011,B01010011,B10011111,B11111110,B10101111,B01010000,B10101111,B10101010,B10100111,B01111011,B01111010,B10110101,B01010101,B01011111,B11111111,B00011111,B01010000,B10101111,B10101011,B00110010,B01111011,B01111100,B10111011,B10010101,B10011111,B11111111,B10111111,B01010000,B10101111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111110,B00011111,B01010000,B10101111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111101,B11101111,B01010000,B10101111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111011,B00110111,B01010000,B10101111,B10111111,B11111111,B11111111,B11111111,B11111111,B11011111,B11111111,B10101010,B11010111,B01010000,B10101111,B10011100,B10011001,B11100110,B11001011,B10010111,B01001110,B01001100,B10101010,B00010111,B01010000,B10101111,B10101001,B10110011,B11101101,B01010101,B00110101,B01010100,B11011001,B11111010,B11010111,B01010000,B10101111,B10101100,B10111001,B11001110,B11010101,B10011010,B11010110,B01011100,B10101101,B11101111,B01010000,B10110111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111110,B00011110,B11010000,B11010111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111110,B10110000,B11011001,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111001,B10110000,B11101110,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000111,B01110000,B11110011,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111100,B11110000,B11111100,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,B11110000,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11110000,};
  195. const byte trigger[] PROGMEM = {B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,};
  196. const byte triggerN[] PROGMEM = {B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,};
  197. const byte triggerE[] PROGMEM = {B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,};
  198. const byte triggerS[] PROGMEM = {B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,};
  199. const byte triggerW[] PROGMEM = {B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,};
  200. const byte bedside1[] PROGMEM = {B11111111,B10000000,B10010000,B10100000,B10100000,B10100000,B10000000,B11111111,};
  201. const byte bedside2[] PROGMEM = {B11111111,B00100001,B00111101,B00100101,B00100101,B00111101,B00100001,B11111111,};
  202. const byte bedside3[] PROGMEM = {B10000000,B11111111,B10100000,B11100000,B00000000,B00000000,B00000000,B00000000,};
  203. const byte bedside4[] PROGMEM = {B00000001,B11111111,B00000101,B00000111,B00000000,B00000000,B00000000,B00000000,};
  204. const byte tabletop1[] PROGMEM = {B11111111,B10000000,B10000000,B10000000,B10000000,B10000000,B10000000,B11111111,};
  205. const byte tabletop2[] PROGMEM = {B11111111,B00000001,B00000001,B00000001,B00000001,B00000001,B00000001,B11111111,};
  206. const byte npc1[] PROGMEM = {B01111110,B01000010,B01111111,B01100110,B01000010,B00111100,B01111110,B00100100,};
  207. const byte houseB32[] PROGMEM = {B00111100,B01100110,B11000011,B10011001,B10000001,B10000101,B10000001,B11111111,};
  208. const byte nothing[] PROGMEM = {16,10,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,};
  209.  
  210.  
  211. const byte *spritesheet[] = {bush, //0
  212. port_noir, //1
  213. rock_terrain_master, //2
  214. rock_valley_ne, //3
  215. rock_valley_nw, //4
  216. rock_valley_se, //5
  217. rock_valley_sw, //6
  218. turtle_rock, //7
  219. void_tile, //8
  220. water_left_bottom, //9
  221. water_left_middle, //10
  222. water_left_top, //11
  223. water_right_bottom, //12
  224. water_right_middle, //13
  225. water_right_top, //14
  226. water_middle_bottom, //15
  227. water_middle_middle, //16
  228. water_middle_top, //17
  229. rock_s, //18
  230. rock_e, //19
  231. rock_w, //20
  232. rock_n, //21
  233. bush_left, //22
  234. bush_middle, //23
  235. bush_right, //24
  236. tree_base, //25
  237. tree_repeat, //26
  238. tree_top, //27
  239. exit_1, //28
  240. exit_2, //29
  241. exit_3, //30
  242. exit_4, //31
  243. exit_5, //32
  244. exit_6, //33
  245. cave_ladder, //34
  246. ladder, //35
  247. tombstone, //36
  248. WallB, //37
  249. WallBL, //38
  250. WallBR, //39
  251. WallL, //40
  252. WallR, //41
  253. WallT, //42
  254. WallTL, //43
  255. WallTR, //44
  256. blackwall, //45
  257. houseB1, //46
  258. houseB2, //47
  259. houseB3, //48
  260. houseB4, //49
  261. houseB5, //50
  262. houseT1, //51
  263. houseT2, //52
  264. houseT3, //53
  265. houseT4, //54
  266. houseT5, //55
  267. roof1, //56
  268. roof2, //57
  269. roof3, //58
  270. roof4, //59
  271. roof5, //60
  272. wallpaper, //61
  273. bedtop, //62
  274. bedmid, //63
  275. bedbottom, //64
  276. chest, //65
  277. bedsidetop, //66
  278. bedsidebottom, //67
  279. trigger, //68
  280. triggerN, //69
  281. triggerE, //70
  282. triggerS, //71
  283. triggerW, //72
  284. bedside1, //73
  285. bedside2, //74
  286. bedside3, //75
  287. bedside4, //76
  288. tabletop1, //77
  289. tabletop2, //78
  290. npc1, //79
  291. houseB32}; //80
  292.  
  293. const byte backblack[] PROGMEM = {8,8,0x7E,0x42,0x42,0x3C,0x7E,0x3C,0x3C,0x24,};
  294. const byte backwhite[] PROGMEM = {8,8,0x0,0x3C,0x3C,0x0,0x0,0x0,0x0,0x0,};
  295. const byte frontblack[] PROGMEM = {8,8,0x7E,0x66,0x42,0x3C,0x7E,0x3C,0x3C,0x24,};
  296. const byte frontwhite[] PROGMEM = {8,8,0x0,0x18,0x3C,0x0,0x0,0x0,0x0,0x0,};
  297. const byte leftblack[] PROGMEM = {8,8,0x7C,0x64,0x44,0x38,0x78,0x38,0x38,0x28,};
  298. const byte leftwhite[] PROGMEM = {8,8,0x0,0x18,0x38,0x0,0x0,0x0,0x0,0x0,};
  299. const byte rightblack[] PROGMEM = {8,8,0x3E,0x26,0x22,0x1C,0x1E,0x1C,0x1C,0x14,};
  300. const byte rightwhite[] PROGMEM = {8,8,0x0,0x18,0x1C,0x0,0x0,0x0,0x0,0x0,};
  301.  
  302.  
  303. int player_x = 70; //cant get these to center
  304. int player_y = 40; //cant get these to center
  305. int player_direction = 0;
  306. int room = 1;
  307. int co_ords = 0;
  308. int menu_1 = 1;
  309. int key_1 = 1;
  310. int key_2 = 1;
  311. int sox_1 = 1;
  312. int narrative = 0;
  313. int timer = 0;
  314. int x,y;
  315. int menuy = -84;
  316. int keyy = -76;
  317. int scroll1;
  318. int cameraroomx = -20;
  319. int cameraroomy = -20;
  320.  
  321. //////CAMERA//////
  322. int camerax = -20 ;
  323. int cameray = -20 ;
  324.  
  325. int Active_slot;
  326. int S1 = 0;
  327. int S2 = 0;
  328. int S3 = 0;
  329. int S4 = 0;
  330.  
  331. /////add item_loc's here////
  332. int key_loc;
  333. int key2_loc;
  334. int sox_loc;
  335.  
  336. ////item slot locations////
  337. int keyslot;
  338. int keyslot2;
  339. int soxslot;
  340.  
  341.  
  342.  
  343.  
  344. void setup() {
  345. gb.begin();
  346. gb.titleScreen(F("NaeD's Adventure"));
  347. gb.setFrameRate(62); ////////for sprite
  348. gb.display.persistence = false;
  349. }
  350.  
  351.  
  352.  
  353.  
  354.  
  355. void loop() {
  356. if(gb.update()){
  357. if (gb.buttons.repeat(BTN_RIGHT,1));{x--;}
  358. if (gb.buttons.repeat(BTN_LEFT,1));{x++;}
  359. if (gb.buttons.repeat(BTN_DOWN,1));{y--;}
  360. if (gb.buttons.repeat(BTN_UP,1));{y++;}
  361.  
  362.  
  363.  
  364. if(player_x > 59 && camerax < 0 && camerax > cameraroomx){player_x = 59;camerax--;}
  365. else if(player_x < 15 && camerax < 0 && camerax > cameraroomx){player_x = 15;camerax++;}
  366. else if(player_x > 59 && camerax <= 0 && camerax >= cameraroomx)camerax--;
  367. else if(player_x < 15 && camerax <= 0 && camerax >= cameraroomx)camerax++;
  368.  
  369.  
  370. if(player_y > 28 && cameray < 0 && cameray > cameraroomy){player_y = 28;cameray--;}
  371. else if(player_y < 15 && cameray < 0 && cameray > cameraroomy){player_y = 15;cameray++;}
  372. else if(player_y > 28 && cameray <= 0 && cameray >= cameraroomy)cameray--;
  373. else if(player_y < 15 && cameray <= 0 && cameray >= cameraroomy)cameray++;
  374.  
  375. if(camerax > 0)camerax= 0;
  376. else if(camerax < cameraroomx) camerax = cameraroomx;
  377.  
  378. if(cameray > 0)cameray= 0;
  379. else if(cameray < cameraroomy) cameray = cameraroomy;
  380.  
  381.  
  382.  
  383. if(room == 1){
  384. cameraroomx = -52;
  385. cameraroomy = -40;
  386. gb.display.clear();
  387. gb.display.drawTilemap(camerax,cameray,tilemap1,spritesheet);} // draw the tilemap
  388. if(room == 2){
  389. cameraroomx = -52;
  390. cameraroomy = -40;
  391. gb.display.clear();
  392. gb.display.drawTilemap(camerax,cameray,tilemap2,spritesheet);} // draw the tilemap
  393. if(room == 3){
  394. cameraroomx = -52;
  395. cameraroomy = -40;
  396. gb.display.clear();
  397. gb.display.drawTilemap(camerax,cameray,tilemap3,spritesheet);} // draw the tilemap
  398. if(room == 4){
  399. cameraroomx = -52;
  400. cameraroomy = -40;
  401. gb.display.clear();
  402. gb.display.drawTilemap(camerax,cameray,tilemap4,spritesheet);} // draw the tilemap
  403. if(room == 5){
  404. cameraroomx = -52;
  405. cameraroomy = -40;
  406. gb.display.clear();
  407. gb.display.drawTilemap(camerax,cameray,tilemap5,spritesheet);} // draw the tilemap
  408. if(room == 6){
  409. cameraroomx = -76;
  410. cameraroomy = -112;
  411. gb.display.clear();
  412. gb.display.drawTilemap(camerax,cameray,tilemap6,spritesheet);} // draw the tilemap
  413. if(room == 7){
  414. cameraroomx = -52;
  415. cameraroomy = -40;
  416. gb.display.clear();
  417. gb.display.drawTilemap(camerax,cameray,tilemap7,spritesheet);} // draw the tilemap
  418.  
  419.  
  420.  
  421. if(gb.buttons.repeat(BTN_UP,1)){
  422. gb.display.setColor(BLACK);{
  423. gb.display.drawBitmap(player_x,player_y,backblack);
  424. }
  425. gb.display.setColor(WHITE);{
  426. gb.display.drawBitmap(player_x,player_y,backwhite);
  427. }
  428. gb.display.setColor(BLACK);
  429. player_direction = 1;
  430. player_y = player_y - 1;
  431. if(checkcolision())player_y++; // ADD by Summoner123 - If have colision on the new position regreat one Pixel
  432. }
  433.  
  434.  
  435. if(player_y <= 0){
  436. player_y = 0;}
  437.  
  438.  
  439.  
  440. if(gb.buttons.repeat(BTN_DOWN,1)){
  441. gb.display.setColor(BLACK);{
  442. gb.display.drawBitmap(player_x,player_y,frontblack);
  443. }
  444. gb.display.setColor(WHITE);{
  445. gb.display.drawBitmap(player_x,player_y,frontwhite);
  446. }
  447. gb.display.setColor(BLACK);
  448. player_direction = 2;
  449. player_y = player_y + 1;
  450. if(checkcolision())player_y--; // ADD by Summoner123 - If have colision on the new position regreat one Pixel
  451. }
  452.  
  453. if(player_y >= 40){
  454. player_y = 40;}
  455.  
  456.  
  457.  
  458. if(gb.buttons.repeat(BTN_RIGHT,1)){
  459. gb.display.setColor(BLACK);{
  460. gb.display.drawBitmap(player_x,player_y,rightblack);
  461. }
  462. gb.display.setColor(WHITE);{
  463. gb.display.drawBitmap(player_x,player_y,rightwhite);
  464. }
  465. gb.display.setColor(BLACK);
  466. player_direction = 3;
  467. player_x = player_x + 1;
  468. if(checkcolision())player_x--; // ADD by Summoner123 - If have colision on the new position regreat one Pixel
  469. }
  470.  
  471.  
  472. if(player_x >= 77){
  473. player_x = 77;}
  474.  
  475.  
  476. if(gb.buttons.repeat(BTN_LEFT,1)){
  477. gb.display.setColor(BLACK);{
  478. gb.display.drawBitmap(player_x,player_y,leftblack);
  479. }
  480. gb.display.setColor(WHITE);{
  481. gb.display.drawBitmap(player_x,player_y,leftwhite);
  482. }
  483. gb.display.setColor(BLACK);
  484. player_direction = 4;
  485. player_x = player_x - 1;
  486.  
  487. if(checkcolision())player_x++; // ADD by Summoner123 - If have colision on the new position regreat one Pixel
  488. }
  489.  
  490. if(player_x <= -2){
  491. player_x = -2;}
  492.  
  493.  
  494.  
  495. ////////////PLAYER DIRECTION/////////////
  496.  
  497. if (player_direction == 1){
  498. gb.display.setColor(BLACK);{
  499. gb.display.drawBitmap(player_x,player_y,backblack);
  500. }
  501. gb.display.setColor(WHITE);{
  502. gb.display.drawBitmap(player_x,player_y,backwhite);
  503. }
  504. gb.display.setColor(BLACK);
  505. }
  506.  
  507. else if (player_direction == 2){
  508. gb.display.setColor(BLACK);{
  509. gb.display.drawBitmap(player_x,player_y,frontblack);
  510. }
  511. gb.display.setColor(WHITE);{
  512. gb.display.drawBitmap(player_x,player_y,frontwhite);
  513. }
  514. gb.display.setColor(BLACK);
  515. }
  516.  
  517. else if (player_direction == 3){
  518. gb.display.setColor(BLACK);{
  519. gb.display.drawBitmap(player_x,player_y,rightblack);
  520. }
  521. gb.display.setColor(WHITE);{
  522. gb.display.drawBitmap(player_x,player_y,rightwhite);
  523. }
  524. gb.display.setColor(BLACK);
  525. }
  526.  
  527. else if (player_direction == 4){
  528. gb.display.setColor(BLACK);{
  529. gb.display.drawBitmap(player_x,player_y,leftblack);
  530. }
  531. gb.display.setColor(WHITE);{
  532. gb.display.drawBitmap(player_x,player_y,leftwhite);
  533. }
  534. gb.display.setColor(BLACK);
  535. }
  536.  
  537. else { gb.display.setColor(BLACK);{
  538. gb.display.drawBitmap(player_x,player_y,frontblack);
  539. }
  540. gb.display.setColor(WHITE);{
  541. gb.display.drawBitmap(player_x,player_y,frontwhite);
  542. }
  543. gb.display.setColor(BLACK);
  544. }
  545. }
  546.  
  547.  
  548.  
  549. gb.display.setColor(BLACK);
  550.  
  551.  
  552. if(gb.buttons.held(BTN_B,20)){
  553. co_ords = co_ords + 1;}
  554.  
  555. if(co_ords == 0){
  556. gb.display.cursorY = 12; gb.display.println( Active_slot );gb.display.println( room );}
  557. if(co_ords == 1){
  558. gb.display.cursorY = 12; gb.display.println( player_x );gb.display.println( player_y );}
  559. else if(co_ords == 2){
  560. gb.display.cursorY = 12; gb.display.println( camerax );gb.display.println( cameray );}
  561. else if(co_ords >= 3){
  562. co_ords = 0;}
  563.  
  564.  
  565. /////////////////////////////////////TEST INVENTORY OVERLAY///////////////////////////////////////////////
  566.  
  567.  
  568. if(S1==0 && S2==0 && S3==0 && S4==0){Active_slot = 1;}
  569. else if(S1==1 && S2==0 && S3==0 && S4==0){Active_slot = 2;}
  570. else if(S1==1 && S2==1 && S3==0 && S4==0){Active_slot = 3;}
  571. else if(S1==1 && S2==1 && S3==1 && S4==0){Active_slot = 4;}
  572. else if(S1==1 && S2==1 && S3==1 && S4==1){Active_slot = 0;}
  573. else if(S1==1 && S2==0 && S3==1 && S4==0){Active_slot = 2;}
  574. else if(S1==1 && S2==0 && S3==1 && S4==1){Active_slot = 2;}
  575. else if(S1==1 && S2==0 && S3==0 && S4==1){Active_slot = 2;}
  576. else if(S1==1 && S2==1 && S3==0 && S4==1){Active_slot = 3;}
  577. else if(S1==0 && S2==1 && S3==0 && S4==0){Active_slot = 1;}
  578. else if(S1==0 && S2==1 && S3==1 && S4==0){Active_slot = 1;}
  579. else if(S1==0 && S2==1 && S3==1 && S4==1){Active_slot = 1;}
  580. else if(S1==0 && S2==1 && S3==0 && S4==1){Active_slot = 1;}
  581. else if(S1==0 && S2==0 && S3==1 && S4==0){Active_slot = 1;}
  582. else if(S1==0 && S2==0 && S3==1 && S4==1){Active_slot = 1;}
  583. else if(S1==0 && S2==0 && S3==0 && S4==1){Active_slot = 1;}
  584.  
  585.  
  586. //////////////////////////////////////
  587.  
  588.  
  589. if (narrative != 1 && narrative != 2 && (gb.buttons.pressed(BTN_C))){
  590. menu_1 ++;}
  591.  
  592. if(menu_1 == 3){
  593. scroll1 = 1;
  594. gb.display.setColor(BLACK);
  595. gb.display.drawBitmap(0,menuy,menu1);
  596. gb.display.setColor(WHITE);
  597. gb.display.drawBitmap(0,menuy,menu2);
  598. gb.display.setColor(BLACK);}
  599.  
  600.  
  601. else if(menu_1 >= 5){
  602. scroll1 =2;
  603. gb.display.setColor(BLACK);
  604. gb.display.drawBitmap(0,menuy,menu1);
  605. gb.display.setColor(WHITE);
  606. gb.display.drawBitmap(0,menuy,menu2);
  607. gb.display.setColor(BLACK);
  608. }
  609.  
  610. if((menu_1 == 3 && key_1 == 3 && Active_slot==1) || (menu_1 == 5 && key_1 == 3 && Active_slot==1)){gb.display.drawBitmap(key_loc,keyy,key);}
  611. if((menu_1 == 3 && key_1 == 3 && Active_slot==2) || (menu_1 == 5 && key_1 == 3 && Active_slot==2)){gb.display.drawBitmap(key_loc,keyy,key);}
  612. if((menu_1 == 3 && key_1 == 3 && Active_slot==3) || (menu_1 == 5 && key_1 == 3 && Active_slot==3)){gb.display.drawBitmap(key_loc,keyy,key);}
  613. if((menu_1 == 3 && key_1 == 3 && Active_slot==4) || (menu_1 == 5 && key_1 == 3 && Active_slot==4)){gb.display.drawBitmap(key_loc,keyy,key);}
  614.  
  615. if(keyslot==1 && gb.buttons.pressed(BTN_B)){key_1 = 5, S1 = 0, keyslot=0 ;} //////test remove item key
  616. if(keyslot==2 && gb.buttons.pressed(BTN_B)){key_1 = 5, S2 = 0, keyslot=0 ;}
  617. if(keyslot==3 && gb.buttons.pressed(BTN_B)){key_1 = 5, S3 = 0, keyslot=0 ;}
  618. if(keyslot==4 && gb.buttons.pressed(BTN_B)){key_1 = 5, S4 = 0, keyslot=0 ;}
  619.  
  620. if((menu_1 == 3 && key_2 == 3 && Active_slot==1) || (menu_1 == 5 && key_2 == 3 && Active_slot==1)){gb.display.drawBitmap(key2_loc,keyy,key2);}
  621. if((menu_1 == 3 && key_2 == 3 && Active_slot==2) || (menu_1 == 5 && key_2 == 3 && Active_slot==2)){gb.display.drawBitmap(key2_loc,keyy,key2);}
  622. if((menu_1 == 3 && key_2 == 3 && Active_slot==3) || (menu_1 == 5 && key_2 == 3 && Active_slot==3)){gb.display.drawBitmap(key2_loc,keyy,key2);}
  623. if((menu_1 == 3 && key_2 == 3 && Active_slot==4) || (menu_1 == 5 && key_2 == 3 && Active_slot==4)){gb.display.drawBitmap(key2_loc,keyy,key2);}
  624.  
  625. //if(keyslot2==1 && gb.buttons.pressed(BTN_B)){key_1 = 5, S1 = 0, keyslot2=0 ;} //////test remove item key
  626. //if(keyslot2==2 && gb.buttons.pressed(BTN_B)){key_1 = 5, S2 = 0, keyslot2=0 ;}
  627. //if(keyslot2==3 && gb.buttons.pressed(BTN_B)){key_1 = 5, S3 = 0, keyslot2=0 ;}
  628. //if(keyslot2==4 && gb.buttons.pressed(BTN_B)){key_1 = 5, S4 = 0, keyslot2=0 ;}
  629.  
  630. if((menu_1 == 3 && sox_1 == 3 && Active_slot==1) || (menu_1 == 5 && sox_1 == 3 && Active_slot==1)){gb.display.drawBitmap(sox_loc,keyy,sox);}
  631. if((menu_1 == 3 && sox_1 == 3 && Active_slot==2) || (menu_1 == 5 && sox_1 == 3 && Active_slot==2)){gb.display.drawBitmap(sox_loc,keyy,sox);}
  632. if((menu_1 == 3 && sox_1 == 3 && Active_slot==3) || (menu_1 == 5 && sox_1 == 3 && Active_slot==3)){gb.display.drawBitmap(sox_loc,keyy,sox);}
  633. if((menu_1 == 3 && sox_1 == 3 && Active_slot==4) || (menu_1 == 5 && sox_1 == 3 && Active_slot==4)){gb.display.drawBitmap(sox_loc,keyy,sox);}
  634.  
  635. //if(soxslot==1 && gb.buttons.pressed(BTN_B)){sox_1 = 5, S1 = 0;} //////test remove item sock
  636. //if(soxslot==2 && gb.buttons.pressed(BTN_B)){sox_1 = 5, S2 = 0;}
  637. //if(soxslot==3 && gb.buttons.pressed(BTN_B)){sox_1 = 5, S3 = 0;}
  638. //if(soxslot==4 && gb.buttons.pressed(BTN_B)){sox_1 = 5, S4 = 0;}
  639.  
  640.  
  641.  
  642. if (scroll1 == 1 && menuy < 0){
  643. menuy = menuy + 2; ////2 = menu speed down
  644. keyy = keyy + 2;} ////2 = menu speed down
  645. if (scroll1 == 2 && menuy > -84){
  646. menuy = menuy - 2; ////2 = menu speed up
  647. keyy = keyy - 2;} ////2 = menu speed up
  648. if (menuy == -84 && scroll1 == 2){
  649. menu_1 ++;}
  650. if (menu_1 > 7){
  651. menu_1 = 1;
  652. scroll1 = 0;}
  653.  
  654. ////////////////////////TEST NARRATIVE///////////////////////////////////
  655.  
  656. if ((gb.buttons.pressed(BTN_A)) && narrative == 1 && timer > 5){
  657. narrative = 2;
  658. gb.frameCount = 0;}
  659.  
  660. if (narrative == 1){
  661. gb.display.setColor(BLACK);
  662. gb.display.drawBitmap(0,0,narrativeblack);
  663. gb.display.setColor(WHITE);
  664. gb.display.drawBitmap(0,0,narrativewhite);
  665. gb.display.setColor(BLACK);
  666. timer = gb.frameCount;
  667. //gb.display.cursorY = 12; gb.display.println( timer );
  668. }
  669.  
  670. else if (narrative == 2){
  671. gb.display.setColor(BLACK);
  672. gb.display.drawBitmap(0,0,narrativeblack2);
  673. gb.display.setColor(WHITE);
  674. gb.display.drawBitmap(0,0,narrativewhite2);
  675. gb.display.setColor(BLACK);
  676. timer = gb.frameCount;
  677. //gb.display.cursorY = 12; gb.display.println( timer );
  678. }
  679.  
  680. if ((gb.buttons.pressed(BTN_A)) && narrative == 2 && timer > 5){
  681. narrative = 3;
  682. gb.frameCount = 0;}
  683.  
  684.  
  685. } ////last }
  686.  
  687.  
  688. bool checkcolision() // Transformed it into a function
  689. {
  690. uint16_t i;
  691. for(i=0; i < gb.display.numcolision + 1; i++)
  692. {
  693. if(gb.collideRectRect(player_x,player_y,8,8,gb.display.solid[i].x,gb.display.solid[i].y,8,8))///changed player_x,y back to 8
  694. {
  695. // if(gb.display.solid[i].spritecol == void_tile); //Do nothing because it's floor - This line not needed
  696. if(gb.display.solid[i].spritecol == bush) return true;
  697. else if(gb.display.solid[i].spritecol == port_noir) return true;
  698. else if(gb.display.solid[i].spritecol == rock_terrain_master) {gb.popup(F(" ""Rock"" "),1); return true;} //Return True if character have touched the wall
  699. else if(gb.display.solid[i].spritecol == rock_valley_ne) return true;
  700. else if(gb.display.solid[i].spritecol == rock_valley_nw) return true;
  701. else if(gb.display.solid[i].spritecol == rock_valley_se) return true;
  702. else if(gb.display.solid[i].spritecol == rock_valley_sw) return true;
  703. else if(gb.display.solid[i].spritecol == turtle_rock) return true;
  704. else if(gb.display.solid[i].spritecol == water_left_bottom) return true;
  705. else if(gb.display.solid[i].spritecol == water_left_middle) return true;
  706. else if(gb.display.solid[i].spritecol == water_left_top) return true;
  707. else if(gb.display.solid[i].spritecol == water_right_bottom) return true;
  708. else if(gb.display.solid[i].spritecol == water_right_middle) return true;
  709. else if(gb.display.solid[i].spritecol == water_right_top) return true;
  710. else if(gb.display.solid[i].spritecol == water_middle_bottom) return true;
  711. else if(gb.display.solid[i].spritecol == water_middle_middle) return true;
  712. else if(gb.display.solid[i].spritecol == water_middle_top) return true;
  713. else if(gb.display.solid[i].spritecol == rock_n) return true;
  714. else if(gb.display.solid[i].spritecol == rock_e) return true;
  715. else if(gb.display.solid[i].spritecol == rock_s) return true;
  716. else if(gb.display.solid[i].spritecol == rock_w) return true;
  717. else if(gb.display.solid[i].spritecol == bush_left) return true;
  718. else if(gb.display.solid[i].spritecol == bush_middle) return true;
  719. else if(gb.display.solid[i].spritecol == bush_right) return true;
  720. else if(gb.display.solid[i].spritecol == tree_base) return true;
  721. else if(gb.display.solid[i].spritecol == tree_repeat) return true;
  722. else if(gb.display.solid[i].spritecol == tree_top) return true;
  723. else if(gb.display.solid[i].spritecol == houseB4) return true;
  724. else if(gb.display.solid[i].spritecol == houseB5) return true;
  725. else if(gb.display.solid[i].spritecol == houseT1) return true;
  726. else if(gb.display.solid[i].spritecol == houseT2) return true;
  727. else if(gb.display.solid[i].spritecol == houseT3) return true;
  728. else if(gb.display.solid[i].spritecol == houseT4) return true;
  729. else if(gb.display.solid[i].spritecol == houseT5) return true;
  730. else if(gb.display.solid[i].spritecol == roof1) return true;
  731. else if(gb.display.solid[i].spritecol == roof2) return true;
  732. else if(gb.display.solid[i].spritecol == roof3) return true;
  733. else if(gb.display.solid[i].spritecol == roof4) return true;
  734. else if(gb.display.solid[i].spritecol == roof5) return true;
  735. else if(gb.display.solid[i].spritecol == WallB) return true;
  736. else if(gb.display.solid[i].spritecol == WallBL) return true;
  737. else if(gb.display.solid[i].spritecol == WallBR) return true;
  738. else if(gb.display.solid[i].spritecol == WallT) return true;
  739. else if(gb.display.solid[i].spritecol == WallTL) return true;
  740. else if(gb.display.solid[i].spritecol == WallTR) return true;
  741. else if(gb.display.solid[i].spritecol == WallL) return true;
  742. else if(gb.display.solid[i].spritecol == WallR) return true;
  743. else if(gb.display.solid[i].spritecol == houseB1) return true;
  744. else if(gb.display.solid[i].spritecol == houseB2) return true;
  745. else if(gb.display.solid[i].spritecol == bedsidetop) return true;
  746. //else if(gb.display.solid[i].spritecol == bedside1) return true;
  747. //else if(gb.display.solid[i].spritecol == bedside2) return true;
  748. else if(gb.display.solid[i].spritecol == tabletop1) return true;
  749. else if(gb.display.solid[i].spritecol == tabletop2) return true;
  750.  
  751.  
  752. ////ROOM 1 EXITS//////
  753. else if((gb.display.solid[i].spritecol == exit_1) && room == 1) {room = 2; player_x = 68; camerax = -52;}
  754. else if((gb.display.solid[i].spritecol == exit_2) && room == 1) {room = 2; player_x = 9; camerax = 0;}
  755. //else if((gb.display.solid[i].spritecol == houseB3) && room == 1 && key_1 > 1) {room = 5; player_y = 32; player_x = 40; camerax = -0; cameray = -40;}
  756. else if((gb.display.solid[i].spritecol == houseB3) && room == 1 //&& key_1 > 1//
  757. ) {room = 5; player_y = 32; player_x = 36; camerax = -28; cameray = -40;}
  758. else if((gb.display.solid[i].spritecol == exit_3) && room == 1) {room = 6; cameraroomx = 0; cameraroomy = -112; camerax = 0; cameray = -112; player_y = 32; player_x = 24;}
  759. ////ROOM 2 EXITS/////
  760. else if((gb.display.solid[i].spritecol == exit_1) && room == 2) {room = 1; player_x = 68; camerax = -52;}
  761. else if((gb.display.solid[i].spritecol == exit_2) && room == 2) {room = 1; player_x = 9; camerax = 0;}
  762. else if((gb.display.solid[i].spritecol == exit_3) && room == 2) {room = 3; player_y = 32; cameray = -40;}
  763. ////ROOM 3 EXITS/////
  764. else if((gb.display.solid[i].spritecol == exit_1) && room == 3) {room = 2; player_y = 9; cameray = 0;}
  765. else if((gb.display.solid[i].spritecol == cave_ladder) && room ==3) {room = 4; player_x = 16; player_y = 24; camerax = 0; cameray = -48;}
  766. ////ROOM 4 EXITS/////
  767. else if((gb.display.solid[i].spritecol == ladder) && room == 4) {room = 3; player_x = 16; player_y = 24; camerax = 0; cameray = -48;}
  768. ////ROOM 5 EXITS/////
  769. else if((gb.display.solid[i].spritecol == exit_1) && room == 5) {room = 1; player_y = 27; player_x = 59; camerax = -45; cameray = -21;}
  770. ////ROOM 6 EXITS/////
  771. else if((gb.display.solid[i].spritecol == exit_1) && room == 6) {room = 1; cameraroomx = -21; cameraroomy = 0; camerax = -21; cameray = 0; player_y = 8; player_x = 43;}
  772. else if((gb.display.solid[i].spritecol == houseB32) && room == 6) {room = 7; player_y = 32; player_x = 40; camerax = -0; cameray = -40;}
  773. ////ROOM 7 EXITS/////
  774. else if((gb.display.solid[i].spritecol == exit_1) && room == 7) {room = 6; player_y = 24; player_x = 39; camerax = -49; cameray = -40;}
  775.  
  776.  
  777.  
  778. ////PICKUP ITEMS/EMPTY LOCATIONS/////
  779. else if((gb.display.solid[i].spritecol == houseB3) && room == 1 && key_1 == 1) {gb.popup(F(" ""It's locked!!"" "),20); return true;}
  780. else if((gb.display.solid[i].spritecol == houseB3) && room == 6) {gb.popup(F(" ""It's locked!!"" "),20); return true;}
  781.  
  782.  
  783. else if((gb.display.solid[i].spritecol == chest) && room == 1 && Active_slot == 1 && gb.buttons.pressed(BTN_A) && key_1 == 1) {gb.popup(F(" ""You got key"" "),20); key_1 = 3, S1=1, key_loc=8, keyslot=1; return true;}
  784. else if((gb.display.solid[i].spritecol == chest) && room == 1 && Active_slot == 2 && gb.buttons.pressed(BTN_A) && key_1 == 1) {gb.popup(F(" ""You got key"" "),20); key_1 = 3, S2=1, key_loc=26, keyslot=2 ; return true;}
  785. else if((gb.display.solid[i].spritecol == chest) && room == 1 && Active_slot == 3 && gb.buttons.pressed(BTN_A) && key_1 == 1) {gb.popup(F(" ""You got key"" "),20); key_1 = 3, S3=1, key_loc=44, keyslot=3; return true;}
  786. else if((gb.display.solid[i].spritecol == chest) && room == 1 && Active_slot == 4 && gb.buttons.pressed(BTN_A) && key_1 == 1) {gb.popup(F(" ""You got key"" "),20); key_1 = 3, S4=1, key_loc=62, keyslot=4; return true;}
  787.  
  788.  
  789. else if((gb.display.solid[i].spritecol == chest) && room == 1 && gb.buttons.pressed(BTN_A) && key_1 > 1) {gb.popup(F(" ""It's empty!!"" "),20); return true;}
  790. //else if(gb.display.solid[i].spritecol == chest) return true;
  791.  
  792. else if((gb.display.solid[i].spritecol == chest) && room == 5 && Active_slot == 1 && gb.buttons.pressed(BTN_A) && key_2 == 1) {gb.popup(F(" ""You got key"" "),20); key_2 = 3, S1=1, key2_loc=8, keyslot2=1; return true;}
  793. else if((gb.display.solid[i].spritecol == chest) && room == 5 && Active_slot == 2 && gb.buttons.pressed(BTN_A) && key_2 == 1) {gb.popup(F(" ""You got key"" "),20); key_2 = 3, S2=1, key2_loc=26, keyslot2=2 ; return true;}
  794. else if((gb.display.solid[i].spritecol == chest) && room == 5 && Active_slot == 3 && gb.buttons.pressed(BTN_A) && key_2 == 1) {gb.popup(F(" ""You got key"" "),20); key_2 = 3, S3=1, key2_loc=44, keyslot2=3; return true;}
  795. else if((gb.display.solid[i].spritecol == chest) && room == 5 && Active_slot == 4 && gb.buttons.pressed(BTN_A) && key_2 == 1) {gb.popup(F(" ""You got key"" "),20); key_2 = 3, S4=1, key2_loc=62, keyslot2=4; return true;}
  796.  
  797.  
  798. else if((gb.display.solid[i].spritecol == chest) && room == 5 && gb.buttons.pressed(BTN_A) && key_2 > 1) {gb.popup(F(" ""It's empty!!"" "),20); return true;}
  799. else if(gb.display.solid[i].spritecol == chest) return true;
  800.  
  801.  
  802. else if((gb.display.solid[i].spritecol == bedsidebottom) && room == 5 && Active_slot == 1 && gb.buttons.pressed(BTN_A) && sox_1 == 1) {gb.popup(F(" ""You got a sock?"" "),20); sox_1 = 3, S1=1, sox_loc=7, soxslot=1; return true;}
  803. else if((gb.display.solid[i].spritecol == bedsidebottom) && room == 5 && Active_slot == 2 && gb.buttons.pressed(BTN_A) && sox_1 == 1) {gb.popup(F(" ""You got a sock?"" "),20); sox_1 = 3, S2=1, sox_loc=25, soxslot=1; return true;}
  804. else if((gb.display.solid[i].spritecol == bedsidebottom) && room == 5 && Active_slot == 3 && gb.buttons.pressed(BTN_A) && sox_1 == 1) {gb.popup(F(" ""You got a sock?"" "),20); sox_1 = 3, S3=1, sox_loc=43, soxslot=1; return true;}
  805. else if((gb.display.solid[i].spritecol == bedsidebottom) && room == 5 && Active_slot == 4 && gb.buttons.pressed(BTN_A) && sox_1 == 1) {gb.popup(F(" ""You got a sock?"" "),20); sox_1 = 3, S4=1, sox_loc=61, soxslot=1; return true;}
  806.  
  807.  
  808. else if((gb.display.solid[i].spritecol == bedsidebottom) && room == 5 && gb.buttons.pressed(BTN_A) && sox_1 > 1) {gb.popup(F(" ""It's empty!!"" "),20); return true;}
  809. else if(gb.display.solid[i].spritecol == bedsidebottom) return true;
  810.  
  811. ////INTERACTIONS/////
  812. else if((gb.display.solid[i].spritecol == tombstone) && gb.buttons.pressed(BTN_A)) {gb.popup(F(" ""Here Lies Dave!"" "),20); return true;}
  813. else if(gb.display.solid[i].spritecol == tombstone) return true;
  814. else if((gb.display.solid[i].spritecol == bedtop) && gb.buttons.pressed(BTN_A)) {gb.popup(F(" ""Aaah! My bed"" "),20); return true;}
  815. else if((gb.display.solid[i].spritecol == bedmid) && gb.buttons.pressed(BTN_A)) {gb.popup(F(" ""Aaah! My bed"" "),20); return true;}
  816. else if((gb.display.solid[i].spritecol == bedbottom) && gb.buttons.pressed(BTN_A)) {gb.popup(F(" ""Aaah! My bed"" "),20);}
  817. else if(gb.display.solid[i].spritecol == bedtop) return true;
  818. else if(gb.display.solid[i].spritecol == bedmid) return true;
  819. else if((gb.display.solid[i].spritecol == bedside1) && gb.buttons.pressed(BTN_A)) {gb.popup(F(" ""It looks comfy"" "),20); return true;}
  820. else if((gb.display.solid[i].spritecol == bedside2) && gb.buttons.pressed(BTN_A)) {gb.popup(F(" ""It looks comfy"" "),20); return true;}
  821. else if(gb.display.solid[i].spritecol == bedside1) return true;
  822. else if(gb.display.solid[i].spritecol == bedside2) return true;
  823.  
  824.  
  825. ////STORYLINE NARRATION/////
  826. else if((gb.display.solid[i].spritecol == npc1) && room == 1 && narrative == 0 && narrative != 3 && gb.buttons.pressed(BTN_A)) {gb.frameCount = 0; narrative = 1; return true;}
  827. //else if(gb.display.solid[i].spritecol == npc1) return true;
  828. else if((gb.display.solid[i].spritecol == npc1) && room == 1 && narrative == 3 && gb.buttons.pressed(BTN_A)) {gb.popup(F(" ""He looks sad"" "),20); return true;}
  829. else if(gb.display.solid[i].spritecol == npc1) return true;
  830.  
  831. }
  832. }
  833. return false; // Return false if don't touch anything
  834. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement