/* ============== LoadScreen ============== */ void LoadScreen (char *name) { char *expanded; expanded = ExpandPathAndArchive (name); printf ("grabbing from %s...\n",expanded); LoadLBM (expanded, &byteimage, &lbmpalette); byteimagewidth = bmhd.w; byteimageheight = bmhd.h; }
/* ============== Load256Image Will load either an lbm or pcx, depending on extension. Any of the return pointers can be NULL if you don't want them. ============== */ void Load256Image(const char *name, byte ** pixels, byte ** palette, int *width, int *height) { char ext[128]; ExtractFileExtension(name, ext); if(!Q_stricmp(ext, "lbm")) { LoadLBM(name, pixels, palette); if(width) *width = bmhd.w; if(height) *height = bmhd.h; } else if(!Q_stricmp(ext, "pcx")) { LoadPCX(name, pixels, palette, width, height); } else if(!Q_stricmp(ext, "bmp")) { LoadBMP(name, pixels, palette, width, height); } else Error("%s doesn't have a known image extension", name); }