Skip to content

Commit

Permalink
Added M_Pretty()
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Aug 15, 2003
1 parent 011696c commit 1ab8836
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion doomsday/Src/m_misc.c
Expand Up @@ -906,4 +906,26 @@ void M_ReplaceFileExt(char *path, char *newext)
{
strcpy(ptr + 1, newext);
}
}
}

//===========================================================================
// M_Pretty
// Return a prettier copy of the original path.
//===========================================================================
const char *M_Pretty(const char *path)
{
#define MAX_BUFS 8
static char buffers[MAX_BUFS][256];
static uint index = 0;
char *str;

if(!strnicmp(path, ddBasePath, strlen(ddBasePath)))
{
str = buffers[index++ % MAX_BUFS];
M_RemoveBasePath(path, str);
return str;
}

// We don't know how to make this prettier.
return path;
}

0 comments on commit 1ab8836

Please sign in to comment.