home *** CD-ROM | disk | FTP | other *** search
/ Magazyn Amiga 14 / MA_Cover_14.iso / source / c / q1source_amy / qw / client / vid_null.c < prev    next >
Encoding:
C/C++ Source or Header  |  1997-07-07  |  1.2 KB  |  69 lines

  1. // vid_null.c -- null video driver to aid porting efforts
  2.  
  3. #include "quakedef.h"
  4. #include "d_local.h"
  5.  
  6. viddef_t    vid;                // global video state
  7.  
  8. #define    BASEWIDTH    320
  9. #define    BASEHEIGHT    200
  10.  
  11. byte    vid_buffer[BASEWIDTH*BASEHEIGHT];
  12. short    zbuffer[BASEWIDTH*BASEHEIGHT];
  13. byte    surfcache[256*1024];
  14.  
  15. unsigned short    d_8to16table[256];
  16. unsigned    d_8to24table[256];
  17.  
  18. void    VID_SetPalette (unsigned char *palette)
  19. {
  20. }
  21.  
  22. void    VID_ShiftPalette (unsigned char *palette)
  23. {
  24. }
  25.  
  26. void    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.  
  41. void    VID_Shutdown (void)
  42. {
  43. }
  44.  
  45. void    VID_Update (vrect_t *rects)
  46. {
  47. }
  48.  
  49. /*
  50. ================
  51. D_BeginDirectRect
  52. ================
  53. */
  54. void D_BeginDirectRect (int x, int y, byte *pbitmap, int width, int height)
  55. {
  56. }
  57.  
  58.  
  59. /*
  60. ================
  61. D_EndDirectRect
  62. ================
  63. */
  64. void D_EndDirectRect (int x, int y, int width, int height)
  65. {
  66. }
  67.  
  68.  
  69.