Simple fish eat program
Dependencies: mbed mbed-rtos N5110 ShiftReg Tone
classes/Graphics.cpp@14:f1552b691274, 2021-08-02 (annotated)
- Committer:
- el18a2k
- Date:
- Mon Aug 02 14:35:02 2021 +0000
- Revision:
- 14:f1552b691274
- Parent:
- 13:183bd19f3d7d
final
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
el18a2k | 14:f1552b691274 | 1 | /* Fish Eat Game v2.0 |
el18a2k | 14:f1552b691274 | 2 | * Author: Andrew Knowles |
el18a2k | 14:f1552b691274 | 3 | * Date: 21/04/2021 |
el18a2k | 14:f1552b691274 | 4 | * Note: See hearder files for additional recognistion */ |
el18a2k | 14:f1552b691274 | 5 | |
el18a2k | 0:cf9660998431 | 6 | #include "Graphics.h" |
el18a2k | 0:cf9660998431 | 7 | |
el18a2k | 12:20ac766b3175 | 8 | //draws title screen |
el18a2k | 0:cf9660998431 | 9 | void Graphics::titleScreen(N5110 &lcd){ |
el18a2k | 12:20ac766b3175 | 10 | //draws an F x y |
el18a2k | 0:cf9660998431 | 11 | const int F[20][12] = { |
el18a2k | 0:cf9660998431 | 12 | { 1,1,1,1,1,1,1,1,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 13 | { 1,1,1,1,1,1,1,1,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 14 | { 1,1,1,1,1,1,1,1,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 15 | { 1,1,1,1,1,1,1,1,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 16 | { 1,1,1,1,0,0,0,0,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 17 | { 1,1,1,1,0,0,0,0,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 18 | { 1,1,1,1,0,0,0,0,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 19 | { 1,1,1,1,0,0,0,0,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 20 | { 1,1,1,1,1,1,1,1,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 21 | { 1,1,1,1,1,1,1,1,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 22 | { 1,1,1,1,1,1,1,1,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 23 | { 1,1,1,1,1,1,1,1,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 24 | { 1,1,1,1,0,0,0,0,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 25 | { 1,1,1,1,0,0,0,0,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 26 | { 1,1,1,1,0,0,0,0,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 27 | { 1,1,1,1,0,0,0,0,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 28 | { 1,1,1,1,0,0,0,0,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 29 | { 1,1,1,1,0,0,0,0,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 30 | { 1,1,1,1,0,0,0,0,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 31 | { 1,1,1,1,0,0,0,0,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 32 | }; |
el18a2k | 0:cf9660998431 | 33 | |
el18a2k | 12:20ac766b3175 | 34 | //draws an I x y |
el18a2k | 0:cf9660998431 | 35 | const int I[20][4] = { |
el18a2k | 0:cf9660998431 | 36 | { 1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 37 | { 1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 38 | { 1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 39 | { 1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 40 | { 1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 41 | { 1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 42 | { 1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 43 | { 1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 44 | { 1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 45 | { 1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 46 | { 1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 47 | { 1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 48 | { 1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 49 | { 1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 50 | { 1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 51 | { 1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 52 | { 1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 53 | { 1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 54 | { 1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 55 | { 1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 56 | }; |
el18a2k | 0:cf9660998431 | 57 | |
el18a2k | 12:20ac766b3175 | 58 | //draws an s x y |
el18a2k | 0:cf9660998431 | 59 | const int S[20][12] = { |
el18a2k | 0:cf9660998431 | 60 | { 1,1,1,1,1,1,1,1,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 61 | { 1,1,1,1,1,1,1,1,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 62 | { 1,1,1,1,1,1,1,1,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 63 | { 1,1,1,1,1,1,1,1,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 64 | { 1,1,1,1,0,0,0,0,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 65 | { 1,1,1,1,0,0,0,0,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 66 | { 1,1,1,1,0,0,0,0,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 67 | { 1,1,1,1,0,0,0,0,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 68 | { 1,1,1,1,1,1,1,1,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 69 | { 1,1,1,1,1,1,1,1,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 70 | { 1,1,1,1,1,1,1,1,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 71 | { 1,1,1,1,1,1,1,1,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 72 | { 0,0,0,0,0,0,0,0,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 73 | { 0,0,0,0,0,0,0,0,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 74 | { 0,0,0,0,0,0,0,0,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 75 | { 0,0,0,0,0,0,0,0,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 76 | { 1,1,1,1,1,1,1,1,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 77 | { 1,1,1,1,1,1,1,1,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 78 | { 1,1,1,1,1,1,1,1,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 79 | { 1,1,1,1,1,1,1,1,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 80 | }; |
el18a2k | 0:cf9660998431 | 81 | |
el18a2k | 12:20ac766b3175 | 82 | //draws an h x y |
el18a2k | 0:cf9660998431 | 83 | const int H[20][12] = { |
el18a2k | 0:cf9660998431 | 84 | { 1,1,1,1,0,0,0,0,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 85 | { 1,1,1,1,0,0,0,0,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 86 | { 1,1,1,1,0,0,0,0,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 87 | { 1,1,1,1,0,0,0,0,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 88 | { 1,1,1,1,0,0,0,0,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 89 | { 1,1,1,1,0,0,0,0,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 90 | { 1,1,1,1,0,0,0,0,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 91 | { 1,1,1,1,1,1,1,1,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 92 | { 1,1,1,1,1,1,1,1,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 93 | { 1,1,1,1,1,1,1,1,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 94 | { 1,1,1,1,1,1,1,1,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 95 | { 1,1,1,1,0,0,0,0,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 96 | { 1,1,1,1,0,0,0,0,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 97 | { 1,1,1,1,0,0,0,0,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 98 | { 1,1,1,1,0,0,0,0,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 99 | { 1,1,1,1,0,0,0,0,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 100 | { 1,1,1,1,0,0,0,0,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 101 | { 1,1,1,1,0,0,0,0,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 102 | { 1,1,1,1,0,0,0,0,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 103 | { 1,1,1,1,0,0,0,0,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 104 | }; |
el18a2k | 0:cf9660998431 | 105 | |
el18a2k | 12:20ac766b3175 | 106 | //draws an e x y |
el18a2k | 0:cf9660998431 | 107 | const int E[20][12] = { |
el18a2k | 0:cf9660998431 | 108 | { 1,1,1,1,1,1,1,1,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 109 | { 1,1,1,1,1,1,1,1,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 110 | { 1,1,1,1,1,1,1,1,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 111 | { 1,1,1,1,1,1,1,1,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 112 | { 1,1,1,1,0,0,0,0,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 113 | { 1,1,1,1,0,0,0,0,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 114 | { 1,1,1,1,0,0,0,0,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 115 | { 1,1,1,1,0,0,0,0,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 116 | { 1,1,1,1,1,1,1,1,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 117 | { 1,1,1,1,1,1,1,1,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 118 | { 1,1,1,1,1,1,1,1,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 119 | { 1,1,1,1,1,1,1,1,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 120 | { 1,1,1,1,0,0,0,0,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 121 | { 1,1,1,1,0,0,0,0,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 122 | { 1,1,1,1,0,0,0,0,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 123 | { 1,1,1,1,0,0,0,0,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 124 | { 1,1,1,1,1,1,1,1,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 125 | { 1,1,1,1,1,1,1,1,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 126 | { 1,1,1,1,1,1,1,1,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 127 | { 1,1,1,1,1,1,1,1,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 128 | }; |
el18a2k | 0:cf9660998431 | 129 | |
el18a2k | 12:20ac766b3175 | 130 | //draws an a x y |
el18a2k | 0:cf9660998431 | 131 | const int A[20][12] = { |
el18a2k | 0:cf9660998431 | 132 | { 1,1,1,1,1,1,1,1,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 133 | { 1,1,1,1,1,1,1,1,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 134 | { 1,1,1,1,1,1,1,1,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 135 | { 1,1,1,1,1,1,1,1,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 136 | { 1,1,1,1,0,0,0,0,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 137 | { 1,1,1,1,0,0,0,0,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 138 | { 1,1,1,1,0,0,0,0,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 139 | { 1,1,1,1,1,1,1,1,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 140 | { 1,1,1,1,1,1,1,1,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 141 | { 1,1,1,1,1,1,1,1,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 142 | { 1,1,1,1,1,1,1,1,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 143 | { 1,1,1,1,0,0,0,0,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 144 | { 1,1,1,1,0,0,0,0,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 145 | { 1,1,1,1,0,0,0,0,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 146 | { 1,1,1,1,0,0,0,0,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 147 | { 1,1,1,1,0,0,0,0,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 148 | { 1,1,1,1,0,0,0,0,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 149 | { 1,1,1,1,0,0,0,0,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 150 | { 1,1,1,1,0,0,0,0,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 151 | { 1,1,1,1,0,0,0,0,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 152 | }; |
el18a2k | 0:cf9660998431 | 153 | |
el18a2k | 12:20ac766b3175 | 154 | //draws an t x y |
el18a2k | 0:cf9660998431 | 155 | const int T[20][12] = { |
el18a2k | 0:cf9660998431 | 156 | { 1,1,1,1,1,1,1,1,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 157 | { 1,1,1,1,1,1,1,1,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 158 | { 1,1,1,1,1,1,1,1,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 159 | { 1,1,1,1,1,1,1,1,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 160 | { 0,0,0,0,1,1,1,1,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 161 | { 0,0,0,0,1,1,1,1,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 162 | { 0,0,0,0,1,1,1,1,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 163 | { 0,0,0,0,1,1,1,1,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 164 | { 0,0,0,0,1,1,1,1,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 165 | { 0,0,0,0,1,1,1,1,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 166 | { 0,0,0,0,1,1,1,1,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 167 | { 0,0,0,0,1,1,1,1,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 168 | { 0,0,0,0,1,1,1,1,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 169 | { 0,0,0,0,1,1,1,1,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 170 | { 0,0,0,0,1,1,1,1,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 171 | { 0,0,0,0,1,1,1,1,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 172 | { 0,0,0,0,1,1,1,1,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 173 | { 0,0,0,0,1,1,1,1,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 174 | { 0,0,0,0,1,1,1,1,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 175 | { 0,0,0,0,1,1,1,1,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 176 | }; |
el18a2k | 0:cf9660998431 | 177 | |
el18a2k | 0:cf9660998431 | 178 | lcd.drawRect(0,0,84,48,FILL_TRANSPARENT); //draws screen border |
el18a2k | 0:cf9660998431 | 179 | |
el18a2k | 2:532b0225519f | 180 | //pos size |
el18a2k | 2:532b0225519f | 181 | //X Y row col |
el18a2k | 2:532b0225519f | 182 | lcd.drawSprite(16,2,20,12,(int *)F); |
el18a2k | 2:532b0225519f | 183 | lcd.drawSprite(32,2,20,4,(int *)I); //xpos = prevoius x pos + col + 4 |
el18a2k | 2:532b0225519f | 184 | lcd.drawSprite(40,2,20,12,(int *)S); |
el18a2k | 2:532b0225519f | 185 | lcd.drawSprite(56,2,20,12,(int *)H); |
el18a2k | 0:cf9660998431 | 186 | |
el18a2k | 2:532b0225519f | 187 | lcd.drawSprite(19,26,20,12,(int *)E); |
el18a2k | 2:532b0225519f | 188 | lcd.drawSprite(35,26,20,12,(int *)A); |
el18a2k | 2:532b0225519f | 189 | lcd.drawSprite(51,26,20,12,(int *)T); |
el18a2k | 0:cf9660998431 | 190 | } |
el18a2k | 0:cf9660998431 | 191 | |
el18a2k | 12:20ac766b3175 | 192 | //creates a confirmation screen to ensure that the player is ready |
el18a2k | 0:cf9660998431 | 193 | void Graphics::confirmationScreen(N5110 &lcd){ |
el18a2k | 12:20ac766b3175 | 194 | //draws an uneaten fish x y |
el18a2k | 0:cf9660998431 | 195 | const int Title_fish[44][21] = { |
el18a2k | 0:cf9660998431 | 196 | { 0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 197 | { 0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 198 | { 0,0,0,0,0,0,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 199 | { 0,0,0,0,0,1,1,1,1,1,1,1,1,0,0,1,0,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 200 | { 0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,1,1,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 201 | { 0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0, }, |
el18a2k | 0:cf9660998431 | 202 | { 0,0,1,1,1,1,0,0,1,1,1,1,1,1,1,1,1,1,1,0,0, }, |
el18a2k | 0:cf9660998431 | 203 | { 0,1,1,1,1,1,0,0,1,1,1,1,1,1,1,1,1,1,1,1,0, }, |
el18a2k | 0:cf9660998431 | 204 | { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 205 | { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 206 | { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 207 | { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 208 | { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 209 | { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 210 | { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 211 | { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 212 | { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 213 | { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 214 | { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 215 | { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 216 | { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 217 | { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 218 | { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 219 | { 0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0, }, |
el18a2k | 0:cf9660998431 | 220 | { 0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0, }, |
el18a2k | 0:cf9660998431 | 221 | { 0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0, }, |
el18a2k | 0:cf9660998431 | 222 | { 0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 223 | { 0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 224 | { 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 225 | { 0,0,0,0,0,0,0,1,1,1,1,1,1,1,0,0,0,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 226 | { 0,0,0,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 227 | { 0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 228 | { 0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 229 | { 0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 230 | { 0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 231 | { 0,0,0,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 232 | { 0,0,0,0,0,0,0,1,1,1,1,1,1,1,0,0,0,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 233 | { 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 234 | { 0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 235 | { 0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 236 | { 0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0, }, |
el18a2k | 0:cf9660998431 | 237 | { 0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0, }, |
el18a2k | 0:cf9660998431 | 238 | { 0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0, }, |
el18a2k | 0:cf9660998431 | 239 | { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 240 | }; |
el18a2k | 0:cf9660998431 | 241 | |
el18a2k | 12:20ac766b3175 | 242 | //draws an eaten fish x y |
el18a2k | 0:cf9660998431 | 243 | const int Title_fish_eaten[44][21] = { |
el18a2k | 0:cf9660998431 | 244 | { 0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 245 | { 0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 246 | { 0,0,0,0,0,0,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 247 | { 0,0,0,0,0,1,1,1,1,1,1,1,1,0,0,1,0,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 248 | { 0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,1,1,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 249 | { 0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0, }, |
el18a2k | 0:cf9660998431 | 250 | { 0,0,1,1,1,1,0,0,1,1,1,1,1,1,1,1,1,1,1,0,0, }, |
el18a2k | 0:cf9660998431 | 251 | { 0,1,1,1,1,1,0,0,1,1,1,1,1,1,1,1,0,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 252 | { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 253 | { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 254 | { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 255 | { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 256 | { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 257 | { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 258 | { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 259 | { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 260 | { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 261 | { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 262 | { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 263 | { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 264 | { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 265 | { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 266 | { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 267 | { 0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 268 | { 0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 269 | { 0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0, }, |
el18a2k | 0:cf9660998431 | 270 | { 0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 271 | { 0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 272 | { 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 273 | { 0,0,0,0,0,0,0,1,1,1,1,1,1,1,0,0,0,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 274 | { 0,0,0,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 275 | { 0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 276 | { 0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 277 | { 0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 278 | { 0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 279 | { 0,0,0,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 280 | { 0,0,0,0,0,0,0,1,1,1,1,1,1,1,0,0,0,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 281 | { 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 282 | { 0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 283 | { 0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 284 | { 0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0, }, |
el18a2k | 0:cf9660998431 | 285 | { 0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0, }, |
el18a2k | 0:cf9660998431 | 286 | { 0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0, }, |
el18a2k | 0:cf9660998431 | 287 | { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 288 | }; |
el18a2k | 0:cf9660998431 | 289 | |
el18a2k | 0:cf9660998431 | 290 | lcd.clear(); |
el18a2k | 0:cf9660998431 | 291 | lcd.drawRect(0,0,84,48,FILL_TRANSPARENT); //draws screen border |
el18a2k | 0:cf9660998431 | 292 | lcd.printString("Hold",12,2); |
el18a2k | 12:20ac766b3175 | 293 | lcd.printString("B",24,3); |
el18a2k | 0:cf9660998431 | 294 | lcd.drawSprite(59,2,44,21,(int*)Title_fish); |
el18a2k | 12:20ac766b3175 | 295 | lcd.refresh(); |
el18a2k | 0:cf9660998431 | 296 | wait_ms(1000); |
el18a2k | 0:cf9660998431 | 297 | lcd.drawSprite(59,2,44,21,(int*)Title_fish_eaten); |
el18a2k | 0:cf9660998431 | 298 | lcd.refresh(); |
el18a2k | 1:7dfa61225fcf | 299 | wait_ms(1000); |
el18a2k | 0:cf9660998431 | 300 | } |
el18a2k | 0:cf9660998431 | 301 | |
el18a2k | 12:20ac766b3175 | 302 | //flashes the screen using normal and inverse lcd functions |
el18a2k | 0:cf9660998431 | 303 | void Graphics::screenFlash(N5110 &lcd){ |
el18a2k | 12:20ac766b3175 | 304 | i = 0; |
el18a2k | 0:cf9660998431 | 305 | |
el18a2k | 0:cf9660998431 | 306 | while(i<4){ |
el18a2k | 0:cf9660998431 | 307 | lcd.inverseMode(); |
el18a2k | 0:cf9660998431 | 308 | lcd.refresh(); |
el18a2k | 0:cf9660998431 | 309 | wait_ms(100); |
el18a2k | 0:cf9660998431 | 310 | lcd.normalMode(); |
el18a2k | 0:cf9660998431 | 311 | lcd.refresh(); |
el18a2k | 0:cf9660998431 | 312 | wait_ms(100); |
el18a2k | 0:cf9660998431 | 313 | i++; |
el18a2k | 0:cf9660998431 | 314 | } |
el18a2k | 0:cf9660998431 | 315 | } |
el18a2k | 0:cf9660998431 | 316 | |
el18a2k | 12:20ac766b3175 | 317 | //displays playing instructions |
el18a2k | 12:20ac766b3175 | 318 | void Graphics::playerInstruc(N5110 &lcd){ |
el18a2k | 12:20ac766b3175 | 319 | lcd.clear(); |
el18a2k | 12:20ac766b3175 | 320 | lcd.printString("-- Welcome --",3,0); |
el18a2k | 12:20ac766b3175 | 321 | lcd.printString("Use the",0,2); |
el18a2k | 12:20ac766b3175 | 322 | lcd.printString("joystick to ",0,3); |
el18a2k | 12:20ac766b3175 | 323 | lcd.printString("move the fish",0,4); |
el18a2k | 12:20ac766b3175 | 324 | lcd.refresh(); |
el18a2k | 12:20ac766b3175 | 325 | wait_ms(4000); |
el18a2k | 12:20ac766b3175 | 326 | |
el18a2k | 12:20ac766b3175 | 327 | lcd.clear(); |
el18a2k | 12:20ac766b3175 | 328 | lcd.printString("remember to",0,1); |
el18a2k | 12:20ac766b3175 | 329 | lcd.printString("only eat fish",0,2); |
el18a2k | 12:20ac766b3175 | 330 | lcd.printString("smaller than",0,3); |
el18a2k | 12:20ac766b3175 | 331 | lcd.printString("or same as",0,4); |
el18a2k | 12:20ac766b3175 | 332 | lcd.printString("you!!",0,5); |
el18a2k | 12:20ac766b3175 | 333 | lcd.refresh(); |
el18a2k | 12:20ac766b3175 | 334 | wait_ms(4000); |
el18a2k | 12:20ac766b3175 | 335 | |
el18a2k | 12:20ac766b3175 | 336 | lcd.clear(); |
el18a2k | 12:20ac766b3175 | 337 | lcd.printString("At the top",0,1); |
el18a2k | 12:20ac766b3175 | 338 | lcd.printString("left youll",0,2); |
el18a2k | 12:20ac766b3175 | 339 | lcd.printString("see your",0,3); |
el18a2k | 12:20ac766b3175 | 340 | lcd.printString("growth bar...",0,4); |
el18a2k | 12:20ac766b3175 | 341 | lcd.refresh(); |
el18a2k | 12:20ac766b3175 | 342 | wait_ms(4000); |
el18a2k | 12:20ac766b3175 | 343 | |
el18a2k | 12:20ac766b3175 | 344 | lcd.clear(); |
el18a2k | 12:20ac766b3175 | 345 | lcd.printString("When this is",0,1); |
el18a2k | 12:20ac766b3175 | 346 | lcd.printString("full your fish",0,2); |
el18a2k | 12:20ac766b3175 | 347 | lcd.printString("will grow!!",0,3); |
el18a2k | 12:20ac766b3175 | 348 | lcd.refresh(); |
el18a2k | 12:20ac766b3175 | 349 | wait_ms(4000); |
el18a2k | 12:20ac766b3175 | 350 | |
el18a2k | 12:20ac766b3175 | 351 | lcd.clear(); |
el18a2k | 12:20ac766b3175 | 352 | lcd.printString("Be careful!",0,1); |
el18a2k | 12:20ac766b3175 | 353 | lcd.printString("Eat a bigger",0,2); |
el18a2k | 12:20ac766b3175 | 354 | lcd.printString("fish, you'll",0,3); |
el18a2k | 12:20ac766b3175 | 355 | lcd.printString("loose a life!",0,4); |
el18a2k | 12:20ac766b3175 | 356 | lcd.refresh(); |
el18a2k | 12:20ac766b3175 | 357 | wait_ms(4000); |
el18a2k | 12:20ac766b3175 | 358 | |
el18a2k | 12:20ac766b3175 | 359 | lcd.clear(); |
el18a2k | 12:20ac766b3175 | 360 | lcd.printString("Good Luck!!!",6,1); |
el18a2k | 12:20ac766b3175 | 361 | lcd.refresh(); |
el18a2k | 12:20ac766b3175 | 362 | wait_ms(4000); |
el18a2k | 12:20ac766b3175 | 363 | } |
el18a2k | 12:20ac766b3175 | 364 | |
el18a2k | 12:20ac766b3175 | 365 | void Graphics::gameOver(N5110 &lcd){ |
el18a2k | 12:20ac766b3175 | 366 | lcd.clear(); |
el18a2k | 13:183bd19f3d7d | 367 | lcd.drawRect(0,0,84,48,FILL_TRANSPARENT); //draws screen border |
el18a2k | 12:20ac766b3175 | 368 | lcd.printString("Game Over!!!",6,1); |
el18a2k | 12:20ac766b3175 | 369 | lcd.refresh(); |
el18a2k | 12:20ac766b3175 | 370 | wait_ms(4000); |
el18a2k | 12:20ac766b3175 | 371 | } |
el18a2k | 12:20ac766b3175 | 372 | |
el18a2k | 12:20ac766b3175 | 373 | //displays congatulations screen |
el18a2k | 12:20ac766b3175 | 374 | void Graphics::newHighscore(N5110 &lcd, int score){ |
el18a2k | 12:20ac766b3175 | 375 | int displayScore = score; |
el18a2k | 12:20ac766b3175 | 376 | |
el18a2k | 12:20ac766b3175 | 377 | //string int |
el18a2k | 12:20ac766b3175 | 378 | stringCon2 = sprintf(writeScore2, "%i", displayScore); //converts int into string |
el18a2k | 12:20ac766b3175 | 379 | lcd.clear(); |
el18a2k | 12:20ac766b3175 | 380 | lcd.drawRect(0,0,84,48,FILL_TRANSPARENT); //draws screen border |
el18a2k | 12:20ac766b3175 | 381 | lcd.printString("New", 33, 1); |
el18a2k | 12:20ac766b3175 | 382 | lcd.printString("High Score", 14, 2); |
el18a2k | 12:20ac766b3175 | 383 | lcd.printString(writeScore2, 29, 4); |
el18a2k | 12:20ac766b3175 | 384 | lcd.refresh(); |
el18a2k | 12:20ac766b3175 | 385 | wait_ms(4000); |
el18a2k | 12:20ac766b3175 | 386 | } |
el18a2k | 12:20ac766b3175 | 387 | |
el18a2k | 10:e221bd1ce3ec | 388 | void Graphics::Fish_1(N5110 &lcd, int _x, int _y){ |
el18a2k | 0:cf9660998431 | 389 | // x y |
el18a2k | 0:cf9660998431 | 390 | const int Fish_1[4][9]= { |
el18a2k | 0:cf9660998431 | 391 | { 1,0,0,1,1,1,1,1,0, }, |
el18a2k | 0:cf9660998431 | 392 | { 1,1,1,1,1,1,1,0,1, }, |
el18a2k | 0:cf9660998431 | 393 | { 1,1,1,1,1,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 394 | { 1,0,0,1,1,1,1,1,0, }, |
el18a2k | 0:cf9660998431 | 395 | }; |
el18a2k | 0:cf9660998431 | 396 | |
el18a2k | 0:cf9660998431 | 397 | //pos / sprite x y / x y |
el18a2k | 10:e221bd1ce3ec | 398 | lcd.drawSprite(_x,_y,4,9,(int*)Fish_1); |
el18a2k | 0:cf9660998431 | 399 | } |
el18a2k | 0:cf9660998431 | 400 | |
el18a2k | 10:e221bd1ce3ec | 401 | void Graphics::Fish_2(N5110 &lcd, int _x, int _y){ |
el18a2k | 0:cf9660998431 | 402 | // x y |
el18a2k | 0:cf9660998431 | 403 | const int Fish_2[6][14] = { |
el18a2k | 0:cf9660998431 | 404 | { 1,0,0,0,0,1,1,1,1,1,1,1,0,0, }, |
el18a2k | 0:cf9660998431 | 405 | { 1,1,0,0,1,1,1,1,1,1,0,1,1,0, }, |
el18a2k | 0:cf9660998431 | 406 | { 1,1,1,1,1,1,1,1,1,1,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 407 | { 1,1,1,1,1,1,1,1,1,1,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 408 | { 1,1,0,0,1,1,1,1,1,1,1,1,1,0, }, |
el18a2k | 0:cf9660998431 | 409 | { 1,0,0,0,0,1,1,1,1,1,1,1,0,0, }, |
el18a2k | 0:cf9660998431 | 410 | }; |
el18a2k | 0:cf9660998431 | 411 | |
el18a2k | 0:cf9660998431 | 412 | //pos / sprite x y / x y |
el18a2k | 10:e221bd1ce3ec | 413 | lcd.drawSprite(_x,_y,6,14,(int*)Fish_2); |
el18a2k | 0:cf9660998431 | 414 | } |
el18a2k | 0:cf9660998431 | 415 | |
el18a2k | 10:e221bd1ce3ec | 416 | void Graphics::Fish_3(N5110 &lcd, int _x, int _y){ |
el18a2k | 0:cf9660998431 | 417 | // x y |
el18a2k | 0:cf9660998431 | 418 | const int Fish_3[8][17] = { |
el18a2k | 0:cf9660998431 | 419 | { 1,0,0,0,0,0,0,1,1,1,1,1,1,1,0,0,0 }, |
el18a2k | 0:cf9660998431 | 420 | { 1,1,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0 }, |
el18a2k | 0:cf9660998431 | 421 | { 1,1,1,0,0,1,1,1,1,1,1,1,1,0,1,1,0 }, |
el18a2k | 0:cf9660998431 | 422 | { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 }, |
el18a2k | 0:cf9660998431 | 423 | { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 }, |
el18a2k | 0:cf9660998431 | 424 | { 1,1,1,0,0,1,1,1,1,1,1,1,1,1,1,1,0 }, |
el18a2k | 0:cf9660998431 | 425 | { 1,1,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0 }, |
el18a2k | 0:cf9660998431 | 426 | { 1,0,0,0,0,0,0,1,1,1,1,1,1,1,0,0,0 }, |
el18a2k | 0:cf9660998431 | 427 | }; |
el18a2k | 0:cf9660998431 | 428 | |
el18a2k | 0:cf9660998431 | 429 | //pos / sprite x y / x y |
el18a2k | 10:e221bd1ce3ec | 430 | lcd.drawSprite(_x,_y,8,17,(int*)Fish_3); |
el18a2k | 0:cf9660998431 | 431 | } |
el18a2k | 0:cf9660998431 | 432 | |
el18a2k | 0:cf9660998431 | 433 | |
el18a2k | 10:e221bd1ce3ec | 434 | void Graphics::Fish_4(N5110 &lcd, int _x, int _y){ |
el18a2k | 0:cf9660998431 | 435 | // x y |
el18a2k | 0:cf9660998431 | 436 | const int Fish_4[12][23] = { |
el18a2k | 0:cf9660998431 | 437 | { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 438 | { 0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 439 | { 1,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 440 | { 1,1,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0, }, |
el18a2k | 0:cf9660998431 | 441 | { 1,1,1,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,0,1,1,0,0, }, |
el18a2k | 0:cf9660998431 | 442 | { 1,1,1,1,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0, }, |
el18a2k | 0:cf9660998431 | 443 | { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 444 | { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, }, |
el18a2k | 0:cf9660998431 | 445 | { 1,1,1,1,0,0,1,1,1,1,1,1,1,0,1,0,1,1,1,1,1,1,0, }, |
el18a2k | 0:cf9660998431 | 446 | { 1,1,1,0,0,0,0,1,1,1,1,1,1,0,0,1,1,1,1,0,0,0,0, }, |
el18a2k | 0:cf9660998431 | 447 | { 1,1,0,0,0,0,0,0,1,1,1,1,1,0,1,1,1,1,1,1,1,0,0, }, |
el18a2k | 0:cf9660998431 | 448 | { 1,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,0,0,0, }, |
el18a2k | 0:cf9660998431 | 449 | }; |
el18a2k | 0:cf9660998431 | 450 | |
el18a2k | 0:cf9660998431 | 451 | //pos / sprite x y / x y |
el18a2k | 10:e221bd1ce3ec | 452 | lcd.drawSprite(_x,_y,12,23,(int*)Fish_4); |
el18a2k | 0:cf9660998431 | 453 | } |
el18a2k | 0:cf9660998431 | 454 | |
el18a2k | 10:e221bd1ce3ec | 455 | void Graphics::E_Fish_1(N5110 &lcd, int _x, int _y){ |
el18a2k | 10:e221bd1ce3ec | 456 | // x y |
el18a2k | 10:e221bd1ce3ec | 457 | const int E_Fish_1[4][9]= { |
el18a2k | 10:e221bd1ce3ec | 458 | { 0,1,1,1,1,1,0,0,1, }, |
el18a2k | 10:e221bd1ce3ec | 459 | { 1,0,1,1,1,1,1,1,1, }, |
el18a2k | 10:e221bd1ce3ec | 460 | { 1,1,1,1,1,1,1,1,1, }, |
el18a2k | 10:e221bd1ce3ec | 461 | { 0,1,1,1,1,1,0,0,1, }, |
el18a2k | 10:e221bd1ce3ec | 462 | }; |
el18a2k | 10:e221bd1ce3ec | 463 | |
el18a2k | 10:e221bd1ce3ec | 464 | //pos / sprite x y / x y |
el18a2k | 10:e221bd1ce3ec | 465 | lcd.drawSprite(_x,_y,4,9,(int*)E_Fish_1); |
el18a2k | 10:e221bd1ce3ec | 466 | } |
el18a2k | 0:cf9660998431 | 467 | |
el18a2k | 10:e221bd1ce3ec | 468 | void Graphics::E_Fish_2(N5110 &lcd, int _x, int _y){ |
el18a2k | 0:cf9660998431 | 469 | // x y |
el18a2k | 10:e221bd1ce3ec | 470 | const int E_Fish_2[6][14] = { |
el18a2k | 10:e221bd1ce3ec | 471 | { 0,0,1,1,1,1,1,1,1,0,0,0,0,1, }, |
el18a2k | 10:e221bd1ce3ec | 472 | { 0,1,1,0,1,1,1,1,1,1,0,0,1,1, }, |
el18a2k | 10:e221bd1ce3ec | 473 | { 1,1,1,1,1,1,1,1,1,1,1,1,1,1, }, |
el18a2k | 10:e221bd1ce3ec | 474 | { 1,1,1,1,1,1,1,1,1,1,1,1,1,1, }, |
el18a2k | 10:e221bd1ce3ec | 475 | { 0,1,1,1,1,1,1,1,1,1,0,0,1,1, }, |
el18a2k | 10:e221bd1ce3ec | 476 | { 0,0,1,1,1,1,1,1,1,0,0,0,0,1, }, |
el18a2k | 0:cf9660998431 | 477 | }; |
el18a2k | 0:cf9660998431 | 478 | |
el18a2k | 10:e221bd1ce3ec | 479 | //pos / sprite x y / x y |
el18a2k | 10:e221bd1ce3ec | 480 | lcd.drawSprite(_x,_y,6,14,(int*)E_Fish_2); |
el18a2k | 10:e221bd1ce3ec | 481 | } |
el18a2k | 10:e221bd1ce3ec | 482 | |
el18a2k | 10:e221bd1ce3ec | 483 | void Graphics::E_Fish_3(N5110 &lcd, int _x, int _y){ |
el18a2k | 10:e221bd1ce3ec | 484 | // x y |
el18a2k | 10:e221bd1ce3ec | 485 | const int E_Fish_3[8][17] = { |
el18a2k | 10:e221bd1ce3ec | 486 | { 0,0,0,1,1,1,1,1,1,1,0,0,0,0,0,0,1, }, |
el18a2k | 10:e221bd1ce3ec | 487 | { 0,0,1,1,1,1,1,1,1,1,1,0,0,0,0,1,1, }, |
el18a2k | 10:e221bd1ce3ec | 488 | { 0,1,1,0,1,1,1,1,1,1,1,1,0,0,1,1,1, }, |
el18a2k | 10:e221bd1ce3ec | 489 | { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, }, |
el18a2k | 10:e221bd1ce3ec | 490 | { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, }, |
el18a2k | 10:e221bd1ce3ec | 491 | { 0,1,1,1,1,1,1,1,1,1,1,1,0,0,1,1,1, }, |
el18a2k | 10:e221bd1ce3ec | 492 | { 0,0,1,1,1,1,1,1,1,1,1,0,0,0,0,1,1, }, |
el18a2k | 10:e221bd1ce3ec | 493 | { 0,0,0,1,1,1,1,1,1,1,0,0,0,0,0,0,1, }, |
el18a2k | 10:e221bd1ce3ec | 494 | }; |
el18a2k | 0:cf9660998431 | 495 | |
el18a2k | 10:e221bd1ce3ec | 496 | //pos / sprite x y / x y |
el18a2k | 10:e221bd1ce3ec | 497 | lcd.drawSprite(_x,_y,8,17,(int*)E_Fish_3); |
el18a2k | 10:e221bd1ce3ec | 498 | } |
el18a2k | 10:e221bd1ce3ec | 499 | |
el18a2k | 10:e221bd1ce3ec | 500 | |
el18a2k | 10:e221bd1ce3ec | 501 | void Graphics::E_Fish_4(N5110 &lcd, int _x, int _y){ |
el18a2k | 10:e221bd1ce3ec | 502 | // x y |
el18a2k | 10:e221bd1ce3ec | 503 | const int E_Fish_4[12][23] = { |
el18a2k | 10:e221bd1ce3ec | 504 | { 0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0, }, |
el18a2k | 10:e221bd1ce3ec | 505 | { 0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0, }, |
el18a2k | 10:e221bd1ce3ec | 506 | { 0,0,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,1, }, |
el18a2k | 10:e221bd1ce3ec | 507 | { 0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,1,1, }, |
el18a2k | 10:e221bd1ce3ec | 508 | { 0,0,1,1,0,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1,1,1, }, |
el18a2k | 10:e221bd1ce3ec | 509 | { 0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,1,1,1,1, }, |
el18a2k | 10:e221bd1ce3ec | 510 | { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, }, |
el18a2k | 10:e221bd1ce3ec | 511 | { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, }, |
el18a2k | 10:e221bd1ce3ec | 512 | { 0,1,1,1,1,1,1,0,1,0,1,1,1,1,1,1,1,0,0,1,1,1,1, }, |
el18a2k | 10:e221bd1ce3ec | 513 | { 0,0,0,0,1,1,1,1,0,0,1,1,1,1,1,1,0,0,0,0,1,1,1, }, |
el18a2k | 10:e221bd1ce3ec | 514 | { 0,0,1,1,1,1,1,1,1,0,1,1,1,1,1,0,0,0,0,0,0,1,1, }, |
el18a2k | 10:e221bd1ce3ec | 515 | { 0,0,0,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,1, }, |
el18a2k | 10:e221bd1ce3ec | 516 | }; |
el18a2k | 10:e221bd1ce3ec | 517 | |
el18a2k | 10:e221bd1ce3ec | 518 | //pos / sprite x y / x y |
el18a2k | 10:e221bd1ce3ec | 519 | lcd.drawSprite(_x,_y,12,23,(int*)E_Fish_4); |
el18a2k | 0:cf9660998431 | 520 | } |