1 /**
2 * @file tiles_background.cc
3 * @brief Draw tiles background in bricks levels
4 * @date 2014-08-16
5 * @copyright 1991-2014 TLK Games
6 * @author Bruno Ethvignot
7 * @version $Revision: 22 $
8 */
9 /*
10 * copyright (c) 1991-2014 TLK Games all rights reserved
11 * $Id: tiles_background.cc 22 2014-08-16 11:28:58Z bruno.ethvignot@gmail.com $
12 *
13 * TecnoballZ is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; either version 3 of the License, or
16 * (at your option) any later version.
17 *
18 * TecnoballZ is distributed in the hope that it will be useful, but
19 * WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
22 *
23 * You should have received a copy of the GNU General Public License
24 * along with this program; if not, write to the Free Software
25 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
26 * MA 02110-1301, USA.
27 */
28 #include "../include/bitmap_data.h"
29 #include "../include/handler_display.h"
30 #include "../include/tiles_background.h"
31 #include "../include/handler_keyboard.h"
32 #include "../include/handler_resources.h"
33
34 tiles_background *
35 tiles_background::tiles_background_singleton = NULL;
36
37 /**
38 * Create the tiles background object
39 */
tiles_background()40 tiles_background::tiles_background ()
41 {
42 object_init ();
43 type_of_tiles = TILES_64x64_WITH_16_COLORS;
44 palette_index = 0;
45 if (resolution == 1 || force_4_colors_tiles)
46 {
47 type_of_tiles = TILES_32x32_WITH_4_COLORS;
48 }
49 current_tiles = NULL;
50 map_tiles = NULL;
51 map_height = 0;
52 map_width = 0;
53 map_xcoord = 0;
54 map_ycoord = 0;
55 map_xmax = 0;
56 map_ymax = 0;
57 tiles_width = 0;
58 tiles_height = 0;
59 map_scroll_num = 1;
60 map_angle_direction = 0;
61 map_velocity = 0.0;
62 map_angle_speed = 0.0;
63 map_scroll_delay = 0;
64 }
65
66 /**
67 * Release the titles background object
68 */
~tiles_background()69 tiles_background::~tiles_background ()
70 {
71 if (NULL != current_tiles)
72 {
73 delete current_tiles;
74 current_tiles = NULL;
75 }
76 if (NULL != map_tiles)
77 {
78 delete[]map_tiles;
79 map_tiles = NULL;
80 }
81 object_free ();
82 tiles_background_singleton = NULL;
83 }
84
85 /**
86 * Get the object instance
87 * tiles_background is a singleton
88 * @return the tiles_background object
89 */
90 tiles_background *
get_instance()91 tiles_background::get_instance ()
92 {
93 if (NULL == tiles_background_singleton)
94 {
95 tiles_background_singleton = new tiles_background ();
96 }
97 return tiles_background_singleton;
98 }
99
100 /**
101 * Load and draw a tiles background
102 * @param tiles_num
103 */
104 void
setup(Uint32 tiles_num)105 tiles_background::setup (Uint32 tiles_num)
106 {
107 if (is_verbose)
108 {
109 std::cout << "tiles_background::setup() tiles_num:" << tiles_num <<
110 std::endl;
111 }
112 if (type_of_tiles > TILES_64x64_WITH_16_COLORS)
113 {
114 type_of_tiles = TILES_64x64_WITH_16_COLORS;
115 }
116
117 switch (type_of_tiles)
118 {
119 case TILES_32x32_WITH_4_COLORS:
120 {
121 bitmap_data *bmp = new bitmap_data ();
122 if (is_verbose)
123 {
124 std::cout << "tiles_background::setup() "
125 "load 32x32 tiles with 4 colors" << std::endl;
126 }
127 bmp->load (handler_resources::RES60BACKG);
128 tiles_width = TILES_32_WIDTH;
129 tiles_height = TILES_32_HEIGHT;
130
131 /* select one of the 60 backgrounds */
132 /* value from 0 to 63 */
133 Uint32 x;
134 Uint32 y = random_counter & 0x3F;
135 if (y >= 60)
136 {
137 y -= 60;
138 }
139 if (y & 0x1)
140 {
141 /* right side */
142 x = bmp->get_width () / 2;
143 }
144 else
145 {
146 x = 0;
147 }
148 y >>= 1;
149 y = y * tiles_height;
150 current_tiles = (bitmap_data *)
151 bmp->cut_to_bitmap (x, y, 5 * tiles_width, tiles_height);
152 delete bmp;
153 }
154 break;
155
156 case TILES_64x64_WITH_16_COLORS:
157 default:
158 {
159 if (tiles_num < 1)
160 {
161 tiles_num = (random_counter & 127) + 1;
162 }
163 if (tiles_num > 77)
164 {
165 tiles_num = tiles_num - 77;
166 }
167 char *pathname = resources->get_tilemaps_filename (tiles_num);
168 if (is_verbose)
169 {
170 std::cout << "tiles_background::setup() " <<
171 "try to initialize" << pathname << std::endl;
172 }
173 current_tiles = new bitmap_data ();
174 current_tiles->load (pathname);
175 tiles_width = TILES_64_WIDTH;
176 tiles_height = TILES_64_HEIGHT;
177 }
178 break;
179 }
180
181 map_width = (game_screen->get_width () - 64 * resolution) / tiles_width;
182 Sint32 h = (240 * resolution) % tiles_height - 1;
183 map_height = (240 * resolution) / tiles_height;
184 map_xmax = tiles_width * map_width;
185 if (h > 0)
186 {
187 map_height++;
188 }
189 map_ymax = tiles_height * map_height;
190 map_row_size = tiles_height * map_width;
191
192 set_palette ();
193 /* generating random map */
194 generate_map ();
195
196 /* draw the tiles in background offscreen */
197 map_xcoord = random_counter % map_xmax;
198 map_ycoord = random_counter * frame_counter % map_ymax;
199 draw (background_screen);
200 draw_shadows ();
201 }
202
203
204 /**
205 * Draw shadows on the top and the right of screen
206 */
207 void
draw_shadows()208 tiles_background::draw_shadows ()
209 {
210 offscreen_surface *screen;
211 if (has_background)
212 {
213 screen = background_screen;
214 }
215 else
216 {
217 screen = game_screen;
218 }
219 Uint32 size = screen->get_row_size ();
220 unsigned char mask = handler_display::SHADOW_PIX;
221
222 /* draw top shadow */
223 char *dest = screen->get_pixel_data ();
224 Uint32 hscreen = display->get_width () - (64 * resolution);
225 Uint32 k = handler_display::SHADOWOFFY * resolution;
226 for (Uint32 i = 0; i < k; i++, dest += size)
227 {
228 for (Uint32 j = 0; j < hscreen; j++)
229 {
230 dest[j] |= mask;
231 }
232 }
233
234 /* draw right shadow */
235 dest = screen->get_pixel_data (252 * resolution, k);
236 Uint32 vscreen = display->get_height () - k;
237 k = 4 * resolution;
238 for (Uint32 i = 0; i < vscreen; i++, dest += size)
239 {
240 for (Uint32 j = 0; j < k; j++)
241 {
242 dest[j] |= mask;
243 }
244 }
245 }
246
247 /**
248 * Generate tiles map
249 */
250 void
generate_map()251 tiles_background::generate_map ()
252 {
253
254 /* allocate memory of the map */
255 if (NULL == map_tiles)
256 {
257 try
258 {
259 map_tiles = new Uint32[map_width * map_height * 4];
260 }
261 catch (std::bad_alloc &)
262 {
263 std::cerr << "(!)tiles_background::generate_map() "
264 "not enough memory to allocate " <<
265 map_width * map_height << " bytes!" << std::endl;
266 throw;
267 }
268 }
269
270
271 Sint32 *positions;
272 switch (type_of_tiles)
273 {
274 case TILES_32x32_WITH_4_COLORS:
275 positions = table_pos1;
276 break;
277 case TILES_64x64_WITH_16_COLORS:
278 default:
279 positions = table_pos1;
280 if (current_tiles->get_width () / TILES_64_WIDTH > 5)
281 {
282 positions = table_pos2;
283 }
284 break;
285 }
286
287 #if __WORDSIZE == 64
288 Sint32 rand1 = (long) display;
289 Sint32 rand2 = (long) current_tiles;
290 #else
291 /* use pointer address as random value */
292 Sint32 rand1 = (intptr_t) display;
293 /* use pointer address as random value */
294 Sint32 rand2 = (intptr_t) current_tiles;
295 #endif
296 for (Uint32 v = 0; v < map_height; v++)
297 {
298 for (Uint32 h = 0; h < map_width; h++)
299 {
300 random_counter =
301 random_counter + rand1 + rand2 + 1 + keyboard->get_mouse_x ();
302 rand1 = rand1 + frame_counter + v;
303 rand2 = rand2 + display->get_frames_per_second ();
304
305 Uint32 x = random_counter;
306 /* table index, from 0 to 15 */
307 x &= 0x0f;
308 /* position source, from 0 to 4 */
309 x = positions[x];
310 x *= tiles_width;
311 Uint32 map_index = v * map_width * 2 + h;
312 map_tiles[map_index] = x;
313 map_tiles[map_index + map_width] = x;
314 map_tiles[map_index + map_width * 2 * map_height] = x;
315 map_tiles[map_index + map_width * 2 * map_height + map_width] = x;
316 }
317 }
318 }
319
320
321 /**
322 * Set a type of displacement for the tilesmap scrolling
323 */
324 void
set_scroll_type(Uint32 type)325 tiles_background::set_scroll_type (Uint32 type)
326 {
327 map_scroll_num = type;
328 map_scroll_delay = 0;
329 if (type != TILES_NO_SCROLL)
330 {
331 map_velocity = 0.0;
332 }
333 }
334
335 /**
336 * Draw the tiles background
337 */
338 void
draw()339 tiles_background::draw ()
340 {
341
342 switch (map_scroll_num)
343 {
344 case TILES_NO_SCROLL:
345 if (map_velocity >= -0.001 && map_velocity <= 0.001)
346 {
347 map_velocity = 0;
348 }
349 else if (map_velocity > -0.01)
350 {
351 map_velocity -= 0.1;
352 }
353 else
354 {
355 map_velocity += 0.1;
356 }
357 break;
358
359 case TILES_SCROLL_WIN:
360 map_angle_direction = 3.14;
361 map_velocity = 5.0;
362 break;
363
364 case TILES_SCROLL_GAMEOVER:
365 if (map_velocity > -0.01 && map_velocity < 0.01)
366 {
367 double pi = 4 * atan (1.0);
368 Uint32 i = random_counter & 64;
369 map_angle_direction = (pi * 2 / 64) * i;
370 }
371 map_velocity = cos (map_angle_speed) * 5;
372 if (map_scroll_delay < 1)
373 {
374 map_angle_speed -= 0.01;
375 if ((map_velocity > 1 - 0.1 && map_velocity < 1 + 0.1)
376 || (map_velocity > -3 - 0.1 && map_velocity < -3 + 0.1))
377 {
378 map_scroll_delay = 100;
379 }
380 }
381 else
382 {
383 map_scroll_delay--;
384 }
385 break;
386
387 case TILES_SCROLL_LOST:
388 if (map_velocity > -0.01 && map_velocity < 0.01)
389 {
390 double pi = 4 * atan (1.0);
391 Uint32 i = random_counter & 31;
392 map_angle_direction = (pi * 2 / 32) * i;
393 }
394 map_velocity = cos (map_angle_speed) * 5;
395 if (map_scroll_delay < 1)
396 {
397 map_angle_speed -= 0.01;
398 if ((map_velocity > 2 - 0.1 && map_velocity < 2 + 0.1)
399 || (map_velocity > -2 - 0.1 && map_velocity < -2 + 0.1))
400 {
401 map_scroll_delay = 10;
402 }
403 }
404 else
405 {
406 map_scroll_delay--;
407 }
408 break;
409
410 case TILES_SCROLL_BEGIN:
411 if (map_velocity > -0.01 && map_velocity < 0.01)
412 {
413 double pi = 4 * atan (1.0);
414 Uint32 i = random_counter & 31;
415 map_angle_direction = (pi * 2 / 32) * i;
416 }
417 map_velocity = cos (map_angle_speed) * 6;
418 if (map_scroll_delay < 1)
419 {
420 map_angle_speed += 0.01;
421 if ((map_velocity > 3 - 0.1 && map_velocity < 3 + 0.1)
422 || (map_velocity > -3 - 0.1 && map_velocity < -3 + 0.1))
423 {
424 map_scroll_delay = 50;
425 }
426 }
427 else
428 {
429 map_scroll_delay--;
430 }
431 }
432 map_ycoord =
433 map_ycoord + (Uint32) (map_velocity * cos (map_angle_direction));
434 map_xcoord =
435 map_xcoord + (Uint32) (map_velocity * sin (map_angle_direction));
436 draw (game_screen);
437 draw_shadows ();
438 }
439
440 /**
441 * Draw the tiles background
442 * @param offscreen pointer to a offscreen_surface object
443 */
444 void
draw(offscreen_surface * offscreen)445 tiles_background::draw (offscreen_surface * offscreen)
446 {
447 map_xcoord = map_xcoord % map_xmax;
448 map_ycoord = map_ycoord % map_ymax;
449
450 SDL_Surface *screen_surface = offscreen->get_surface ();
451 SDL_Surface *tiles_surface = current_tiles->get_surface ();
452 Uint32 voffset = offscreen->get_vertical_offset ();
453
454 /* width and height of the visible window */
455 Uint32 width_box = offscreen->get_width () - 64 * resolution;
456 Uint32 height_box = offscreen->get_height () - voffset * 2;
457 /* index on the first tile map */
458 Uint32 map_index =
459 (map_ycoord / tiles_height % map_height) * map_height * 2 +
460 (map_xcoord / tiles_width % map_width);
461 /* calculate the width of the tiles of the first column */
462 Uint32 modulo_x = map_xcoord % tiles_width;
463 Uint32 first_width = tiles_width - modulo_x;
464 /* calculate the height of the tiles of the first line */
465 Uint32 modulo_y = map_ycoord % tiles_height;
466 Uint32 first_height = tiles_height - modulo_y;
467 /* calculate the width of the tiles of the last column,
468 * zero value is * possible */
469 Uint32 last_width = (width_box - first_width) % tiles_width;
470 /* calculate the height of the tiles of the last line,
471 * zero value is * possible */
472 Uint32 last_height = (height_box - first_height) % tiles_height;
473
474
475 SDL_Rect rect_src = { 0, 0, 0, 0 };
476 SDL_Rect rect_dst = { 0, 0, 0, 0 };
477
478 rect_dst.y = voffset;
479
480 Uint32 vcount = (height_box - first_height) / tiles_height + 1;
481 Uint32 hcount = (width_box - first_width) / tiles_width + 1;
482 for (Uint32 v = 0; v <= vcount; v++)
483 {
484 if (v == 0)
485 {
486 rect_src.h = rect_dst.h = first_height;
487 rect_src.y = modulo_y;
488 }
489 else
490 {
491 rect_src.y = 0;
492 if (v < vcount)
493 {
494 rect_src.h = rect_dst.h = tiles_height;
495 }
496 else
497 {
498 if (last_height > 0)
499 {
500 rect_src.h = rect_dst.h = last_height;
501 }
502 else
503 {
504 continue;
505 }
506 }
507 }
508 rect_dst.x = 0;
509 Uint32 *map_line = &map_tiles[map_index];
510 for (Uint32 h = 0; h <= hcount; h++)
511 {
512 if (h == 0)
513 {
514 rect_src.w = rect_dst.w = first_width;
515 rect_src.x = *(map_line++) + modulo_x;
516 }
517 else
518 {
519 rect_src.x = *(map_line++);
520 if (h < hcount)
521 {
522 rect_src.w = rect_dst.w = tiles_width;
523 }
524 else
525 {
526 if (last_width > 0)
527 {
528 rect_src.w = rect_dst.w = last_width;
529 }
530 else
531 {
532 continue;
533 }
534 }
535 }
536 if (SDL_BlitSurface
537 (tiles_surface, &rect_src, screen_surface, &rect_dst) < 0)
538 {
539 std::cerr << "(!)tiles_background::draw() " <<
540 "SDL_BlitSurface() return " << SDL_GetError () << std::endl;
541 }
542 rect_dst.x += rect_dst.w;
543 }
544 map_index += map_width * 2;
545 rect_dst.y += rect_dst.h;
546 }
547 }
548
549 /**
550 * x-coordinates of sources in the tiles bitmap
551 */
552 Sint32
553 tiles_background::table_pos1[16] =
554 {
555 3, 0, 0, 3, 4, 2, 1, 4, 3, 2, 1, 1, 0, 0, 2, 4
556 };
557
558 Sint32
559 tiles_background::table_pos2[16] =
560 {
561 3, 0, 0, 3, 4, 2, 1, 4, 3, 2, 1, 1, 5, 0, 5, 4
562 };
563
564 void
set_palette()565 tiles_background::set_palette ()
566 {
567 /* initialize color palette */
568 switch (type_of_tiles)
569 {
570 case TILES_32x32_WITH_4_COLORS:
571 set_4_color_palette ();
572 break;
573
574 case TILES_64x64_WITH_16_COLORS:
575 default:
576 unsigned char *colPT = current_tiles->get_palette ();
577 SDL_Color *palPT = display->get_palette ();
578 SDL_Color *palP1 = palPT;
579 SDL_Color *palP2 = palP1 + 128;
580 unsigned char pixel;
581 for (Sint32 i = 0; i < 16; i++)
582 {
583 /* red */
584 pixel = *(colPT++);
585 palP1->r = pixel;
586 pixel >>= 1;
587 palP2->r = pixel;
588 /* green */
589 pixel = *(colPT++);
590 palP1->g = pixel;
591 pixel >>= 1;
592 palP2->g = pixel;
593 /* blue */
594 pixel = *(colPT++);
595 palP1->b = pixel;
596 pixel >>= 1;
597 palP2->b = pixel;
598 palP1++;
599 palP2++;
600 }
601 display->enable_palette (palPT);
602 break;
603 }
604 }
605
606
607 /**
608 * Randomly select one of 112 4-color palettes
609 */
610 void
set_4_color_palette()611 tiles_background::set_4_color_palette ()
612 {
613 Sint32 j = random_counter & 0x1ff;
614 if (j >= 448)
615 {
616 /* 112 preset 4 color palettes */
617 j -= 448;
618 }
619 j = j & 0xfff0;
620 set_4_color_palette (j);
621 }
622
623 /**
624 * Set next background palette of 4 colors
625 */
626 void
next_4_color_palette()627 tiles_background::next_4_color_palette ()
628 {
629 palette_index += 16;
630 if (palette_index >= 432)
631 {
632 palette_index = 0;
633 }
634 set_4_color_palette (palette_index);
635 }
636
637 /**
638 * Set previous background palette of 4 colors
639 */
640 void
prev_4_color_palette()641 tiles_background::prev_4_color_palette ()
642 {
643 palette_index -= 16;
644 if (palette_index < 0)
645 {
646 palette_index = 432;
647 }
648 set_4_color_palette (palette_index);
649 }
650
651 /**
652 * Initialize a background palette color of 4 colors
653 * @param pal_index 4 color palette number
654 */
655 void
set_4_color_palette(Uint32 pal_index)656 tiles_background::set_4_color_palette (Uint32 pal_index)
657 {
658 if (is_verbose)
659 {
660 std::cout << "tiles_background::set_4_color_palette() " <<
661 "pal_index:" << pal_index << std::endl;
662
663 }
664 palette_index = pal_index;
665 unsigned char *color = &couleurs[0];
666 unsigned char *colPT = (color) + pal_index;
667 SDL_Color *pal = display->get_palette ();
668 SDL_Color *lighted = pal + 1;
669 SDL_Color *dark = lighted + 128;
670 for (Uint32 i = 0; i < 4; i++)
671 {
672 unsigned char pixel = *(colPT++);
673 /* red */
674 pixel = *(colPT++);
675 lighted->r = pixel;
676 pixel >>= 1;
677 dark->r = pixel;
678 /* green */
679 pixel = *(colPT++);
680 lighted->g = pixel;
681 pixel >>= 1;
682 dark->g = pixel;
683 /* blue */
684 pixel = *(colPT++);
685 lighted->b = pixel;
686 pixel >>= 1;
687 dark->b = pixel;
688 lighted++;
689 dark++;
690 }
691 display->enable_palette (pal);
692 if (NULL != current_tiles)
693 {
694 current_tiles->set_palette (pal);
695 }
696 }
697
698 /**
699 * Preset palettes: 4 colors original background (mode 320x200)
700 * 448 / 16 : 28 preset palettes
701 * 4 * 4 : 16 composantes by palette
702 * 112 * 4 : 448 composantes
703 */
704 unsigned char
705 tiles_background::couleurs[448] =
706 {
707 0x00, 0x40, 0x20, 0x40, 0x00, 0x60, 0x40, 0x60, 0x00, 0x80, 0x60, 0x80,
708 0x00, 0xA0, 0x80, 0xA0, 0x00, 0x00, 0x20, 0x40, 0x00, 0x20,
709 0x40, 0x60, 0x00, 0x40, 0x60, 0x80, 0x00, 0x60, 0x80, 0xA0, 0x00, 0x00,
710 0x20, 0x20, 0x00, 0x20, 0x40, 0x40, 0x00, 0x40, 0x60, 0x60,
711 0x00, 0x60, 0x80, 0x80, 0x00, 0x00, 0x20, 0x40, 0x00, 0x00, 0x40, 0x60,
712 0x00, 0x20, 0x60, 0x80, 0x00, 0x40, 0x80, 0xA0, 0x00, 0x30,
713 0x40, 0x30, 0x00, 0x50, 0x60, 0x50, 0x00, 0x70, 0x80, 0x70, 0x00, 0x90,
714 0xA0, 0x90, 0x00, 0x20, 0x20, 0x40, 0x00, 0x40, 0x40, 0x60,
715 0x00, 0x60, 0x60, 0x80, 0x00, 0x80, 0x80, 0xA0, 0x00, 0x00, 0x40, 0x40,
716 0x00, 0x20, 0x60, 0x60, 0x00, 0x40, 0x80, 0x80, 0x00, 0x60,
717 0xA0, 0xA0, 0x00, 0x20, 0x00, 0x20, 0x00, 0x40, 0x20, 0x40, 0x00, 0x60,
718 0x40, 0x60, 0x00, 0x80, 0x60, 0x80, 0x00, 0x00, 0x40, 0x20,
719 0x00, 0x00, 0x60, 0x40, 0x00, 0x20, 0x80, 0x60, 0x00, 0x40, 0xA0, 0x80,
720 0x00, 0x40, 0x20, 0x00, 0x00, 0x60, 0x40, 0x20, 0x00, 0x80,
721 0x60, 0x40, 0x00, 0xA0, 0x80, 0x60, 0x00, 0x40, 0x00, 0x00, 0x00, 0x60,
722 0x20, 0x20, 0x00, 0x80, 0x40, 0x40, 0x00, 0xA0, 0x60, 0x60,
723 0x00, 0x40, 0x00, 0x40, 0x00, 0x60, 0x20, 0x60, 0x00, 0x80, 0x40, 0x80,
724 0x00, 0xA0, 0x60, 0xA0, 0x00, 0x00, 0x20, 0x00, 0x00, 0x20,
725 0x40, 0x20, 0x00, 0x40, 0x60, 0x40, 0x00, 0x60, 0x80, 0x60, 0x00, 0x20,
726 0x40, 0x20, 0x00, 0x40, 0x60, 0x40, 0x00, 0x60, 0x80, 0x60,
727 0x00, 0x80, 0xA0, 0x80, 0x00, 0x40, 0x40, 0x00, 0x00, 0x60, 0x60, 0x20,
728 0x00, 0x80, 0x80, 0x40, 0x00, 0xA0, 0xA0, 0x60, 0x00, 0x00,
729 0x40, 0x00, 0x00, 0x20, 0x60, 0x20, 0x00, 0x40, 0x80, 0x40, 0x00, 0x60,
730 0xA0, 0x60, 0x00, 0x20, 0x20, 0x20, 0x00, 0x40, 0x40, 0x40,
731 0x00, 0x60, 0x60, 0x60, 0x00, 0x80, 0x80, 0x80, 0x00, 0x40, 0x20, 0x60,
732 0x00, 0x60, 0x40, 0x80, 0x00, 0x80, 0x60, 0xA0, 0x00, 0xA0,
733 0x80, 0xC0, 0x00, 0x20, 0x20, 0x00, 0x00, 0x40, 0x40, 0x20, 0x00, 0x60,
734 0x60, 0x40, 0x00, 0x80, 0x80, 0x60, 0x00, 0x20, 0x40, 0x60,
735 0x00, 0x40, 0x60, 0x80, 0x00, 0x60, 0x80, 0xA0, 0x00, 0x80, 0xA0, 0xC0,
736 0x00, 0x60, 0x40, 0x20, 0x00, 0x80, 0x60, 0x40, 0x00, 0xA0,
737 0x80, 0x60, 0x00, 0xC0, 0xA0, 0x80, 0x00, 0x40, 0x00, 0x60, 0x00, 0x60,
738 0x20, 0x80, 0x00, 0x80, 0x40, 0xA0, 0x00, 0xA0, 0x60, 0xC0,
739 0x00, 0x40, 0x00, 0x20, 0x00, 0x60, 0x20, 0x40, 0x00, 0x80, 0x40, 0x60,
740 0x00, 0xA0, 0x60, 0x80, 0x00, 0x20, 0x20, 0x60, 0x00, 0x40,
741 0x40, 0x80, 0x00, 0x60, 0x60, 0xA0, 0x00, 0x80, 0x80, 0xC0, 0x00, 0x60,
742 0x40, 0x00, 0x00, 0x80, 0x60, 0x20, 0x00, 0xA0, 0x80, 0x40,
743 0x00, 0xC0, 0x80, 0x60, 0x00, 0x20, 0x40, 0x00, 0x00, 0x40, 0x60, 0x20,
744 0x00, 0x60, 0x80, 0x40, 0x00, 0x80, 0xA0, 0x60, 0x00, 0x40,
745 0x20, 0x20, 0x00, 0x60, 0x40, 0x40, 0x00, 0x80, 0x60, 0x60, 0x00, 0xA0,
746 0x80, 0x80, 0x00, 0x20, 0x40, 0x40, 0x00, 0x40, 0x60, 0x60,
747 0x00, 0x60, 0x80, 0x80, 0x00, 0x80, 0xA0, 0xA0
748 };
749