home *** CD-ROM | disk | FTP | other *** search
- /*-> c.ami_chars */
- /* this defines the character shapes */
-
- /* Modifications for ANSI C under RISC-OS:
- *
- * Date Modification
- * 11-may-90 modifications of headers
- * 18-may-90 removal of non-essential parts of the Border structure (first
- * 4 elements)
- * 23-may-90 increase size of grid by factor 2
- * 23-may-90 increase the line elements per segment to 4, to improve shape
- */
-
- #include "types.h"
-
- /* First the shape of the seven segments + point & comma.
- They are defined in a 28x26 box and are drawn by a series of lines.
- The offsets are relative to the top left corner of this box */
- static WORD top[] = {
- 7,0, 22,0,
- 8,1, 21,1,
- 9,2, 20,2,
- 10,3, 19,3
- };
- static WORD ctr[] = {
- 9,12, 20,12,
- 8,13, 21,13,
- 8,14, 21,14,
- 9,15, 20,15
- };
- static WORD bottom[] = {
- 10,24, 19,24,
- 9,25, 20,25,
- 8,26, 21,26,
- 7,27, 22,27
- };
- static WORD tl[] = {
- 6,1, 6,13,
- 7,2, 7,12,
- 8,3, 8,11,
- 9,4, 9,10
- };
- static WORD tr[] = {
- 23,1, 23,13,
- 22,2, 22,12,
- 21,3, 21,11,
- 20,4, 20,10
- };
- static WORD bl[] = {
- 6,14, 6,26,
- 7,15, 7,25,
- 8,16, 8,24,
- 9,17, 9,23
- };
- static WORD br[] = {
- 23,14, 23,26,
- 22,15, 22,25,
- 21,16, 21,24,
- 20,17, 20,23
- };
- static WORD pt[] = {
- -2,24, 1,24,
- -2,25, 1,25,
- -2,26, 1,26,
- -2,27, 1,27
- };
- static WORD com[] = {
- -2,28, -1,28,
- -3,29, -1,29,
- -4,30, -2,30,
- -5,31, -4,31
- };
-
- /* Character definitions, they are composed of the seven segments */
- static struct Border zero[] = {
- { top, &zero[1] },
- { tl, &zero[2] },
- { tr, &zero[3] },
- { bl, &zero[4] },
- { br, &zero[5] },
- { bottom, NULL }
- };
- static struct Border one[] = {
- { tr, &one[1] },
- { br, NULL }
- };
- static struct Border two[] = {
- { top, &two[1] },
- { tr, &two[2] },
- { ctr, &two[3] },
- { bl, &two[4] },
- { bottom, NULL }
- };
- static struct Border three[] = {
- { top, &three[1] },
- { ctr, &three[2] },
- { bottom, &three[3] },
- { tr, &three[4] },
- { br, NULL }
- };
- static struct Border four[] = {
- { tr, &four[1] },
- { tl, &four[2] },
- { br, &four[3] },
- { ctr, NULL }
- };
- static struct Border five[] = {
- { top, &five[1] },
- { ctr, &five[2] },
- { bottom, &five[3] },
- { tl, &five[4] },
- { br, NULL }
- };
- static struct Border six[] = {
- { top, &six[1] },
- { ctr, &six[2] },
- { bottom, &six[3] },
- { tl, &six[4] },
- { bl, &six[5] },
- { br, NULL }
- };
- static struct Border seven[] = {
- { top, &seven[1] },
- { tr, &seven[2] },
- { br, NULL }
- };
- static struct Border eight[] = {
- { top, &eight[1] },
- { ctr, &eight[2] },
- { bottom, &eight[3] },
- { tl, &eight[4] },
- { tr, &eight[5] },
- { bl, &eight[6] },
- { br, NULL }
- };
- static struct Border nine[] = {
- { top, &nine[1] },
- { ctr, &nine[2] },
- { bottom, &nine[3] },
- { tl, &nine[4] },
- { tr, &nine[5] },
- { br, NULL }
- };
- static struct Border minus[] = {
- { ctr, NULL }
- };
- static struct Border E[] = {
- { top, &E[1] },
- { ctr, &E[2] },
- { bottom, &E[3] },
- { tl, &E[4] },
- { bl, NULL }
- };
- static struct Border r[] = {
- { ctr, &r[1] },
- { bl, NULL }
- };
- static struct Border o[] = {
- { ctr, &o[1] },
- { bottom, &o[2] },
- { bl, &o[3] },
- { br, NULL }
- };
- static struct Border R[] = {
- { top, &R[1] },
- { tl, NULL }
- };
- static struct Border u[] = {
- { tl, &u[1] },
- { tr, &u[2] },
- { ctr, NULL }
- };
- static struct Border n[] = {
- { top, &n[1] },
- { tl, &n[2] },
- { tr, NULL },
- };
- static struct Border i[] = {
- { tr, NULL },
- };
- static struct Border point[] = {
- { pt, NULL },
- };
- static struct Border comma[] = {
- { pt, &comma[1] },
- { com, NULL }
- };
- static struct Border P[] = {
- { top, &P[1] },
- { ctr, &P[2] },
- { tr, &P[3] },
- { tl, &P[4] },
- { bl, NULL }
- };
-
- /* The character array, visible to the exterior */
- struct Border *hp11char[] = {
- zero, one, two, three, four, five, six, seven, eight, nine,
- minus, E, r, o, R, u, n, i, nine /* g */, point, comma, P };
-
-