diff options
Diffstat (limited to 'apps/plugins/snake2.c')
-rw-r--r-- | apps/plugins/snake2.c | 500 |
1 files changed, 447 insertions, 53 deletions
diff --git a/apps/plugins/snake2.c b/apps/plugins/snake2.c index 1e3859165c..3569c851b1 100644 --- a/apps/plugins/snake2.c +++ b/apps/plugins/snake2.c | |||
@@ -33,6 +33,28 @@ Head and Tail are stored | |||
33 | #define WIDTH 28 | 33 | #define WIDTH 28 |
34 | #define HEIGHT 16 | 34 | #define HEIGHT 16 |
35 | 35 | ||
36 | #ifdef IRIVER_H100 | ||
37 | #define MULTIPLIER 5 /*Modifier for porting on other screens*/ | ||
38 | #define MODIFIER_1 5 | ||
39 | #define MODIFIER_2 3 | ||
40 | #define CENTER_X 10 | ||
41 | #define CENTER_Y 38 | ||
42 | #define BMPHEIGHT_snakebmp 128 | ||
43 | #define BMPWIDTH_snakebmp 160 | ||
44 | #define BMPHEIGHT_snakeupbmp 36 | ||
45 | #define BMPWIDTH_snakeupbmp 160 | ||
46 | #else | ||
47 | #define MULTIPLIER 4 | ||
48 | #define MODIFIER_1 4 | ||
49 | #define MODIFIER_2 2 | ||
50 | #define CENTER_X 0 | ||
51 | #define CENTER_Y 0 | ||
52 | |||
53 | #endif | ||
54 | |||
55 | |||
56 | |||
57 | |||
36 | /* variable button definitions */ | 58 | /* variable button definitions */ |
37 | #if CONFIG_KEYPAD == RECORDER_PAD | 59 | #if CONFIG_KEYPAD == RECORDER_PAD |
38 | #define SNAKE2_QUIT BUTTON_OFF | 60 | #define SNAKE2_QUIT BUTTON_OFF |
@@ -78,6 +100,7 @@ static int ardirectionbuffer[2]; | |||
78 | static unsigned int score, hiscore = 0; | 100 | static unsigned int score, hiscore = 0; |
79 | static int applex; | 101 | static int applex; |
80 | static int appley; | 102 | static int appley; |
103 | static int strwdt,strhgt; /*used for string width, height for orientation purposes*/ | ||
81 | static int dir; | 104 | static int dir; |
82 | static int frames; | 105 | static int frames; |
83 | static int apple; | 106 | static int apple; |
@@ -90,6 +113,290 @@ static int game_type = 0; | |||
90 | static int num_apples_to_get=1; | 113 | static int num_apples_to_get=1; |
91 | static int num_apples_to_got=0; | 114 | static int num_apples_to_got=0; |
92 | static int game_b_level=1; | 115 | static int game_b_level=1; |
116 | static int applecount=0; | ||
117 | static char phscore[30]; | ||
118 | |||
119 | |||
120 | const unsigned char snakebmp[] = { | ||
121 | 0x00, 0x00, 0x00, 0xe0, 0x20, 0xa0, 0xa0, 0x00, 0xe0, 0xa0, 0xa0, 0xe0, 0x00, | ||
122 | 0xe0, 0x40, 0x80, 0x40, 0xe0, 0x00, 0xe0, 0xa0, 0xa0, 0xa0, 0x00, 0x00, 0xf0, | ||
123 | 0x08, 0x04, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, | ||
124 | 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x04, 0x08, 0xf0, 0x00, 0x00, 0x00, | ||
125 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x00, 0x80, | ||
126 | 0x00, 0x80, 0x80, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, | ||
127 | 0x80, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, | ||
128 | 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
129 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x08, 0x04, 0x02, 0x02, 0x02, 0x02, | ||
130 | 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, | ||
131 | 0x02, 0x04, 0x08, 0xf0, 0x00, 0x00, 0xe0, 0x40, 0x80, 0x40, 0xe0, 0x00, 0xe0, | ||
132 | 0xa0, 0xa0, 0xe0, 0x00, 0x20, 0xa0, 0xa0, 0x60, 0x00, 0xe0, 0xa0, 0xa0, 0xa0, | ||
133 | 0x00, 0x00, 0x00, 0x00, | ||
134 | 0x00, 0x00, 0x00, 0x03, 0x02, 0x02, 0x03, 0x00, 0x03, 0x00, 0x00, 0x03, 0x00, | ||
135 | 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0xc3, 0x22, 0x22, 0x22, 0xc0, 0x00, 0x07, | ||
136 | 0x08, 0x10, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, | ||
137 | 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x10, 0x08, 0x07, 0x00, 0x00, 0x00, | ||
138 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x77, 0x27, 0x4c, 0x4c, 0x79, 0x3b, | ||
139 | 0x00, 0x40, 0x7f, 0x47, 0x0e, 0x1c, 0x38, 0x7f, 0x00, 0x40, 0x70, 0x5c, 0x13, | ||
140 | 0x13, 0x5f, 0x7c, 0x70, 0x40, 0x40, 0x7f, 0x7f, 0x48, 0x0c, 0x3e, 0x79, 0x60, | ||
141 | 0x40, 0x40, 0x7f, 0x7f, 0x44, 0x4e, 0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
142 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x08, 0x10, 0x20, 0x20, 0x20, 0x20, | ||
143 | 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, | ||
144 | 0x20, 0x10, 0x08, 0x07, 0x00, 0xe0, 0x13, 0x10, 0x10, 0xe0, 0x03, 0x00, 0x03, | ||
145 | 0x00, 0x00, 0x03, 0x00, 0x03, 0x02, 0x02, 0x02, 0x00, 0x03, 0x02, 0x02, 0x02, | ||
146 | 0x00, 0x00, 0x00, 0x00, | ||
147 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, | ||
148 | 0x80, 0x98, 0xa4, 0xa4, 0x98, 0x80, 0x81, 0x02, 0x82, 0x82, 0x01, 0x00, 0x00, | ||
149 | 0x00, 0x17, 0x15, 0x15, 0x1d, 0x80, 0x5f, 0x45, 0x45, 0x42, 0x40, 0x5f, 0x55, | ||
150 | 0x55, 0x55, 0x40, 0x5f, 0x55, 0x55, 0x55, 0x40, 0x5f, 0x51, 0x51, 0x4e, 0x40, | ||
151 | 0x40, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
152 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0xf0, 0xf0, 0x10, | ||
153 | 0x00, 0x10, 0xf0, 0xf0, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
154 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x04, 0x04, 0x1f, 0x80, 0x51, | ||
155 | 0x5f, 0x51, 0x44, 0x44, 0x44, 0x40, 0x57, 0x55, 0x55, 0x5d, 0x40, 0x5f, 0x51, | ||
156 | 0x51, 0x51, 0x40, 0x5f, 0x51, 0x51, 0x5f, 0x40, 0x5f, 0x45, 0x4d, 0x92, 0x00, | ||
157 | 0x1f, 0x15, 0x15, 0x15, 0x00, 0x00, 0x01, 0x81, 0x81, 0x00, 0x98, 0xa4, 0xa4, | ||
158 | 0x98, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
159 | 0x00, 0x00, 0x00, 0x00, | ||
160 | 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x20, 0x30, 0xf8, 0x8c, 0x1a, 0x7f, 0xc0, | ||
161 | 0x90, 0x60, 0xc7, 0xce, 0x4c, 0x8f, 0x00, 0x47, 0x0e, 0x1e, 0x57, 0x90, 0xe0, | ||
162 | 0x00, 0x10, 0x28, 0xc6, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
163 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
164 | 0x00, 0x00, 0x00, 0x01, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
165 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x0f, 0x0f, 0x08, | ||
166 | 0x00, 0x08, 0x0f, 0x0f, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
167 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x00, 0x00, | ||
168 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
169 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, | ||
170 | 0xc6, 0x28, 0x10, 0x00, 0xe0, 0x90, 0x57, 0x1e, 0x0e, 0x47, 0x00, 0x8f, 0x4c, | ||
171 | 0xce, 0xc7, 0x60, 0x90, 0xc0, 0x7f, 0x1a, 0x8c, 0xf8, 0x30, 0x20, 0xc0, 0x00, | ||
172 | 0x00, 0x00, 0x00, 0x00, | ||
173 | 0x80, 0xf0, 0x9c, 0x16, 0x57, 0x4d, 0xe9, 0xa1, 0xf5, 0xfc, 0x36, 0x3b, 0x39, | ||
174 | 0x37, 0x33, 0x31, 0x30, 0x31, 0x32, 0x35, 0x35, 0x35, 0x35, 0x33, 0x30, 0x30, | ||
175 | 0x30, 0x30, 0x30, 0x30, 0x31, 0x32, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, | ||
176 | 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, | ||
177 | 0x34, 0x34, 0x32, 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, | ||
178 | 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, | ||
179 | 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, | ||
180 | 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x31, 0x32, 0x34, | ||
181 | 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, | ||
182 | 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, 0x32, 0x31, | ||
183 | 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x33, 0x35, 0x35, 0x35, 0x35, 0x32, 0x31, | ||
184 | 0x30, 0x31, 0x33, 0x37, 0x39, 0x3b, 0x36, 0xfc, 0xf5, 0xa1, 0xe9, 0x4d, 0x57, | ||
185 | 0x16, 0x9c, 0xf0, 0x80, | ||
186 | 0xff, 0x88, 0xad, 0x25, 0x77, 0x52, 0xda, 0x88, 0xff, 0xff, 0x00, 0x00, 0x00, | ||
187 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
188 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
189 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
190 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
191 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
192 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
193 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
194 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
195 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
196 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
197 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x88, 0xda, 0x52, 0x77, | ||
198 | 0x25, 0xad, 0x88, 0xff, | ||
199 | 0xff, 0x88, 0xad, 0x25, 0x77, 0x52, 0xda, 0x88, 0xff, 0xff, 0x00, 0x00, 0x00, | ||
200 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
201 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
202 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
203 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
204 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
205 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
206 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
207 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
208 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
209 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
210 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x88, 0xda, 0x52, 0x77, | ||
211 | 0x25, 0xad, 0x88, 0xff, | ||
212 | 0xff, 0x88, 0xad, 0x25, 0x77, 0x52, 0xda, 0x88, 0xff, 0xff, 0x00, 0x00, 0x00, | ||
213 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
214 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
215 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
216 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
217 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
218 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
219 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
220 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
221 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
222 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
223 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x88, 0xda, 0x52, 0x77, | ||
224 | 0x25, 0xad, 0x88, 0xff, | ||
225 | 0xff, 0x88, 0xad, 0x25, 0x77, 0x52, 0xda, 0x88, 0xff, 0xff, 0x00, 0x00, 0x00, | ||
226 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
227 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
228 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
229 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
230 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
231 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
232 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
233 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
234 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
235 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
236 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x88, 0xda, 0x52, 0x77, | ||
237 | 0x25, 0xad, 0x88, 0xff, | ||
238 | 0xff, 0x88, 0xad, 0x25, 0x77, 0x52, 0xda, 0x88, 0xff, 0xff, 0x00, 0x00, 0x00, | ||
239 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
240 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
241 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
242 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
243 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
244 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
245 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
246 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
247 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
248 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
249 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x88, 0xda, 0x52, 0x77, | ||
250 | 0x25, 0xad, 0x88, 0xff, | ||
251 | 0xff, 0x88, 0xad, 0x25, 0x77, 0x52, 0xda, 0x88, 0xff, 0xff, 0x00, 0x00, 0x00, | ||
252 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
253 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
254 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
255 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
256 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
257 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
258 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
259 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
260 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
261 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
262 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x88, 0xda, 0x52, 0x77, | ||
263 | 0x25, 0xad, 0x88, 0xff, | ||
264 | 0xff, 0x88, 0xad, 0x25, 0x77, 0x52, 0xda, 0x88, 0xff, 0xff, 0x00, 0x00, 0x00, | ||
265 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
266 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
267 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
268 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
269 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
270 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
271 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
272 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
273 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
274 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
275 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x88, 0xda, 0x52, 0x77, | ||
276 | 0x25, 0xad, 0x88, 0xff, | ||
277 | 0xff, 0x88, 0xad, 0x25, 0x77, 0x52, 0xda, 0x88, 0xff, 0xff, 0x00, 0x00, 0x00, | ||
278 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
279 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
280 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
281 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
282 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
283 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
284 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
285 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
286 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
287 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
288 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x88, 0xda, 0x52, 0x77, | ||
289 | 0x25, 0xad, 0x88, 0xff, | ||
290 | 0xff, 0x88, 0xad, 0x25, 0x77, 0x52, 0xda, 0x88, 0xff, 0xff, 0x00, 0x00, 0x00, | ||
291 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
292 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
293 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
294 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
295 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
296 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
297 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
298 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
299 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
300 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
301 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x88, 0xda, 0x52, 0x77, | ||
302 | 0x25, 0xad, 0x88, 0xff, | ||
303 | 0xff, 0x88, 0xad, 0x25, 0x77, 0x52, 0xda, 0x88, 0xff, 0xff, 0xc0, 0xc0, 0xc0, | ||
304 | 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, | ||
305 | 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, | ||
306 | 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, | ||
307 | 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, | ||
308 | 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, | ||
309 | 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, | ||
310 | 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, | ||
311 | 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, | ||
312 | 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, | ||
313 | 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, | ||
314 | 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xff, 0xff, 0x88, 0xda, 0x52, 0x77, | ||
315 | 0x25, 0xad, 0x88, 0xff, | ||
316 | 0x0f, 0x1c, 0x39, 0x6d, 0x77, 0xda, 0x8c, 0xb8, 0xe3, 0x8e, 0xb8, 0x8e, 0xe3, | ||
317 | 0xb8, 0x8e, 0xb8, 0xe3, 0x8e, 0xb8, 0x8e, 0xe3, 0xb8, 0x8e, 0xb8, 0xe3, 0x8e, | ||
318 | 0xb8, 0x8e, 0xe3, 0xb8, 0x8e, 0xb8, 0xe3, 0x8e, 0xb8, 0x8e, 0xe3, 0xb8, 0x8e, | ||
319 | 0xb8, 0xe3, 0x8e, 0xb8, 0x8e, 0xe3, 0xb8, 0x8e, 0xb8, 0xe3, 0x8e, 0xb8, 0x8e, | ||
320 | 0xe3, 0xb8, 0x8e, 0xb8, 0xe3, 0x8e, 0xb8, 0x8e, 0xe3, 0xb8, 0x8e, 0xb8, 0xe3, | ||
321 | 0x8e, 0xb8, 0x8e, 0xe3, 0xb8, 0x8e, 0xb8, 0xe3, 0x8e, 0xb8, 0x8e, 0xe3, 0xb8, | ||
322 | 0x8e, 0xb8, 0xb8, 0x8e, 0xb8, 0xe3, 0x8e, 0xb8, 0x8e, 0xe3, 0xb8, 0x8e, 0xb8, | ||
323 | 0xe3, 0x8e, 0xb8, 0x8e, 0xe3, 0xb8, 0x8e, 0xb8, 0xe3, 0x8e, 0xb8, 0x8e, 0xe3, | ||
324 | 0xb8, 0x8e, 0xb8, 0xe3, 0x8e, 0xb8, 0x8e, 0xe3, 0xb8, 0x8e, 0xb8, 0xe3, 0x8e, | ||
325 | 0xb8, 0x8e, 0xe3, 0xb8, 0x8e, 0xb8, 0xe3, 0x8e, 0xb8, 0x8e, 0xe3, 0xb8, 0x8e, | ||
326 | 0xb8, 0xe3, 0x8e, 0xb8, 0x8e, 0xe3, 0xb8, 0x8e, 0xb8, 0xe3, 0x8e, 0xb8, 0x8e, | ||
327 | 0xe3, 0xb8, 0x8e, 0xb8, 0xe3, 0x8e, 0xb8, 0x8e, 0xe3, 0xb8, 0x8c, 0x5a, 0x77, | ||
328 | 0x6d, 0x39, 0x1c, 0x0f, | ||
329 | |||
330 | }; | ||
331 | |||
332 | const unsigned char snakeupbmp[] = { | ||
333 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
334 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
335 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
336 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
337 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x00, | ||
338 | 0x80, 0x00, 0x80, 0x80, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, | ||
339 | 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x80, | ||
340 | 0x80, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
341 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
342 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
343 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
344 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
345 | 0x00, 0x00, 0x00, 0x00, | ||
346 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
347 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
348 | 0xc0, 0x40, 0x40, 0xc0, 0x00, 0xc0, 0x40, 0x40, 0x80, 0x00, 0xc0, 0x40, 0x40, | ||
349 | 0x80, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x40, 0x40, 0x40, 0x00, 0xc0, | ||
350 | 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x77, 0x27, 0x4c, 0x4c, 0x79, | ||
351 | 0x3b, 0x00, 0x40, 0x7f, 0x47, 0x0e, 0x1c, 0x38, 0x7f, 0x00, 0x40, 0x70, 0x5c, | ||
352 | 0x13, 0x13, 0x5f, 0x7c, 0x70, 0x40, 0x40, 0x7f, 0x7f, 0x48, 0x0c, 0x3e, 0x79, | ||
353 | 0x60, 0x40, 0x40, 0x7f, 0x7f, 0x44, 0x4e, 0x71, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
354 | 0x00, 0x00, 0xc0, 0x40, 0x40, 0x40, 0x00, 0xc0, 0x40, 0x40, 0x40, 0x00, 0xc0, | ||
355 | 0x40, 0x40, 0xc0, 0x00, 0xc0, 0x40, 0x40, 0x80, 0x00, 0xc0, 0x40, 0x40, 0x40, | ||
356 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
357 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
358 | 0x00, 0x00, 0x00, 0x00, | ||
359 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, | ||
360 | 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x00, 0x00, 0x00, | ||
361 | 0x07, 0x01, 0x01, 0x07, 0x00, 0x87, 0x41, 0x41, 0x40, 0x40, 0x47, 0x41, 0x41, | ||
362 | 0x40, 0x40, 0x47, 0x44, 0x44, 0x44, 0x40, 0x47, 0x45, 0x45, 0x45, 0x40, 0x45, | ||
363 | 0x45, 0x45, 0x87, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
364 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0xf0, 0xf0, | ||
365 | 0x10, 0x00, 0x10, 0xf0, 0xf0, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
366 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, | ||
367 | 0x40, 0x40, 0x45, 0x45, 0x45, 0x47, 0x40, 0x47, 0x44, 0x44, 0x44, 0x40, 0x47, | ||
368 | 0x44, 0x44, 0x47, 0x40, 0x47, 0x41, 0x43, 0x44, 0x40, 0x47, 0x45, 0x85, 0x05, | ||
369 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x00, 0x80, 0x80, 0x80, | ||
370 | 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
371 | 0x00, 0x00, 0x00, 0x00, | ||
372 | 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x20, 0x30, 0xf8, 0x8c, 0x1a, 0x7f, 0xc0, | ||
373 | 0x90, 0x60, 0xc7, 0xce, 0x4c, 0x8f, 0x00, 0x47, 0x0e, 0x1e, 0x57, 0x90, 0xe0, | ||
374 | 0x00, 0x10, 0x28, 0xc6, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
375 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
376 | 0x00, 0x00, 0x00, 0x01, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
377 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x0f, 0x0f, | ||
378 | 0x08, 0x00, 0x08, 0x0f, 0x0f, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
379 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x00, 0x00, | ||
380 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
381 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, | ||
382 | 0xc6, 0x28, 0x10, 0x00, 0xe0, 0x90, 0x57, 0x1e, 0x0e, 0x47, 0x00, 0x8f, 0x4c, | ||
383 | 0xce, 0xc7, 0x60, 0x90, 0xc0, 0x7f, 0x1a, 0x8c, 0xf8, 0x30, 0x20, 0xc0, 0x00, | ||
384 | 0x00, 0x00, 0x00, 0x00, | ||
385 | 0x00, 0x00, 0x0c, 0x06, 0x07, 0x0d, 0x09, 0x01, 0x05, 0x0c, 0x06, 0x0b, 0x09, | ||
386 | 0x07, 0x03, 0x01, 0x00, 0x01, 0x02, 0x05, 0x05, 0x05, 0x05, 0x03, 0x00, 0x00, | ||
387 | 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, | ||
388 | 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, | ||
389 | 0x04, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
390 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
391 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
392 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, | ||
393 | 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, | ||
394 | 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x02, 0x01, | ||
395 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x05, 0x05, 0x05, 0x05, 0x02, 0x01, | ||
396 | 0x00, 0x01, 0x03, 0x07, 0x09, 0x0b, 0x06, 0x0c, 0x05, 0x01, 0x09, 0x0d, 0x07, | ||
397 | 0x06, 0x0c, 0x00, 0x00, | ||
398 | |||
399 | }; | ||
93 | 400 | ||
94 | #define NORTH 1 | 401 | #define NORTH 1 |
95 | #define EAST 2 | 402 | #define EAST 2 |
@@ -107,7 +414,8 @@ static int game_b_level=1; | |||
107 | #define SOUTH_EAST 2048 | 414 | #define SOUTH_EAST 2048 |
108 | #define SOUTH_WEST 4096 | 415 | #define SOUTH_WEST 4096 |
109 | 416 | ||
110 | #define LEVELS_FILE "/.rockbox/snake2.levels" | 417 | #define LEVELS_FILE PLUGIN_DIR "/snake2.levels" |
418 | #define HISCORE_FILE PLUGIN_DIR "/snake2.hs" | ||
111 | 419 | ||
112 | int load_all_levels(void) | 420 | int load_all_levels(void) |
113 | { | 421 | { |
@@ -155,9 +463,34 @@ int load_all_levels(void) | |||
155 | return 0; | 463 | return 0; |
156 | } | 464 | } |
157 | 465 | ||
466 | /*Hi-Score reading and writing to file "/.rockbox/snake2.levels" function */ | ||
467 | void iohiscore(void) | ||
468 | { | ||
469 | int fd; | ||
470 | unsigned int compare,init=0; | ||
471 | |||
472 | rb->snprintf(phscore,sizeof(phscore),"%d",init); | ||
473 | |||
474 | fd = rb->open(HISCORE_FILE,O_RDWR | O_CREAT); | ||
475 | rb->read(fd,phscore,4); | ||
476 | |||
477 | compare = rb->atoi(phscore); | ||
478 | |||
479 | if(hiscore > compare){ | ||
480 | rb->snprintf(phscore,sizeof(phscore),"%d",hiscore); | ||
481 | rb->lseek(fd,0,SEEK_SET); | ||
482 | rb->write(fd,phscore,rb->strlen(phscore)); | ||
483 | } | ||
484 | else | ||
485 | hiscore = compare; | ||
486 | |||
487 | rb->close(fd); | ||
488 | |||
489 | } | ||
490 | |||
158 | /* | 491 | /* |
159 | ** Completely clear the board of walls and/or snake | 492 | ** Completely clear the board of walls and/or snake */ |
160 | */ | 493 | |
161 | void clear_board( void) | 494 | void clear_board( void) |
162 | { | 495 | { |
163 | int x,y; | 496 | int x,y; |
@@ -282,6 +615,23 @@ void init_snake(void) | |||
282 | void draw_apple( void ) | 615 | void draw_apple( void ) |
283 | { | 616 | { |
284 | int x,y; | 617 | int x,y; |
618 | |||
619 | #ifdef IRIVER_H100 | ||
620 | char pscore[5], counter[4]; | ||
621 | |||
622 | rb->lcd_bitmap(snakebmp,0,0,BMPWIDTH_snakebmp,BMPHEIGHT_snakebmp,false); | ||
623 | rb->lcd_clearrect(0,0,BMPWIDTH_snakeupbmp,BMPHEIGHT_snakeupbmp); | ||
624 | rb->lcd_bitmap(snakeupbmp,0,0,BMPWIDTH_snakeupbmp,BMPHEIGHT_snakeupbmp,false); | ||
625 | |||
626 | rb->snprintf(counter,sizeof(counter),"%d",applecount); | ||
627 | rb->lcd_getstringsize(counter,&strwdt,&strhgt); | ||
628 | rb->lcd_putsxy(42-strwdt/2,25,counter); | ||
629 | |||
630 | rb->snprintf(pscore,sizeof(pscore),"%d",score); | ||
631 | rb->lcd_getstringsize(pscore,&strwdt,&strhgt); | ||
632 | rb->lcd_putsxy(116-strwdt/2,25,pscore); | ||
633 | #endif | ||
634 | |||
285 | if (!apple) | 635 | if (!apple) |
286 | { | 636 | { |
287 | do | 637 | do |
@@ -293,8 +643,8 @@ void draw_apple( void ) | |||
293 | board[x][y]=-1; | 643 | board[x][y]=-1; |
294 | applex = x;appley = y; | 644 | applex = x;appley = y; |
295 | } | 645 | } |
296 | rb->lcd_fillrect((applex*4)+1,appley*4,2,4); | 646 | rb->lcd_fillrect((CENTER_X+applex*MULTIPLIER)+1,CENTER_Y+appley*MULTIPLIER,MODIFIER_2,MODIFIER_1); |
297 | rb->lcd_fillrect(applex*4,(appley*4)+1,4,2); | 647 | rb->lcd_fillrect(CENTER_X+applex*MULTIPLIER,(CENTER_Y+appley*MULTIPLIER)+1,MODIFIER_1,MODIFIER_2); |
298 | } | 648 | } |
299 | 649 | ||
300 | /* | 650 | /* |
@@ -305,7 +655,7 @@ void draw_apple( void ) | |||
305 | */ | 655 | */ |
306 | void draw_vertical_bit(int x, int y) | 656 | void draw_vertical_bit(int x, int y) |
307 | { | 657 | { |
308 | rb->lcd_fillrect(x*4+1,y*4,2,4); | 658 | rb->lcd_fillrect(CENTER_X+x*MULTIPLIER+1,CENTER_Y+y*MULTIPLIER,MODIFIER_2,MODIFIER_1); |
309 | } | 659 | } |
310 | 660 | ||
311 | /* | 661 | /* |
@@ -316,7 +666,7 @@ void draw_vertical_bit(int x, int y) | |||
316 | */ | 666 | */ |
317 | void draw_horizontal_bit(int x, int y) | 667 | void draw_horizontal_bit(int x, int y) |
318 | { | 668 | { |
319 | rb->lcd_fillrect(x*4,y*4+1,4,2); | 669 | rb->lcd_fillrect(CENTER_X+x*MULTIPLIER,CENTER_Y+y*MULTIPLIER+1,MODIFIER_1,MODIFIER_2); |
320 | } | 670 | } |
321 | 671 | ||
322 | /* | 672 | /* |
@@ -327,8 +677,8 @@ void draw_horizontal_bit(int x, int y) | |||
327 | */ | 677 | */ |
328 | void draw_n_to_e_bit(int x, int y) | 678 | void draw_n_to_e_bit(int x, int y) |
329 | { | 679 | { |
330 | rb->lcd_fillrect(x*4+1,y*4+2,2,2); | 680 | rb->lcd_fillrect(CENTER_X+x*MULTIPLIER+1,CENTER_Y+y*MULTIPLIER+2,MODIFIER_2,MODIFIER_2); |
331 | rb->lcd_fillrect(x*4+2,y*4+1,2,2); | 681 | rb->lcd_fillrect(CENTER_X+x*MULTIPLIER+2,CENTER_Y+y*MULTIPLIER+1,MODIFIER_2,MODIFIER_2); |
332 | } | 682 | } |
333 | 683 | ||
334 | /* | 684 | /* |
@@ -350,8 +700,8 @@ void draw_w_to_s_bit(int x, int y) | |||
350 | */ | 700 | */ |
351 | void draw_n_to_w_bit(int x, int y) | 701 | void draw_n_to_w_bit(int x, int y) |
352 | { | 702 | { |
353 | rb->lcd_fillrect(x*4,y*4+1,2,2); | 703 | rb->lcd_fillrect(CENTER_X+x*MULTIPLIER,CENTER_Y+y*MULTIPLIER+1,MODIFIER_2,MODIFIER_2); |
354 | rb->lcd_fillrect(x*4+1,y*4+2,2,2); | 704 | rb->lcd_fillrect(CENTER_X+x*MULTIPLIER+1,CENTER_Y+y*MULTIPLIER+2,MODIFIER_2,MODIFIER_2); |
355 | } | 705 | } |
356 | 706 | ||
357 | /* | 707 | /* |
@@ -373,8 +723,8 @@ void draw_e_to_s_bit(int x, int y) | |||
373 | */ | 723 | */ |
374 | void draw_s_to_e_bit(int x, int y) | 724 | void draw_s_to_e_bit(int x, int y) |
375 | { | 725 | { |
376 | rb->lcd_fillrect(x*4+1,y*4,2,2); | 726 | rb->lcd_fillrect(CENTER_X+x*MULTIPLIER+1,CENTER_Y+y*MULTIPLIER,MODIFIER_2,MODIFIER_2); |
377 | rb->lcd_fillrect(x*4+2,y*4+1,2,2); | 727 | rb->lcd_fillrect(CENTER_X+x*MULTIPLIER+2,CENTER_Y+y*MULTIPLIER+1,MODIFIER_2,MODIFIER_2); |
378 | } | 728 | } |
379 | 729 | ||
380 | /* | 730 | /* |
@@ -396,8 +746,8 @@ void draw_w_to_n_bit(int x, int y) | |||
396 | */ | 746 | */ |
397 | void draw_e_to_n_bit(int x, int y) | 747 | void draw_e_to_n_bit(int x, int y) |
398 | { | 748 | { |
399 | rb->lcd_fillrect(x*4+1,y*4,2,2); | 749 | rb->lcd_fillrect(CENTER_X+x*MULTIPLIER+1,CENTER_Y+y*MULTIPLIER,MODIFIER_2,MODIFIER_2); |
400 | rb->lcd_fillrect(x*4,y*4+1,2,2); | 750 | rb->lcd_fillrect(CENTER_X+x*MULTIPLIER,CENTER_Y+y*MULTIPLIER+1,MODIFIER_2,MODIFIER_2); |
401 | } | 751 | } |
402 | 752 | ||
403 | /* | 753 | /* |
@@ -456,8 +806,8 @@ void redraw (void) | |||
456 | switch (board[x][y]) | 806 | switch (board[x][y]) |
457 | { | 807 | { |
458 | case -1: | 808 | case -1: |
459 | rb->lcd_fillrect((x*4)+1,y*4,2,4); | 809 | rb->lcd_fillrect((CENTER_X+x*MULTIPLIER)+1,CENTER_Y+y*MULTIPLIER,MODIFIER_2,MODIFIER_1); |
460 | rb->lcd_fillrect(x*4,(y*4)+1,4,2); | 810 | rb->lcd_fillrect(CENTER_X+x*MULTIPLIER,(CENTER_Y+y*MULTIPLIER)+1,MODIFIER_1,MODIFIER_2); |
461 | break; | 811 | break; |
462 | case 0: | 812 | case 0: |
463 | break; | 813 | break; |
@@ -473,12 +823,13 @@ void redraw (void) | |||
473 | break; | 823 | break; |
474 | 824 | ||
475 | default: | 825 | default: |
476 | rb->lcd_fillrect(x*4,y*4,4,4); | 826 | rb->lcd_fillrect(CENTER_X+x*MULTIPLIER,CENTER_Y+y*MULTIPLIER,MODIFIER_1,MODIFIER_1); |
477 | break; | 827 | break; |
478 | } | 828 | } |
479 | } | 829 | } |
480 | } | 830 | } |
481 | rb->lcd_update(); | 831 | rb->lcd_update(); |
832 | |||
482 | } | 833 | } |
483 | 834 | ||
484 | /* | 835 | /* |
@@ -487,7 +838,8 @@ void redraw (void) | |||
487 | */ | 838 | */ |
488 | void draw_snake_bit(int currentbit, int previousbit, int x, int y) | 839 | void draw_snake_bit(int currentbit, int previousbit, int x, int y) |
489 | { | 840 | { |
490 | rb->lcd_clearrect(x*4,y*4,4,4); | 841 | rb->lcd_clearrect(CENTER_X+x*MULTIPLIER,CENTER_Y+y*MULTIPLIER,MODIFIER_1,MODIFIER_1); |
842 | |||
491 | switch(currentbit) | 843 | switch(currentbit) |
492 | { | 844 | { |
493 | case(NORTH): | 845 | case(NORTH): |
@@ -571,8 +923,7 @@ void die (void) | |||
571 | { | 923 | { |
572 | int n=100; | 924 | int n=100; |
573 | int count; | 925 | int count; |
574 | char pscore[15],hscore[17]; | 926 | char pscore[18]; |
575 | |||
576 | /*Flashy death sequence (flashy as in 'flashes')*/ | 927 | /*Flashy death sequence (flashy as in 'flashes')*/ |
577 | for(count=0;count<24;count++) | 928 | for(count=0;count<24;count++) |
578 | { | 929 | { |
@@ -589,20 +940,28 @@ void die (void) | |||
589 | rb->lcd_clear_display(); | 940 | rb->lcd_clear_display(); |
590 | draw_apple(); | 941 | draw_apple(); |
591 | rb->lcd_update(); | 942 | rb->lcd_update(); |
943 | rb->lcd_clear_display(); | ||
944 | |||
945 | applecount=0; | ||
946 | |||
947 | rb->lcd_getstringsize("Dead",&strwdt,&strhgt); | ||
948 | rb->lcd_putsxy((LCD_WIDTH - strwdt)/2,strhgt,"Dead"); | ||
949 | |||
950 | rb->snprintf(pscore,sizeof(pscore),"Your Score %d",score); | ||
951 | rb->lcd_getstringsize(pscore,&strwdt,&strhgt); | ||
952 | rb->lcd_putsxy((LCD_WIDTH - strwdt)/2,strhgt * 2 + 2,pscore); | ||
592 | 953 | ||
593 | rb->snprintf(pscore,sizeof(pscore),"%d",score); | ||
594 | rb->lcd_putsxy(LCD_WIDTH/2 - 15,12,"Dead"); | ||
595 | rb->lcd_putsxy(LCD_WIDTH/2 - 35,22,"Your score :"); | ||
596 | rb->lcd_putsxy(LCD_WIDTH/2 - 35,32, pscore); | ||
597 | if (score>hiscore) | 954 | if (score>hiscore) |
598 | { | 955 | { |
599 | hiscore=score; | 956 | hiscore=score; |
600 | rb->lcd_putsxy(3,42,"New High Score!"); | 957 | rb->lcd_getstringsize("New High Score!",&strwdt,&strhgt); |
958 | rb->lcd_putsxy((LCD_WIDTH - strwdt)/2,strhgt * 4 + 2,"New High Score!"); | ||
601 | } | 959 | } |
602 | else | 960 | else |
603 | { | 961 | { |
604 | rb->snprintf(hscore,sizeof(hscore),"High Score: %d",hiscore); | 962 | rb->snprintf(phscore,sizeof(phscore),"High Score: %d",hiscore); |
605 | rb->lcd_putsxy(5,42,hscore); | 963 | rb->lcd_getstringsize(phscore,&strwdt,&strhgt); |
964 | rb->lcd_putsxy((LCD_WIDTH - strwdt)/2,strhgt * 6,phscore); | ||
606 | } | 965 | } |
607 | rb->lcd_update(); | 966 | rb->lcd_update(); |
608 | rb->sleep(3*HZ); | 967 | rb->sleep(3*HZ); |
@@ -618,15 +977,17 @@ void collision ( int x, int y ) | |||
618 | { | 977 | { |
619 | int bdeath=0; | 978 | int bdeath=0; |
620 | 979 | ||
980 | |||
621 | switch (board[x][y]) | 981 | switch (board[x][y]) |
622 | { | 982 | { |
623 | case 0: | 983 | case 0: |
624 | 984 | ||
625 | break; | 985 | break; |
626 | case -1: | 986 | case -1: |
627 | score+=2; | 987 | score = score + (1 * level); |
628 | apple=0; | 988 | apple=0; |
629 | applecountdown=2; | 989 | applecountdown=2; |
990 | applecount++; | ||
630 | 991 | ||
631 | if(game_type==1) | 992 | if(game_type==1) |
632 | { | 993 | { |
@@ -699,12 +1060,12 @@ void move( void ) | |||
699 | else if(heady < 0) | 1060 | else if(heady < 0) |
700 | heady = HEIGHT-1; | 1061 | heady = HEIGHT-1; |
701 | 1062 | ||
702 | rb->lcd_fillrect(headx*4,heady*4,4,4); | 1063 | rb->lcd_fillrect(CENTER_X+headx*MULTIPLIER,CENTER_Y+heady*MULTIPLIER,MODIFIER_1,MODIFIER_1); |
703 | 1064 | ||
704 | /*clear tail*/ | 1065 | /*clear tail*/ |
705 | if(applecountdown <= 0) | 1066 | if(applecountdown <= 0) |
706 | { | 1067 | { |
707 | rb->lcd_clearrect(tailx*4,taily*4,4,4); | 1068 | rb->lcd_clearrect(CENTER_X+tailx*MULTIPLIER,CENTER_Y+taily*MULTIPLIER,MODIFIER_1,MODIFIER_1); |
708 | 1069 | ||
709 | taildir = board[tailx][taily]; | 1070 | taildir = board[tailx][taily]; |
710 | board[tailx][taily] = 0; | 1071 | board[tailx][taily] = 0; |
@@ -805,7 +1166,8 @@ void game_pause (void) | |||
805 | int button; | 1166 | int button; |
806 | 1167 | ||
807 | rb->lcd_clear_display(); | 1168 | rb->lcd_clear_display(); |
808 | rb->lcd_putsxy(33,12,"Paused"); | 1169 | rb->lcd_getstringsize("Paused",&strwdt,&strhgt); |
1170 | rb->lcd_putsxy((LCD_WIDTH - strwdt)/2,LCD_HEIGHT/2,"Paused"); | ||
809 | 1171 | ||
810 | rb->lcd_update(); | 1172 | rb->lcd_update(); |
811 | while (1) | 1173 | while (1) |
@@ -905,13 +1267,13 @@ void game (void) | |||
905 | break; | 1267 | break; |
906 | } | 1268 | } |
907 | } | 1269 | } |
1270 | |||
908 | } | 1271 | } |
909 | 1272 | ||
910 | void game_init(void) | 1273 | void game_init(void) |
911 | { | 1274 | { |
912 | int button; | 1275 | int button; |
913 | char plevel[30]; | 1276 | char plevel[30]; |
914 | char phscore[30]; | ||
915 | 1277 | ||
916 | dead=0; | 1278 | dead=0; |
917 | apple=0; | 1279 | apple=0; |
@@ -924,27 +1286,55 @@ void game_init(void) | |||
924 | { | 1286 | { |
925 | rb->lcd_clear_display(); | 1287 | rb->lcd_clear_display(); |
926 | redraw(); | 1288 | redraw(); |
927 | /*TODO: CENTER ALL TEXT!!!!*/ | 1289 | |
928 | rb->snprintf(plevel,sizeof(plevel),"Speed - %d",level); | 1290 | #ifdef IRIVER_H100 |
929 | rb->lcd_putsxy(LCD_WIDTH/2 - 30,5, plevel); | 1291 | |
930 | #if CONFIG_KEYPAD == RECORDER_PAD | 1292 | rb->lcd_bitmap(snakebmp,0,0,BMPWIDTH_snakebmp,BMPWIDTH_snakebmp,false); |
931 | rb->snprintf(plevel,sizeof(plevel),"F1 - Maze %d",level_from_file); | 1293 | |
932 | rb->lcd_putsxy(18, 20, plevel); | 1294 | rb->snprintf(plevel,sizeof(plevel),"%d",level); |
933 | if(game_type==0) | 1295 | rb->lcd_getstringsize(plevel,&strwdt,&strhgt); |
934 | rb->lcd_putsxy(18, 30, "F3 - Game A"); | 1296 | rb->lcd_putsxy(42-strwdt/2,25, plevel); |
935 | else | 1297 | |
936 | rb->lcd_putsxy(18, 30, "F3 - Game B"); | 1298 | rb->snprintf(plevel,sizeof(plevel),"%d",level_from_file); |
937 | #elif CONFIG_KEYPAD == ONDIO_PAD | 1299 | rb->lcd_getstringsize(plevel,&strwdt,&strhgt); |
938 | rb->snprintf(plevel,sizeof(plevel),"Left - Maze %d",level_from_file); | 1300 | rb->lcd_putsxy(121-strwdt/2,4, plevel); |
939 | rb->lcd_putsxy(18, 20, plevel); | 1301 | |
940 | if(game_type==0) | 1302 | if(game_type==0){ |
941 | rb->lcd_putsxy(12, 30, "Right - Game A"); | 1303 | rb->lcd_getstringsize("A",&strwdt,&strhgt); |
942 | else | 1304 | rb->lcd_putsxy(34,4,"A"); |
943 | rb->lcd_putsxy(12, 30, "Right - Game B"); | 1305 | } |
944 | #endif | 1306 | else{ |
1307 | rb->lcd_getstringsize("B",&strwdt,&strhgt); | ||
1308 | rb->lcd_putsxy(34,4,"B"); | ||
1309 | } | ||
1310 | |||
1311 | rb->snprintf(phscore,sizeof(phscore),"%d",hiscore); | ||
1312 | rb->lcd_getstringsize(phscore,&strwdt,&strhgt); | ||
1313 | rb->lcd_putsxy(114-strwdt/2,25, phscore); | ||
1314 | |||
1315 | #else | ||
1316 | rb->snprintf(plevel,sizeof(plevel),"Speed: %d",level); | ||
1317 | rb->lcd_getstringsize("Speed: 00",&strwdt,&strhgt); | ||
1318 | rb->lcd_putsxy((LCD_WIDTH - strwdt)/2,strhgt+4, plevel); | ||
1319 | |||
1320 | rb->snprintf(plevel,sizeof(plevel),"Maze: %d",level_from_file); | ||
1321 | rb->lcd_getstringsize(plevel,&strwdt,&strhgt); | ||
1322 | rb->lcd_putsxy((LCD_WIDTH - strwdt)/2,strhgt*2+4, plevel); | ||
1323 | |||
1324 | if(game_type==0){ | ||
1325 | rb->lcd_getstringsize("Game Type: A ",&strwdt,&strhgt); | ||
1326 | rb->lcd_putsxy((LCD_WIDTH - strwdt)/2,strhgt*3+4,"Game Type: A"); | ||
1327 | } | ||
1328 | else{ | ||
1329 | rb->lcd_getstringsize("Game Type: B ",&strwdt,&strhgt); | ||
1330 | rb->lcd_putsxy((LCD_WIDTH - strwdt)/2,strhgt*3+4,"Game Type: B"); | ||
1331 | } | ||
945 | 1332 | ||
946 | rb->snprintf(phscore,sizeof(phscore),"Hi Score: %d",hiscore); | 1333 | rb->snprintf(phscore,sizeof(phscore),"Hi Score: %d",hiscore); |
947 | rb->lcd_putsxy(LCD_WIDTH/2 - 37,50, phscore); | 1334 | rb->lcd_getstringsize(phscore,&strwdt,&strhgt); |
1335 | rb->lcd_putsxy((LCD_WIDTH - strwdt)/2,strhgt*4+4, phscore); | ||
1336 | #endif | ||
1337 | |||
948 | rb->lcd_update(); | 1338 | rb->lcd_update(); |
949 | 1339 | ||
950 | button=rb->button_get(true); | 1340 | button=rb->button_get(true); |
@@ -994,6 +1384,7 @@ void game_init(void) | |||
994 | break; | 1384 | break; |
995 | } | 1385 | } |
996 | } | 1386 | } |
1387 | |||
997 | } | 1388 | } |
998 | 1389 | ||
999 | enum plugin_status plugin_start(struct plugin_api* api, void* parameter) | 1390 | enum plugin_status plugin_start(struct plugin_api* api, void* parameter) |
@@ -1011,6 +1402,8 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) | |||
1011 | return PLUGIN_OK; | 1402 | return PLUGIN_OK; |
1012 | } | 1403 | } |
1013 | 1404 | ||
1405 | iohiscore(); | ||
1406 | |||
1014 | while(quit==0) | 1407 | while(quit==0) |
1015 | { | 1408 | { |
1016 | game_init(); | 1409 | game_init(); |
@@ -1026,6 +1419,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) | |||
1026 | } | 1419 | } |
1027 | } | 1420 | } |
1028 | 1421 | ||
1422 | iohiscore(); | ||
1029 | return (quit==1) ? PLUGIN_OK : PLUGIN_USB_CONNECTED; | 1423 | return (quit==1) ? PLUGIN_OK : PLUGIN_USB_CONNECTED; |
1030 | } | 1424 | } |
1031 | 1425 | ||