mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2025-02-01 21:51:08 +00:00
renders: check for SiN format in player models
This commit is contained in:
parent
9145c0a923
commit
eff91e34c0
9 changed files with 39 additions and 15 deletions
31
README.md
31
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:
|
||||
|
|
|
@ -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 &&
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue