vid_null.c 1.2 KB

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