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);