Пример #1
0
void mw_ShowMemoryWatches()
{
    if(g_bShowMemStats > 0)
    {
        con_WhitePrintf("--------- Memory Watch ----------");
        con_WhitePrintf("Total allocations: %d, total frees: %d", g_nTotalAllocations, g_nTotalFrees);

        con_WhitePrintf("-              Sound: %luk", mw_BytesToK(g_dwSoundMemory));
        con_WhitePrintf("-     Server Objects: %luk", mw_BytesToK(g_ObjectMemory));
        con_WhitePrintf("-     World Geometry: %luk", mw_BytesToK(g_WorldGeometryMemory));
        con_WhitePrintf("- Interface surfaces: %luk", mw_BytesToK(GetInterfaceSurfaceMemory()));
        con_WhitePrintf("-  Internal Textures: %luk", mw_BytesToK(GetInternalTextureMemory()));
        con_WhitePrintf("-  Renderer Textures: %luk", mw_BytesToK(GetRendererTextureMemory()));
        con_WhitePrintf("-             Models: %luk", mw_BytesToK(g_ModelMemory));
    }
}
Пример #2
0
static void r_ConsolePrint(char *pMsg, ...)
{
	char msg[300];
	va_list marker;

	va_start(marker, pMsg);
	LTVSNPrintF(msg, sizeof(msg), pMsg, marker);
	va_end(marker);

	con_WhitePrintf(msg);
}