Example #1
0
/*
====================
W_LoadLumpNum
====================
*/
void	*W_LoadLumpNum (int lump)
{
	void	*buf;
	
	if ((unsigned)lump >= (unsigned)numlumps)
		Error ("W_CacheLumpNum: %i >= numlumps",lump);
		
	buf = malloc (W_LumpLength (lump));
	W_ReadLumpNum (lump, buf);
	
	return buf;
}
Example #2
0
/*
 * ====================
 * W_LoadLumpNum
 * ====================
 */
void *
W_LoadLumpNum(int lump)
{
    void *buf;

    if ((unsigned)lump >= numlumps)
        Error("%s: %i >= numlumps", __func__, lump);

    buf = malloc(W_LumpLength(lump));
    W_ReadLumpNum(lump, buf);

    return buf;
}