diff --git a/README.md b/README.md index d0377f1a..47e18fc0 100644 --- a/README.md +++ b/README.md @@ -67,6 +67,7 @@ Maps support: | ------ | ------- | ------------------------------------------ | | IBSP | 39 | Quake 2 / Anachronox / Kingpin / Heretic 2 | | IBSP | 41 | Daikatana / SIN | +| RBSP | 1 | SIN | | QBSP | 39 | Quake 2 ReRelease | | BSPX | 39 | Quake 2 ReRelease (Extension to IBSP) | diff --git a/src/client/refresh/files/maps.c b/src/client/refresh/files/maps.c index e8e98ed1..3db86501 100644 --- a/src/client/refresh/files/maps.c +++ b/src/client/refresh/files/maps.c @@ -247,7 +247,8 @@ Mod_LoadQBSPNodes(const char *name, cplane_t *planes, int numplanes, mleaf_t *le int numleafs, mnode_t **nodes, int *numnodes, const byte *mod_base, const lump_t *l, int ident) { - if (ident == IDBSPHEADER) + if ((ident == IDBSPHEADER) || + (ident == RBSPHEADER)) { Mod_LoadNodes(name, planes, numplanes, leafs, numleafs, nodes, numnodes, mod_base, l); @@ -571,7 +572,8 @@ void Mod_LoadQBSPEdges(const char *name, medge_t **edges, int *numedges, const byte *mod_base, const lump_t *l, int ident) { - if (ident == IDBSPHEADER) + if ((ident == IDBSPHEADER) || + (ident == RBSPHEADER)) { Mod_LoadEdges(name, edges, numedges, mod_base, l); } @@ -693,7 +695,8 @@ Mod_LoadBSPX(int filesize, const byte *mod_base, maptype_t maptype) xofs = 0; numlumps = HEADER_LUMPS; - if (maptype == map_daikatana) + if ((header->version == BSPDKMVERSION) && + (maptype == map_daikatana)) { numlumps = 21; } @@ -865,7 +868,8 @@ void Mod_LoadQBSPMarksurfaces(const char *name, msurface_t ***marksurfaces, unsigned int *nummarksurfaces, msurface_t *surfaces, int numsurfaces, const byte *mod_base, const lump_t *l, int ident) { - if (ident == IDBSPHEADER) + if ((ident == IDBSPHEADER) || + (ident == RBSPHEADER)) { Mod_LoadMarksurfaces(name, marksurfaces, nummarksurfaces, surfaces, numsurfaces, mod_base, l); @@ -1032,7 +1036,8 @@ Mod_LoadQBSPLeafs(const char *name, mleaf_t **leafs, int *numleafs, msurface_t **marksurfaces, unsigned int nummarksurfaces, const byte *mod_base, const lump_t *l, int ident, maptype_t maptype) { - if (ident == IDBSPHEADER) + if ((ident == IDBSPHEADER) || + (ident == RBSPHEADER)) { if ((maptype == map_daikatana) && (l->filelen % sizeof(ddkleaf_t) == 0)) @@ -1357,7 +1362,8 @@ calcTexinfoFacesLeafsSize(const byte *mod_base, const dheader_t *header) { int hunkSize = 0; - if (header->ident == IDBSPHEADER) + if ((header->ident == IDBSPHEADER) || + (header->ident == RBSPHEADER)) { hunkSize += calcTexinfoAndFacesSize(mod_base, &header->lumps[LUMP_FACES], &header->lumps[LUMP_TEXINFO]); diff --git a/src/client/refresh/gl1/gl1_model.c b/src/client/refresh/gl1/gl1_model.c index 19334874..b2cb31a4 100644 --- a/src/client/refresh/gl1/gl1_model.c +++ b/src/client/refresh/gl1/gl1_model.c @@ -453,7 +453,9 @@ Mod_LoadBrushModel(model_t *mod, const void *buffer, int modfilelen) i = LittleLong(header->ident); - if (i != IDBSPHEADER && i != QBSPHEADER) + if ((i != IDBSPHEADER) && + (i != RBSPHEADER) && + (i != QBSPHEADER)) { Com_Error(ERR_DROP, "%s: %s has wrong ident (%i should be %i)", __func__, mod->name, i, IDBSPHEADER); @@ -461,7 +463,9 @@ Mod_LoadBrushModel(model_t *mod, const void *buffer, int modfilelen) i = LittleLong(header->version); - if (i != BSPVERSION && i != BSPDKMVERSION) + if ((i != BSPVERSION) && + (i != BSPSINVERSION) && + (i != BSPDKMVERSION)) { Com_Error(ERR_DROP, "%s: %s has wrong version number (%i should be %i)", __func__, mod->name, i, BSPVERSION); @@ -489,7 +493,8 @@ Mod_LoadBrushModel(model_t *mod, const void *buffer, int modfilelen) int hunkSize = 0; hunkSize += Mod_CalcLumpHunkSize(&header->lumps[LUMP_VERTEXES], sizeof(dvertex_t), sizeof(mvertex_t), EXTRA_LUMP_VERTEXES); - if (header->ident == IDBSPHEADER) + if ((header->ident == IDBSPHEADER) || + (header->ident == RBSPHEADER)) { hunkSize += Mod_CalcLumpHunkSize(&header->lumps[LUMP_EDGES], sizeof(dedge_t), sizeof(medge_t), EXTRA_LUMP_EDGES); @@ -508,7 +513,8 @@ Mod_LoadBrushModel(model_t *mod, const void *buffer, int modfilelen) hunkSize += calcTexinfoFacesLeafsSize(mod_base, header); hunkSize += Mod_CalcLumpHunkSize(&header->lumps[LUMP_VISIBILITY], 1, 1, 0); - if (header->ident == IDBSPHEADER) + if ((header->ident == IDBSPHEADER) || + (header->ident == RBSPHEADER)) { if ((maptype == map_daikatana) && (header->lumps[LUMP_LEAFS].filelen % sizeof(ddkleaf_t) == 0)) @@ -567,7 +573,8 @@ Mod_LoadBrushModel(model_t *mod, const void *buffer, int modfilelen) Mod_LoadTexinfo(mod->name, &mod->texinfo, &mod->numtexinfo, mod_base, &header->lumps[LUMP_TEXINFO], (findimage_t)R_FindImage, r_notexture, maptype); - if (header->ident == IDBSPHEADER) + if ((header->ident == IDBSPHEADER) || + (header->ident == RBSPHEADER)) { Mod_LoadFaces(mod, mod_base, &header->lumps[LUMP_FACES], bspx_header); } @@ -708,6 +715,8 @@ Mod_ForName(const char *name, model_t *parent_model, qboolean crash) case IDBSPHEADER: /* fall through */ + case RBSPHEADER: + /* fall through */ case QBSPHEADER: Mod_LoadBrushModel(mod, buf, modfilelen); break; diff --git a/src/client/refresh/gl3/gl3_model.c b/src/client/refresh/gl3/gl3_model.c index 7ff58b50..6d9cb6bd 100644 --- a/src/client/refresh/gl3/gl3_model.c +++ b/src/client/refresh/gl3/gl3_model.c @@ -454,7 +454,9 @@ Mod_LoadBrushModel(gl3model_t *mod, const void *buffer, int modfilelen) i = LittleLong(header->ident); - if (i != IDBSPHEADER && i != QBSPHEADER) + if ((i != IDBSPHEADER) && + (i != RBSPHEADER) && + (i != QBSPHEADER)) { Com_Error(ERR_DROP, "%s: %s has wrong ident (%i should be %i)", __func__, mod->name, i, IDBSPHEADER); @@ -462,7 +464,9 @@ Mod_LoadBrushModel(gl3model_t *mod, const void *buffer, int modfilelen) i = LittleLong(header->version); - if (i != BSPVERSION && i != BSPDKMVERSION) + if ((i != BSPVERSION) && + (i != BSPSINVERSION) && + (i != BSPDKMVERSION)) { Com_Error(ERR_DROP, "%s: %s has wrong version number (%i should be %i)", __func__, mod->name, i, BSPVERSION); @@ -490,7 +494,8 @@ Mod_LoadBrushModel(gl3model_t *mod, const void *buffer, int modfilelen) int hunkSize = 0; hunkSize += Mod_CalcLumpHunkSize(&header->lumps[LUMP_VERTEXES], sizeof(dvertex_t), sizeof(mvertex_t), EXTRA_LUMP_VERTEXES); - if (header->ident == IDBSPHEADER) + if ((header->ident == IDBSPHEADER) || + (header->ident == RBSPHEADER)) { hunkSize += Mod_CalcLumpHunkSize(&header->lumps[LUMP_EDGES], sizeof(dedge_t), sizeof(medge_t), EXTRA_LUMP_EDGES); @@ -509,7 +514,8 @@ Mod_LoadBrushModel(gl3model_t *mod, const void *buffer, int modfilelen) hunkSize += calcTexinfoFacesLeafsSize(mod_base, header); hunkSize += Mod_CalcLumpHunkSize(&header->lumps[LUMP_VISIBILITY], 1, 1, 0); - if (header->ident == IDBSPHEADER) + if ((header->ident == IDBSPHEADER) || + (header->ident == RBSPHEADER)) { if ((maptype == map_daikatana) && (header->lumps[LUMP_LEAFS].filelen % sizeof(ddkleaf_t) == 0)) @@ -568,7 +574,8 @@ Mod_LoadBrushModel(gl3model_t *mod, const void *buffer, int modfilelen) Mod_LoadTexinfo(mod->name, &mod->texinfo, &mod->numtexinfo, mod_base, &header->lumps[LUMP_TEXINFO], (findimage_t)GL3_FindImage, gl3_notexture, maptype); - if (header->ident == IDBSPHEADER) + if ((header->ident == IDBSPHEADER) || + (header->ident == RBSPHEADER)) { Mod_LoadFaces(mod, mod_base, &header->lumps[LUMP_FACES], bspx_header); } @@ -709,6 +716,8 @@ Mod_ForName(const char *name, gl3model_t *parent_model, qboolean crash) case IDBSPHEADER: /* fall through */ + case RBSPHEADER: + /* fall through */ case QBSPHEADER: Mod_LoadBrushModel(mod, buf, modfilelen); break; diff --git a/src/client/refresh/gl4/gl4_model.c b/src/client/refresh/gl4/gl4_model.c index af9e6aef..809ed904 100644 --- a/src/client/refresh/gl4/gl4_model.c +++ b/src/client/refresh/gl4/gl4_model.c @@ -454,7 +454,9 @@ Mod_LoadBrushModel(gl4model_t *mod, const void *buffer, int modfilelen) i = LittleLong(header->ident); - if (i != IDBSPHEADER && i != QBSPHEADER) + if ((i != IDBSPHEADER) && + (i != RBSPHEADER) && + (i != QBSPHEADER)) { Com_Error(ERR_DROP, "%s: %s has wrong ident (%i should be %i)", __func__, mod->name, i, IDBSPHEADER); @@ -462,7 +464,9 @@ Mod_LoadBrushModel(gl4model_t *mod, const void *buffer, int modfilelen) i = LittleLong(header->version); - if (i != BSPVERSION && i != BSPDKMVERSION) + if ((i != BSPVERSION) && + (i != BSPSINVERSION) && + (i != BSPDKMVERSION)) { Com_Error(ERR_DROP, "%s: %s has wrong version number (%i should be %i)", __func__, mod->name, i, BSPVERSION); @@ -490,7 +494,8 @@ Mod_LoadBrushModel(gl4model_t *mod, const void *buffer, int modfilelen) int hunkSize = 0; hunkSize += Mod_CalcLumpHunkSize(&header->lumps[LUMP_VERTEXES], sizeof(dvertex_t), sizeof(mvertex_t), EXTRA_LUMP_VERTEXES); - if (header->ident == IDBSPHEADER) + if ((header->ident == IDBSPHEADER) || + (header->ident == RBSPHEADER)) { hunkSize += Mod_CalcLumpHunkSize(&header->lumps[LUMP_EDGES], sizeof(dedge_t), sizeof(medge_t), EXTRA_LUMP_EDGES); @@ -509,7 +514,8 @@ Mod_LoadBrushModel(gl4model_t *mod, const void *buffer, int modfilelen) hunkSize += calcTexinfoFacesLeafsSize(mod_base, header); hunkSize += Mod_CalcLumpHunkSize(&header->lumps[LUMP_VISIBILITY], 1, 1, 0); - if (header->ident == IDBSPHEADER) + if ((header->ident == IDBSPHEADER) || + (header->ident == RBSPHEADER)) { if ((maptype == map_daikatana) && (header->lumps[LUMP_LEAFS].filelen % sizeof(ddkleaf_t) == 0)) @@ -568,7 +574,8 @@ Mod_LoadBrushModel(gl4model_t *mod, const void *buffer, int modfilelen) Mod_LoadTexinfo(mod->name, &mod->texinfo, &mod->numtexinfo, mod_base, &header->lumps[LUMP_TEXINFO], (findimage_t)GL4_FindImage, gl4_notexture, maptype); - if (header->ident == IDBSPHEADER) + if ((header->ident == IDBSPHEADER) || + (header->ident == RBSPHEADER)) { Mod_LoadFaces(mod, mod_base, &header->lumps[LUMP_FACES], bspx_header); } @@ -709,6 +716,8 @@ Mod_ForName(const char *name, gl4model_t *parent_model, qboolean crash) case IDBSPHEADER: /* fall through */ + case RBSPHEADER: + /* fall through */ case QBSPHEADER: Mod_LoadBrushModel(mod, buf, modfilelen); break; diff --git a/src/client/refresh/soft/sw_model.c b/src/client/refresh/soft/sw_model.c index 0219fc24..2a6b8357 100644 --- a/src/client/refresh/soft/sw_model.c +++ b/src/client/refresh/soft/sw_model.c @@ -438,7 +438,9 @@ Mod_LoadBrushModel(model_t *mod, const void *buffer, int modfilelen) i = LittleLong(header->ident); - if (i != IDBSPHEADER && i != QBSPHEADER) + if ((i != IDBSPHEADER) && + (i != RBSPHEADER) && + (i != QBSPHEADER)) { Com_Error(ERR_DROP, "%s: %s has wrong ident (%i should be %i)", __func__, mod->name, i, IDBSPHEADER); @@ -446,7 +448,9 @@ Mod_LoadBrushModel(model_t *mod, const void *buffer, int modfilelen) i = LittleLong(header->version); - if (i != BSPVERSION && i != BSPDKMVERSION) + if ((i != BSPVERSION) && + (i != BSPSINVERSION) && + (i != BSPDKMVERSION)) { Com_Error(ERR_DROP, "%s: %s has wrong version number (%i should be %i)", __func__, mod->name, i, BSPVERSION); @@ -474,7 +478,8 @@ Mod_LoadBrushModel(model_t *mod, const void *buffer, int modfilelen) int hunkSize = 0; hunkSize += Mod_CalcLumpHunkSize(&header->lumps[LUMP_VERTEXES], sizeof(dvertex_t), sizeof(mvertex_t), EXTRA_LUMP_VERTEXES); - if (header->ident == IDBSPHEADER) + if ((header->ident == IDBSPHEADER) || + (header->ident == RBSPHEADER)) { hunkSize += Mod_CalcLumpHunkSize(&header->lumps[LUMP_EDGES], sizeof(dedge_t), sizeof(medge_t), EXTRA_LUMP_EDGES); @@ -495,7 +500,8 @@ Mod_LoadBrushModel(model_t *mod, const void *buffer, int modfilelen) hunkSize += calcTexinfoFacesLeafsSize(mod_base, header); hunkSize += Mod_CalcLumpHunkSize(&header->lumps[LUMP_VISIBILITY], 1, 1, 0); - if (header->ident == IDBSPHEADER) + if ((header->ident == IDBSPHEADER) || + (header->ident == RBSPHEADER)) { if ((maptype == map_daikatana) && (header->lumps[LUMP_LEAFS].filelen % sizeof(ddkleaf_t) == 0)) @@ -556,7 +562,8 @@ Mod_LoadBrushModel(model_t *mod, const void *buffer, int modfilelen) Mod_LoadTexinfo(mod->name, &mod->texinfo, &mod->numtexinfo, mod_base, &header->lumps[LUMP_TEXINFO], (findimage_t)R_FindImage, r_notexture_mip, maptype); - if (header->ident == IDBSPHEADER) + if ((header->ident == IDBSPHEADER) || + (header->ident == RBSPHEADER)) { Mod_LoadFaces(mod, mod_base, &header->lumps[LUMP_FACES], bspx_header); } @@ -699,6 +706,8 @@ Mod_ForName(const char *name, model_t *parent_model, qboolean crash) case IDBSPHEADER: /* fall through */ + case RBSPHEADER: + /* fall through */ case QBSPHEADER: Mod_LoadBrushModel(mod, buf, modfilelen); break; diff --git a/src/client/refresh/vk/vk_model.c b/src/client/refresh/vk/vk_model.c index a2d0b845..8bd2ab9e 100644 --- a/src/client/refresh/vk/vk_model.c +++ b/src/client/refresh/vk/vk_model.c @@ -428,7 +428,9 @@ Mod_LoadBrushModel(model_t *mod, const void *buffer, int modfilelen) i = LittleLong(header->ident); - if (i != IDBSPHEADER && i != QBSPHEADER) + if ((i != IDBSPHEADER) && + (i != RBSPHEADER) && + (i != QBSPHEADER)) { Com_Error(ERR_DROP, "%s: %s has wrong ident (%i should be %i)", __func__, mod->name, i, IDBSPHEADER); @@ -436,7 +438,9 @@ Mod_LoadBrushModel(model_t *mod, const void *buffer, int modfilelen) i = LittleLong(header->version); - if (i != BSPVERSION && i != BSPDKMVERSION) + if ((i != BSPVERSION) && + (i != BSPSINVERSION) && + (i != BSPDKMVERSION)) { Com_Error(ERR_DROP, "%s: %s has wrong version number (%i should be %i)", __func__, mod->name, i, BSPVERSION); @@ -464,7 +468,8 @@ Mod_LoadBrushModel(model_t *mod, const void *buffer, int modfilelen) int hunkSize = 0; hunkSize += Mod_CalcLumpHunkSize(&header->lumps[LUMP_VERTEXES], sizeof(dvertex_t), sizeof(mvertex_t), EXTRA_LUMP_VERTEXES); - if (header->ident == IDBSPHEADER) + if ((header->ident == IDBSPHEADER) || + (header->ident == RBSPHEADER)) { hunkSize += Mod_CalcLumpHunkSize(&header->lumps[LUMP_EDGES], sizeof(dedge_t), sizeof(medge_t), EXTRA_LUMP_EDGES); @@ -483,7 +488,8 @@ Mod_LoadBrushModel(model_t *mod, const void *buffer, int modfilelen) hunkSize += calcTexinfoFacesLeafsSize(mod_base, header); hunkSize += Mod_CalcLumpHunkSize(&header->lumps[LUMP_VISIBILITY], 1, 1, 0); - if (header->ident == IDBSPHEADER) + if ((header->ident == IDBSPHEADER) || + (header->ident == RBSPHEADER)) { if ((maptype == map_daikatana) && (header->lumps[LUMP_LEAFS].filelen % sizeof(ddkleaf_t) == 0)) @@ -542,7 +548,8 @@ Mod_LoadBrushModel(model_t *mod, const void *buffer, int modfilelen) Mod_LoadTexinfo(mod->name, &mod->texinfo, &mod->numtexinfo, mod_base, &header->lumps[LUMP_TEXINFO], (findimage_t)Vk_FindImage, r_notexture, maptype); - if (header->ident == IDBSPHEADER) + if ((header->ident == IDBSPHEADER) || + (header->ident == RBSPHEADER)) { Mod_LoadFaces(mod, mod_base, &header->lumps[LUMP_FACES], bspx_header); } @@ -692,6 +699,8 @@ Mod_ForName(const char *name, model_t *parent_model, qboolean crash) case IDBSPHEADER: /* fall through */ + case RBSPHEADER: + /* fall through */ case QBSPHEADER: Mod_LoadBrushModel(mod, buf, modfilelen); break; diff --git a/src/common/cmodels.c b/src/common/cmodels.c index d5360646..ca257b9d 100644 --- a/src/common/cmodels.c +++ b/src/common/cmodels.c @@ -202,6 +202,7 @@ Mod_MaptypeName(maptype_t maptype) case map_daikatana: maptypename = "Daikatana"; break; case map_kingpin: maptypename = "Kingpin"; break; case map_anachronox: maptypename = "Anachronox"; break; + case map_sin: maptypename = "SiN"; break; default: maptypename = "Unknown"; break; } @@ -215,7 +216,8 @@ Mod_LoadValidateLumps(const char *name, const dheader_t *header) qboolean error = false; maptype_t maptype; - if (header->ident == IDBSPHEADER) + if ((header->ident == IDBSPHEADER) || + (header->ident == RBSPHEADER)) { rules = idbsplumps; if (header->version == BSPDKMVERSION) diff --git a/src/common/collision.c b/src/common/collision.c index 9049ea16..66202668 100644 --- a/src/common/collision.c +++ b/src/common/collision.c @@ -2013,7 +2013,9 @@ CM_LoadCachedMap(const char *name, model_t *mod) ((int *)&header)[i] = LittleLong(((int *)&header)[i]); } - if (header.ident != IDBSPHEADER && header.ident != QBSPHEADER) + if ((header.ident != IDBSPHEADER) && + (header.ident != RBSPHEADER) && + (header.ident != QBSPHEADER)) { Com_Error(ERR_DROP, "%s: %s has wrong ident (%i should be %i)", __func__, name, header.ident, IDBSPHEADER); @@ -2036,6 +2038,14 @@ CM_LoadCachedMap(const char *name, model_t *mod) __func__, name, header.version, BSPVERSION); } + if ((header.ident == RBSPHEADER) && + (header.version != BSPSINVERSION)) + { + Com_Error(ERR_DROP, + "%s: %s has wrong version number (%i should be %i)", + __func__, name, header.version, BSPSINVERSION); + } + maptype = Mod_LoadValidateLumps(name, &header); cmod_base = (byte *)buf; @@ -2046,7 +2056,8 @@ CM_LoadCachedMap(const char *name, model_t *mod) hunkSize += Mod_CalcLumpHunkSize(&header.lumps[LUMP_TEXINFO], sizeof(texinfo_t), sizeof(mapsurface_t), EXTRA_LUMP_TEXINFO); - if (header.ident == IDBSPHEADER) + if ((header.ident == IDBSPHEADER) || + (header.ident == RBSPHEADER)) { if ((maptype == map_daikatana) && (header.lumps[LUMP_LEAFS].filelen % sizeof(ddkleaf_t) == 0)) @@ -2076,7 +2087,8 @@ CM_LoadCachedMap(const char *name, model_t *mod) hunkSize += Mod_CalcLumpHunkSize(&header.lumps[LUMP_BRUSHES], sizeof(dbrush_t), sizeof(cbrush_t), EXTRA_LUMP_BRUSHES); - if (header.ident == IDBSPHEADER) + if ((header.ident == IDBSPHEADER) || + (header.ident == RBSPHEADER)) { hunkSize += Mod_CalcLumpHunkSize(&header.lumps[LUMP_BRUSHSIDES], sizeof(dbrushside_t), sizeof(cbrushside_t), EXTRA_LUMP_BRUSHSIDES); @@ -2106,7 +2118,9 @@ CM_LoadCachedMap(const char *name, model_t *mod) CMod_LoadSurfaces(mod->name, &mod->map_surfaces, &mod->numtexinfo, cmod_base, &header.lumps[LUMP_TEXINFO], maptype); - if (header.ident == IDBSPHEADER) + + if ((header.ident == IDBSPHEADER) || + (header.ident == RBSPHEADER)) { if ((maptype == map_daikatana) && (header.lumps[LUMP_LEAFS].filelen % sizeof(ddkleaf_t) == 0)) @@ -2135,7 +2149,8 @@ CM_LoadCachedMap(const char *name, model_t *mod) CMod_LoadBrushes(mod->name, &mod->map_brushes, &mod->numbrushes, cmod_base, &header.lumps[LUMP_BRUSHES]); - if (header.ident == IDBSPHEADER) + if ((header.ident == IDBSPHEADER) || + (header.ident == RBSPHEADER)) { CMod_LoadBrushSides(mod->name, &mod->map_brushsides, &mod->numbrushsides, mod->map_planes, mod->numplanes, mod->map_surfaces, mod->numtexinfo, @@ -2151,7 +2166,8 @@ CM_LoadCachedMap(const char *name, model_t *mod) CMod_LoadSubmodels(mod->name, mod->map_cmodels, &mod->numcmodels, cmod_base, &header.lumps[LUMP_MODELS]); - if (header.ident == IDBSPHEADER) + if ((header.ident == IDBSPHEADER) || + (header.ident == RBSPHEADER)) { CMod_LoadNodes(mod->name, &mod->map_nodes, &mod->numnodes, mod->map_planes, cmod_base, &header.lumps[LUMP_NODES]); diff --git a/src/common/header/cmodel.h b/src/common/header/cmodel.h index 6f71703c..8a4a5efd 100644 --- a/src/common/header/cmodel.h +++ b/src/common/header/cmodel.h @@ -46,6 +46,7 @@ typedef enum map_daikatana = 2, map_kingpin = 3, map_anachronox = 4, + map_sin = 5, } maptype_t; extern int Mod_LoadSurfConvertFlags(int flags, maptype_t maptype); diff --git a/src/common/header/files.h b/src/common/header/files.h index d8377325..506bfe12 100644 --- a/src/common/header/files.h +++ b/src/common/header/files.h @@ -588,7 +588,7 @@ typedef struct { int value; } dkmtex_t; -/* .SWL Daikana texture file format */ +/* .SWL SiN texture file format */ #define SIN_PALETTE_SIZE 256 * 4 @@ -965,5 +965,9 @@ typedef struct int unknow; /* some unused additional field */ } ddkleaf_t; +/* SiN structures */ +#define RBSPHEADER (('P' << 24) + ('S' << 16) + ('B' << 8) + 'R') /* little-endian "RBSP" */ +#define BSPSINVERSION 1 + #endif