1
0
Fork 0
forked from fte/fteqw

Fix other stuff after quake64 bsp support.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@6033 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2021-08-23 06:36:32 +00:00
parent d63a4cea1f
commit d0d2c31f38
4 changed files with 17 additions and 15 deletions

View file

@ -554,19 +554,6 @@ void *Mod_Extradata (struct model_s *mod); // handles caching
void Mod_TouchModel (const char *name); void Mod_TouchModel (const char *name);
void Mod_RebuildLightmaps (void); void Mod_RebuildLightmaps (void);
typedef struct
{
unsigned int *offsets;
unsigned short *extents;
unsigned char *styles8;
unsigned short *styles16;
unsigned int stylesperface;
unsigned char *shifts;
unsigned char defaultshift;
} lightmapoverrides_t;
typedef struct bspx_header_s bspx_header_t;
void Mod_LoadLighting (struct model_s *loadmodel, bspx_header_t *bspx, qbyte *mod_base, lump_t *l, qboolean interleaveddeluxe, lightmapoverrides_t *overrides);
struct mleaf_s *Mod_PointInLeaf (struct model_s *model, float *p); struct mleaf_s *Mod_PointInLeaf (struct model_s *model, float *p);
void Mod_NowLoadExternal(struct model_s *loadmodel); void Mod_NowLoadExternal(struct model_s *loadmodel);

View file

@ -1524,7 +1524,7 @@ static void CalcSurfaceExtents (msurface_t *s)
Mod_LoadFaces Mod_LoadFaces
================= =================
*/ */
#ifndef SERVERONLY #ifdef HAVE_CLIENT
static qboolean CModQ2_LoadFaces (model_t *mod, qbyte *mod_base, lump_t *l, lump_t *lightlump, qboolean lightofsisdouble, bspx_header_t *bspx) static qboolean CModQ2_LoadFaces (model_t *mod, qbyte *mod_base, lump_t *l, lump_t *lightlump, qboolean lightofsisdouble, bspx_header_t *bspx)
{ {
dsface_t *in; dsface_t *in;
@ -1551,7 +1551,7 @@ static qboolean CModQ2_LoadFaces (model_t *mod, qbyte *mod_base, lump_t *l, lump
mod->surfaces = out; mod->surfaces = out;
mod->numsurfaces = count; mod->numsurfaces = count;
Mod_LoadLighting(mod, bspx, mod_base, lightlump, lightofsisdouble, &overrides); Mod_LoadLighting(mod, bspx, mod_base, lightlump, lightofsisdouble, &overrides, sb_none);
if (overrides.offsets) if (overrides.offsets)
lmshift = overrides.defaultshift; lmshift = overrides.defaultshift;
else else

View file

@ -3722,6 +3722,7 @@ TRACE(("dbg: Mod_LoadTextures: inittexturedescs\n"));
Mod_LoadMiptex(loadmodel, tx, mt, mtsize, ptr, e-o); Mod_LoadMiptex(loadmodel, tx, mt, mtsize, ptr, e-o);
#else #else
(void)e; (void)e;
(void)mtsize;
#endif #endif
e = o; e = o;

View file

@ -31,6 +31,7 @@ struct model_s;
struct world_s; struct world_s;
struct dlight_s; struct dlight_s;
typedef struct builddata_s builddata_t; typedef struct builddata_s builddata_t;
typedef struct bspx_header_s bspx_header_t;
typedef enum { typedef enum {
SHADER_SORT_NONE, SHADER_SORT_NONE,
@ -1108,6 +1109,19 @@ typedef struct model_s
#endif // __MODEL__ #endif // __MODEL__
typedef struct
{
unsigned int *offsets;
unsigned short *extents;
unsigned char *styles8;
unsigned short *styles16;
unsigned int stylesperface;
unsigned char *shifts;
unsigned char defaultshift;
} lightmapoverrides_t;
void Mod_LoadLighting (struct model_s *loadmodel, bspx_header_t *bspx, qbyte *mod_base, lump_t *l, qboolean interleaveddeluxe, lightmapoverrides_t *overrides, subbsp_t subbsp);
float RadiusFromBounds (const vec3_t mins, const vec3_t maxs); float RadiusFromBounds (const vec3_t mins, const vec3_t maxs);