diff --git a/README.md b/README.md index 9b2a4c6c..ef91021b 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,7 @@ Have a look at the yquake2 repository for the "normal" Yamagi Quake II: https://github.com/yquake2/yquake2 Alpha windows 64 bit [binaries](https://github.com/yquake2/yquake2remaster/releases). +Saves format is unstabled and could change between alpha releases. State: * GL1/GLES3/GL3/GL4/VK: @@ -29,20 +30,20 @@ Monsters: Models support: -| Format | Original Game | Frame vertex | Meshes | Comments | -| ------ | --------------- | ------------ | ------ | --------------------------------------- | -| mdl | Quake 1 | 8 bit | Single | Unsupported grouped textures | -| md2 | Quake 2 | 8 bit | Single | | -| md2 | Anachronox | 8/10/16 bit | Single | No tagged surfaces, unchecked with game | -| mdx | Kingpin | 8 bit | Many | No sfx support, unchecked with game | -| fm | Heretic 2 | 8 bit | Many | | -| def | SiN | Part of sam | Many | Unchecked with game | -| dkm | Daikatana DKM1 | 8 bit | Many | Unchecked with game | -| dkm | Daikatana DKM2 | 10 bit | Many | Unchecked with game | -| md3 | Quake 3 | 16 bit | Many | No tags support | -| md5 | Doom 3/Quake 4 | float | Many | Requires md2 for skins | -| sbm | SiN | Part of sam | Many | Unchecked with game | -| sam | SiN | 8 bit | Many | Unchecked with game | +| Format | Original Game | Frame vertex | Meshes | Comments | +| ------ | --------------- | ------------ | -------- | --------------------------------------- | +| mdl | Quake 1 | 8 bit | Single | Unsupported grouped textures | +| md2 | Quake 2 | 8 bit | Single | | +| md2 | Anachronox | 8/10/16 bit | Single | No tagged surfaces, unchecked with game | +| mdx | Kingpin | 8 bit | Multiple | No sfx support, unchecked with game | +| fm | Heretic 2 | 8 bit | Multiple | | +| def | SiN | Part of sam | Multiple | Unchecked with game | +| dkm | Daikatana DKM1 | 8 bit | Multiple | Unchecked with game | +| dkm | Daikatana DKM2 | 10 bit | Multiple | Unchecked with game | +| md3 | Quake 3 | 16 bit | Multiple | No tags support | +| md5 | Doom 3/Quake 4 | float | Multiple | Requires md2 for skins | +| sbm | SiN | Part of sam | Multiple | Unchecked with game | +| sam | SiN | 8 bit | Multiple | Unchecked with game | All models support only single texture for all meshes and frames limit based on game protocol. @@ -74,6 +75,8 @@ Maps support: Note: * Non Quake 2 maps are limmited mostly view only, and could have issues with tranparency or some animations flags and properties. + * If you like support some other maps type, create pull request for Mod_Load2QBSP + function and provide a link to demo maps. Games: * Quake 2: diff --git a/src/client/menu/menu.c b/src/client/menu/menu.c index 2dede985..3be524ee 100644 --- a/src/client/menu/menu.c +++ b/src/client/menu/menu.c @@ -5731,6 +5731,7 @@ PlayerModelList(void) if (ContainsFile(s, "tris.fm") == false && ContainsFile(s, "tris.dkm") == false && + ContainsFile(s, "tris.def") == false && ContainsFile(s, "tris.md2") == false && ContainsFile(s, "tris.md3") == false && ContainsFile(s, "tris.md5mesh") == false && diff --git a/src/client/refresh/gl1/gl1_model.c b/src/client/refresh/gl1/gl1_model.c index 64a699f4..b040e65c 100644 --- a/src/client/refresh/gl1/gl1_model.c +++ b/src/client/refresh/gl1/gl1_model.c @@ -474,6 +474,8 @@ Mod_ForName(const char *name, model_t *parent_model, qboolean crash) /* call the apropriate loader */ switch (LittleLong(*(unsigned *)buf)) { + case SDEFHEADER: + /* fall through */ case MDXHEADER: /* fall through */ case DKMHEADER: diff --git a/src/client/refresh/gl3/gl3_model.c b/src/client/refresh/gl3/gl3_model.c index 795534a1..8fe1d7b3 100644 --- a/src/client/refresh/gl3/gl3_model.c +++ b/src/client/refresh/gl3/gl3_model.c @@ -475,6 +475,8 @@ Mod_ForName(const char *name, gl3model_t *parent_model, qboolean crash) /* call the apropriate loader */ switch (LittleLong(*(unsigned *)buf)) { + case SDEFHEADER: + /* fall through */ case MDXHEADER: /* fall through */ case DKMHEADER: diff --git a/src/client/refresh/gl4/gl4_model.c b/src/client/refresh/gl4/gl4_model.c index 5107a935..baefec1d 100644 --- a/src/client/refresh/gl4/gl4_model.c +++ b/src/client/refresh/gl4/gl4_model.c @@ -475,6 +475,8 @@ Mod_ForName(const char *name, gl4model_t *parent_model, qboolean crash) /* call the apropriate loader */ switch (LittleLong(*(unsigned *)buf)) { + case SDEFHEADER: + /* fall through */ case MDXHEADER: /* fall through */ case DKMHEADER: diff --git a/src/client/refresh/soft/sw_model.c b/src/client/refresh/soft/sw_model.c index 17d86c38..91506a49 100644 --- a/src/client/refresh/soft/sw_model.c +++ b/src/client/refresh/soft/sw_model.c @@ -482,6 +482,8 @@ Mod_ForName(const char *name, model_t *parent_model, qboolean crash) /* call the apropriate loader */ switch (LittleLong(*(unsigned *)buf)) { + case SDEFHEADER: + /* fall through */ case MDXHEADER: /* fall through */ case DKMHEADER: diff --git a/src/client/refresh/vk/vk_model.c b/src/client/refresh/vk/vk_model.c index 150d25c8..307bac46 100644 --- a/src/client/refresh/vk/vk_model.c +++ b/src/client/refresh/vk/vk_model.c @@ -458,6 +458,8 @@ Mod_ForName(const char *name, model_t *parent_model, qboolean crash) /* call the apropriate loader */ switch (LittleLong(*(unsigned *)buf)) { + case SDEFHEADER: + /* fall through */ case MDXHEADER: /* fall through */ case DKMHEADER: diff --git a/src/common/filesystem.c b/src/common/filesystem.c index 39370dc2..e8f8ad57 100644 --- a/src/common/filesystem.c +++ b/src/common/filesystem.c @@ -1150,7 +1150,6 @@ FS_LoadSIN(const char *packPath) files[i].size = LittleLong(info[i].filelen); files[i].compressed_size = 0; files[i].format = PAK_MODE_Q2; - printf("sin: %s:%d\n", files[i].name, files[i].size); } free(info); diff --git a/src/common/models.c b/src/common/models.c index 61008d8a..9c717c8b 100644 --- a/src/common/models.c +++ b/src/common/models.c @@ -217,6 +217,7 @@ Mod_LoadFileWithoutExt(const char *namewe, void **buffer, const char* ext) tlen = strlen(namewe); if (!strcmp(ext, "fm") || + !strcmp(ext, "def") || !strcmp(ext, "dkm") || !strcmp(ext, "md2") || !strcmp(ext, "md3") || @@ -257,6 +258,16 @@ Mod_LoadFileWithoutExt(const char *namewe, void **buffer, const char* ext) return filesize; } + /* Check SiN model def with include sbm/sam files */ + Q_strlcpy(newname + tlen, ".def", sizeof(newname)); + filesize = FS_LoadFile(newname, buffer); + if (filesize > 0) + { + Com_DPrintf("%s: %s loaded as def/sbm/sam (SiN)\n", + __func__, namewe); + return filesize; + } + /* Check Quake 2 model */ Q_strlcpy(newname + tlen, ".md2", sizeof(newname)); filesize = FS_LoadFile(newname, buffer);