64 bit compatibility effort, 2/nn: type correctness work in common.h,

gl_draw.c, gl_model.c, gl_sky.c, gl_texmgr.c, gl_texmgr.h, r_alias.c,
r_brush.c, r_part.c, r_world.c, snd_mem.c.  next step will be server
side (progs) work which is actually the heart of the problems.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@34 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
sezero 2010-02-16 21:26:11 +00:00
parent cd19da00f7
commit 9c837a77ae
11 changed files with 35 additions and 33 deletions

View file

@ -64,7 +64,7 @@ void InsertLinkAfter (link_t *l, link_t *after);
// (type *)STRUCT_FROM_LINK(link_t *link, type, member) // (type *)STRUCT_FROM_LINK(link_t *link, type, member)
// ent = STRUCT_FROM_LINK(link,entity_t,order) // ent = STRUCT_FROM_LINK(link,entity_t,order)
// FIXME: remove this mess! // FIXME: remove this mess!
#define STRUCT_FROM_LINK(l,t,m) ((t *)((byte *)l - (int)&(((t *)0)->m))) #define STRUCT_FROM_LINK(l,t,m) ((t *)((byte *)l - (size_t)&(((t *)0)->m)))
//============================================================================ //============================================================================

View file

@ -207,7 +207,7 @@ void Scrap_Upload (void)
{ {
sprintf (name, "scrap%i", i); sprintf (name, "scrap%i", i);
scrap_textures[i] = TexMgr_LoadImage (NULL, name, BLOCK_WIDTH, BLOCK_HEIGHT, SRC_INDEXED, scrap_texels[i], scrap_textures[i] = TexMgr_LoadImage (NULL, name, BLOCK_WIDTH, BLOCK_HEIGHT, SRC_INDEXED, scrap_texels[i],
"", (unsigned)scrap_texels[i], TEXPREF_ALPHA | TEXPREF_OVERWRITE | TEXPREF_NOPICMIP); "", (src_offset_t)scrap_texels[i], TEXPREF_ALPHA | TEXPREF_OVERWRITE | TEXPREF_NOPICMIP);
} }
scrap_dirty = false; scrap_dirty = false;
@ -222,7 +222,7 @@ qpic_t *Draw_PicFromWad (char *name)
{ {
qpic_t *p; qpic_t *p;
glpic_t *gl; glpic_t *gl;
unsigned offset; //johnfitz src_offset_t offset; //johnfitz
p = W_GetLumpName (name); p = W_GetLumpName (name);
if (!p) return pic_nul; //johnfitz if (!p) return pic_nul; //johnfitz
@ -253,7 +253,7 @@ qpic_t *Draw_PicFromWad (char *name)
char texturename[64]; //johnfitz char texturename[64]; //johnfitz
sprintf (texturename, "%s:%s", WADFILENAME, name); //johnfitz sprintf (texturename, "%s:%s", WADFILENAME, name); //johnfitz
offset = (unsigned)p - (unsigned)wad_base + sizeof(int)*2; //johnfitz offset = (src_offset_t)p - (src_offset_t)wad_base + sizeof(int)*2; //johnfitz
gl->gltexture = TexMgr_LoadImage (NULL, texturename, p->width, p->height, SRC_INDEXED, p->data, WADFILENAME, gl->gltexture = TexMgr_LoadImage (NULL, texturename, p->width, p->height, SRC_INDEXED, p->data, WADFILENAME,
offset, TEXPREF_ALPHA | TEXPREF_PAD | TEXPREF_NOPICMIP); //johnfitz -- TexMgr offset, TEXPREF_ALPHA | TEXPREF_PAD | TEXPREF_NOPICMIP); //johnfitz -- TexMgr
@ -331,7 +331,7 @@ qpic_t *Draw_MakePic (char *name, int width, int height, byte *data)
pic->height = height; pic->height = height;
gl = (glpic_t *)pic->data; gl = (glpic_t *)pic->data;
gl->gltexture = TexMgr_LoadImage (NULL, name, width, height, SRC_INDEXED, data, "", (unsigned)data, flags); gl->gltexture = TexMgr_LoadImage (NULL, name, width, height, SRC_INDEXED, data, "", (src_offset_t)data, flags);
gl->sl = 0; gl->sl = 0;
gl->sh = (float)width/(float)TexMgr_PadConditional(width); gl->sh = (float)width/(float)TexMgr_PadConditional(width);
gl->tl = 0; gl->tl = 0;
@ -354,11 +354,11 @@ Draw_LoadPics -- johnfitz
void Draw_LoadPics (void) void Draw_LoadPics (void)
{ {
byte *data; byte *data;
unsigned offset; src_offset_t offset;
data = W_GetLumpName ("conchars"); data = W_GetLumpName ("conchars");
if (!data) Sys_Error ("Draw_LoadPics: couldn't load conchars"); if (!data) Sys_Error ("Draw_LoadPics: couldn't load conchars");
offset = (unsigned)data - (unsigned)wad_base; offset = (src_offset_t)data - (src_offset_t)wad_base;
char_texture = TexMgr_LoadImage (NULL, WADFILENAME":conchars", 128, 128, SRC_INDEXED, data, char_texture = TexMgr_LoadImage (NULL, WADFILENAME":conchars", 128, 128, SRC_INDEXED, data,
WADFILENAME, offset, TEXPREF_ALPHA | TEXPREF_NEAREST | TEXPREF_NOPICMIP | TEXPREF_CONCHARS); WADFILENAME, offset, TEXPREF_ALPHA | TEXPREF_NEAREST | TEXPREF_NOPICMIP | TEXPREF_CONCHARS);

View file

@ -375,7 +375,7 @@ void Mod_LoadTextures (lump_t *l)
//johnfitz -- more variables //johnfitz -- more variables
char texturename[64]; char texturename[64];
int nummiptex; int nummiptex;
unsigned offset; src_offset_t offset;
int mark, fwidth, fheight; int mark, fwidth, fheight;
char filename[MAX_OSPATH], filename2[MAX_OSPATH], mapname[MAX_OSPATH]; char filename[MAX_OSPATH], filename2[MAX_OSPATH], mapname[MAX_OSPATH];
byte *data; byte *data;
@ -456,7 +456,7 @@ void Mod_LoadTextures (lump_t *l)
else //use the texture from the bsp file else //use the texture from the bsp file
{ {
sprintf (texturename, "%s:%s", loadmodel->name, tx->name); sprintf (texturename, "%s:%s", loadmodel->name, tx->name);
offset = (unsigned)(mt+1) - (unsigned)mod_base; offset = (src_offset_t)(mt+1) - (src_offset_t)mod_base;
tx->gltexture = TexMgr_LoadImage (loadmodel, texturename, tx->width, tx->height, tx->gltexture = TexMgr_LoadImage (loadmodel, texturename, tx->width, tx->height,
SRC_INDEXED, (byte *)(tx+1), loadmodel->name, offset, TEXPREF_NONE); SRC_INDEXED, (byte *)(tx+1), loadmodel->name, offset, TEXPREF_NONE);
} }
@ -466,7 +466,7 @@ void Mod_LoadTextures (lump_t *l)
Hunk_FreeToLowMark (mark); Hunk_FreeToLowMark (mark);
sprintf (texturename, "%s_warp", texturename); sprintf (texturename, "%s_warp", texturename);
tx->warpimage = TexMgr_LoadImage (loadmodel, texturename, gl_warpimagesize, tx->warpimage = TexMgr_LoadImage (loadmodel, texturename, gl_warpimagesize,
gl_warpimagesize, SRC_RGBA, hunk_base, "", (unsigned)hunk_base, TEXPREF_NOPICMIP | TEXPREF_WARPIMAGE); gl_warpimagesize, SRC_RGBA, hunk_base, "", (src_offset_t)hunk_base, TEXPREF_NOPICMIP | TEXPREF_WARPIMAGE);
tx->update_warp = true; tx->update_warp = true;
} }
else //regular texture else //regular texture
@ -503,7 +503,7 @@ void Mod_LoadTextures (lump_t *l)
else //use the texture from the bsp file else //use the texture from the bsp file
{ {
sprintf (texturename, "%s:%s", loadmodel->name, tx->name); sprintf (texturename, "%s:%s", loadmodel->name, tx->name);
offset = (unsigned)(mt+1) - (unsigned)mod_base; offset = (src_offset_t)(mt+1) - (src_offset_t)mod_base;
if (Mod_CheckFullbrights ((byte *)(tx+1), pixels)) if (Mod_CheckFullbrights ((byte *)(tx+1), pixels))
{ {
tx->gltexture = TexMgr_LoadImage (loadmodel, texturename, tx->width, tx->height, tx->gltexture = TexMgr_LoadImage (loadmodel, texturename, tx->width, tx->height,
@ -1809,7 +1809,7 @@ void *Mod_LoadAllSkins (int numskins, daliasskintype_t *pskintype)
daliasskingroup_t *pinskingroup; daliasskingroup_t *pinskingroup;
daliasskininterval_t *pinskinintervals; daliasskininterval_t *pinskinintervals;
char fbr_mask_name[64]; //johnfitz -- added for fullbright support char fbr_mask_name[64]; //johnfitz -- added for fullbright support
unsigned offset; //johnfitz src_offset_t offset; //johnfitz
skin = (byte *)(pskintype + 1); skin = (byte *)(pskintype + 1);
@ -1831,7 +1831,7 @@ void *Mod_LoadAllSkins (int numskins, daliasskintype_t *pskintype)
//johnfitz -- rewritten //johnfitz -- rewritten
sprintf (name, "%s:frame%i", loadmodel->name, i); sprintf (name, "%s:frame%i", loadmodel->name, i);
offset = (unsigned)(pskintype+1) - (unsigned)mod_base; offset = (src_offset_t)(pskintype+1) - (src_offset_t)mod_base;
if (Mod_CheckFullbrights ((byte *)(pskintype+1), size)) if (Mod_CheckFullbrights ((byte *)(pskintype+1), size))
{ {
pheader->gltextures[i][0] = TexMgr_LoadImage (loadmodel, name, pheader->skinwidth, pheader->skinheight, pheader->gltextures[i][0] = TexMgr_LoadImage (loadmodel, name, pheader->skinwidth, pheader->skinheight,
@ -1874,7 +1874,7 @@ void *Mod_LoadAllSkins (int numskins, daliasskintype_t *pskintype)
//johnfitz -- rewritten //johnfitz -- rewritten
sprintf (name, "%s:frame%i_%i", loadmodel->name, i,j); sprintf (name, "%s:frame%i_%i", loadmodel->name, i,j);
offset = (unsigned)(pskintype) - (unsigned)mod_base; //johnfitz offset = (src_offset_t)(pskintype) - (src_offset_t)mod_base; //johnfitz
if (Mod_CheckFullbrights ((byte *)(pskintype), size)) if (Mod_CheckFullbrights ((byte *)(pskintype), size))
{ {
pheader->gltextures[i][j&3] = TexMgr_LoadImage (loadmodel, name, pheader->skinwidth, pheader->skinheight, pheader->gltextures[i][j&3] = TexMgr_LoadImage (loadmodel, name, pheader->skinwidth, pheader->skinheight,
@ -2173,7 +2173,7 @@ void * Mod_LoadSpriteFrame (void * pin, mspriteframe_t **ppframe, int framenum)
mspriteframe_t *pspriteframe; mspriteframe_t *pspriteframe;
int width, height, size, origin[2]; int width, height, size, origin[2];
char name[64]; char name[64];
unsigned offset; //johnfitz src_offset_t offset; //johnfitz
pinframe = (dspriteframe_t *)pin; pinframe = (dspriteframe_t *)pin;
@ -2203,7 +2203,7 @@ void * Mod_LoadSpriteFrame (void * pin, mspriteframe_t **ppframe, int framenum)
//johnfitz //johnfitz
sprintf (name, "%s:frame%i", loadmodel->name, framenum); sprintf (name, "%s:frame%i", loadmodel->name, framenum);
offset = (unsigned)(pinframe+1) - (unsigned)mod_base; //johnfitz offset = (src_offset_t)(pinframe+1) - (src_offset_t)mod_base; //johnfitz
pspriteframe->gltexture = pspriteframe->gltexture =
TexMgr_LoadImage (loadmodel, name, width, height, SRC_INDEXED, (byte *)(pinframe + 1), TexMgr_LoadImage (loadmodel, name, width, height, SRC_INDEXED, (byte *)(pinframe + 1),
loadmodel->name, offset, TEXPREF_PAD | TEXPREF_ALPHA | TEXPREF_NOPICMIP); //johnfitz -- TexMgr loadmodel->name, offset, TEXPREF_PAD | TEXPREF_ALPHA | TEXPREF_NOPICMIP); //johnfitz -- TexMgr

View file

@ -106,7 +106,7 @@ void Sky_LoadTexture (texture_t *mt)
back_data[(i*128) + j] = src[i*256 + j + 128]; back_data[(i*128) + j] = src[i*256 + j + 128];
sprintf(texturename, "%s:%s_back", loadmodel->name, mt->name); sprintf(texturename, "%s:%s_back", loadmodel->name, mt->name);
solidskytexture = TexMgr_LoadImage (loadmodel, texturename, 128, 128, SRC_INDEXED, back_data, "", (unsigned)back_data, TEXPREF_NONE); solidskytexture = TexMgr_LoadImage (loadmodel, texturename, 128, 128, SRC_INDEXED, back_data, "", (src_offset_t)back_data, TEXPREF_NONE);
// extract front layer and upload // extract front layer and upload
for (i=0 ; i<128 ; i++) for (i=0 ; i<128 ; i++)
@ -118,7 +118,7 @@ void Sky_LoadTexture (texture_t *mt)
} }
sprintf(texturename, "%s:%s_front", loadmodel->name, mt->name); sprintf(texturename, "%s:%s_front", loadmodel->name, mt->name);
alphaskytexture = TexMgr_LoadImage (loadmodel, texturename, 128, 128, SRC_INDEXED, front_data, "", (unsigned)front_data, TEXPREF_ALPHA); alphaskytexture = TexMgr_LoadImage (loadmodel, texturename, 128, 128, SRC_INDEXED, front_data, "", (src_offset_t)front_data, TEXPREF_ALPHA);
// calculate r_fastsky color based on average of all opaque foreground colors // calculate r_fastsky color based on average of all opaque foreground colors
r = g = b = count = 0; r = g = b = count = 0;

View file

@ -574,8 +574,8 @@ void TexMgr_Init (void)
glGetIntegerv (GL_MAX_TEXTURE_SIZE, &gl_hardware_maxsize); glGetIntegerv (GL_MAX_TEXTURE_SIZE, &gl_hardware_maxsize);
// load notexture images // load notexture images
notexture = TexMgr_LoadImage (NULL, "notexture", 2, 2, SRC_RGBA, notexture_data, "", (unsigned)notexture_data, TEXPREF_NEAREST | TEXPREF_PERSIST | TEXPREF_NOPICMIP); notexture = TexMgr_LoadImage (NULL, "notexture", 2, 2, SRC_RGBA, notexture_data, "", (src_offset_t)notexture_data, TEXPREF_NEAREST | TEXPREF_PERSIST | TEXPREF_NOPICMIP);
nulltexture = TexMgr_LoadImage (NULL, "nulltexture", 2, 2, SRC_RGBA, nulltexture_data, "", (unsigned)nulltexture_data, TEXPREF_NEAREST | TEXPREF_PERSIST | TEXPREF_NOPICMIP); nulltexture = TexMgr_LoadImage (NULL, "nulltexture", 2, 2, SRC_RGBA, nulltexture_data, "", (src_offset_t)nulltexture_data, TEXPREF_NEAREST | TEXPREF_PERSIST | TEXPREF_NOPICMIP);
//have to assign these here becuase Mod_Init is called before TexMgr_Init //have to assign these here becuase Mod_Init is called before TexMgr_Init
r_notexture_mip->gltexture = r_notexture_mip2->gltexture = notexture; r_notexture_mip->gltexture = r_notexture_mip2->gltexture = notexture;
@ -1117,7 +1117,7 @@ TexMgr_LoadImage -- the one entry point for loading all textures
================ ================
*/ */
gltexture_t *TexMgr_LoadImage (model_t *owner, char *name, int width, int height, enum srcformat format, gltexture_t *TexMgr_LoadImage (model_t *owner, char *name, int width, int height, enum srcformat format,
byte *data, char *source_file, unsigned source_offset, unsigned flags) byte *data, char *source_file, src_offset_t source_offset, unsigned flags)
{ {
extern int lightmap_bytes; extern int lightmap_bytes;
unsigned short crc; unsigned short crc;

View file

@ -36,6 +36,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
enum srcformat {SRC_INDEXED, SRC_LIGHTMAP, SRC_RGBA}; enum srcformat {SRC_INDEXED, SRC_LIGHTMAP, SRC_RGBA};
typedef size_t src_offset_t; // technically need uintptr_t, but size_t is OK virtually everywhere.
typedef struct gltexture_s { typedef struct gltexture_s {
//managed by texture manager //managed by texture manager
unsigned int texnum; unsigned int texnum;
@ -47,7 +49,7 @@ typedef struct gltexture_s {
unsigned int height; //size of image as it exists in opengl unsigned int height; //size of image as it exists in opengl
unsigned int flags; unsigned int flags;
char source_file[MAX_QPATH]; //relative filepath to data source, or "" if source is in memory char source_file[MAX_QPATH]; //relative filepath to data source, or "" if source is in memory
unsigned int source_offset; //byte offset into file, or memory address src_offset_t source_offset; //byte offset into file, or memory address
enum srcformat source_format; //format of pixel data (indexed, lightmap, or rgba) enum srcformat source_format; //format of pixel data (indexed, lightmap, or rgba)
unsigned int source_width; //size of image in source data unsigned int source_width; //size of image in source data
unsigned int source_height; //size of image in source data unsigned int source_height; //size of image in source data
@ -81,7 +83,7 @@ void TexMgr_Init (void);
// IMAGE LOADING // IMAGE LOADING
gltexture_t *TexMgr_LoadImage (model_t *owner, char *name, int width, int height, enum srcformat format, gltexture_t *TexMgr_LoadImage (model_t *owner, char *name, int width, int height, enum srcformat format,
byte *data, char *source_file, unsigned source_offset, unsigned flags); byte *data, char *source_file, src_offset_t source_offset, unsigned flags);
void TexMgr_ReloadImage (gltexture_t *glt, int shirt, int pants); void TexMgr_ReloadImage (gltexture_t *glt, int shirt, int pants);
void TexMgr_ReloadImages (void); void TexMgr_ReloadImages (void);
void TexMgr_ReloadNobrightImages (void); void TexMgr_ReloadNobrightImages (void);

View file

@ -134,7 +134,7 @@ void GL_DrawAliasFrame (aliashdr_t *paliashdr, lerpdata_t lerpdata)
{ {
if (r_drawflat_cheatsafe) if (r_drawflat_cheatsafe)
{ {
srand(count * (unsigned int) commands); srand(count * (unsigned int)(src_offset_t)commands);
glColor3f (rand()%256/255.0, rand()%256/255.0, rand()%256/255.0); glColor3f (rand()%256/255.0, rand()%256/255.0, rand()%256/255.0);
} }
else if (lerping) else if (lerping)

View file

@ -152,7 +152,7 @@ void R_DrawSequentialPoly (msurface_t *s)
{ {
for (p = s->polys->next; p; p = p->next) for (p = s->polys->next; p; p = p->next)
{ {
srand((unsigned int) p); srand((unsigned int) (size_t) p);
glColor3f (rand()%256/255.0, rand()%256/255.0, rand()%256/255.0); glColor3f (rand()%256/255.0, rand()%256/255.0, rand()%256/255.0);
DrawGLPoly (p); DrawGLPoly (p);
rs_brushpasses++; rs_brushpasses++;
@ -160,7 +160,7 @@ void R_DrawSequentialPoly (msurface_t *s)
return; return;
} }
srand((unsigned int) s->polys); srand((unsigned int) (size_t) s->polys);
glColor3f (rand()%256/255.0, rand()%256/255.0, rand()%256/255.0); glColor3f (rand()%256/255.0, rand()%256/255.0, rand()%256/255.0);
DrawGLPoly (s->polys); DrawGLPoly (s->polys);
rs_brushpasses++; rs_brushpasses++;
@ -918,7 +918,7 @@ void GL_BuildLightmaps (void)
sprintf(name, "lightmap%03i",i); sprintf(name, "lightmap%03i",i);
data = lightmaps+i*BLOCK_WIDTH*BLOCK_HEIGHT*lightmap_bytes; data = lightmaps+i*BLOCK_WIDTH*BLOCK_HEIGHT*lightmap_bytes;
lightmap_textures[i] = TexMgr_LoadImage (cl.worldmodel, name, BLOCK_WIDTH, BLOCK_HEIGHT, lightmap_textures[i] = TexMgr_LoadImage (cl.worldmodel, name, BLOCK_WIDTH, BLOCK_HEIGHT,
SRC_LIGHTMAP, data, "", (unsigned)data, TEXPREF_LINEAR | TEXPREF_NOPICMIP); SRC_LIGHTMAP, data, "", (src_offset_t)data, TEXPREF_LINEAR | TEXPREF_NOPICMIP);
//johnfitz //johnfitz
} }

View file

@ -85,7 +85,7 @@ void R_InitParticleTextures (void)
*dst++ = 255; *dst++ = 255;
*dst++ = R_ParticleTextureLookup(x, y, 8); *dst++ = R_ParticleTextureLookup(x, y, 8);
} }
particletexture1 = TexMgr_LoadImage (NULL, "particle1", 64, 64, SRC_RGBA, particle1_data, "", (unsigned)particle1_data, TEXPREF_PERSIST | TEXPREF_ALPHA | TEXPREF_LINEAR); particletexture1 = TexMgr_LoadImage (NULL, "particle1", 64, 64, SRC_RGBA, particle1_data, "", (src_offset_t)particle1_data, TEXPREF_PERSIST | TEXPREF_ALPHA | TEXPREF_LINEAR);
// particle texture 2 -- square // particle texture 2 -- square
dst = particle2_data; dst = particle2_data;
@ -97,7 +97,7 @@ void R_InitParticleTextures (void)
*dst++ = 255; *dst++ = 255;
*dst++ = x || y ? 0 : 255; *dst++ = x || y ? 0 : 255;
} }
particletexture2 = TexMgr_LoadImage (NULL, "particle2", 2, 2, SRC_RGBA, particle2_data, "", (unsigned)particle2_data, TEXPREF_PERSIST | TEXPREF_ALPHA | TEXPREF_NEAREST); particletexture2 = TexMgr_LoadImage (NULL, "particle2", 2, 2, SRC_RGBA, particle2_data, "", (src_offset_t)particle2_data, TEXPREF_PERSIST | TEXPREF_ALPHA | TEXPREF_NEAREST);
// particle texture 3 -- blob // particle texture 3 -- blob
dst = particle3_data; dst = particle3_data;
@ -109,7 +109,7 @@ void R_InitParticleTextures (void)
*dst++ = 255; *dst++ = 255;
*dst++ = R_ParticleTextureLookup(x, y, 2); *dst++ = R_ParticleTextureLookup(x, y, 2);
} }
particletexture3 = TexMgr_LoadImage (NULL, "particle3", 64, 64, SRC_RGBA, particle3_data, "", (unsigned)particle3_data, TEXPREF_PERSIST | TEXPREF_ALPHA | TEXPREF_LINEAR); particletexture3 = TexMgr_LoadImage (NULL, "particle3", 64, 64, SRC_RGBA, particle3_data, "", (src_offset_t)particle3_data, TEXPREF_PERSIST | TEXPREF_ALPHA | TEXPREF_LINEAR);
//set default //set default

View file

@ -282,7 +282,7 @@ void R_DrawTextureChains_Drawflat (void)
if (!s->culled) if (!s->culled)
for (p = s->polys->next; p; p = p->next) for (p = s->polys->next; p; p = p->next)
{ {
srand((unsigned int) p); srand((unsigned int) (size_t) p);
glColor3f (rand()%256/255.0, rand()%256/255.0, rand()%256/255.0); glColor3f (rand()%256/255.0, rand()%256/255.0, rand()%256/255.0);
DrawGLPoly (p); DrawGLPoly (p);
rs_brushpasses++; rs_brushpasses++;
@ -293,7 +293,7 @@ void R_DrawTextureChains_Drawflat (void)
for (s = t->texturechain; s; s = s->texturechain) for (s = t->texturechain; s; s = s->texturechain)
if (!s->culled) if (!s->culled)
{ {
srand((unsigned int) s->polys); srand((unsigned int) (size_t) s->polys);
glColor3f (rand()%256/255.0, rand()%256/255.0, rand()%256/255.0); glColor3f (rand()%256/255.0, rand()%256/255.0, rand()%256/255.0);
DrawGLPoly (s->polys); DrawGLPoly (s->polys);
rs_brushpasses++; rs_brushpasses++;

View file

@ -236,7 +236,7 @@ void DumpChunks(void)
memcpy (str, data_p, 4); memcpy (str, data_p, 4);
data_p += 4; data_p += 4;
iff_chunk_len = GetLittleLong(); iff_chunk_len = GetLittleLong();
Con_Printf ("0x%x : %s (%d)\n", (int)(data_p - 4), str, iff_chunk_len); Con_Printf ("%p : %s (%d)\n", (data_p - 4), str, iff_chunk_len);
data_p += (iff_chunk_len + 1) & ~1; data_p += (iff_chunk_len + 1) & ~1;
} while (data_p < iff_end); } while (data_p < iff_end);
} }