OSDN Git Service

018083d36b5edb3e6e7dabddb60ac070df172bf0
[proj16/16.git] / src / lib / hb / c3_scale.c
1 /* Catacomb 3-D Source Code\r
2  * Copyright (C) 1993-2014 Flat Rock Software\r
3  *\r
4  * This program is free software; you can redistribute it and/or modify\r
5  * it under the terms of the GNU General Public License as published by\r
6  * the Free Software Foundation; either version 2 of the License, or\r
7  * (at your option) any later version.\r
8  *\r
9  * This program is distributed in the hope that it will be useful,\r
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
12  * GNU General Public License for more details.\r
13  *\r
14  * You should have received a copy of the GNU General Public License along\r
15  * with this program; if not, write to the Free Software Foundation, Inc.,\r
16  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\r
17  */\r
18 \r
19 // C3_SCALE.C\r
20 \r
21 #include "C3_DEF.H"\r
22 #pragma hdrstop\r
23 \r
24 //const unsigned        viewheight = 144;\r
25 const   unsigned        screenbwide = 40;\r
26 const   byte            BACKGROUNDPIX   =   5;\r
27 \r
28 unsigned                shapesize[MAXSCALE+1];\r
29 t_compscale _seg *scaledirectory[MAXSCALE+1];\r
30 t_compshape _seg *shapedirectory[NUMSCALEPICS];\r
31 memptr                  walldirectory[NUMSCALEWALLS];\r
32 \r
33 /*\r
34 ===========================\r
35 =\r
36 = DeplanePic\r
37 =\r
38 = Takes a raw bit map of width bytes by height and creates a scaleable shape\r
39 =\r
40 = Returns the length of the shape in bytes\r
41 =\r
42 = Fills in spotvis (a convenient 64*64 array) with the color values\r
43 =\r
44 ===========================\r
45 */\r
46 \r
47 void DeplanePic (int picnum)\r
48 {\r
49         byte            far *plane0,far *plane1,far *plane2,far *plane3;\r
50         byte            by0,by1,by2,by3;\r
51         unsigned        x,y,b,color,shift,width,height;\r
52         byte            *dest;\r
53 \r
54 //\r
55 // convert ega pixels to byte color values in a temp buffer\r
56 //\r
57         width = pictable[picnum-STARTPICS].width;\r
58         height = pictable[picnum-STARTPICS].height;\r
59 \r
60         if (width>64 || height!=64)\r
61                 Quit ("DePlanePic: Bad size shape");\r
62 \r
63         memset (spotvis,BACKGROUNDPIX,sizeof(spotvis));\r
64 \r
65         plane0 = (byte _seg *)grsegs[picnum];\r
66         plane1 = plane0 + width*height;\r
67         plane2 = plane1 + width*height;\r
68         plane3 = plane2 + width*height;\r
69 \r
70         for (y=0;y<height;y++)\r
71         {\r
72                 dest = &spotvis[y][0];\r
73                 for (x=0;x<width;x++)\r
74                 {\r
75                         by0 = *plane0++;\r
76                         by1 = *plane1++;\r
77                         by2 = *plane2++;\r
78                         by3 = *plane3++;\r
79 \r
80                         for (b=0;b<8;b++)\r
81                         {\r
82                                 shift=8-b;\r
83 \r
84                                 color = 0;\r
85                                 asm     mov     cl,[BYTE PTR shift]\r
86                                 asm     mov     al,[BYTE PTR by3]\r
87                                 asm     rcr     al,cl;\r
88                                 asm     rcl     [BYTE PTR color],1;\r
89 \r
90                                 asm     mov     cl,[BYTE PTR shift]\r
91                                 asm     mov     al,[BYTE PTR by2]\r
92                                 asm     rcr     al,cl;\r
93                                 asm     rcl     [BYTE PTR color],1;\r
94 \r
95                                 asm     mov     cl,[BYTE PTR shift]\r
96                                 asm     mov     al,[BYTE PTR by1]\r
97                                 asm     rcr     al,cl;\r
98                                 asm     rcl     [BYTE PTR color],1;\r
99 \r
100                                 asm     mov     cl,[BYTE PTR shift]\r
101                                 asm     mov     al,[BYTE PTR by0]\r
102                                 asm     rcr     al,cl;\r
103                                 asm     rcl     [BYTE PTR color],1;\r
104 \r
105                                 *dest++ = color;\r
106                         }       // B\r
107                 }               // X\r
108         }                       // Y\r
109 }\r
110 \r
111 \r
112 \r
113 \r
114 /*\r
115 ========================\r
116 =\r
117 = BuildCompScale\r
118 =\r
119 = Builds a compiled scaler object that will scale a 64 tall object to\r
120 = the given height (centered vertically on the screen)\r
121 =\r
122 = height should be even\r
123 =\r
124 = Call with\r
125 = ---------\r
126 = DS:SI         Source for scale\r
127 = ES:DI         Dest for scale\r
128 =\r
129 = Calling the compiled scaler only destroys AL\r
130 =\r
131 ========================\r
132 */\r
133 \r
134 unsigned BuildCompScale (int height, memptr *finalspot)\r
135 {\r
136         t_compscale     _seg *work;\r
137         byte            far *code;\r
138 \r
139         int                     i;\r
140         long            fix,step;\r
141         unsigned        src,totalscaled,totalsize;\r
142         int                     startpix,endpix,toppix;\r
143 \r
144 \r
145         MM_GetPtr (&(memptr)work,20000);\r
146 \r
147         step = ((long)height<<16) / 64;\r
148         code = &work->code[0];\r
149         toppix = (viewheight-height)/2;\r
150         fix = 0;\r
151 \r
152         for (src=0;src<=64;src++)\r
153         {\r
154                 startpix = fix>>16;\r
155                 fix += step;\r
156                 endpix = fix>>16;\r
157 \r
158                 work->start[src] = startpix;\r
159                 if (endpix>startpix)\r
160                         work->width[src] = endpix-startpix;\r
161                 else\r
162                         work->width[src] = 0;\r
163 \r
164 //\r
165 // mark the start of the code\r
166 //\r
167                 work->codeofs[src] = FP_OFF(code);\r
168 \r
169 //\r
170 // compile some code if the source pixel generates any screen pixels\r
171 //\r
172                 startpix+=toppix;\r
173                 endpix+=toppix;\r
174 \r
175                 if (startpix == endpix || endpix < 0 || startpix >= VIEWHEIGHT || src == 64)\r
176                         continue;\r
177 \r
178         //\r
179         // mov al,[si+src]\r
180         //\r
181                 *code++ = 0x8a;\r
182                 *code++ = 0x44;\r
183                 *code++ = src;\r
184 \r
185                 for (;startpix<endpix;startpix++)\r
186                 {\r
187                         if (startpix >= VIEWHEIGHT)\r
188                                 break;                                          // off the bottom of the view area\r
189                         if (startpix < 0)\r
190                                 continue;                                       // not into the view area\r
191 \r
192                 //\r
193                 // and [es:di+heightofs],al\r
194                 //\r
195                         *code++ = 0x26;\r
196                         *code++ = 0x20;\r
197                         *code++ = 0x85;\r
198                         *((unsigned far *)code)++ = startpix*screenbwide;\r
199                 }\r
200 \r
201         }\r
202 \r
203 //\r
204 // retf\r
205 //\r
206         *code++ = 0xcb;\r
207 \r
208         totalsize = FP_OFF(code);\r
209         MM_GetPtr (finalspot,totalsize);\r
210         _fmemcpy ((byte _seg *)(*finalspot),(byte _seg *)work,totalsize);\r
211         MM_FreePtr (&(memptr)work);\r
212 \r
213         return totalsize;\r
214 }\r
215 \r
216 \r
217 \r
218 \r
219 /*\r
220 ========================\r
221 =\r
222 = BuildCompShape\r
223 =\r
224 = typedef struct\r
225 = {\r
226 =       unsigned        width;\r
227 =       unsigned        codeofs[64];\r
228 = }     t_compshape;\r
229 =\r
230 = Width is the number of compiled line draws in the shape.  The shape\r
231 = drawing code will assume that the midpoint of the shape is in the\r
232 = middle of the width.\r
233 =\r
234 = The non background pixel data will start at codeofs[width], so codeofs\r
235 = greater than width will be invalid.\r
236 =\r
237 = Each code offset will draw one vertical line of the shape, consisting\r
238 = of 0 or more segments of scaled pixels.\r
239 =\r
240 = The scaled shapes use ss:0-4 as a scratch variable for the far call to\r
241 = the compiled scaler, so zero it back out after the shape is scaled, or\r
242 = a "null pointer assignment" will result upon termination.\r
243 =\r
244 = Setup for a call to a compiled shape\r
245 = -----------------------------------\r
246 = ax    toast\r
247 = bx    toast\r
248 = cx    toast\r
249 = dx    segment of compiled shape\r
250 = si    toast\r
251 = di    byte at top of view area to draw the line in\r
252 = bp    0\r
253 = ss:2 and ds  the segment of the compiled scaler to use\r
254 = es    screenseg\r
255 =\r
256 = Upon return, ds IS NOT SET to the data segment.  Do:\r
257 =       mov     ax,ss\r
258 =       mov     ds,ax\r
259 =\r
260 =\r
261 = GC_BITMASK    set to the pixels to be drawn in the row of bytes under DI\r
262 = GC_MODE               read mode 1, write mode 2\r
263 = GC_COLORDONTCARE  set to 0, so all reads from video memory return 0xff\r
264 =\r
265 =\r
266 = Code generated for each segment\r
267 = -------------------------------\r
268 =       mov     bx,[(segend+1)*2]\r
269 =       mov     cx,[bx]\r
270 =       mov     [BYTE PTR bx],0xc8              // far return\r
271 =       mov     ax,[segstart*2]\r
272 =       mov     [ss:0],ax                               // entry point into the compiled scaler\r
273 =       mov     ds,dx                   // (mov ds,cs) the data is after the compiled code\r
274 =       mov     si,ofs data\r
275 =       call    [bp]                            // scale some pixels\r
276 =       mov     ds,[bp+2]\r
277 =       mov     [bx],cx                                 // un patch return\r
278 =\r
279 = Code generated after all segments on a line\r
280 = -------------------------------------------\r
281 =       retf\r
282 =\r
283 ========================\r
284 */\r
285 \r
286 unsigned BuildCompShape (t_compshape _seg **finalspot)\r
287 {\r
288         t_compshape     _seg *work;\r
289         byte            far *code;\r
290         int                     firstline,lastline,x,y;\r
291         unsigned        firstpix,lastpix,width;\r
292         unsigned        totalsize,pixelofs;\r
293         unsigned        buff;\r
294 \r
295 \r
296 //      MM_GetPtr (&(memptr)work,20000);\r
297         EGAWRITEMODE(0);\r
298         EGAREADMAP(0);          // use ega screen memory for temp buffer\r
299         EGAMAPMASK(1);\r
300         buff = screenloc[1];\r
301         work = (t_compshape _seg *)(0xa000+(buff+15)/16);\r
302 \r
303 //\r
304 // find the width of the shape\r
305 //\r
306         firstline = -1;\r
307         x=0;\r
308         do\r
309         {\r
310                 for (y=0;y<64;y++)\r
311                         if (spotvis[y][x] != BACKGROUNDPIX)\r
312                         {\r
313                                 firstline = x;\r
314                                 break;\r
315                         }\r
316                 if (++x == 64)\r
317                         Quit ("BuildCompShape: No shape data!");\r
318         } while (firstline == -1);\r
319 \r
320         lastline = -1;\r
321         x=63;\r
322         do\r
323         {\r
324                 for (y=0;y<64;y++)\r
325                         if (spotvis[y][x] != BACKGROUNDPIX)\r
326                         {\r
327                                 lastline = x;\r
328                                 break;\r
329                         }\r
330                 x--;\r
331         } while (lastline == -1);\r
332 \r
333         width = lastline-firstline+1;\r
334 \r
335         work->width = width;\r
336         code = (byte far *)&work->codeofs[width];\r
337 \r
338 //\r
339 // copy all non background pixels to the work space\r
340 //\r
341         pixelofs = FP_OFF(code);\r
342 \r
343         for (x=firstline;x<=lastline;x++)\r
344                 for (y=0;y<64;y++)\r
345                         if (spotvis[y][x] != BACKGROUNDPIX)\r
346                                 *code++ = spotvis[y][x];\r
347 \r
348 //\r
349 // start compiling the vertical lines\r
350 //\r
351         for (x=firstline;x<=lastline;x++)\r
352         {\r
353                 work->codeofs[x-firstline] = FP_OFF(code);\r
354 \r
355                 y=0;\r
356                 do\r
357                 {\r
358                 //\r
359                 // scan past black background pixels\r
360                 //\r
361                         while (spotvis[y][x] == BACKGROUNDPIX && y<64)\r
362                                 y++;\r
363 \r
364                         if (y>63)               // no more segments\r
365                                 break;\r
366 \r
367                         firstpix = y+1;         // +1 because width is before codeofs\r
368 \r
369                 //\r
370                 // scan past scalable pixels\r
371                 //\r
372                         while (spotvis[y][x] != BACKGROUNDPIX && y<64)\r
373                                 y++;\r
374 \r
375                         if (y>63)\r
376                                 lastpix = 65;\r
377                         else\r
378                                 lastpix = y+1;  // actually one pixel past the last displayed\r
379 \r
380                 //\r
381                 // compile the scale call\r
382                 //\r
383                         *code++ = 0x8b;         // mov bx,[lastpix*2]\r
384                         *code++ = 0x1e;\r
385                         *((unsigned far *)code)++ = lastpix*2;\r
386 \r
387                         *code++ = 0x8b;         // mov cx,[bx]\r
388                         *code++ = 0x0f;\r
389 \r
390                         *code++ = 0xc6;         // move [BYTE bx],0xcb\r
391                         *code++ = 0x07;\r
392                         *code++ = 0xcb;\r
393 \r
394                         *code++ = 0xa1;         // mov ax,[firstpix*2]  /*************\r
395                         *((unsigned far *)code)++ = firstpix*2;\r
396 \r
397                         *code++ = 0x36;         // mov [ss:0],ax\r
398                         *code++ = 0xa3;\r
399                         *code++ = 0x00;\r
400                         *code++ = 0x00;\r
401 \r
402                         *code++ = 0x8e;         // mov ds,dx    (mov ds,cs)\r
403                         *code++ = 0xda;\r
404 \r
405                         *code++ = 0xbe;         // mov si,OFFSET pixelofs-firstpixel\r
406                         *((unsigned far *)code)++ = pixelofs-firstpix;\r
407 \r
408                         *code++ = 0xff;         // call [DWORD bp]\r
409                         *code++ = 0x5e;\r
410                         *code++ = 0x00;\r
411 \r
412                         *code++ = 0x8e;         // mov ds,[bp+2]\r
413                         *code++ = 0x5e;\r
414                         *code++ = 0x02;\r
415 \r
416                         *code++ = 0x89;         // mov [bx],cx\r
417                         *code++ = 0x0f;\r
418 \r
419                         pixelofs += (lastpix-firstpix);\r
420                 } while (y<63);\r
421 \r
422         //\r
423         // retf\r
424         //\r
425                 *code++ = 0xcb;\r
426         }\r
427 \r
428 \r
429 //\r
430 // copy the final shape to a properly sized buffer\r
431 //\r
432         totalsize = FP_OFF(code);\r
433         MM_GetPtr ((memptr *)finalspot,totalsize);\r
434         _fmemcpy ((byte _seg *)(*finalspot),(byte _seg *)work,totalsize);\r
435 //      MM_FreePtr (&(memptr)work);\r
436 \r
437         return totalsize;\r
438 }\r
439 \r
440 \r
441 \r
442 /*\r
443 =======================\r
444 =\r
445 = ScaleShape\r
446 =\r
447 = Draws a compiled shape at [scale] pixels high\r
448 =\r
449 = Setup for call\r
450 = --------------\r
451 = GC_MODE                       read mode 1, write mode 2\r
452 = GC_COLORDONTCARE  set to 0, so all reads from video memory return 0xff\r
453 = GC_INDEX                      pointing at GC_BITMASK\r
454 =\r
455 =======================\r
456 */\r
457 \r
458 static  long            longtemp;\r
459 \r
460 void ScaleShape (int xcenter, t_compshape _seg *compshape, unsigned scale)\r
461 {\r
462         t_compscale _seg *comptable;\r
463         unsigned        width,scalewidth;\r
464         int                     x,pixel,lastpixel,pixwidth,min;\r
465         unsigned        far *codehandle, far *widthptr;\r
466         unsigned        badcodeptr;\r
467         int                     rightclip;\r
468 \r
469         if (!compshape)\r
470                 Quit ("ScaleShape: NULL compshape ptr!");\r
471 \r
472         scale = (scale+1)/2;\r
473         if (!scale)\r
474                 return;                                                         // too far away\r
475         if (scale>MAXSCALE)\r
476                 scale = MAXSCALE;\r
477         comptable = scaledirectory[scale];\r
478 \r
479         width = compshape->width;\r
480         scalewidth = comptable->start[width];\r
481 \r
482         pixel = xcenter - scalewidth/2;\r
483         lastpixel = pixel+scalewidth-1;\r
484         if (pixel >= VIEWWIDTH || lastpixel < 0)\r
485                 return;                                                         // totally off screen\r
486 \r
487 //\r
488 // scan backwards from the right edge until pixels are visable\r
489 // rightclip is the first NON VISABLE pixel\r
490 //\r
491         if (lastpixel>=VIEWWIDTH-1)\r
492                 rightclip = VIEWWIDTH-1;\r
493         else\r
494                 rightclip = lastpixel;\r
495 \r
496         if (zbuffer[rightclip]>scale)\r
497         {\r
498                 if (pixel>0)\r
499                         min = pixel;\r
500                 else\r
501                         min = 0;\r
502                 do\r
503                 {\r
504                         if (--rightclip < min)\r
505                                 return;                                                 // totally covered or before 0\r
506                         if (zbuffer[rightclip]<=scale)\r
507                                 break;\r
508                 } while (1);\r
509         }\r
510         rightclip++;\r
511 \r
512 //\r
513 // scan from the left until it is on screen, leaving\r
514 // [pixel],[pixwidth],[codehandle],and [widthptr] set correctly\r
515 //\r
516         *(((unsigned *)&longtemp)+1) = (unsigned)compshape;     // seg of shape\r
517         codehandle = &compshape->codeofs[0];\r
518         badcodeptr = compshape->codeofs[width];\r
519         widthptr = &comptable->width[0];\r
520         asm     mov     ax,[comptable]\r
521         asm     mov     WORD PTR [2],ax                         // ds:0-4 is used as a far call pointer\r
522                                                                                 // by the compiled shapes\r
523         pixwidth = *widthptr;                           // scaled width of this pixel\r
524         while (!pixwidth)\r
525         {\r
526                 pixwidth = *++widthptr;                 // find the first visable pixel\r
527                 codehandle++;\r
528         }\r
529 \r
530         if (pixel<0)\r
531         {\r
532                 do\r
533                 {\r
534                         if (pixel+pixwidth>0)\r
535                         {\r
536                                 pixwidth += pixel;\r
537                                 pixel = 0;\r
538                                 break;\r
539                         }\r
540                         do\r
541                         {\r
542                                 pixwidth = *++widthptr;\r
543                                 codehandle++;\r
544                         } while (!pixwidth);\r
545                         pixel+=pixwidth;\r
546                 } while (1);\r
547         }\r
548 \r
549 //\r
550 // scan until it is visable, leaving\r
551 // [pixel],[pixwidth],[codehandle],and [widthptr] set correctly\r
552 //\r
553         do\r
554         {\r
555                 if (zbuffer[pixel] <= scale)\r
556                         break;                                                  // start drawing here\r
557                 pixel++;\r
558                 if (!--pixwidth)\r
559                 {\r
560                         do\r
561                         {\r
562                                 pixwidth = *++widthptr;\r
563                                 codehandle++;\r
564                         } while (!pixwidth);\r
565                 }\r
566         } while (1);\r
567 \r
568         if (pixel+pixwidth>rightclip)\r
569                 pixwidth = rightclip-pixel;\r
570 //\r
571 // draw lines\r
572 //\r
573         do              // while (1)\r
574         {\r
575         //\r
576         // scale a vertical segment [pixwidth] pixels wide at [pixel]\r
577         //\r
578                 (unsigned)longtemp = *codehandle;       // offset of compiled code\r
579                 if ((unsigned)longtemp == badcodeptr)\r
580                         Quit ("ScaleShape: codehandle past end!");\r
581 \r
582                 asm     mov     bx,[pixel]\r
583                 asm     mov     di,bx\r
584                 asm     shr     di,1\r
585                 asm     shr     di,1\r
586                 asm     shr     di,1                                            // X in bytes\r
587                 asm     add     di,[bufferofs]\r
588                 asm     and     bx,7\r
589                 asm     shl     bx,1\r
590                 asm     shl     bx,1\r
591                 asm     shl     bx,1\r
592                 asm     add     bx,[pixwidth]                           // bx = pixel*8+pixwidth-1\r
593                 asm     dec     bx\r
594                 asm     push    bx\r
595                 asm     mov     al,BYTE PTR [bitmasks1+bx]\r
596                 asm     mov     dx,GC_INDEX+1\r
597                 asm     out     dx,al                                           // set bit mask register\r
598 \r
599                 asm     mov     es,[screenseg]\r
600                 asm     push    si\r
601                 asm     push    di\r
602                 asm     push    bp\r
603                 asm     xor     bp,bp\r
604                 asm     mov     dx,[WORD PTR longtemp+2]\r
605                 asm     mov     ds,[2]\r
606                 asm     call ss:[DWORD PTR longtemp]            // scale the line of pixels\r
607                 asm     mov     ax,ss\r
608                 asm     mov     ds,ax\r
609                 asm     pop             bp\r
610                 asm     pop             di\r
611                 asm     pop             si\r
612 \r
613                 asm     pop     bx\r
614                 asm     mov     al,BYTE PTR [bitmasks2+bx]\r
615                 asm     or      al,al\r
616                 asm     jz      nosecond\r
617 \r
618         //\r
619         // draw a second byte for vertical strips that cross two bytes\r
620         //\r
621                 asm     inc     di\r
622                 asm     mov     dx,GC_INDEX+1\r
623                 asm     out     dx,al                                           // set bit mask register\r
624                 asm     push    si\r
625                 asm     push    di\r
626                 asm     push    bp\r
627                 asm     xor     bp,bp\r
628                 asm     mov     dx,[WORD PTR longtemp+2]\r
629                 asm     mov     ds,[2]\r
630                 asm     call ss:[DWORD PTR longtemp]            // scale the line of pixels\r
631                 asm     mov     ax,ss\r
632                 asm     mov     ds,ax\r
633                 asm     pop             bp\r
634                 asm     pop             di\r
635                 asm     pop             si\r
636 \r
637 \r
638         //\r
639         // advance to the next drawn line\r
640         //\r
641 nosecond:;\r
642                 if ( (pixel+=pixwidth) == rightclip )\r
643                 {\r
644                         asm     mov     WORD PTR [0],0\r
645                         asm     mov     WORD PTR [2],0\r
646                         return;                                                 // all done!\r
647                 }\r
648 \r
649                 do\r
650                 {\r
651                         pixwidth = *++widthptr;\r
652                         codehandle++;\r
653                 } while (!pixwidth);\r
654 \r
655                 if (pixel+pixwidth > rightclip)\r
656                         pixwidth = rightclip-pixel;\r
657 \r
658         } while (1);\r
659 \r
660 }\r
661 \r
662 //\r
663 // bit mask tables for drawing scaled strips up to eight pixels wide\r
664 //\r
665 \r
666 byte    bitmasks1[8][8] = {\r
667 {0x80,0xc0,0xe0,0xf0,0xf8,0xfc,0xfe,0xff},\r
668 {0x40,0x60,0x70,0x78,0x7c,0x7e,0x7f,0x7f},\r
669 {0x20,0x30,0x38,0x3c,0x3e,0x3f,0x3f,0x3f},\r
670 {0x10,0x18,0x1c,0x1e,0x1f,0x1f,0x1f,0x1f},\r
671 {0x8,0xc,0xe,0xf,0xf,0xf,0xf,0xf},\r
672 {0x4,0x6,0x7,0x7,0x7,0x7,0x7,0x7},\r
673 {0x2,0x3,0x3,0x3,0x3,0x3,0x3,0x3},\r
674 {0x1,0x1,0x1,0x1,0x1,0x1,0x1,0x1} };\r
675 \r
676 byte    bitmasks2[8][8] = {\r
677 {0,0,0,0,0,0,0,0},\r
678 {0,0,0,0,0,0,0,0x80},\r
679 {0,0,0,0,0,0,0x80,0xc0},\r
680 {0,0,0,0,0,0x80,0xc0,0xe0},\r
681 {0,0,0,0,0x80,0xc0,0xe0,0xf0},\r
682 {0,0,0,0x80,0xc0,0xe0,0xf0,0xf8},\r
683 {0,0,0x80,0xc0,0xe0,0xf0,0xf8,0xfc},\r
684 {0,0x80,0xc0,0xe0,0xf0,0xf8,0xfc,0xfe} };\r
685 \r
686 \r
687 \r
688 \r
689 \r
690 \r