-
Notifications
You must be signed in to change notification settings - Fork 0
/
graphics.cpp
662 lines (598 loc) · 20.4 KB
/
graphics.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
// ============================================
// The graphics class file
//
// Copyright 2023 Georgia Tech. All rights reserved.
// The materials provided by the instructor in this course are for
// the use of the students currently enrolled in the course.
// Copyrighted course materials may not be further disseminated.
// This file must NOT be made publicly available anywhere.
//==================================================================
#include "graphics.h"
#include "globals.h"
///////////////////////////////////////////
// Drawing Images based on Characters
///////////////////////////////////////////
//Additional color definitions // Y
#define BROWN 0xD2691E
#define DIRT BROWN // B
#define TEAL 0x0AE5F5 // T
#define AZURE 0x007FFF // A
#define C_DBROWN 0x643C04 // 1 // chest_darkBrown
#define C_LBROWN 0xC07707 // 2 // chest_lightBrown
#define LPURPLE 0x6969E2 // 4
#define NPC_DGRAY 0xA3A1A1 // 6
#define NPC_LGRAY 0xD4D0D0 // 7
#define NPC_PURPLE 0x976EEC // 8
#define NPC_BROWN 0x9F5F16 // 9
#define SKIN 0xFFC384 // S
#define LK_GREEN 0x09D809 // E
#define LK_ORANGE 0xE55110 // O
#define FR_ORANGE 0xF49806 // F
#define WT_LBLUE 0x00FFFF // B
#define WT_DBLUE 0x0000FF // L
// You can define more hex colors here
//Function to draw images based on characters
// - The function takes an image array and changes the color
// labeled by a character to a hex value (ex: 'Y' -> 0xFFF00)
void draw_img(int u, int v, const char* img)
{
int colors[11*11];
for (int i = 0; i < 11*11; i++)
{
//You can add more characters by defining their hex values above
if (img[i] == 'R') colors[i] = RED;
else if (img[i] == 'Y') colors[i] = YELLOW;
else if (img[i] == 'G') colors[i] = GREEN;
else if (img[i] == 'D') colors[i] = DIRT;
else if (img[i] == '5') colors[i] = LGREY;
else if (img[i] == '3') colors[i] = DGREY;
else if (img[i] == 'A') colors[i] = AZURE;
else if (img[i] == 'T') colors[i] = TEAL;
else if (img[i] == '1') colors[i] = C_DBROWN;
else if (img[i] == '2') colors[i] = C_LBROWN;
else if (img[i] == 'W') colors[i] = WHITE;
else if (img[i] == '4') colors[i] = LPURPLE;
else if (img[i] == '6') colors[i] = NPC_DGRAY;
else if (img[i] == '7') colors[i] = NPC_LGRAY;
else if (img[i] == '8') colors[i] = NPC_PURPLE;
else if (img[i] == '9') colors[i] = NPC_BROWN;
else if (img[i] == 'S') colors[i] = SKIN;
else if (img[i] == 'E') colors[i] = LK_GREEN;
else if (img[i] == 'S') colors[i] = SKIN;
else if (img[i] == 'O') colors[i] = LK_ORANGE;
else if (img[i] == 'F') colors[i] = FR_ORANGE;
else if (img[i] == 'B') colors[i] = WT_DBLUE;
else if (img[i] == 'L') colors[i] = WT_LBLUE;
else colors[i] = BLACK;
}
uLCD.BLIT(u, v, 11, 11, colors);
wait_us(250); // Recovery time!
}
///////////////////////////////////////////
//Simple drawing of objects using uLCD methods
///////////////////////////////////////////
void draw_nothing(int u, int v)
{
uLCD.filled_rectangle(u, v, u+10, v+10, BLACK);
}
void draw_player(int u, int v, int key)
{
const char* img;
if (!key)
{
img =
" EEEEE "
"S EOOOOOE S"
"SSOSESESOSS"
" SSSOSOSSS "
" OSSSSSSSO "
" OESSOSSEO "
" SEEEEES "
" SSEOOOESS "
" SOOOEOOOS "
" SEEOOOEES "
" EEEEE ";
}
else
{
img =
" EEEEE "
"S EOOOOOE S"
"SSOSESESOSS"
" SSSOSOSSS "
" OSSSSSSSO "
" YYYYOSSSO "
"YYYYYEYEY "
"YYOOYOYEYS "
"YYOOYYYEYS "
"YYYYYYYYYS "
" YYYYEEE ";
}
draw_img(u, v, img);
}
void draw_wall(int u, int v)
{
const char* img =
"AAAAAAAAAAA"
"ATTTATTTATA"
"AAAAAAAAAAA"
"ATATTTATTTA"
"AAAAAAAAAAA"
"ATTTATTTATA"
"AAAAAAAAAAA"
"ATATTTATTTA"
"AAAAAAAAAAA"
"ATTTATTTATA"
"AAAAAAAAAAA";
draw_img(u, v, img);
//uLCD.filled_rectangle(u, v, u+10, v+10, BROWN);
}
void draw_key(int u, int v)
{
const char* img =
" "
" YY Y Y"
"YYYY Y Y"
"Y YYYYYYY"
"Y YYYYYYY"
"YYYY "
" YY "
" ";
int colors[11*11];
for (int i = 0; i < 11*11; i++)
{
//You can add more characters by defining their hex values above
if (img[i] == 'R') colors[i] = RED;
else if (img[i] == 'Y') colors[i] = YELLOW;
else if (img[i] == 'G') colors[i] = GREEN;
else if (img[i] == 'D') colors[i] = DIRT;
else if (img[i] == '5') colors[i] = LGREY;
else if (img[i] == '3') colors[i] = DGREY;
else if (img[i] == 'A') colors[i] = AZURE;
else if (img[i] == 'T') colors[i] = TEAL;
else if (img[i] == '1') colors[i] = C_DBROWN;
else if (img[i] == '2') colors[i] = C_LBROWN;
else if (img[i] == 'W') colors[i] = WHITE;
else if (img[i] == '4') colors[i] = LPURPLE;
else if (img[i] == '6') colors[i] = NPC_DGRAY;
else if (img[i] == '7') colors[i] = NPC_LGRAY;
else if (img[i] == '8') colors[i] = NPC_PURPLE;
else if (img[i] == '9') colors[i] = NPC_BROWN;
else if (img[i] == 'S') colors[i] = SKIN;
else if (img[i] == 'E') colors[i] = LK_GREEN;
else if (img[i] == 'S') colors[i] = SKIN;
else if (img[i] == 'O') colors[i] = LK_ORANGE;
else if (img[i] == 'F') colors[i] = FR_ORANGE;
else if (img[i] == 'B') colors[i] = WT_DBLUE;
else if (img[i] == 'L') colors[i] = WT_LBLUE;
else colors[i] = BLACK;
}
uLCD.BLIT(u, v, 10, 8, colors);
wait_us(250); // Recovery time!
}
void draw_hearts(int u, int v, int num_lives)
{
const char* img =
" R R "
" RRR RRR "
" RRRRRRR "
" RRRRRRR "
" RRRRR "
" RRR "
" R ";
int colors[11*11];
for (int i = 0; i < 11*11; i++)
{
//You can add more characters by defining their hex values above
if (img[i] == 'R') colors[i] = RED;
else if (img[i] == 'Y') colors[i] = YELLOW;
else if (img[i] == 'G') colors[i] = GREEN;
else if (img[i] == 'D') colors[i] = DIRT;
else if (img[i] == '5') colors[i] = LGREY;
else if (img[i] == '3') colors[i] = DGREY;
else if (img[i] == 'A') colors[i] = AZURE;
else if (img[i] == 'T') colors[i] = TEAL;
else if (img[i] == '1') colors[i] = C_DBROWN;
else if (img[i] == '2') colors[i] = C_LBROWN;
else if (img[i] == 'W') colors[i] = WHITE;
else if (img[i] == '4') colors[i] = LPURPLE;
else if (img[i] == '6') colors[i] = NPC_DGRAY;
else if (img[i] == '7') colors[i] = NPC_LGRAY;
else if (img[i] == '8') colors[i] = NPC_PURPLE;
else if (img[i] == '9') colors[i] = NPC_BROWN;
else if (img[i] == 'S') colors[i] = SKIN;
else if (img[i] == 'E') colors[i] = LK_GREEN;
else if (img[i] == 'S') colors[i] = SKIN;
else if (img[i] == 'O') colors[i] = LK_ORANGE;
else if (img[i] == 'F') colors[i] = FR_ORANGE;
else if (img[i] == 'B') colors[i] = WT_DBLUE;
else if (img[i] == 'L') colors[i] = WT_LBLUE;
else colors[i] = BLACK;
}
int offset = 0;
int j;
for (j = 0; j < num_lives; j++) {
uLCD.BLIT(u+offset, v, 9, 7, colors);
offset += 9;
}
int all_black[189];
for (j = 0; j < 189; j++) {
all_black[j] = BLACK;
}
uLCD.BLIT(offset, v, 27, 7, all_black);
}
void draw_door(int u, int v) // x, y
{
const char* img =
" Y "
" Y "
" Y "
" Y "
" Y "
" Y "
" Y "
" Y "
" Y "
" Y "
" Y ";
draw_img(u, v, img);
// draw_nothing(u,v);
// uLCD.line(u, v+6, u+11, v+6, 0xFFFF00);
}
void draw_white_block(int u, int v)
{
const char* img =
"WWWWWWWWWWW"
"WWWWWWWWWWW"
"WWWWWWWWWWW"
"WWWWWWWWWWW"
"WWWWWWWWWWW"
"WWWWWWWWWWW"
"WWWWWWWWWWW"
"WWWWWWWWWWW"
"WWWWWWWWWWW"
"WWWWWWWWWWW"
"WWWWWWWWWWW";
draw_img(u, v, img);
}
/**
* Draw the upper status bar.
*/
void draw_upper_status()
{
uLCD.line(0, 9, 127, 9, GREEN);
}
/**
* Draw the lower status bar.
*/
void draw_lower_status()
{
uLCD.line(0, 118, 127, 118, GREEN);
}
/**
* Draw the border for the map.
*/
void draw_border()
{
uLCD.filled_rectangle(0, 9, 127, 14, WHITE); // Top
uLCD.filled_rectangle(0, 13, 2, 114, WHITE); // Left
uLCD.filled_rectangle(0, 114, 127, 117, WHITE); // Bottom
uLCD.filled_rectangle(124, 14, 127, 117, WHITE); // Right
}
///////////////////////////////////////////
//Sprite drawing of objects using draw_img function
///////////////////////////////////////////
void draw_plant(int u, int v)
{
const char* img =
" "
" GGGGGGGG "
" GGGGGGGGG "
"GGGGGGGGGGG"
"GGGGGGGGGGG"
" GGGGGGGG "
" DD "
" DD "
" DD "
" DDDDD "
" D D D ";
draw_img(u, v, img);
}
void draw_big_tree1(int u, int v)
{
const char* img =
" GGG"
" GGGGGGW"
" GGWWGWWG"
" GGGWGGGG"
" GWWGGWGWG"
" GGGGGGGGG"
" GGGGWWGGWG"
"GGGGGGGWGGG"
"GGGGGGGGGGG"
"GGGGGGGGGGG"
" GGGGGGGGGG";
draw_img(u, v, img);
}
void draw_big_tree2(int u, int v)
{
const char* img =
"GG "
"WGGGGGGGG "
"GGWWGWWGGG "
"WGGWGGWWGGG"
"GGGWGGGGGGG"
"GWGWGWGGWGG"
"GGGGGGGGGGW"
"GGGGGGGGGGW"
"GGGGGGGGGGG"
"WGDDGGGGGGW"
"WWDDGGGGGGW";
draw_img(u, v, img);
}
void draw_big_tree3(int u, int v)
{
const char* img =
" GGGGGGDGG"
" GGGGGDGD"
" GWGDDD"
" DDDDD"
" DDDD"
" DDD"
" DDD"
" DDDD"
" DDDD"
" DDDDD"
" DDDDDDD";
draw_img(u, v, img);
}
void draw_big_tree4(int u, int v)
{
const char* img =
"WWDDDGGGGG "
"WDDD GGGG "
"DDDD G "
"DDDD "
"DDDD "
"DDDD "
"DDDD "
"DDDD "
"DDDDD "
"DDDDDD "
"DDDDDDD ";
draw_img(u, v, img);
}
void draw_spikes(int u, int v)
{
const char* img =
" "
" R R R "
" R R R "
" RR RR RR"
" RR RR RR"
"RRR RRR RRR"
"RW5 RW5 RW5"
"WW5 WW5 WW5"
"WW5 WW5 WW5"
"WW5WWW5WWW5"
"WW5WWW5WWW5";
draw_img(u, v, img);
}
void draw_npc(int u, int v)
{
const char* img =
" 666 "
" 6SSS6 "
" 6S S S6 "
" 6SS6SS6 "
"996S6S6S6 "
" 98666668S "
"S9S966689SS"
"S9S896698SS"
" 98889988 "
" 97888887 "
" 9 78887 ";
draw_img(u, v, img);
}
void draw_stairs(int u, int v)
{
const char* img =
" 333"
" 353"
" 33333"
" 35553"
" 3333333"
" 3555553"
" 333333333"
" 355555553"
"33333333333"
"35555555553"
"33333333333";
draw_img(u, v, img);
}
////////////////////////////////////////////
//Examples of Piskel sprite C array export
////////////////////////////////////////////
void draw_buzz(int u, int v)
{
int new_piskel_data[121] = {
0x00000000, 0x00000000, 0x00000000, 0xff58110c, 0xff58110c, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0xff58110c, 0x00000000, 0x00000000, 0xff58110c, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0xffffff00, 0xffffffff, 0xff0000ff, 0xff606060, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0xffffff00, 0xffffff00, 0xff0000ff, 0xffffffff, 0xff0000ff, 0xffffffff, 0xffffffff, 0x00000000, 0x00000000,
0x00000000, 0xffffff00, 0xffffff00, 0xffffff00, 0xff0000ff, 0xff0000ff, 0xff606060, 0xffffffff, 0xffffffff, 0xffffffff, 0x00000000,
0x00000000, 0x00000000, 0xffffff00, 0xffffffff, 0xffffffff, 0xffffff00, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0xffffff00, 0xffffff00, 0xff58110c, 0xff58110c, 0xff137bff, 0xffffffff, 0x00000000, 0x00000000,
0xff137bff, 0x00000000, 0xff137bff, 0xff58110c, 0xff58110c, 0xff58110c, 0xffffff00, 0xff58110c, 0xff137bff, 0x00000000, 0x00000000,
0x00000000, 0xff137bff, 0xff137bff, 0x00000000, 0x00000000, 0xffffff00, 0xff137bff, 0xff137bff, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0xffffff00, 0xffffff00, 0xff58110c, 0xff58110c, 0xff58110c, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xff58110c, 0xffffff00, 0xffffff00, 0x00000000, 0x00000000, 0x00000000, 0x00000000
};
uLCD.BLIT(u,v, 11,11, new_piskel_data);
}
void draw_fire_buzz(int u, int v)
{
const char* img =
" DD "
" D D "
" RR FF "
" RR W FWW "
" RRR FFFWWW"
" RRRWWWWWW"
" RR WW "
"F F R F "
" FF R FF "
" RR "
" RR ";
draw_img(u, v, img);
}
void draw_water(int u, int v)
{
int new_piskel_data[121] = {
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xff0101c4, 0xff0101c4, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xff0101c4, 0xff0101c4, 0xff0101c4, 0xff0101c4, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0xff0101c4, 0xff0101c4, 0xff0101c4, 0xff0101c4, 0xff0101c4, 0xff0101c4, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0xff0101c4, 0xff0101c4, 0xff7c7cff, 0xff7c7cff, 0xff7c7cff, 0xff0101c4, 0xff0101c4, 0xff0101c4, 0x00000000,
0x00000000, 0xff0101c4, 0xff0101c4, 0xff0101c4, 0xff7c7cff, 0xff7c7cff, 0xff7c7cff, 0xff7c7cff, 0xff0101c4, 0xff0101c4, 0x00000000,
0x00000000, 0xff0101c4, 0xff0101c4, 0xff7c7cff, 0xff7c7cff, 0xff7c7cff, 0xff7c7cff, 0xff7c7cff, 0xff0101c4, 0xff0101c4, 0x00000000,
0x00000000, 0xff0101c4, 0xff0101c4, 0xff7c7cff, 0xff7c7cff, 0xff7c7cff, 0xff7c7cff, 0xff7c7cff, 0xff0101c4, 0xff0101c4, 0x00000000,
0x00000000, 0xff0101c4, 0xff0101c4, 0xff7c7cff, 0xff7c7cff, 0xff7c7cff, 0xff7c7cff, 0xff7c7cff, 0xff0101c4, 0xff0101c4, 0x00000000,
0x00000000, 0x00000000, 0xff0101c4, 0xff7c7cff, 0xff7c7cff, 0xff7c7cff, 0xff7c7cff, 0xff7c7cff, 0xff0101c4, 0xff0101c4, 0x00000000,
0x00000000, 0x00000000, 0xff0101c4, 0xff0101c4, 0xff7c7cff, 0xff7c7cff, 0xff7c7cff, 0xff7c7cff, 0xff0101c4, 0xff0101c4, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0xff0101c4, 0xff0101c4, 0xff0101c4, 0xff0101c4, 0xff0101c4, 0x00000000, 0x00000000, 0x00000000
};
uLCD.BLIT(u,v, 11,11, new_piskel_data);
}
void draw_fire(int u, int v)
{
int new_piskel_data[121] = {
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0xffff0009, 0xffff0009, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0xffff0009, 0xffff0009, 0xffff0009, 0xffff0009, 0x00000000, 0xffff0009, 0xffff0009, 0xffff0009, 0x00000000, 0x00000000, 0x00000000,
0xffff0009, 0xffff0009, 0xffdeb200, 0xffff0009, 0x00000000, 0xffff0009, 0xffdeb200, 0xffff0009, 0xffff0009, 0x00000000, 0x00000000,
0x00000000, 0xffff0009, 0xffdeb200, 0xffdeb200, 0xffff0009, 0xffdeb200, 0xffdeb200, 0xffff0009, 0xffff0009, 0x00000000, 0x00000000,
0x00000000, 0xffff0009, 0xffdeb200, 0xffdeb200, 0xffdeb200, 0xffdeb200, 0xffdeb200, 0xffff0009, 0xffff0009, 0xffff0009, 0x00000000,
0x00000000, 0xffff0009, 0xffde4600, 0xffde4600, 0xffdeb200, 0xffdeb200, 0xffdeb200, 0xffff0009, 0xffff0009, 0xffff0009, 0xffff0009,
0xffff0009, 0xffff0009, 0xffde4600, 0xffde4600, 0xffde4600, 0xffde4600, 0xffde4600, 0xffff0009, 0xffde4600, 0xffde4600, 0xffff0009,
0xffff0009, 0xffb30007, 0xffb30007, 0xffb30007, 0xffde4600, 0xffde4600, 0xffde4600, 0xffde4600, 0xffde4600, 0xffff0009, 0xffff0009,
0xffff0009, 0xffb30007, 0xffb30007, 0xffb30007, 0xffde4600, 0xffde4600, 0xffb30007, 0xffb30007, 0xffb30007, 0xffff0009, 0x00000000,
0xffff0009, 0xffff0009, 0xffff0009, 0xffb30007, 0xffb30007, 0xffb30007, 0xffb30007, 0xffb30007, 0xffff0009, 0xffff0009, 0xffff0009
};
uLCD.BLIT(u,v, 11,11, new_piskel_data);
}
void draw_earth(int u, int v)
{
int new_piskel_data[121] = {
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0xffffffff, 0xff00659e, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x00000000, 0x00000000,
0x00000000, 0xffffffff, 0xffffffff, 0xff00659e, 0xff00659e, 0xff00659e, 0xff00659e, 0xff00659e, 0xffffffff, 0xffffffff, 0x00000000,
0x00000000, 0xffffffff, 0xffffffff, 0xffffffff, 0xff00659e, 0xff00659e, 0xff00659e, 0xff00659e, 0xff00659e, 0xffffffff, 0x00000000,
0xffffffff, 0xffffffff, 0xff00659e, 0xffffffff, 0xffffffff, 0xff00659e, 0xff00659e, 0xff00659e, 0xff00659e, 0xffffffff, 0x00000000,
0xffffffff, 0xff00659e, 0xff00659e, 0xff00659e, 0xffffffff, 0xff00659e, 0xff00659e, 0xff00659e, 0xff00659e, 0xffffffff, 0x00000000,
0xffffffff, 0xff00659e, 0xff00659e, 0xff00659e, 0xffffffff, 0xff00659e, 0xff00659e, 0xff00659e, 0xffffffff, 0xffffffff, 0xffffffff,
0xffffffff, 0xff00659e, 0xff00659e, 0xff00659e, 0xffffffff, 0xff00659e, 0xff00659e, 0xffffffff, 0xff00659e, 0xff00659e, 0xff00659e,
0xff00659e, 0xff00659e, 0xff00659e, 0xff00659e, 0xffffffff, 0xff00659e, 0xffffffff, 0xffffffff, 0xff00659e, 0xff00659e, 0xff00659e
};
uLCD.BLIT(u,v, 11,11, new_piskel_data);
}
///////////////////////////////////////////
//Other sprites
///////////////////////////////////////////
void draw_chest(int u, int v)
{
const char* img =
" "
" "
" 1111111 "
" 112222211 "
"11222222211"
"1111YYY1111"
"1122YYY2211"
"11222222211"
"11222222211"
"11222222211"
"11111111111";
draw_img(u, v, img);
}
void draw_cave1(int u, int v)
{
const char* img =
"$4444444444"
"44444444444"
"44444444444"
"44444444444"
"44444444444"
"44444444444"
"44444444444"
"44444444444"
"44444444444"
"44444444444"
"44444444444";
draw_img(u, v, img);
}
void draw_cave2(int u, int v)
{
const char* img =
"33333333333"
"33333333333"
"33333333333"
"33333333333"
"33333333333"
"33333333333"
"33333333333"
"33333333333"
"33333333333"
"33333333333"
"33333333333";
draw_img(u, v, img);
}
void draw_cave3(int u, int v)
{
const char* img =
"44444444444"
"44444444444"
"44444444444"
"44444444444"
"44444444444"
"44444444444"
"44444444444"
"44444444444"
"44444444000"
"44444444000"
"44444444000";
draw_img(u, v, img);
}
void draw_cave4(int u, int v)
{
const char* img =
"44444444444"
"44444444444"
"44444444444"
"44444444444"
"44444444444"
"44444444444"
"44444444444"
"44444444444"
"00044444444"
"00044444444"
"00044444444";
draw_img(u, v, img);
}
void draw_mud(int u, int v)
{
const char* img =
"DDDDDDDDDDD"
"DDD3333DD3D"
"D33D33D33DD"
"D3DDD33D33D"
"DD333D333DD"
"D33D33DDDD"
"DDD333D333D"
"DD3DDD3DD3D"
"D3D333D33DD"
"DDDDD33DDDD"
"DDDDDDDDDDD";
draw_img(u, v, img);
}