Skip to content

Commit

Permalink
Added ID to Model def
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Aug 18, 2003
1 parent 4f56bbe commit 888bdab
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions doomsday/Include/r_model.h
Expand Up @@ -53,6 +53,7 @@ typedef struct
typedef struct modeldef_s
{
int order;
char id[33];

state_t *state; // Pointer to the states list (in dd_defns.c).
int flags;
Expand Down Expand Up @@ -87,6 +88,7 @@ void R_ShutdownModels(void);
void R_ClearModelPath(void);
void R_AddModelPath(char *addPath, boolean append);
float R_CheckModelFor(mobj_t *mo, modeldef_t **mdef, modeldef_t **nextmdef);
modeldef_t *R_CheckIDModelFor(const char *id);
void R_SetSpriteReplacement(int sprite, char *modelname);
int R_FindModelFile(const char *filename, char *outfn);
byte *R_LoadSkin(model_t *mdl, int skin, int *width, int *height, int *pxsize);
Expand Down
12 changes: 12 additions & 0 deletions doomsday/Src/dd_defns.c
Expand Up @@ -198,6 +198,18 @@ int Def_GetStateNum(char *id)
return -1;
}

int Def_GetModelNum(const char *id)
{
int i;

if(!id[0]) return -1;

for(i = 0; i < defs.count.models.num; i++)
if(!strcmp(defs.models[i].id, id))
return i;
return -1;
}

int Def_GetSoundNum(char *id)
{
int i;
Expand Down

0 comments on commit 888bdab

Please sign in to comment.