1// vid_null.c -- null video driver to aid porting efforts 2 3#include "quakedef.h" 4#include "d_local.h" 5 6viddef_t vid; // global video state 7 8#define BASEWIDTH 320 9#define BASEHEIGHT 200 10 11byte vid_buffer[BASEWIDTH*BASEHEIGHT]; 12short zbuffer[BASEWIDTH*BASEHEIGHT]; 13byte surfcache[256*1024]; 14 15unsigned short d_8to16table[256]; 16unsigned d_8to24table[256]; 17 18void VID_SetPalette (unsigned char *palette) 19{ 20} 21 22void VID_ShiftPalette (unsigned char *palette) 23{ 24} 25 26void VID_Init (unsigned char *palette) 27{ 28 vid.maxwarpwidth = vid.width = vid.conwidth = BASEWIDTH; 29 vid.maxwarpheight = vid.height = vid.conheight = BASEHEIGHT; 30 vid.aspect = 1.0; 31 vid.numpages = 1; 32 vid.colormap = host_colormap; 33 vid.fullbright = 256 - LittleLong (*((int *)vid.colormap + 2048)); 34 vid.buffer = vid.conbuffer = vid_buffer; 35 vid.rowbytes = vid.conrowbytes = BASEWIDTH; 36 37 d_pzbuffer = zbuffer; 38 D_InitCaches (surfcache, sizeof(surfcache)); 39} 40 41void VID_Shutdown (void) 42{ 43} 44 45void VID_Update (vrect_t *rects) 46{ 47} 48 49/* 50================ 51D_BeginDirectRect 52================ 53*/ 54void D_BeginDirectRect (int x, int y, byte *pbitmap, int width, int height) 55{ 56} 57 58 59/* 60================ 61D_EndDirectRect 62================ 63*/ 64void D_EndDirectRect (int x, int y, int width, int height) 65{ 66} 67 68 69