Go to the source code of this file.
|  | 
| void | R_ImageList_f (void) | 
|  | 
| void | LoadPCX (char *filename, byte **pic, byte **palette, int *width, int *height) | 
|  | 
| void | LoadTGA (char *name, byte **pic, int *width, int *height) | 
|  | 
| image_t * | R_FindFreeImage (void) | 
|  | 
| image_t * | GL_LoadPic (char *name, byte *pic, int width, int height, imagetype_t type) | 
|  | 
| image_t * | R_LoadWal (char *name) | 
|  | 
| image_t * | R_FindImage (char *name, imagetype_t type) | 
|  | 
| struct image_s * | R_RegisterSkin (char *name) | 
|  | 
| void | R_FreeUnusedImages (void) | 
|  | 
| void | R_InitImages (void) | 
|  | 
| void | R_ShutdownImages (void) | 
|  | 
◆ MAX_RIMAGES
◆ TargaHeader
◆ GL_LoadPic()
◆ LoadPCX()
Definition at line 87 of file r_image.c.
   93     int     dataByte, runLength;
 
  135     out = malloc ( (pcx->
ymax+1) * (pcx->
xmax+1) );
 
  143         *palette = malloc(768);
 
  144         memcpy (*palette, (
byte *)pcx + len - 768, 768);
 
  154         for (
x=0 ; 
x<=pcx->
xmax ; )
 
  158             if((dataByte & 0xC0) == 0xC0)
 
  160                 runLength = dataByte & 0x3F;
 
  166             while(runLength-- > 0)
 
  172     if ( raw - (
byte *)pcx > len)
 
 
Referenced by Draw_GetPalette(), and R_FindImage().
 
 
◆ LoadTGA()
Definition at line 204 of file r_image.c.
  206     int     columns, rows, numPixels;
 
  257     columns = targa_header.
width;
 
  258     rows = targa_header.
height;
 
  259     numPixels = columns * rows;
 
  266     targa_rgba = malloc (numPixels*4);
 
  273         for(row=rows-1; row>=0; row--) {
 
  274             pixbuf = targa_rgba + row*columns*4;
 
  275             for(column=0; column<columns; column++) {
 
  292                             alphabyte = *buf_p++;
 
  296                             *pixbuf++ = alphabyte;
 
  303         unsigned char red,
green,
blue,alphabyte,packetHeader,packetSize,
j;
 
  304         for(row=rows-1; row>=0; row--) {
 
  305             pixbuf = targa_rgba + row*columns*4;
 
  306             for(column=0; column<columns; ) {
 
  307                 packetHeader= *buf_p++;
 
  308                 packetSize = 1 + (packetHeader & 0x7f);
 
  309                 if (packetHeader & 0x80) {        
 
  321                             alphabyte = *buf_p++;
 
  331                     for(
j=0;
j<packetSize;
j++) {
 
  337                         if (column==columns) { 
 
  343                             pixbuf = targa_rgba + row*columns*4;
 
  348                     for(
j=0;
j<packetSize;
j++) {
 
  363                                     alphabyte = *buf_p++;
 
  367                                     *pixbuf++ = alphabyte;
 
  371                         if (column==columns) { 
 
  377                             pixbuf = targa_rgba + row*columns*4;
 
 
 
 
◆ R_FindFreeImage()
◆ R_FindImage()
Definition at line 497 of file r_image.c.
  513     while ((ptr=strchr(
name,
'\\'))) {
 
  533     if (!strcmp(
name+len-4, 
".pcx"))
 
  540     else if (!strcmp(
name+len-4, 
".wal"))
 
  544     else if (!strcmp(
name+len-4, 
".tga"))
 
 
Referenced by Draw_FindPic(), Mod_LoadAliasModel(), Mod_LoadSpriteModel(), Mod_LoadTexinfo(), R_RegisterModel(), R_RegisterSkin(), and R_SetSky().
 
 
◆ R_FreeUnusedImages()
◆ R_ImageList_f()
◆ R_InitImages()
◆ R_LoadWal()
◆ R_RegisterSkin()
      
        
          | struct image_s* R_RegisterSkin | ( | char * | name | ) |  | 
      
 
 
◆ R_ShutdownImages()
◆ numr_images
◆ r_images