r1261 - trunk/code/renderer

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Thu Feb 14 08:16:14 EST 2008


Author: tma
Date: 2008-02-14 08:16:13 -0500 (Thu, 14 Feb 2008)
New Revision: 1261

Removed:
   trunk/code/renderer/tr_image_bmp.h
   trunk/code/renderer/tr_image_jpg.h
   trunk/code/renderer/tr_image_pcx.h
   trunk/code/renderer/tr_image_png.h
   trunk/code/renderer/tr_image_tga.h
Modified:
   trunk/code/renderer/tr_image.c
   trunk/code/renderer/tr_image_bmp.c
   trunk/code/renderer/tr_image_jpg.c
   trunk/code/renderer/tr_image_pcx.c
   trunk/code/renderer/tr_image_png.c
   trunk/code/renderer/tr_image_tga.c
   trunk/code/renderer/tr_local.h
Log:
* Consolidate tr_image_*.h headers into tr_local.h to more closely follow the
  Q3 coding style
* Prefix image loaders with R_ now they're non-static


Modified: trunk/code/renderer/tr_image.c
===================================================================
--- trunk/code/renderer/tr_image.c	2008-02-14 11:13:51 UTC (rev 1260)
+++ trunk/code/renderer/tr_image.c	2008-02-14 13:16:13 UTC (rev 1261)
@@ -22,13 +22,6 @@
 // tr_image.c
 #include "tr_local.h"
 
-
-#include "tr_image_bmp.h"
-#include "tr_image_jpg.h"
-#include "tr_image_pcx.h"
-#include "tr_image_png.h"
-#include "tr_image_tga.h"
-
 static byte			 s_intensitytable[256];
 static unsigned char s_gammatable[256];
 
@@ -801,12 +794,12 @@
 // when there are multiple images of different formats available
 static imageExtToLoaderMap_t imageLoaders[ ] =
 {
-	{ "tga",  LoadTGA },
-	{ "jpg",  LoadJPG },
-	{ "jpeg", LoadJPG },
-	{ "png",  LoadPNG },
-	{ "pcx",  LoadPCX },
-	{ "bmp",  LoadBMP }
+	{ "tga",  R_LoadTGA },
+	{ "jpg",  R_LoadJPG },
+	{ "jpeg", R_LoadJPG },
+	{ "png",  R_LoadPNG },
+	{ "pcx",  R_LoadPCX },
+	{ "bmp",  R_LoadBMP }
 };
 
 static int numImageLoaders = sizeof( imageLoaders ) /

Modified: trunk/code/renderer/tr_image_bmp.c
===================================================================
--- trunk/code/renderer/tr_image_bmp.c	2008-02-14 11:13:51 UTC (rev 1260)
+++ trunk/code/renderer/tr_image_bmp.c	2008-02-14 13:16:13 UTC (rev 1261)
@@ -42,7 +42,7 @@
 	unsigned char palette[256][4];
 } BMPHeader_t;
 
-void LoadBMP( const char *name, byte **pic, int *width, int *height )
+void R_LoadBMP( const char *name, byte **pic, int *width, int *height )
 {
 	int		columns, rows;
 	unsigned	numPixels;

Deleted: trunk/code/renderer/tr_image_bmp.h
===================================================================
--- trunk/code/renderer/tr_image_bmp.h	2008-02-14 11:13:51 UTC (rev 1260)
+++ trunk/code/renderer/tr_image_bmp.h	2008-02-14 13:16:13 UTC (rev 1261)
@@ -1 +0,0 @@
-void LoadBMP( const char *name, byte **pic, int *width, int *height );

Modified: trunk/code/renderer/tr_image_jpg.c
===================================================================
--- trunk/code/renderer/tr_image_jpg.c	2008-02-14 11:13:51 UTC (rev 1260)
+++ trunk/code/renderer/tr_image_jpg.c	2008-02-14 13:16:13 UTC (rev 1261)
@@ -33,7 +33,7 @@
 #define JPEG_INTERNALS
 #include "../jpeg-6/jpeglib.h"
 
-void LoadJPG( const char *filename, unsigned char **pic, int *width, int *height ) {
+void R_LoadJPG( const char *filename, unsigned char **pic, int *width, int *height ) {
   /* This struct contains the JPEG decompression parameters and pointers to
    * working space (which is allocated as needed by the JPEG library).
    */

Deleted: trunk/code/renderer/tr_image_jpg.h
===================================================================
--- trunk/code/renderer/tr_image_jpg.h	2008-02-14 11:13:51 UTC (rev 1260)
+++ trunk/code/renderer/tr_image_jpg.h	2008-02-14 13:16:13 UTC (rev 1261)
@@ -1 +0,0 @@
-void LoadJPG( const char *name, byte **pic, int *width, int *height );

Modified: trunk/code/renderer/tr_image_pcx.c
===================================================================
--- trunk/code/renderer/tr_image_pcx.c	2008-02-14 11:13:51 UTC (rev 1260)
+++ trunk/code/renderer/tr_image_pcx.c	2008-02-14 13:16:13 UTC (rev 1261)
@@ -48,7 +48,7 @@
 	unsigned char	data[];
 } pcx_t;
 
-void LoadPCX ( const char *filename, byte **pic, int *width, int *height)
+void R_LoadPCX ( const char *filename, byte **pic, int *width, int *height)
 {
 	byte	*raw;
 	byte	*end;

Deleted: trunk/code/renderer/tr_image_pcx.h
===================================================================
--- trunk/code/renderer/tr_image_pcx.h	2008-02-14 11:13:51 UTC (rev 1260)
+++ trunk/code/renderer/tr_image_pcx.h	2008-02-14 13:16:13 UTC (rev 1261)
@@ -1 +0,0 @@
-void LoadPCX( const char *name, byte **pic, int *width, int *height );

Modified: trunk/code/renderer/tr_image_png.c
===================================================================
--- trunk/code/renderer/tr_image_png.c	2008-02-14 11:13:51 UTC (rev 1260)
+++ trunk/code/renderer/tr_image_png.c	2008-02-14 13:16:13 UTC (rev 1261)
@@ -1889,7 +1889,7 @@
  *  The PNG loader
  */
 
-void LoadPNG(const char *name, byte **pic, int *width, int *height)
+void R_LoadPNG(const char *name, byte **pic, int *width, int *height)
 {
 	struct BufferedFile *ThePNG;
 	byte *OutBuffer;

Deleted: trunk/code/renderer/tr_image_png.h
===================================================================
--- trunk/code/renderer/tr_image_png.h	2008-02-14 11:13:51 UTC (rev 1260)
+++ trunk/code/renderer/tr_image_png.h	2008-02-14 13:16:13 UTC (rev 1261)
@@ -1 +0,0 @@
-void LoadPNG( const char *name, byte **pic, int *width, int *height );

Modified: trunk/code/renderer/tr_image_tga.c
===================================================================
--- trunk/code/renderer/tr_image_tga.c	2008-02-14 11:13:51 UTC (rev 1260)
+++ trunk/code/renderer/tr_image_tga.c	2008-02-14 13:16:13 UTC (rev 1261)
@@ -38,7 +38,7 @@
 	unsigned char	pixel_size, attributes;
 } TargaHeader;
 
-void LoadTGA ( const char *name, byte **pic, int *width, int *height)
+void R_LoadTGA ( const char *name, byte **pic, int *width, int *height)
 {
 	unsigned	columns, rows, numPixels;
 	byte	*pixbuf;

Deleted: trunk/code/renderer/tr_image_tga.h
===================================================================
--- trunk/code/renderer/tr_image_tga.h	2008-02-14 11:13:51 UTC (rev 1260)
+++ trunk/code/renderer/tr_image_tga.h	2008-02-14 13:16:13 UTC (rev 1261)
@@ -1 +0,0 @@
-void LoadTGA( const char *name, byte **pic, int *width, int *height );

Modified: trunk/code/renderer/tr_local.h
===================================================================
--- trunk/code/renderer/tr_local.h	2008-02-14 11:13:51 UTC (rev 1260)
+++ trunk/code/renderer/tr_local.h	2008-02-14 13:16:13 UTC (rev 1261)
@@ -1483,8 +1483,22 @@
 
 /*
 =============================================================
+
+IMAGE LOADERS
+
 =============================================================
 */
+
+void R_LoadBMP( const char *name, byte **pic, int *width, int *height );
+void R_LoadJPG( const char *name, byte **pic, int *width, int *height );
+void R_LoadPCX( const char *name, byte **pic, int *width, int *height );
+void R_LoadPNG( const char *name, byte **pic, int *width, int *height );
+void R_LoadTGA( const char *name, byte **pic, int *width, int *height );
+
+/*
+=============================================================
+=============================================================
+*/
 void	R_TransformModelToClip( const vec3_t src, const float *modelMatrix, const float *projectionMatrix,
 							vec4_t eye, vec4_t dst );
 void	R_TransformClipToWindow( const vec4_t clip, const viewParms_t *view, vec4_t normalized, vec4_t window );




More information about the quake3-commits mailing list