mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-10 07:12:07 +00:00
renders: load mdx/Kingpin models support
This commit is contained in:
parent
b30dd7dd2d
commit
bb3ac6ef9c
8 changed files with 24 additions and 1 deletions
|
@ -39,7 +39,8 @@ Models support:
|
|||
| mdl | Quake 1 | 8 bit | unsupported grouped textures |
|
||||
| md2 | Quake 2 | 8 bit | full support |
|
||||
| md2 | Anachronox | 8/10/16 bit | does no suport tagged surfaces |
|
||||
| fm | Heretic 2 | 8 bit | show all meshes, |
|
||||
| mdx | Kingpin | 8 bit | unchecked with game |
|
||||
| fm | Heretic 2 | 8 bit | show all meshes |
|
||||
| dkm | Daikatana DKM1 | 8 bit | unchecked with game |
|
||||
| dkm | Daikatana DKM2 | 10 bit | unchecked with game |
|
||||
| md3 | Quake 3 | 16 bit | show all meshes, no tags support, unchecked |
|
||||
|
|
|
@ -5735,6 +5735,7 @@ PlayerModelList(void)
|
|||
ContainsFile(s, "tris.md2") == false &&
|
||||
ContainsFile(s, "tris.md3") == false &&
|
||||
ContainsFile(s, "tris.md5mesh") == false &&
|
||||
ContainsFile(s, "tris.mdx") == false &&
|
||||
ContainsFile(s, "tris.mdl") == false)
|
||||
{
|
||||
/* invalid player model */
|
||||
|
|
|
@ -2820,6 +2820,7 @@ Mod_LoadFileWithoutExt(const char *namewe, void **buffer, const char* ext)
|
|||
!strcmp(ext, "md2") ||
|
||||
!strcmp(ext, "md3") ||
|
||||
!strcmp(ext, "md5mesh") ||
|
||||
!strcmp(ext, "mdx") ||
|
||||
!strcmp(ext, "mdl"))
|
||||
{
|
||||
int filesize;
|
||||
|
@ -2865,6 +2866,16 @@ Mod_LoadFileWithoutExt(const char *namewe, void **buffer, const char* ext)
|
|||
return filesize;
|
||||
}
|
||||
|
||||
/* Check Kingpin model */
|
||||
Q_strlcpy(newname + tlen, ".mdx", sizeof(newname));
|
||||
filesize = ri.FS_LoadFile(newname, buffer);
|
||||
if (filesize > 0)
|
||||
{
|
||||
R_Printf(PRINT_DEVELOPER, "%s: %s loaded as mdx (Kingpin)\n",
|
||||
__func__, namewe);
|
||||
return filesize;
|
||||
}
|
||||
|
||||
/* Check Daikatana model */
|
||||
Q_strlcpy(newname + tlen, ".dkm", sizeof(newname));
|
||||
filesize = ri.FS_LoadFile(newname, buffer);
|
||||
|
|
|
@ -820,6 +820,8 @@ Mod_ForName(const char *name, model_t *parent_model, qboolean crash)
|
|||
/* call the apropriate loader */
|
||||
switch (LittleLong(*(unsigned *)buf))
|
||||
{
|
||||
case MDXHEADER:
|
||||
/* fall through */
|
||||
case DKMHEADER:
|
||||
/* fall through */
|
||||
case RAVENFMHEADER:
|
||||
|
|
|
@ -821,6 +821,8 @@ Mod_ForName(const char *name, gl3model_t *parent_model, qboolean crash)
|
|||
/* call the apropriate loader */
|
||||
switch (LittleLong(*(unsigned *)buf))
|
||||
{
|
||||
case MDXHEADER:
|
||||
/* fall through */
|
||||
case DKMHEADER:
|
||||
/* fall through */
|
||||
case RAVENFMHEADER:
|
||||
|
|
|
@ -821,6 +821,8 @@ Mod_ForName(const char *name, gl4model_t *parent_model, qboolean crash)
|
|||
/* call the apropriate loader */
|
||||
switch (LittleLong(*(unsigned *)buf))
|
||||
{
|
||||
case MDXHEADER:
|
||||
/* fall through */
|
||||
case DKMHEADER:
|
||||
/* fall through */
|
||||
case RAVENFMHEADER:
|
||||
|
|
|
@ -645,6 +645,8 @@ Mod_ForName(const char *name, model_t *parent_model, qboolean crash)
|
|||
/* call the apropriate loader */
|
||||
switch (LittleLong(*(unsigned *)buf))
|
||||
{
|
||||
case MDXHEADER:
|
||||
/* fall through */
|
||||
case DKMHEADER:
|
||||
/* fall through */
|
||||
case RAVENFMHEADER:
|
||||
|
|
|
@ -804,6 +804,8 @@ Mod_ForName(const char *name, model_t *parent_model, qboolean crash)
|
|||
/* call the apropriate loader */
|
||||
switch (LittleLong(*(unsigned *)buf))
|
||||
{
|
||||
case MDXHEADER:
|
||||
/* fall through */
|
||||
case DKMHEADER:
|
||||
/* fall through */
|
||||
case RAVENFMHEADER:
|
||||
|
|
Loading…
Reference in a new issue