From c59951b04646f610d6c1221312d9769fc0b177cb Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Mon, 16 Apr 2001 20:38:51 +0000 Subject: [PATCH] fix sw nq --- nq/source/d_init.c | 6 ++++++ nq/source/d_surf.c | 2 ++ nq/source/host.c | 5 ++--- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/nq/source/d_init.c b/nq/source/d_init.c index b30ca4991..d989d7085 100644 --- a/nq/source/d_init.c +++ b/nq/source/d_init.c @@ -70,6 +70,12 @@ D_Init (void) r_recursiveaffinetriangles = true; r_pixbytes = 1; r_aliasuvscale = 1.0; + + vid.surf_cache_size = D_SurfaceCacheForRes; + vid.flush_caches = D_FlushCaches; + vid.init_caches = D_InitCaches; + + VID_InitBuffers (); } diff --git a/nq/source/d_surf.c b/nq/source/d_surf.c index a77eebf7f..d43fac9e0 100644 --- a/nq/source/d_surf.c +++ b/nq/source/d_surf.c @@ -122,6 +122,8 @@ D_InitCaches (void *buffer, int size) sc_base->owner = NULL; sc_base->size = sc_size; + d_pzbuffer = vid.zbuffer; + D_ClearCacheGuard (); } diff --git a/nq/source/host.c b/nq/source/host.c index 9c55b8ebc..43d96ad7c 100644 --- a/nq/source/host.c +++ b/nq/source/host.c @@ -87,7 +87,6 @@ client_t *host_client; // current client jmp_buf host_abortserver; byte *vid_basepal; -byte *host_colormap; cvar_t *fs_globalcfg; @@ -971,8 +970,8 @@ Host_Init (quakeparms_t *parms) // color // to // black - host_colormap = (byte *) COM_LoadHunkFile ("gfx/colormap.lmp"); - if (!host_colormap) + vid_colormap = (byte *) COM_LoadHunkFile ("gfx/colormap.lmp"); + if (!vid_colormap) Sys_Error ("Couldn't load gfx/colormap.lmp"); VID_Init (vid_basepal);