mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-04-28 21:57:57 +03:00
Use ri.Printf to print instead of the Com_* functions
This commit is contained in:
parent
390c1d3f3d
commit
fe16f999d8
10 changed files with 36 additions and 36 deletions
|
@ -25,7 +25,7 @@ static backEndCounters_t pc_save;
|
|||
|
||||
/*
|
||||
=====================
|
||||
R_PerformanceCounters
|
||||
R_SavePerformanceCounters
|
||||
=====================
|
||||
*/
|
||||
void R_SavePerformanceCounters(void) {
|
||||
|
|
|
@ -604,7 +604,7 @@ void R_DrawString_sgl(fontheader_sgl_t* font, const char* text, float x, float y
|
|||
case '\t':
|
||||
indirected = font->indirection[32];
|
||||
if (indirected == -1) {
|
||||
Com_DPrintf("R_DrawString: no space-character in font!\n");
|
||||
ri.Printf(PRINT_DEVELOPER, "R_DrawString: no space-character in font!\n");
|
||||
} else {
|
||||
x = s_fontGeneralScale * font->locations[indirected].size[0] * 256.0 * 3.0 + x;
|
||||
}
|
||||
|
@ -624,10 +624,10 @@ void R_DrawString_sgl(fontheader_sgl_t* font, const char* text, float x, float y
|
|||
indirected = font->indirection[c];
|
||||
if (indirected == -1)
|
||||
{
|
||||
Com_DPrintf("R_DrawString: no 0x%02x-character in font!\n", c);
|
||||
ri.Printf(PRINT_DEVELOPER, "R_DrawString: no 0x%02x-character in font!\n", c);
|
||||
indirected = font->indirection['?'];
|
||||
if (indirected == -1) {
|
||||
Com_DPrintf("R_DrawString: no '?' character in font!\n");
|
||||
ri.Printf(PRINT_DEVELOPER, "R_DrawString: no '?' character in font!\n");
|
||||
break;
|
||||
}
|
||||
// set the indirection for the next time
|
||||
|
@ -829,7 +829,7 @@ void R_DrawFloatingString_sgl(fontheader_sgl_t* font, const char* text, const ve
|
|||
indirected = font->indirection[c];
|
||||
if (indirected == -1)
|
||||
{
|
||||
Com_Printf("R_DrawFloatingString: no 0x%02x-character in font!\n", c);
|
||||
ri.Printf(PRINT_ALL, "R_DrawFloatingString: no 0x%02x-character in font!\n", c);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -920,7 +920,7 @@ float R_GetFontStringWidth_sgl(const fontheader_sgl_t* font, const char* s)
|
|||
if (indirected != -1) {
|
||||
widths += font->locations[indirected].size[0] * 3.0;
|
||||
} else {
|
||||
Com_Printf("R_GetFontStringWidth: no space-character in font!\n");
|
||||
ri.Printf(PRINT_ALL, "R_GetFontStringWidth: no space-character in font!\n");
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -929,7 +929,7 @@ float R_GetFontStringWidth_sgl(const fontheader_sgl_t* font, const char* s)
|
|||
if (indirected != -1) {
|
||||
widths += font->locations[indirected].size[0];
|
||||
} else {
|
||||
Com_Printf("R_GetFontStringWidth: no 0x%02x-character in font!\n", c);
|
||||
ri.Printf(PRINT_ALL, "R_GetFontStringWidth: no 0x%02x-character in font!\n", c);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3140,12 +3140,12 @@ qhandle_t RE_RegisterSkin( const char *name ) {
|
|||
char surfName[MAX_QPATH];
|
||||
|
||||
if ( !name || !name[0] ) {
|
||||
Com_Printf( "Empty name passed to RE_RegisterSkin\n" );
|
||||
ri.Printf(PRINT_ALL, "Empty name passed to RE_RegisterSkin\n" );
|
||||
return 0;
|
||||
}
|
||||
|
||||
if ( strlen( name ) >= MAX_QPATH ) {
|
||||
Com_Printf( "Skin name exceeds MAX_QPATH\n" );
|
||||
ri.Printf(PRINT_ALL, "Skin name exceeds MAX_QPATH\n" );
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -1285,17 +1285,17 @@ FarPlaneInfo_f
|
|||
==================
|
||||
*/
|
||||
void FarPlaneInfo_f(void) {
|
||||
Com_Printf("Current fog settings:\n");
|
||||
Com_Printf("Distance: %i\n", (int)tr.viewParms.farplane_distance);
|
||||
Com_Printf(
|
||||
ri.Printf(PRINT_ALL, "Current fog settings:\n");
|
||||
ri.Printf(PRINT_ALL, "Distance: %i\n", (int)tr.viewParms.farplane_distance);
|
||||
ri.Printf(PRINT_ALL,
|
||||
"Color: %f %f %f\n",
|
||||
tr.viewParms.farplane_color[0],
|
||||
tr.viewParms.farplane_color[1],
|
||||
tr.viewParms.farplane_color[2]);
|
||||
if (tr.viewParms.farplane_cull) {
|
||||
Com_Printf("Cull: on\n");
|
||||
ri.Printf(PRINT_ALL, "Cull: on\n");
|
||||
} else {
|
||||
Com_Printf("Cull: off\n");
|
||||
ri.Printf(PRINT_ALL, "Cull: off\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1645,7 +1645,7 @@ void R_Init( void ) {
|
|||
// Swap_Init();
|
||||
|
||||
if ( (intptr_t)tess.xyz & 15 ) {
|
||||
Com_Printf( "WARNING: tess.xyz not 16 byte aligned\n" );
|
||||
ri.Printf(PRINT_ALL, "WARNING: tess.xyz not 16 byte aligned\n" );
|
||||
}
|
||||
Com_Memset( tess.constantColor255, 255, sizeof( tess.constantColor255 ) );
|
||||
|
||||
|
@ -1835,7 +1835,7 @@ void RE_EndRegistration( void ) {
|
|||
|
||||
end = ri.Milliseconds();
|
||||
|
||||
Com_Printf("RB_ShowImages: %5.2f seconds\n", (float)((end - start) / 1000.f));
|
||||
ri.Printf(PRINT_ALL, "RB_ShowImages: %5.2f seconds\n", (float)((end - start) / 1000.f));
|
||||
}
|
||||
|
||||
R_FreeUnusedImages();
|
||||
|
|
|
@ -1531,7 +1531,7 @@ void R_AddEntitySurfaces (void) {
|
|||
} else {
|
||||
switch ( tr.currentModel->type ) {
|
||||
case MOD_SPRITE:
|
||||
Com_Printf("sprite model '%s' being added to renderer!\n", tr.currentModel->name);
|
||||
ri.Printf(PRINT_ALL, "sprite model '%s' being added to renderer!\n", tr.currentModel->name);
|
||||
break;
|
||||
case MOD_TIKI:
|
||||
R_AddSkelSurfaces( ent );
|
||||
|
|
|
@ -183,7 +183,7 @@ static qhandle_t R_RegisterModelInternal(const char *name, qboolean bBeginTiki,
|
|||
}
|
||||
|
||||
if (strlen(name) >= 128) {
|
||||
Com_Printf("Model name exceeds MAX_MODEL_NAME\n");
|
||||
ri.Printf(PRINT_ALL, "Model name exceeds MAX_MODEL_NAME\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1661,10 +1661,10 @@ void R_PrintInfoWorldtris(void)
|
|||
totalNumTris += numTris;
|
||||
tiki = backEnd.refdef.entities[i].e.tiki;
|
||||
skelmodel = ri.TIKI_GetSkel(tiki->mesh[0]);
|
||||
Com_Printf("ent: %i, tris: %i, %s, version: %i\n", i, numTris, tiki->a->name, skelmodel->version);
|
||||
ri.Printf(PRINT_ALL, "ent: %i, tris: %i, %s, version: %i\n", i, numTris, tiki->a->name, skelmodel->version);
|
||||
}
|
||||
|
||||
Com_Printf("total entity tris: %i\n\n", totalNumTris);
|
||||
ri.Printf(PRINT_ALL, "total entity tris: %i\n\n", totalNumTris);
|
||||
|
||||
totalNumTris = 0;
|
||||
|
||||
|
@ -1677,10 +1677,10 @@ void R_PrintInfoWorldtris(void)
|
|||
totalNumTris += numTris;
|
||||
tiki = backEnd.refdef.staticModels[i].tiki;
|
||||
skelmodel = ri.TIKI_GetSkel(tiki->mesh[0]);
|
||||
Com_Printf("sm: %i, tris: %i, %s, version: %i\n", i, numTris, tiki->a->name, skelmodel->version);
|
||||
ri.Printf(PRINT_ALL, "sm: %i, tris: %i, %s, version: %i\n", i, numTris, tiki->a->name, skelmodel->version);
|
||||
}
|
||||
|
||||
Com_Printf("total static model tris: %i\n\n", totalNumTris);
|
||||
ri.Printf(PRINT_ALL, "total static model tris: %i\n\n", totalNumTris);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -1726,7 +1726,7 @@ void RB_CalcLightGridColor(unsigned char* colors)
|
|||
}
|
||||
}
|
||||
else {
|
||||
Com_Printf(
|
||||
ri.Printf(PRINT_ALL,
|
||||
"##### shader '%s' incorrectly uses rgbGen lightingGrid or lightingSpherical; was rgbGen vertex intended?\n",
|
||||
tess.shader->name);
|
||||
|
||||
|
@ -1755,7 +1755,7 @@ void RB_CalcAlphaFromDotView(unsigned char* colors, float alphaMin, float alphaM
|
|||
|
||||
u.f = DotProduct(viewInModel, tess.normal[i]);
|
||||
u.f = fabs(u.f);
|
||||
Com_Printf("normal: %f %f %f dot: %f i %d\n", tess.normal[i][0], tess.normal[i][1], tess.normal[i][2], u.f, i);
|
||||
ri.Printf(PRINT_ALL, "normal: %f %f %f dot: %f i %d\n", tess.normal[i][0], tess.normal[i][1], tess.normal[i][2], u.f, i);
|
||||
|
||||
u.f = ((alphaMax - alphaMin) * u.f + alphaMin) * 255.0;
|
||||
u.f = u.f - (float)(~((int)(u.f - 255.0) >> 31) & (int)(u.f - 255.0));
|
||||
|
@ -1782,7 +1782,7 @@ void RB_CalcAlphaFromOneMinusDotView(unsigned char* colors, float alphaMin, floa
|
|||
u.f = DotProduct(viewInModel, tess.normal[i]);
|
||||
u.f = fabs(u.f);
|
||||
u.f = 1.0 - u.f;
|
||||
Com_Printf("normal: %f %f %f dot: %f i %d\n", tess.normal[i][0], tess.normal[i][1], tess.normal[i][2], u.f, i);
|
||||
ri.Printf(PRINT_ALL, "normal: %f %f %f dot: %f i %d\n", tess.normal[i][0], tess.normal[i][1], tess.normal[i][2], u.f, i);
|
||||
|
||||
u.f = ((alphaMax - alphaMin) * u.f + alphaMin) * 255.0;
|
||||
u.f = u.f - (long double)(~((int)(u.f - 255.0) >> 31) & (int)(u.f - 255.0));
|
||||
|
|
|
@ -3567,7 +3567,7 @@ qhandle_t RE_RegisterShader( const char *name ) {
|
|||
shader_t *sh;
|
||||
|
||||
if ( strlen( name ) >= MAX_QPATH ) {
|
||||
Com_Printf( "Shader name exceeds MAX_QPATH\n" );
|
||||
ri.Printf(PRINT_ALL, "Shader name exceeds MAX_QPATH\n" );
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -3597,7 +3597,7 @@ qhandle_t RE_RegisterShaderNoMip( const char *name ) {
|
|||
shader_t *sh;
|
||||
|
||||
if ( strlen( name ) >= MAX_QPATH ) {
|
||||
Com_Printf( "Shader name exceeds MAX_QPATH\n" );
|
||||
ri.Printf(PRINT_ALL, "Shader name exceeds MAX_QPATH\n" );
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -525,8 +525,8 @@ void R_PrintInfoStaticModels()
|
|||
cStaticModelUnpacked_t *pSM[MAX_DISTINCT_STATIC_MODELS];
|
||||
int count;
|
||||
|
||||
Com_Printf("Static model info:\n");
|
||||
Com_Printf("------------------\n");
|
||||
ri.Printf(PRINT_ALL, "Static model info:\n");
|
||||
ri.Printf(PRINT_ALL, "------------------\n");
|
||||
|
||||
count = 0;
|
||||
iRenderCount = 0;
|
||||
|
@ -541,7 +541,7 @@ void R_PrintInfoStaticModels()
|
|||
iRenderCount++;
|
||||
|
||||
if (!SM->tiki) {
|
||||
Com_Printf("ERROR: static model with no tiki\n");
|
||||
ri.Printf(PRINT_ALL, "ERROR: static model with no tiki\n");
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -553,7 +553,7 @@ void R_PrintInfoStaticModels()
|
|||
}
|
||||
|
||||
if (count >= MAX_DISTINCT_STATIC_MODELS) {
|
||||
Com_Printf("R_PrintInfoStaticModels: MAX_DISTINCT_STATIC_MODELS exceeded - increase and recompile\n");
|
||||
ri.Printf(PRINT_ALL, "R_PrintInfoStaticModels: MAX_DISTINCT_STATIC_MODELS exceeded - increase and recompile\n");
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -566,12 +566,12 @@ void R_PrintInfoStaticModels()
|
|||
}
|
||||
}
|
||||
|
||||
Com_Printf("Total static models rendered: %d\n", iRenderCount);
|
||||
ri.Printf(PRINT_ALL, "Total static models rendered: %d\n", iRenderCount);
|
||||
|
||||
for (i = 0; i < count; i++) {
|
||||
skelHeaderGame_t *skelmodel = ri.TIKI_GetSkel(tikis[i]->mesh[0]);
|
||||
|
||||
Com_Printf(
|
||||
ri.Printf(PRINT_ALL,
|
||||
"model: %s, version: %d, count: %d,\n culling min %.1f %.1f %.1f, max %.1f %.1f %.1f, radius %.1f\n",
|
||||
tikis[i]->a->name,
|
||||
skelmodel ? skelmodel->version : -1,
|
||||
|
|
|
@ -689,7 +689,7 @@ static void R_PreTessellateTerrain()
|
|||
ri.Cvar_SetValue("ter_maxtris", 65535);
|
||||
}
|
||||
|
||||
Com_DPrintf("Using ter_maxtris = %d\n", ter_maxtris->integer);
|
||||
ri.Printf(PRINT_DEVELOPER, "Using ter_maxtris = %d\n", ter_maxtris->integer);
|
||||
|
||||
g_nTris = ter_maxtris->integer * 2 + 1;
|
||||
g_nVerts = ter_maxtris->integer + 1;
|
||||
|
@ -999,7 +999,7 @@ static void R_DoTriSplitting()
|
|||
// make sure there are sufficient number of tris
|
||||
//
|
||||
if (g_tri.nFree < 14 || g_vert.nFree < 14) {
|
||||
Com_DPrintf("WARNING: aborting terrain tessellation -- insufficient tris\n");
|
||||
ri.Printf(PRINT_DEVELOPER, "WARNING: aborting terrain tessellation -- insufficient tris\n");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1336,7 +1336,7 @@ void R_AddTerrainSurfaces()
|
|||
|
||||
if (ter_count->integer && (g_nSplit || g_nMerge)) {
|
||||
if (ter_count->integer == 1 || g_nSplit * 2 != g_nMerge) {
|
||||
Com_DPrintf(
|
||||
ri.Printf(PRINT_DEVELOPER,
|
||||
"%5zu tris / %5zu verts / %4d splits / %4d merges\n",
|
||||
g_nTris - g_tri.nFree,
|
||||
g_nVerts - g_vert.nFree,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue