vid_null.c 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. /*
  2. Copyright (C) 1996-1997 Id Software, Inc.
  3. This program is free software; you can redistribute it and/or
  4. modify it under the terms of the GNU General Public License
  5. as published by the Free Software Foundation; either version 2
  6. of the License, or (at your option) any later version.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  10. See the GNU General Public License for more details.
  11. You should have received a copy of the GNU General Public License
  12. along with this program; if not, write to the Free Software
  13. Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  14. */
  15. // vid_null.c -- null video driver to aid porting efforts
  16. #include "quakedef.h"
  17. #include "d_local.h"
  18. viddef_t vid; // global video state
  19. #define BASEWIDTH 320
  20. #define BASEHEIGHT 200
  21. byte vid_buffer[BASEWIDTH*BASEHEIGHT];
  22. short zbuffer[BASEWIDTH*BASEHEIGHT];
  23. byte surfcache[256*1024];
  24. unsigned short d_8to16table[256];
  25. unsigned d_8to24table[256];
  26. void VID_SetPalette (unsigned char *palette)
  27. {
  28. }
  29. void VID_ShiftPalette (unsigned char *palette)
  30. {
  31. }
  32. void VID_Init (unsigned char *palette)
  33. {
  34. vid.maxwarpwidth = vid.width = vid.conwidth = BASEWIDTH;
  35. vid.maxwarpheight = vid.height = vid.conheight = BASEHEIGHT;
  36. vid.aspect = 1.0;
  37. vid.numpages = 1;
  38. vid.colormap = host_colormap;
  39. vid.fullbright = 256 - LittleLong (*((int *)vid.colormap + 2048));
  40. vid.buffer = vid.conbuffer = vid_buffer;
  41. vid.rowbytes = vid.conrowbytes = BASEWIDTH;
  42. d_pzbuffer = zbuffer;
  43. D_InitCaches (surfcache, sizeof(surfcache));
  44. }
  45. void VID_Shutdown (void)
  46. {
  47. }
  48. void VID_Update (vrect_t *rects)
  49. {
  50. }
  51. /*
  52. ================
  53. D_BeginDirectRect
  54. ================
  55. */
  56. void D_BeginDirectRect (int x, int y, byte *pbitmap, int width, int height)
  57. {
  58. }
  59. /*
  60. ================
  61. D_EndDirectRect
  62. ================
  63. */
  64. void D_EndDirectRect (int x, int y, int width, int height)
  65. {
  66. }