ECE 2035 final project
Dependencies: mbed wave_player 4DGL-uLCD-SE MMA8452
graphics.cpp@2:22d36e7740f1, 2019-04-15 (annotated)
- Committer:
- npatel387
- Date:
- Mon Apr 15 12:25:08 2019 +0000
- Revision:
- 2:22d36e7740f1
- Parent:
- 0:35660d7952f7
final;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
rconnorlawson | 0:35660d7952f7 | 1 | #include "graphics.h" |
npatel387 | 2:22d36e7740f1 | 2 | #include "hardware.h" |
rconnorlawson | 0:35660d7952f7 | 3 | #include "globals.h" |
rconnorlawson | 0:35660d7952f7 | 4 | |
rconnorlawson | 0:35660d7952f7 | 5 | |
npatel387 | 2:22d36e7740f1 | 6 | static int player[121] = {0x00000000, 0xff5a0c45, 0x00000000, 0xff3e2113, 0xff3e2113, 0xff3e2113, 0xff3e2113, 0x00000000, 0x00000000, 0x00000000, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 7 | 0xff5a0c45, 0xff5a0c45, 0xff3e2113, 0xff434345, 0xff434345, 0xff434345, 0xff434345, 0xff3e2113, 0x00000000, 0x00000000, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 8 | 0xff5a0c45, 0xff3e2113, 0xff434345, 0xff000000, 0xff434345, 0xff000000, 0xff434345, 0xff000000, 0xff3e2113, 0x00000000, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 9 | 0x00000000, 0xff3e2113, 0xff434345, 0xff000000, 0xff434345, 0xff000000, 0xff434345, 0xff000000, 0xff3e2113, 0x00000000, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 10 | 0x00000000, 0xff3e2113, 0xff434345, 0xff000000, 0xff434345, 0xff000000, 0xff434345, 0xff000000, 0xff3e2113, 0x00000000, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 11 | 0x00000000, 0x00000000, 0xff3e2113, 0xff3e2113, 0xff434345, 0xff434345, 0xff3e2113, 0xff3e2113, 0x00000000, 0x00000000, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 12 | 0xff3e2113, 0xff3e2113, 0xff277a28, 0xff277a28, 0xff3e2113, 0xff3e2113, 0xff277a28, 0xff277a28, 0xff3e2113, 0xff3e2113, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 13 | 0x00ffe0bd, 0x00000000, 0xff497a4a, 0xff277a28, 0xff497a4a, 0xff277a28, 0xff497a4a, 0xff277a28, 0x00000000, 0x00ffe0bd, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 14 | 0x00000000, 0x00000000, 0xff277a28, 0xff497a4a, 0xff277a28, 0xff497a4a, 0xff277a28, 0xff497a4a, 0x00000000, 0x00000000, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 15 | 0x00000000, 0x00000000, 0xff3e2113, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xff3e2113, 0x00000000, 0x00000000, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 16 | 0x00000000, 0xff3e2113, 0xff3e2113, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xff3e2113, 0xff3e2113, 0x00000000, 0x00000000 |
npatel387 | 2:22d36e7740f1 | 17 | }; |
npatel387 | 2:22d36e7740f1 | 18 | |
npatel387 | 2:22d36e7740f1 | 19 | static int player_shield[121] = {0x00000000, 0xff5a0c45, 0x00000000, 0xff3e2113, 0xff3e2113, 0xff3e2113, 0xff3e2113, 0x00000000, 0x00000000, 0x00000000, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 20 | 0xff5a0c45, 0xff5a0c45, 0xff3e2113, 0xff434345, 0xff434345, 0xff434345, 0xff434345, 0xff3e2113, 0x00000000, 0x00000000, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 21 | 0xff5a0c45, 0xff3e2113, 0xff434345, 0xff000000, 0xff434345, 0xff000000, 0xff434345, 0xff000000, 0xff3e2113, 0x00000000, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 22 | 0x00000000, 0xff3e2113, 0xff434345, 0xff000000, 0xff434345, 0xff000000, 0xff434345, 0xff000000, 0xff3e2113, 0x00000000, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 23 | 0x00000000, 0xff3e2113, 0xff434345, 0xff000000, 0xff434345, 0xff000000, 0xff434345, 0xff000000, 0xff3e2113, 0x00000000, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 24 | 0x00000000, 0x00000000, 0xff3e2113, 0xff3e2113, 0xff434345, 0xff434345, 0xff3e2113, 0xff3e2113, 0x00000000, 0x00000000, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 25 | 0x00c66a00, 0x00ff8d09, 0x00c66a00, 0xff277a28, 0xff3e2113, 0xff3e2113, 0xff277a28, 0xff277a28, 0xff3e2113, 0xff3e2113, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 26 | 0x00ff8d09, 0x00ff8d09, 0x00ff8d09, 0xff277a28, 0xff497a4a, 0xff277a28, 0xff497a4a, 0xff277a28, 0x00000000, 0xffbde0ff, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 27 | 0x00c66a00, 0x00ff8d09, 0x00c66a00, 0xff497a4a, 0xff277a28, 0xff497a4a, 0xff277a28, 0xff497a4a, 0x00000000, 0x00000000, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 28 | 0x00000000, 0x00000000, 0xff3e2113, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xff3e2113, 0x00000000, 0x00000000, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 29 | 0x00000000, 0xff3e2113, 0xff3e2113, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xff3e2113, 0xff3e2113, 0x00000000, 0x00000000}; |
npatel387 | 2:22d36e7740f1 | 30 | |
npatel387 | 2:22d36e7740f1 | 31 | static int player_sword[121] = {0x00000000, 0xff5a0c45, 0x00000000, 0xff3e2113, 0xff3e2113, 0xff3e2113, 0xff3e2113, 0x00000000, 0x00000000, 0x00000000, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 32 | 0xff5a0c45, 0xff5a0c45, 0xff3e2113, 0xff434345, 0xff434345, 0xff434345, 0xff434345, 0xff3e2113, 0x00000000, 0x00ffd700, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 33 | 0xff5a0c45, 0xff3e2113, 0xff434345, 0xff000000, 0xff434345, 0xff000000, 0xff434345, 0xff000000, 0xff3e2113, 0x00ffd700, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 34 | 0x00000000, 0xff3e2113, 0xff434345, 0xff000000, 0xff434345, 0xff000000, 0xff434345, 0xff000000, 0xff3e2113, 0x00ffd700, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 35 | 0x00000000, 0xff3e2113, 0xff434345, 0xff000000, 0xff434345, 0xff000000, 0xff434345, 0xff000000, 0xff3e2113, 0x00ffd700, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 36 | 0x00000000, 0x00000000, 0xff3e2113, 0xff3e2113, 0xff434345, 0xff434345, 0xff3e2113, 0xff3e2113, 0x00000000, 0x00ffd700, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 37 | 0x00c66a00, 0x00ff8d09, 0x00c66a00, 0xff277a28, 0xff3e2113, 0xff3e2113, 0xff277a28, 0xff277a28, 0x00ffd700, 0x00ffd700, 0x00ffd700, |
npatel387 | 2:22d36e7740f1 | 38 | 0x00ff8d09, 0x00ff8d09, 0x00ff8d09, 0xff277a28, 0xff497a4a, 0xff277a28, 0xff497a4a, 0xff277a28, 0x00000000, 0x00ffd700, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 39 | 0x00c66a00, 0x00ff8d09, 0x00c66a00, 0xff497a4a, 0xff277a28, 0xff497a4a, 0xff277a28, 0xff497a4a, 0x00000000, 0x00000000, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 40 | 0x00000000, 0x00000000, 0xff3e2113, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xff3e2113, 0x00000000, 0x00000000, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 41 | 0x00000000, 0xff3e2113, 0xff3e2113, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xff3e2113, 0xff3e2113, 0x00000000, 0x00000000}; |
npatel387 | 2:22d36e7740f1 | 42 | |
npatel387 | 2:22d36e7740f1 | 43 | static int player_plate[121] = {0x00000000, 0xff5a0c45, 0x00000000, 0xff3e2113, 0xff3e2113, 0xff3e2113, 0xff3e2113, 0x00000000, 0x00000000, 0x00000000, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 44 | 0xff5a0c45, 0xff5a0c45, 0xff3e2113, 0xff434345, 0xff434345, 0xff434345, 0xff434345, 0xff3e2113, 0x00000000, 0x00ffd700, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 45 | 0xff5a0c45, 0xff3e2113, 0xff434345, 0xff000000, 0xff434345, 0xff000000, 0xff434345, 0xff000000, 0xff3e2113, 0x00ffd700, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 46 | 0x00000000, 0xff3e2113, 0xff434345, 0xff000000, 0xff434345, 0xff000000, 0xff434345, 0xff000000, 0xff3e2113, 0x00ffd700, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 47 | 0x00000000, 0xff3e2113, 0xff434345, 0xff000000, 0xff434345, 0xff000000, 0xff434345, 0xff000000, 0xff3e2113, 0x00ffd700, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 48 | 0x00000000, 0x00000000, 0xff3e2113, 0xff3e2113, 0xff434345, 0xff434345, 0xff3e2113, 0xff3e2113, 0x00000000, 0x00ffd700, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 49 | 0x00c66a00, 0x00ff8d09, 0x00c66a00, 0x000ba1d9, 0xff3e2113, 0xff3e2113, 0x000ba1d9, 0x000ba1d9, 0x00ffd700, 0x00ffd700, 0x00ffd700, |
npatel387 | 2:22d36e7740f1 | 50 | 0x00ff8d09, 0x00ff8d09, 0x00ff8d09, 0x000ba1d9, 0x000ba1d9, 0x000ba1d9, 0x000ba1d9, 0x000ba1d9, 0x00000000, 0x00ffd700, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 51 | 0x00c66a00, 0x00ff8d09, 0x00c66a00, 0x000ba1d9, 0x000ba1d9, 0x000ba1d9, 0x000ba1d9, 0x000ba1d9, 0x00000000, 0x00000000, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 52 | 0x00000000, 0x00000000, 0xff3e2113, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xff3e2113, 0x00000000, 0x00000000, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 53 | 0x00000000, 0xff3e2113, 0xff3e2113, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xff3e2113, 0xff3e2113, 0x00000000, 0x00000000}; |
npatel387 | 2:22d36e7740f1 | 54 | |
npatel387 | 2:22d36e7740f1 | 55 | static int player_running[121] = {0x00000000, 0x00000000, 0x00000000, 0xff5a0c45, 0x00000000, 0xff3e2113, 0xff3e2113, 0xff3e2113, 0xff3e2113, 0x00000000, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 56 | 0x00000000, 0x00000000, 0xff5a0c45, 0xff5a0c45, 0xff3e2113, 0xff434345, 0xff434345, 0xff434345, 0xff434345, 0xff3e2113, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 57 | 0x00000000, 0x00000000, 0xff5a0c45, 0xff3e2113, 0xff434345, 0xff000000, 0xff434345, 0xff000000, 0xff434345, 0xff000000, 0xff3e2113, |
npatel387 | 2:22d36e7740f1 | 58 | 0x00000000, 0x00000000, 0x00000000, 0xff3e2113, 0xff434345, 0xff000000, 0xff434345, 0xff000000, 0xff434345, 0xff000000, 0xff3e2113, |
npatel387 | 2:22d36e7740f1 | 59 | 0x00000000, 0x00000000, 0x00000000, 0xff3e2113, 0xff434345, 0xff000000, 0xff434345, 0xff000000, 0xff434345, 0xff000000, 0xff3e2113, |
npatel387 | 2:22d36e7740f1 | 60 | 0xffb4b4b4, 0xffb4b4b4, 0x00000000, 0x00000000, 0xff3e2113, 0xff3e2113, 0xff434345, 0xff434345, 0xff3e2113, 0xff3e2113, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 61 | 0x00000000, 0x00000000, 0xff3e2113, 0xff3e2113, 0xff277a28, 0xff277a28, 0xff3e2113, 0xff3e2113, 0xff277a28, 0xff3e2113, 0xff3e2113, |
npatel387 | 2:22d36e7740f1 | 62 | 0xffb4b4b4, 0xffb4b4b4, 0xffbde0ff, 0x00000000, 0xff497a4a, 0xff277a28, 0xff497a4a, 0xff277a28, 0xff497a4a, 0xffbde0ff, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 63 | 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xff277a28, 0xff497a4a, 0xff277a28, 0xff497a4a, 0xff277a28, 0xff497a4a, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 64 | 0xffb4b4b4, 0xffb4b4b4, 0x00000000, 0x00000000, 0xff3e2113, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xff3e2113, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 65 | 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xff3e2113, 0xff3e2113, 0x00000000, 0x00000000, 0x00000000, 0xff3e2113, 0xff3e2113}; |
npatel387 | 2:22d36e7740f1 | 66 | |
npatel387 | 2:22d36e7740f1 | 67 | static int walls[121] = {0xff202020, 0xff202020, 0xff202020, 0xff202020, 0xff202020, 0xff202020, 0xff202020, 0xff202020, 0xff202020, 0xff202020, 0xff202020, |
npatel387 | 2:22d36e7740f1 | 68 | 0xff202020, 0xff6d6d6e, 0xff6d6d6e, 0xff08320a, 0xff6d6d6e, 0xff6d6d6e, 0xff6d6d6e, 0xff6d6d6e, 0xff08320a, 0xff6d6d6e, 0xff202020, |
npatel387 | 2:22d36e7740f1 | 69 | 0xff202020, 0xff6d6d6e, 0xff08320a, 0xff6d6d6e, 0xff6d6d6e, 0xff6d6d6e, 0xff6d6d6e, 0xff08320a, 0xff6d6d6e, 0xff6d6d6e, 0xff202020, |
npatel387 | 2:22d36e7740f1 | 70 | 0xff202020, 0xff6d6d6e, 0xff6d6d6e, 0xff08320a, 0xff6d6d6e, 0xff6d6d6e, 0xff6d6d6e, 0xff6d6d6e, 0xff08320a, 0xff6d6d6e, 0xff202020, |
npatel387 | 2:22d36e7740f1 | 71 | 0xff202020, 0xff6d6d6e, 0xff08320a, 0xff6d6d6e, 0xff6d6d6e, 0xff6d6d6e, 0xff6d6d6e, 0xff6d6d6e, 0xff6d6d6e, 0xff08320a, 0xff202020, |
npatel387 | 2:22d36e7740f1 | 72 | 0xff202020, 0xff202020, 0xff202020, 0xff202020, 0xff202020, 0xff202020, 0xff202020, 0xff202020, 0xff202020, 0xff202020, 0xff202020, |
npatel387 | 2:22d36e7740f1 | 73 | 0xff202020, 0xff474747, 0xff474747, 0xff474747, 0xff474747, 0xff474747, 0xff474747, 0xff08320a, 0xff474747, 0xff474747, 0xff202020, |
npatel387 | 2:22d36e7740f1 | 74 | 0xff202020, 0xff474747, 0xff474747, 0xff474747, 0xff08320a, 0xff474747, 0xff08320a, 0xff474747, 0xff474747, 0xff474747, 0xff202020, |
npatel387 | 2:22d36e7740f1 | 75 | 0xff202020, 0xff474747, 0xff474747, 0xff474747, 0xff474747, 0xff08320a, 0xff474747, 0xff474747, 0xff474747, 0xff474747, 0xff202020, |
npatel387 | 2:22d36e7740f1 | 76 | 0xff202020, 0xff474747, 0xff474747, 0xff474747, 0xff474747, 0xff474747, 0xff08320a, 0xff474747, 0xff474747, 0xff474747, 0xff202020, |
npatel387 | 2:22d36e7740f1 | 77 | 0xff202020, 0xff202020, 0xff202020, 0xff202020, 0xff202020, 0xff202020, 0xff202020, 0xff202020, 0xff202020, 0xff202020, 0xff202020}; |
npatel387 | 2:22d36e7740f1 | 78 | |
npatel387 | 2:22d36e7740f1 | 79 | static int plant[121] = {0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 80 | 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 81 | 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 82 | 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 83 | 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 84 | 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 85 | 0x00000000, 0x00000000, 0x00000000, 0xff999999, 0xff999999, 0xff999999, 0xff999999, 0x00000000, 0x00000000, 0x00000000, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 86 | 0x00000000, 0x00000000, 0xff999999, 0xff999999, 0xff747474, 0xff747474, 0xff999999, 0xff999999, 0x00000000, 0x00000000, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 87 | 0x00000000, 0xff999999, 0xff999999, 0xff747474, 0xff747474, 0xff747474, 0xff747474, 0xff999999, 0xff999999, 0x00000000, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 88 | 0x00000000, 0xff999999, 0xff747474, 0xff747474, 0xff747474, 0xff747474, 0xff747474, 0xff747474, 0xff747474, 0xff999999, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 89 | 0x00000000, 0xff999999, 0xff999999, 0xff999999, 0xff999999, 0xff999999, 0xff999999, 0xff999999, 0xff999999, 0xff999999, 0x00000000}; |
npatel387 | 2:22d36e7740f1 | 90 | |
npatel387 | 2:22d36e7740f1 | 91 | static int startNPC[121] = {0x00000000, 0x00ff2525, 0x00ff2525, 0x00ff2525, 0x00ff2525, 0x00ff2525, 0x00ff2525, 0x00000000, 0x00000000, 0x00000000, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 92 | 0x00ff2525, 0x00ff2525, 0x00ff2525, 0x00ff2525, 0x00ff2525, 0x00ff2525, 0x00ff2525, 0x00ff2525, 0x00000000, 0x00000000, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 93 | 0x00ff2525, 0x00ff2525, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 94 | 0xffffffff, 0x00000000, 0x00ffc58f, 0x00ffc58f, 0x00ffc58f, 0x00ffc58f, 0x00ffc58f, 0x00ffc58f, 0x00000000, 0x00000000, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 95 | 0x00000000, 0x00000000, 0x00ffc58f, 0xffddd058, 0xffffffff, 0x00ffc58f, 0xffddd058, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 96 | 0x00000000, 0x00000000, 0x00ffc58f, 0x00ffc58f, 0x00ffc58f, 0x00ffc58f, 0x00ffc58f, 0x00ffc58f, 0x00000000, 0x00000000, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 97 | 0x00000000, 0x00000000, 0xffff8fe1, 0x00ffc58f, 0x00d44b4b, 0x00d44b4b, 0x00ffc58f, 0xffff8fe1, 0x00000000, 0x00000000, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 98 | 0xffff8fe1, 0xffff8fe1, 0xffff8fe1, 0xffff8fe1, 0x00ffc58f, 0x00ffc58f, 0xffff8fe1, 0xffff8fe1, 0xffff8fe1, 0xffff8fe1, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 99 | 0x00ffc58f, 0x00000000, 0xffff8fe1, 0xffff6dd8, 0xffff8fe1, 0xffff8fe1, 0xffff6dd8, 0xffff8fe1, 0x00000000, 0x00ffc58f, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 100 | 0x00000000, 0x00000000, 0xffff8fe1, 0xffff8fe1, 0xffff6dd8, 0xffff6dd8, 0xffff8fe1, 0xffff8fe1, 0x00000000, 0x00000000, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 101 | 0x00000000, 0xffff8fe1, 0xffff8fe1, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffff8fe1, 0xffff8fe1, 0x00000000, 0x00000000}; |
npatel387 | 2:22d36e7740f1 | 102 | |
npatel387 | 2:22d36e7740f1 | 103 | static int cave[121] = {0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 104 | 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 105 | 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xff838383, 0xff838383, 0xff838383, 0x00000000, 0x00000000, 0x00000000, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 106 | 0x00000000, 0x00000000, 0x00000000, 0xff838383, 0xff252525, 0xff252525, 0xff252525, 0xff838383, 0x00000000, 0x00000000, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 107 | 0x00000000, 0x00000000, 0xff838383, 0xff838383, 0xff252525, 0xff252525, 0xff252525, 0xff838383, 0xff838383, 0x00000000, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 108 | 0x00000000, 0xff838383, 0xff838383, 0xff252525, 0xff252525, 0xff252525, 0xff252525, 0xff252525, 0xff838383, 0xff838383, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 109 | 0x00000000, 0xff838383, 0xff323232, 0xff252525, 0xff252525, 0xff252525, 0xff252525, 0xff252525, 0xff323232, 0xff838383, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 110 | 0xff838383, 0xff838383, 0xff323232, 0xff323232, 0xff323232, 0xff323232, 0xff323232, 0xff323232, 0xff323232, 0xff838383, 0xff838383, |
npatel387 | 2:22d36e7740f1 | 111 | 0xff838383, 0xff585858, 0xff585858, 0xff585858, 0xff585858, 0xff585858, 0xff585858, 0xff585858, 0xff585858, 0xff585858, 0xff838383, |
npatel387 | 2:22d36e7740f1 | 112 | 0xff838383, 0xff585858, 0xff585858, 0xff585858, 0xff585858, 0xff585858, 0xff585858, 0xff585858, 0xff585858, 0xff585858, 0xff838383, |
npatel387 | 2:22d36e7740f1 | 113 | 0xff838383, 0xff838383, 0xff838383, 0xff838383, 0xff838383, 0xff838383, 0xff838383, 0xff838383, 0xff838383, 0xff838383, 0xff838383}; |
npatel387 | 2:22d36e7740f1 | 114 | |
npatel387 | 2:22d36e7740f1 | 115 | static int swordInStone[121] = {0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 116 | 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 117 | 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00ffd700, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 118 | 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00ffd700, 0x00ffd700, 0x00ffd700, 0x00000000, 0x00000000, 0x00000000, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 119 | 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00ffd700, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 120 | 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00ffd700, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 121 | 0x00000000, 0x00000000, 0x00000000, 0xff999999, 0xff999999, 0x00ffd700, 0xff999999, 0x00000000, 0x00000000, 0x00000000, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 122 | 0x00000000, 0x00000000, 0xff999999, 0xff999999, 0xff747474, 0x00ffd700, 0xff999999, 0xff999999, 0x00000000, 0x00000000, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 123 | 0x00000000, 0xff999999, 0xff999999, 0xff747474, 0xff747474, 0xff747474, 0xff747474, 0xff999999, 0xff999999, 0x00000000, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 124 | 0x00000000, 0xff999999, 0xff747474, 0xff747474, 0xff747474, 0xff747474, 0xff747474, 0xff747474, 0xff747474, 0xff999999, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 125 | 0x00000000, 0xff999999, 0xff999999, 0xff999999, 0xff999999, 0xff999999, 0xff999999, 0xff999999, 0xff999999, 0xff999999, 0x00000000}; |
npatel387 | 2:22d36e7740f1 | 126 | |
npatel387 | 2:22d36e7740f1 | 127 | static int elvarg[121] = {0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 128 | 0x00000000, 0x00fff6f6, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 129 | 0x00808000, 0x00808000, 0x00000000, 0x00fff6f6, 0x00000000, 0x00000000, 0x00000000, 0x00808000, 0x00808000, 0x00808000, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 130 | 0x00808000, 0x00d20303, 0x00808000, 0x00fff6f6, 0x00000000, 0x00000000, 0x00808000, 0x00808000, 0x00808000, 0x00808000, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 131 | 0x00808000, 0x00808000, 0x00808000, 0x00000000, 0x00000000, 0x00808000, 0x00808000, 0x00808000, 0x00808000, 0x00000000, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 132 | 0x00000000, 0x00808000, 0x00808000, 0x00808000, 0x00000000, 0x00808000, 0x00808000, 0x00808000, 0x00808000, 0x00000000, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 133 | 0x00000000, 0x00000000, 0x00808000, 0x00808000, 0x00808000, 0x00808000, 0x00808000, 0x00808000, 0x00000000, 0x00000000, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 134 | 0x00000000, 0x00000000, 0x00808000, 0x00808000, 0x00808000, 0x00808000, 0x00808000, 0x00808000, 0x00808000, 0x00000000, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 135 | 0x00000000, 0x00808000, 0x00808000, 0x00808000, 0x00808000, 0x00808000, 0x00808000, 0x00808000, 0x00808000, 0x00808000, 0x00808000, |
npatel387 | 2:22d36e7740f1 | 136 | 0x00000000, 0x00000000, 0x00808000, 0x005a5a00, 0x00000000, 0x00000000, 0x005a5a00, 0x00808000, 0x00000000, 0x00000000, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 137 | 0x00000000, 0x00fff6f6, 0x00808000, 0x005a5a00, 0x00000000, 0x00fff6f6, 0x005a5a00, 0x00808000, 0x00000000, 0x00000000, 0x00000000}; |
npatel387 | 2:22d36e7740f1 | 138 | |
npatel387 | 2:22d36e7740f1 | 139 | static int gate[121] = {0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 140 | 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 141 | 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 142 | 0x00959826, 0x00959826, 0x00959826, 0x00959826, 0x00959826, 0x00959826, 0x00959826, 0x00959826, 0x00959826, 0x00959826, 0x00959826, |
npatel387 | 2:22d36e7740f1 | 143 | 0x00e5ea00, 0x00e5ea00, 0x00e5ea00, 0x00e5ea00, 0x00e5ea00, 0x00e5ea00, 0x00e5ea00, 0x00e5ea00, 0x00e5ea00, 0x00e5ea00, 0x00e5ea00, |
npatel387 | 2:22d36e7740f1 | 144 | 0x00e5ea00, 0x00e5ea00, 0x00e5ea00, 0x00e5ea00, 0x00e5ea00, 0x00e5ea00, 0x00e5ea00, 0x00e5ea00, 0x00e5ea00, 0x00e5ea00, 0x00e5ea00, |
npatel387 | 2:22d36e7740f1 | 145 | 0x00e5ea00, 0x00e5ea00, 0x00e5ea00, 0x00e5ea00, 0x00e5ea00, 0x00e5ea00, 0x00e5ea00, 0x00e5ea00, 0x00e5ea00, 0x00e5ea00, 0x00e5ea00, |
npatel387 | 2:22d36e7740f1 | 146 | 0x00959826, 0x00959826, 0x00959826, 0x00959826, 0x00959826, 0x00959826, 0x00959826, 0x00959826, 0x00959826, 0x00959826, 0x00959826, |
npatel387 | 2:22d36e7740f1 | 147 | 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 148 | 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 149 | 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000}; |
npatel387 | 2:22d36e7740f1 | 150 | |
npatel387 | 2:22d36e7740f1 | 151 | static int treasure[121] = {0x004d3402, 0x004d3402, 0x004d3402, 0x004d3402, 0x004d3402, 0x004d3402, 0x004d3402, 0x004d3402, 0x004d3402, 0x004d3402, 0x004d3402, |
npatel387 | 2:22d36e7740f1 | 152 | 0x004d3402, 0x002d1e01, 0x002d1e01, 0x002d1e01, 0x002d1e01, 0x002d1e01, 0x002d1e01, 0x002d1e01, 0x002d1e01, 0x002d1e01, 0x004d3402, |
npatel387 | 2:22d36e7740f1 | 153 | 0x004d3402, 0x002d1e01, 0x002d1e01, 0x002d1e01, 0x002d1e01, 0x002d1e01, 0x002d1e01, 0x002d1e01, 0x002d1e01, 0x002d1e01, 0x004d3402, |
npatel387 | 2:22d36e7740f1 | 154 | 0x004d3402, 0x002d1e01, 0x002d1e01, 0x002d1e01, 0x002d1e01, 0x002d1e01, 0x002d1e01, 0x002d1e01, 0x002d1e01, 0x002d1e01, 0x004d3402, |
npatel387 | 2:22d36e7740f1 | 155 | 0x004d3402, 0x00d93b3b, 0x0050c878, 0x00ffd700, 0x00ffd700, 0x00ffd700, 0x00d93b3b, 0x00ffd700, 0x00ffd700, 0x0050c878, 0x004d3402, |
npatel387 | 2:22d36e7740f1 | 156 | 0x004d3402, 0x00ffd700, 0x00ffd700, 0x00d93b3b, 0x0050c878, 0x00ffd700, 0x00d93b3b, 0x00ffd700, 0x00d93b3b, 0x00ffd700, 0x004d3402, |
npatel387 | 2:22d36e7740f1 | 157 | 0x00d1d50b, 0x004d3402, 0x004d3402, 0x004d3402, 0x004d3402, 0x004d3402, 0x004d3402, 0x004d3402, 0x004d3402, 0x004d3402, 0x00d1d50b, |
npatel387 | 2:22d36e7740f1 | 158 | 0x00d1d50b, 0x004d3402, 0x004d3402, 0x004d3402, 0x004d3402, 0x004d3402, 0x004d3402, 0x004d3402, 0x004d3402, 0x004d3402, 0x00d1d50b, |
npatel387 | 2:22d36e7740f1 | 159 | 0x00d1d50b, 0x004d3402, 0x00d1d50b, 0x00d1d50b, 0x00d1d50b, 0x00d1d50b, 0x00d1d50b, 0x00d1d50b, 0x00d1d50b, 0x004d3402, 0x00d1d50b, |
npatel387 | 2:22d36e7740f1 | 160 | 0x00d1d50b, 0x004d3402, 0x004d3402, 0x004d3402, 0x004d3402, 0x004d3402, 0x004d3402, 0x004d3402, 0x004d3402, 0x004d3402, 0x00d1d50b, |
npatel387 | 2:22d36e7740f1 | 161 | 0x00d1d50b, 0x004d3402, 0x004d3402, 0x004d3402, 0x004d3402, 0x004d3402, 0x004d3402, 0x004d3402, 0x004d3402, 0x004d3402, 0x00d1d50b}; |
npatel387 | 2:22d36e7740f1 | 162 | |
npatel387 | 2:22d36e7740f1 | 163 | static int boulder[121] = {0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xff898989, 0xff898989, 0xff898989, 0xff898989, 0xff898989, 0x00000000, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 164 | 0x00000000, 0x00000000, 0xff898989, 0xff898989, 0xff898989, 0xff898989, 0xff898989, 0xff656565, 0xff898989, 0x00000000, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 165 | 0x00000000, 0xff898989, 0xff898989, 0xff898989, 0xff656565, 0xff898989, 0xff898989, 0xff656565, 0xff898989, 0xff898989, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 166 | 0x00000000, 0xff898989, 0xff898989, 0xff898989, 0xff898989, 0xff898989, 0xff898989, 0xff898989, 0xff898989, 0xff898989, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 167 | 0x00000000, 0xff898989, 0xff898989, 0xff898989, 0xff898989, 0xff898989, 0xff898989, 0xff898989, 0xff656565, 0xff898989, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 168 | 0xff898989, 0xff898989, 0xff898989, 0xff898989, 0xff656565, 0xff898989, 0xff898989, 0xff898989, 0xff898989, 0xff898989, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 169 | 0xff898989, 0xff898989, 0xff898989, 0xff656565, 0xff898989, 0xff898989, 0xff898989, 0xff898989, 0xff898989, 0xff898989, 0xff898989, |
npatel387 | 2:22d36e7740f1 | 170 | 0xff656565, 0xff898989, 0xff656565, 0xff898989, 0xff898989, 0xff898989, 0xff656565, 0xff898989, 0xff898989, 0xff898989, 0xff898989, |
npatel387 | 2:22d36e7740f1 | 171 | 0xff898989, 0xff898989, 0xff898989, 0xff898989, 0xff898989, 0xff898989, 0xff898989, 0xff656565, 0xff898989, 0xff656565, 0xff898989, |
npatel387 | 2:22d36e7740f1 | 172 | 0xff898989, 0xff898989, 0xff898989, 0xff898989, 0xff898989, 0xff898989, 0xff898989, 0xff898989, 0xff898989, 0xff898989, 0xff898989, |
npatel387 | 2:22d36e7740f1 | 173 | 0xff898989, 0xff898989, 0xff898989, 0xff898989, 0xff656565, 0xff898989, 0xff898989, 0xff898989, 0xff898989, 0xff898989, 0xff898989}; |
npatel387 | 2:22d36e7740f1 | 174 | |
npatel387 | 2:22d36e7740f1 | 175 | static int phat[121] = {0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 176 | 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 177 | 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 178 | 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 179 | 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 180 | 0x00000000, 0xffa3111a, 0x00000000, 0xffa3111a, 0x00000000, 0xffa3111a, 0x00000000, 0xffa3111a, 0x00000000, 0xffa3111a, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 181 | 0x00000000, 0xffa3111a, 0x00000000, 0xffa3111a, 0x00000000, 0xffa3111a, 0x00000000, 0xffa3111a, 0x00000000, 0xffa3111a, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 182 | 0x00000000, 0xffa3111a, 0xffa3111a, 0xffa3111a, 0xffa3111a, 0xffa3111a, 0xffa3111a, 0xffa3111a, 0xffa3111a, 0xffa3111a, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 183 | 0x00000000, 0xffa3111a, 0xffa3111a, 0xffa3111a, 0xffa3111a, 0xffa3111a, 0xffa3111a, 0xffa3111a, 0xffa3111a, 0xffa3111a, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 184 | 0x00000000, 0xffa3111a, 0xffa3111a, 0xffa3111a, 0xffa3111a, 0xffa3111a, 0xffa3111a, 0xffa3111a, 0xffa3111a, 0xffa3111a, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 185 | 0x00000000, 0xffa3111a, 0xffa3111a, 0xffa3111a, 0xffa3111a, 0xffa3111a, 0xffa3111a, 0xffa3111a, 0xffa3111a, 0xffa3111a, 0x00000000}; |
npatel387 | 2:22d36e7740f1 | 186 | |
npatel387 | 2:22d36e7740f1 | 187 | static int rolling[121] = {0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 188 | 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 189 | 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffc5c5c5, 0xffc5c5c5, 0xffc5c5c5, 0x00000000, 0x00000000, 0x00000000, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 190 | 0x00000000, 0x00000000, 0x00000000, 0xffc5c5c5, 0xffc5c5c5, 0xffc5c5c5, 0xffc5c5c5, 0xffc5c5c5, 0x00000000, 0x00000000, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 191 | 0x00000000, 0x00000000, 0xffc5c5c5, 0xffc5c5c5, 0xffc5c5c5, 0xffc5c5c5, 0xffc5c5c5, 0xffc5c5c5, 0xffc5c5c5, 0x00000000, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 192 | 0x00000000, 0x00000000, 0xffc5c5c5, 0xffc5c5c5, 0xffc5c5c5, 0xffc5c5c5, 0xffc5c5c5, 0xffc5c5c5, 0xffc5c5c5, 0x00000000, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 193 | 0x00000000, 0x00000000, 0xffc5c5c5, 0xffc5c5c5, 0xffc5c5c5, 0xffc5c5c5, 0xffc5c5c5, 0xffc5c5c5, 0xffc5c5c5, 0x00000000, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 194 | 0x00000000, 0x00000000, 0x00000000, 0xffc5c5c5, 0xffc5c5c5, 0xffc5c5c5, 0xffc5c5c5, 0xffc5c5c5, 0x00000000, 0x00000000, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 195 | 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffc5c5c5, 0xffc5c5c5, 0xffc5c5c5, 0x00000000, 0x00000000, 0x00000000, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 196 | 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, |
npatel387 | 2:22d36e7740f1 | 197 | 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000}; |
rconnorlawson | 0:35660d7952f7 | 198 | |
rconnorlawson | 0:35660d7952f7 | 199 | void draw_player(int u, int v, int key) |
rconnorlawson | 0:35660d7952f7 | 200 | { |
npatel387 | 2:22d36e7740f1 | 201 | if(key == 0) |
npatel387 | 2:22d36e7740f1 | 202 | uLCD.BLIT(u, v, 11, 11, player); |
npatel387 | 2:22d36e7740f1 | 203 | else if(key == 1) |
npatel387 | 2:22d36e7740f1 | 204 | uLCD.BLIT(u, v, 11, 11, player_shield); |
npatel387 | 2:22d36e7740f1 | 205 | else if(key == 2) |
npatel387 | 2:22d36e7740f1 | 206 | uLCD.BLIT(u, v, 11, 11, player_sword); |
npatel387 | 2:22d36e7740f1 | 207 | else if(key == 3) |
npatel387 | 2:22d36e7740f1 | 208 | uLCD.BLIT(u, v, 11, 11, player_plate); |
npatel387 | 2:22d36e7740f1 | 209 | else if(key == 4) |
npatel387 | 2:22d36e7740f1 | 210 | uLCD.BLIT(u, v, 11, 11, player_running); |
rconnorlawson | 0:35660d7952f7 | 211 | } |
rconnorlawson | 0:35660d7952f7 | 212 | |
rconnorlawson | 0:35660d7952f7 | 213 | #define YELLOW 0xFFFF00 |
rconnorlawson | 0:35660d7952f7 | 214 | #define BROWN 0xD2691E |
rconnorlawson | 0:35660d7952f7 | 215 | #define DIRT BROWN |
rconnorlawson | 0:35660d7952f7 | 216 | void draw_img(int u, int v, const char* img) |
rconnorlawson | 0:35660d7952f7 | 217 | { |
rconnorlawson | 0:35660d7952f7 | 218 | int colors[11*11]; |
rconnorlawson | 0:35660d7952f7 | 219 | for (int i = 0; i < 11*11; i++) |
rconnorlawson | 0:35660d7952f7 | 220 | { |
rconnorlawson | 0:35660d7952f7 | 221 | if (img[i] == 'R') colors[i] = RED; |
rconnorlawson | 0:35660d7952f7 | 222 | else if (img[i] == 'Y') colors[i] = YELLOW; |
rconnorlawson | 0:35660d7952f7 | 223 | else if (img[i] == 'G') colors[i] = GREEN; |
rconnorlawson | 0:35660d7952f7 | 224 | else if (img[i] == 'D') colors[i] = DIRT; |
rconnorlawson | 0:35660d7952f7 | 225 | else if (img[i] == '5') colors[i] = LGREY; |
rconnorlawson | 0:35660d7952f7 | 226 | else if (img[i] == '3') colors[i] = DGREY; |
rconnorlawson | 0:35660d7952f7 | 227 | else colors[i] = BLACK; |
rconnorlawson | 0:35660d7952f7 | 228 | } |
rconnorlawson | 0:35660d7952f7 | 229 | uLCD.BLIT(u, v, 11, 11, colors); |
rconnorlawson | 0:35660d7952f7 | 230 | wait_us(250); // Recovery time! |
rconnorlawson | 0:35660d7952f7 | 231 | } |
rconnorlawson | 0:35660d7952f7 | 232 | |
rconnorlawson | 0:35660d7952f7 | 233 | void draw_nothing(int u, int v) |
rconnorlawson | 0:35660d7952f7 | 234 | { |
rconnorlawson | 0:35660d7952f7 | 235 | // Fill a tile with blackness |
rconnorlawson | 0:35660d7952f7 | 236 | uLCD.filled_rectangle(u, v, u+10, v+10, BLACK); |
rconnorlawson | 0:35660d7952f7 | 237 | } |
rconnorlawson | 0:35660d7952f7 | 238 | |
rconnorlawson | 0:35660d7952f7 | 239 | void draw_wall(int u, int v) |
rconnorlawson | 0:35660d7952f7 | 240 | { |
npatel387 | 2:22d36e7740f1 | 241 | uLCD.BLIT(u, v, 11, 11, walls); |
rconnorlawson | 0:35660d7952f7 | 242 | } |
rconnorlawson | 0:35660d7952f7 | 243 | |
rconnorlawson | 0:35660d7952f7 | 244 | void draw_plant(int u, int v) |
rconnorlawson | 0:35660d7952f7 | 245 | { |
npatel387 | 2:22d36e7740f1 | 246 | uLCD.BLIT(u, v, 11, 11, plant); |
npatel387 | 2:22d36e7740f1 | 247 | } |
npatel387 | 2:22d36e7740f1 | 248 | |
npatel387 | 2:22d36e7740f1 | 249 | void draw_startNPC(int u, int v) |
npatel387 | 2:22d36e7740f1 | 250 | { |
npatel387 | 2:22d36e7740f1 | 251 | uLCD.BLIT(u, v, 11, 11, startNPC); |
npatel387 | 2:22d36e7740f1 | 252 | } |
npatel387 | 2:22d36e7740f1 | 253 | |
npatel387 | 2:22d36e7740f1 | 254 | void draw_cave(int u, int v) |
npatel387 | 2:22d36e7740f1 | 255 | { |
npatel387 | 2:22d36e7740f1 | 256 | uLCD.BLIT(u, v, 11, 11, cave); |
npatel387 | 2:22d36e7740f1 | 257 | } |
npatel387 | 2:22d36e7740f1 | 258 | |
npatel387 | 2:22d36e7740f1 | 259 | void draw_swordInStone(int u, int v) |
npatel387 | 2:22d36e7740f1 | 260 | { |
npatel387 | 2:22d36e7740f1 | 261 | uLCD.BLIT(u, v, 11, 11, swordInStone); |
npatel387 | 2:22d36e7740f1 | 262 | } |
npatel387 | 2:22d36e7740f1 | 263 | |
npatel387 | 2:22d36e7740f1 | 264 | void draw_elvarg(int u, int v) |
npatel387 | 2:22d36e7740f1 | 265 | { |
npatel387 | 2:22d36e7740f1 | 266 | uLCD.BLIT(u, v, 11, 11, elvarg); |
rconnorlawson | 0:35660d7952f7 | 267 | } |
rconnorlawson | 0:35660d7952f7 | 268 | |
npatel387 | 2:22d36e7740f1 | 269 | void draw_gate(int u, int v) |
npatel387 | 2:22d36e7740f1 | 270 | { |
npatel387 | 2:22d36e7740f1 | 271 | uLCD.BLIT(u, v, 11, 11, gate); |
npatel387 | 2:22d36e7740f1 | 272 | } |
npatel387 | 2:22d36e7740f1 | 273 | |
npatel387 | 2:22d36e7740f1 | 274 | void draw_treasure(int u, int v) |
npatel387 | 2:22d36e7740f1 | 275 | { |
npatel387 | 2:22d36e7740f1 | 276 | uLCD.BLIT(u, v, 11, 11, treasure); |
npatel387 | 2:22d36e7740f1 | 277 | } |
npatel387 | 2:22d36e7740f1 | 278 | |
npatel387 | 2:22d36e7740f1 | 279 | void draw_boulder(int u, int v) |
npatel387 | 2:22d36e7740f1 | 280 | { |
npatel387 | 2:22d36e7740f1 | 281 | uLCD.BLIT(u, v, 11, 11, boulder); |
npatel387 | 2:22d36e7740f1 | 282 | } |
npatel387 | 2:22d36e7740f1 | 283 | |
npatel387 | 2:22d36e7740f1 | 284 | void draw_phat(int u, int v) |
npatel387 | 2:22d36e7740f1 | 285 | { |
npatel387 | 2:22d36e7740f1 | 286 | uLCD.BLIT(u, v, 11, 11, phat); |
npatel387 | 2:22d36e7740f1 | 287 | } |
npatel387 | 2:22d36e7740f1 | 288 | |
npatel387 | 2:22d36e7740f1 | 289 | void draw_rolling(int u, int v) |
npatel387 | 2:22d36e7740f1 | 290 | { |
npatel387 | 2:22d36e7740f1 | 291 | uLCD.BLIT(u, v, 11, 11, rolling); |
npatel387 | 2:22d36e7740f1 | 292 | } |
npatel387 | 2:22d36e7740f1 | 293 | |
npatel387 | 2:22d36e7740f1 | 294 | void draw_upper_status(int x_pos, int y_pos) |
rconnorlawson | 0:35660d7952f7 | 295 | { |
rconnorlawson | 0:35660d7952f7 | 296 | // Draw bottom border of status bar |
rconnorlawson | 0:35660d7952f7 | 297 | uLCD.line(0, 9, 127, 9, GREEN); |
rconnorlawson | 0:35660d7952f7 | 298 | // Add other status info drawing code here |
npatel387 | 2:22d36e7740f1 | 299 | uLCD.locate(0,0); |
npatel387 | 2:22d36e7740f1 | 300 | uLCD.printf("X:%-3iY:%-2i", x_pos, y_pos); |
rconnorlawson | 0:35660d7952f7 | 301 | } |
rconnorlawson | 0:35660d7952f7 | 302 | |
npatel387 | 2:22d36e7740f1 | 303 | |
npatel387 | 2:22d36e7740f1 | 304 | void draw_lower_status(int health, int phats) |
rconnorlawson | 0:35660d7952f7 | 305 | { |
rconnorlawson | 0:35660d7952f7 | 306 | // Draw top border of status bar |
rconnorlawson | 0:35660d7952f7 | 307 | uLCD.line(0, 118, 127, 118, GREEN); |
rconnorlawson | 0:35660d7952f7 | 308 | // Add other status info drawing code here |
npatel387 | 2:22d36e7740f1 | 309 | uLCD.locate(0,15); |
npatel387 | 2:22d36e7740f1 | 310 | uLCD.printf("HP:%-3iPHats:%-2i/5", health, phats); |
rconnorlawson | 0:35660d7952f7 | 311 | } |
rconnorlawson | 0:35660d7952f7 | 312 | |
npatel387 | 2:22d36e7740f1 | 313 | void draw_menu(int omnipotent, int sword, int shield, int platebody, int key) |
npatel387 | 2:22d36e7740f1 | 314 | { |
npatel387 | 2:22d36e7740f1 | 315 | uLCD.filled_rectangle(0, 10, 127, 117, 0xD3D3D3); |
npatel387 | 2:22d36e7740f1 | 316 | uLCD.textbackground_color(0xD3D3D3); |
npatel387 | 2:22d36e7740f1 | 317 | uLCD.color(0x000000); |
npatel387 | 2:22d36e7740f1 | 318 | uLCD.locate(0,2); |
npatel387 | 2:22d36e7740f1 | 319 | uLCD.printf("Menu: Exit w/ B3\n"); |
npatel387 | 2:22d36e7740f1 | 320 | uLCD.printf("----------------\n"); |
npatel387 | 2:22d36e7740f1 | 321 | uLCD.printf("Omnipotent:%i\n", omnipotent); |
npatel387 | 2:22d36e7740f1 | 322 | if(shield) |
npatel387 | 2:22d36e7740f1 | 323 | uLCD.printf("Goal:Defeat Elvarg"); |
npatel387 | 2:22d36e7740f1 | 324 | else if(platebody) |
npatel387 | 2:22d36e7740f1 | 325 | uLCD.printf("Goal:Return to NPC"); |
npatel387 | 2:22d36e7740f1 | 326 | uLCD.printf("Shield: %i\n", shield); |
npatel387 | 2:22d36e7740f1 | 327 | if(shield == 0) |
npatel387 | 2:22d36e7740f1 | 328 | uLCD.printf(" Talk to NPC\n"); |
npatel387 | 2:22d36e7740f1 | 329 | uLCD.printf("Sword: %i\n", sword); |
npatel387 | 2:22d36e7740f1 | 330 | if(sword == 0) |
npatel387 | 2:22d36e7740f1 | 331 | uLCD.printf(" Find Excalibur\n"); |
npatel387 | 2:22d36e7740f1 | 332 | uLCD.printf("Key: %i\n", key); |
npatel387 | 2:22d36e7740f1 | 333 | if(key == 0) |
npatel387 | 2:22d36e7740f1 | 334 | uLCD.printf(" Defeat Elvarg\n"); |
npatel387 | 2:22d36e7740f1 | 335 | uLCD.printf("Platebody: %i\n", platebody); |
npatel387 | 2:22d36e7740f1 | 336 | if(platebody == 0) |
npatel387 | 2:22d36e7740f1 | 337 | uLCD.printf(" Unlock Treasure\n"); |
npatel387 | 2:22d36e7740f1 | 338 | uLCD.textbackground_color(0x000000); |
npatel387 | 2:22d36e7740f1 | 339 | uLCD.color(GREEN); |
npatel387 | 2:22d36e7740f1 | 340 | GameInputs inputs = read_inputs(); |
npatel387 | 2:22d36e7740f1 | 341 | while(inputs.b3) |
npatel387 | 2:22d36e7740f1 | 342 | { |
npatel387 | 2:22d36e7740f1 | 343 | wait_ms(200); |
npatel387 | 2:22d36e7740f1 | 344 | inputs = read_inputs(); |
npatel387 | 2:22d36e7740f1 | 345 | } |
npatel387 | 2:22d36e7740f1 | 346 | } |
npatel387 | 2:22d36e7740f1 | 347 | |
rconnorlawson | 0:35660d7952f7 | 348 | void draw_border() |
rconnorlawson | 0:35660d7952f7 | 349 | { |
rconnorlawson | 0:35660d7952f7 | 350 | uLCD.filled_rectangle(0, 9, 127, 14, WHITE); // Top |
rconnorlawson | 0:35660d7952f7 | 351 | uLCD.filled_rectangle(0, 13, 2, 114, WHITE); // Left |
rconnorlawson | 0:35660d7952f7 | 352 | uLCD.filled_rectangle(0, 114, 127, 117, WHITE); // Bottom |
rconnorlawson | 0:35660d7952f7 | 353 | uLCD.filled_rectangle(124, 14, 127, 117, WHITE); // Right |
rconnorlawson | 0:35660d7952f7 | 354 | } |
rconnorlawson | 0:35660d7952f7 | 355 | |
npatel387 | 2:22d36e7740f1 | 356 | void draw_bad() |
npatel387 | 2:22d36e7740f1 | 357 | { |
npatel387 | 2:22d36e7740f1 | 358 | uLCD.filled_rectangle(0, 0, 127, 127, 0xBB0A1E); |
npatel387 | 2:22d36e7740f1 | 359 | uLCD.textbackground_color(0xBB0A1E); |
npatel387 | 2:22d36e7740f1 | 360 | uLCD.color(0xFFFFFF); |
npatel387 | 2:22d36e7740f1 | 361 | uLCD.text_width(2); |
npatel387 | 2:22d36e7740f1 | 362 | uLCD.text_height(2); |
npatel387 | 2:22d36e7740f1 | 363 | uLCD.locate(0,2); |
npatel387 | 2:22d36e7740f1 | 364 | uLCD.printf("YOU DIED!"); |
npatel387 | 2:22d36e7740f1 | 365 | uLCD.text_width(1); |
npatel387 | 2:22d36e7740f1 | 366 | uLCD.text_height(1); |
npatel387 | 2:22d36e7740f1 | 367 | uLCD.locate(2,10); |
npatel387 | 2:22d36e7740f1 | 368 | uLCD.printf("Reset Mbed"); |
npatel387 | 2:22d36e7740f1 | 369 | } |
rconnorlawson | 0:35660d7952f7 | 370 | |
npatel387 | 2:22d36e7740f1 | 371 | void draw_good() |
npatel387 | 2:22d36e7740f1 | 372 | { |
npatel387 | 2:22d36e7740f1 | 373 | uLCD.filled_rectangle(0, 0, 127, 127, 0x40E0D0); |
npatel387 | 2:22d36e7740f1 | 374 | uLCD.textbackground_color(0x40E0D0); |
npatel387 | 2:22d36e7740f1 | 375 | uLCD.color(0xFFFFFF); |
npatel387 | 2:22d36e7740f1 | 376 | uLCD.text_width(2); |
npatel387 | 2:22d36e7740f1 | 377 | uLCD.text_height(2); |
npatel387 | 2:22d36e7740f1 | 378 | uLCD.locate(0,2); |
npatel387 | 2:22d36e7740f1 | 379 | uLCD.printf("Quest\nCompleted\n!!!!!!!!!!!"); |
npatel387 | 2:22d36e7740f1 | 380 | } |
npatel387 | 2:22d36e7740f1 | 381 | |
npatel387 | 2:22d36e7740f1 | 382 | void draw_start() |
npatel387 | 2:22d36e7740f1 | 383 | { |
npatel387 | 2:22d36e7740f1 | 384 | uLCD.filled_rectangle(0, 0, 127, 127, 0x808000); |
npatel387 | 2:22d36e7740f1 | 385 | uLCD.textbackground_color(0x808000); |
npatel387 | 2:22d36e7740f1 | 386 | uLCD.color(0xBB0A1E); |
npatel387 | 2:22d36e7740f1 | 387 | uLCD.text_width(3); |
npatel387 | 2:22d36e7740f1 | 388 | uLCD.text_height(3); |
npatel387 | 2:22d36e7740f1 | 389 | uLCD.locate(0,0); |
npatel387 | 2:22d36e7740f1 | 390 | uLCD.printf("Dragon\nSlayer"); |
npatel387 | 2:22d36e7740f1 | 391 | uLCD.text_width(1); |
npatel387 | 2:22d36e7740f1 | 392 | uLCD.text_height(1); |
npatel387 | 2:22d36e7740f1 | 393 | uLCD.locate(1,14); |
npatel387 | 2:22d36e7740f1 | 394 | uLCD.printf("Press any button"); |
npatel387 | 2:22d36e7740f1 | 395 | uLCD.textbackground_color(0x000000); |
npatel387 | 2:22d36e7740f1 | 396 | uLCD.color(GREEN); |
npatel387 | 2:22d36e7740f1 | 397 | GameInputs inputs = read_inputs(); |
npatel387 | 2:22d36e7740f1 | 398 | while(inputs.b1 && inputs.b2 && inputs.b3) |
npatel387 | 2:22d36e7740f1 | 399 | { |
npatel387 | 2:22d36e7740f1 | 400 | wait_ms(200); |
npatel387 | 2:22d36e7740f1 | 401 | inputs = read_inputs(); |
npatel387 | 2:22d36e7740f1 | 402 | } |
npatel387 | 2:22d36e7740f1 | 403 | } |
npatel387 | 2:22d36e7740f1 | 404 |