Annotation of os2sdk/demos/apps/mandel/mdraw.h, revision 1.1.1.2

1.1       root        1: /**    mdraw.h - mdraw include file
                      2:  */
                      3: 
                      4: 
                      5: #define MOUSE                  /* compile mouse support */
                      6: 
                      7: #define UP     72              /* up arrow scan code */
                      8: #define DOWN   80              /* down arrow scan code */
                      9: #define RIGHT  77              /* right arrow scan code */
                     10: #define LEFT   75              /* left arrow scan code */
                     11: 
                     12: 
                     13: #define RESTORE_MODE   0       /* request for notification to restore mode */
                     14: #define RESERVED       0       /* reserved word */
                     15: #define REDRAW         1       /* request for notification to redraw */
                     16: #define BLOCK          1       /* wait until screen I/O is available */
                     17: #define STACKSIZE      2048    /* size of stack to allocate for threads */
                     18: #define GIVEUPOWNER    1       /* owner indicator */
                     19: #define KILLTHREAD     1       /* kill indicator  */
                     20: 
                     21: #define MAXREAL 2000           /* maximum number of real coordinates */
                     22: #define MAXLOOP 1000           /* maximum number of iterations */
                     23: #define BUFFER 4096            /* number of ints to read at one time */
                     24: 
                     25: #define SCANTIME 20            /* scan time in milliseconds */
                     26: #define RIPPLE_UP   0          /* ripple palette registers up */
                     27: #define RIPPLE_DN   1          /* ripple palette registers down */
                     28: 
                     29: #define PAGESIZE 0x8000        /* size of display page in EGA memory */
                     30: #define BLACK  0x00            /* EGA black value         */
                     31: #define BLUE   0x01            /* EGA blue value          */
                     32: #define GREEN  0x02            /* EGA green value         */
                     33: #define CYAN   0x03            /* EGA cyan value          */
                     34: #define RED    0x04            /* EGA red value           */
                     35: #define MAGENTA 0x05           /* EGA magenta value       */
                     36: #define BROWN  0x06            /* EGA brown value         */
                     37: #define WHITE  0x07            /* EGA white value         */
                     38: #define DGRAY  0x08            /* EGA dark gray value     */
                     39: #define LBLUE  0x09            /* EGA light blue          */
                     40: #define LGREEN 0x0a            /* EGA light green         */
                     41: #define LCYAN  0x0b            /* EGA light cyan value    */
                     42: #define LRED   0x0c            /* EGA light red value     */
                     43: #define LMAGENTA 0x0d          /* EGA light magenta value */
                     44: #define YELLOW 0x0e            /* EGA yellow value        */
                     45: #define IWHITE 0x0f            /* EGA intense white value */
                     46: 
                     47: struct cmplx {
                     48:        double   realp;         /* real part of number */
                     49:        double   imagp;         /* imaginary part of number */
                     50: };
                     51: 
                     52: 
                     53: /**    This structure forms a linked list of pointers to image descriptors.
                     54:  *     The image descriptor is stored in allocated segments so that
                     55:  *     DS is not filled up with the image descriptor.
                     56:  */
                     57: 
                     58: 
                     59: struct ilist {
                     60:        struct ilist *next;     /* pointer to next ilist */
                     61:        struct ilist *prev;     /* pointer to previous ilist */
                     62:        struct image far *desc; /* pointer to segement containing image data */
                     63: };
                     64: 
                     65: 
                     66: /**    This structure which is stored in a allocated far segment contains
                     67:  *     the data that describes the image.  This is basically the data
                     68:  *     stored in the header of the .cnt file.
                     69:  */
                     70: 
                     71: 
                     72: struct image {
                     73:        unsigned savesel[2];    /* selectors for screen saves */
                     74:        struct  cmplx ul;       /* coordinates of upper left corner */
                     75:        struct  cmplx lr;       /* coordinates of lower right corner */
                     76:        int     nimag;          /* number of imaginary coordinates */
                     77:        int     lni;
                     78:        int     lnr;
                     79:        int     mloop;          /* maximum loop count */
                     80:        int     nreal;          /* number of real coordinates */
                     81: 
                     82:        double  rinc;           /* increment in real coordinate */
                     83:        double  iinc;           /* increment in imaginary coordinate */
                     84:        double  aspect;         /* aspect ratio */
                     85:        char    cmap[MAXLOOP + 1];   /* mapping from iteration counter to color */
                     86:        long    hist[MAXLOOP + 1]; /* histogram counters */
                     87: };

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.