Clean up LOG_3D

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2634 4a71c877-e1ca-e34f-864e-861f7616d084
master
Per Inge Mathisen 2007-10-27 13:58:01 +00:00
parent 9d5f31cbdd
commit 94421b5b56
7 changed files with 28 additions and 16 deletions

View File

@ -120,7 +120,7 @@ BOOL iV_IMDSave(char *filename, iIMDShape *s, BOOL PieIMD)
if (poly->flags & iV_IMD_TEXANIM) {
if (poly->pTexAnim == NULL) {
debug( LOG_3D, "No TexAnim pointer!\n" );
debug(LOG_3D, "No TexAnim pointer!");
} else {
fprintf(fp," %d %d %d %d",
poly->pTexAnim->nFrames,
@ -189,7 +189,7 @@ void iV_IMDRelease(iIMDShape *s)
free(s->shadowEdgeList);
s->shadowEdgeList = NULL;
}
debug(LOG_3D, "imd[IMDRelease] = release successful\n");
debug(LOG_3D, "imd[IMDRelease] = release successful");
d = s->next;
free(s);
iV_IMDRelease(d);

View File

@ -482,13 +482,13 @@ static BOOL _imd_load_points( const char **ppFileData, iIMDShape *s )
cen.x = (rad*cen.x + old_to_new*p->x) / old_to_p;
cen.y = (rad*cen.y + old_to_new*p->y) / old_to_p;
cen.z = (rad*cen.z + old_to_new*p->z) / old_to_p;
debug(LOG_3D, "NEW SPHERE: cen,rad = %f %f %f, %f\n", cen.x, cen.y, cen.z, rad);
debug(LOG_3D, "NEW SPHERE: cen,rad = %f %f %f, %f", cen.x, cen.y, cen.z, rad);
}
}
s->ocen = cen;
debug(LOG_3D, "radius, sradius, %d, %d\n", s->radius, s->sradius);
debug(LOG_3D, "SPHERE: cen,rad = %f %f %f\n", s->ocen.x, s->ocen.y, s->ocen.z);
debug(LOG_3D, "radius, sradius, %d, %d", s->radius, s->sradius);
debug(LOG_3D, "SPHERE: cen,rad = %f %f %f", s->ocen.x, s->ocen.y, s->ocen.z);
// END: tight bounding sphere
@ -630,7 +630,7 @@ static iIMDShape *_imd_load_level(const char **ppFileData, const char *FileDataE
// might be "BSP" or "LEVEL"
if (strcmp(buffer, "LEVEL") == 0)
{
debug(LOG_3D, "imd[_load_level] = npoints %d, npolys %d\n", s->npoints, s->npolys);
debug(LOG_3D, "imd[_load_level] = npoints %d, npolys %d", s->npoints, s->npolys);
s->next = _imd_load_level(&pFileData, FileDataEnd, nlevels - 1);
}
else if (strcmp(buffer, "CONNECTORS") == 0)

View File

@ -28,11 +28,10 @@ void iV_Reset()
_TEX_INDEX = 0;
}
void iV_ShutDown(void)
{
pie_ShutDown();
pie_TexShutDown();
iV_TextShutdown();
debug(LOG_3D, "iVi[ShutDown] = successful\n");
debug(LOG_3D, "iVi[ShutDown] = successful");
}

View File

@ -64,14 +64,11 @@ BOOL check_extension(const char* extension_name)
if ( extension_name_length == first_extension_length
&& strncmp(extension_name, tmp, first_extension_length) == 0) {
debug( LOG_3D, "%s is supported.\n", extension_name );
return TRUE;
}
tmp += first_extension_length + 1;
}
debug( LOG_3D, "%s is not supported.\n", extension_name );
return FALSE;
}

View File

@ -508,5 +508,5 @@ void pie_MatInit(void)
pie_MatReset();
debug(LOG_3D, "geo[_geo_setup] = setup successful\n");
debug(LOG_3D, "geo[_geo_setup] = setup successful");
}

View File

@ -67,7 +67,7 @@ iSurface *iV_SurfaceCreate(Uint32 flags, int width, int height, int xp, int yp,
s->clip.top = 0;
s->clip.bottom = height-1;
debug(LOG_3D, "vid[SurfaceCreate] = created surface width %d, height %d\n",width,height);
debug(LOG_3D, "vid[SurfaceCreate] = created surface width %d, height %d", width, height);
return s;
}
@ -96,7 +96,6 @@ void iV_RenderAssign(iSurface *s)
/* Need to look into this - won't the unwanted called still set render surface? */
psRendSurface = s;
debug(LOG_3D, "vid[RenderAssign] = assigned renderer :\n");
debug(LOG_3D, "flags %x\nxcentre %d, ycentre %d\nbuffer %p\n",
debug(LOG_3D, "iV_RenderAssign: flags %x; xcentre %d; ycentre %d; buffer %p",
s->flags, s->xcentre, s->ycentre, s->buffer);
}

View File

@ -159,12 +159,29 @@ BOOL screenInitialise(
}
glGetIntegerv(GL_MAX_TEXTURE_SIZE, &glval);
debug( LOG_TEXTURE, "Maximum texture size: %dx%d", (int)glval, (int)glval );
if ( glval < 512 ) // FIXME: Replace by a define that gives us the real maximum
if (glval < 512) // PAGE_WIDTH and PAGE_HEIGHT from src/texture.h
{
debug( LOG_ERROR, "OpenGL reports a texture size (%d) that is less than required!", (int)glval );
debug( LOG_ERROR, "This is either a bug in OpenGL or your graphics card is really old!" );
debug( LOG_ERROR, "Trying to run the game anyway..." );
}
debug(LOG_3D, "OpenGL extensions supported:");
if (check_extension("GL_ARB_texture_compression"))
{
debug(LOG_3D, " * Texture compression supported.");
}
if (check_extension("GL_EXT_stencil_two_side"))
{
debug(LOG_3D, " * Two side stencil supported.");
}
if (check_extension("GL_EXT_stencil_wrap"))
{
debug(LOG_3D, " * Stencil wrap supported.");
}
if (check_extension("GL_EXT_texture_filter_anisotropic"))
{
debug(LOG_3D, " * Anisotropic filtering supported.");
}
glViewport(0, 0, width, height);
glMatrixMode(GL_PROJECTION);