Annotation of quake1/vid.h, revision 1.1

1.1     ! root        1: // vid.h -- video driver defs
        !             2: 
        !             3: #define VID_CBITS      6
        !             4: #define VID_GRADES     (1 << VID_CBITS)
        !             5: 
        !             6: // a pixel can be one, two, or four bytes
        !             7: typedef byte pixel_t;
        !             8: 
        !             9: typedef struct vrect_s
        !            10: {
        !            11:        int                             x,y,width,height;
        !            12:        struct vrect_s  *pnext;
        !            13: } vrect_t;
        !            14: 
        !            15: typedef struct
        !            16: {
        !            17:        pixel_t                 *buffer;                // invisible buffer
        !            18:        pixel_t                 *colormap;              // 256 * VID_GRADES size
        !            19:        unsigned short  *colormap16;    // 256 * VID_GRADES size
        !            20:        int                             fullbright;             // index of first fullbright color
        !            21:        unsigned                rowbytes;       // may be > width if displayed in a window
        !            22:        unsigned                width;          
        !            23:        unsigned                height;
        !            24:        float                   aspect;         // width / height -- < 0 is taller than wide
        !            25:        int                             numpages;
        !            26:        int                             recalc_refdef;  // if true, recalc vid-based stuff
        !            27:        pixel_t                 *conbuffer;
        !            28:        int                             conrowbytes;
        !            29:        unsigned                conwidth;
        !            30:        unsigned                conheight;
        !            31:        int                             maxwarpwidth;
        !            32:        int                             maxwarpheight;
        !            33:        pixel_t                 *direct;                // direct drawing to framebuffer, if not
        !            34:                                                                        //  NULL
        !            35: } viddef_t;
        !            36: 
        !            37: extern viddef_t        vid;                            // global video state
        !            38: extern unsigned short  d_8to16table[256];
        !            39: extern unsigned        d_8to24table[256];
        !            40: extern void (*vid_menudrawfn)(void);
        !            41: extern void (*vid_menukeyfn)(int key);
        !            42: 
        !            43: void   VID_SetPalette (unsigned char *palette);
        !            44: // called at startup and after any gamma correction
        !            45: 
        !            46: void   VID_ShiftPalette (unsigned char *palette);
        !            47: // called for bonus and pain flashes, and for underwater color changes
        !            48: 
        !            49: void   VID_Init (unsigned char *palette);
        !            50: // Called at startup to set up translation tables, takes 256 8 bit RGB values
        !            51: // the palette data will go away after the call, so it must be copied off if
        !            52: // the video driver will need it again
        !            53: 
        !            54: void   VID_Shutdown (void);
        !            55: // Called at shutdown
        !            56: 
        !            57: void   VID_Update (vrect_t *rects);
        !            58: // flushes the given rectangles from the view buffer to the screen
        !            59: 
        !            60: int VID_SetMode (int modenum, unsigned char *palette);
        !            61: // sets the mode; only used by the Quake engine for resetting to mode 0 (the
        !            62: // base mode) on memory allocation failures
        !            63: 

unix.superglobalmegacorp.com

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