Replaced all Com_printf's in UI with Logger's

Signed-off-by: Harry Young <hendrik.gerritzen@googlemail.com>
This commit is contained in:
Harry Young 2013-09-05 19:18:14 +02:00
parent 65f2b94ca2
commit c48f5ce237
17 changed files with 143 additions and 143 deletions

View file

@ -603,7 +603,7 @@ static void AdminMenu_Event( void* ptr, int32_t event ) {
}
}
/* Com_Printf( "Cmd: %s\n", cmd ); */
/* UI_Logger( LL_DEBUG, "Cmd: %s\n", cmd ); */
trap_Cmd_ExecuteText( EXEC_APPEND, cmd );
}
@ -1595,7 +1595,7 @@ static void ClientAdmin_GetClient ( int32_t listNum )
/* holy crap this is bad. */
/* This could happen if a selected player disconnected at exactly the wrong time lol */
if ( !info[0] ) {
Com_Printf( S_COLOR_RED "ERROR: Selected player was not found. Please try again." );
UI_Logger( LL_ERROR, "Selected player was not found. Please try again." );
/* Re-Init. If it were a dud player, this'll probably get rid of them */
s_clientAdmin.clientList.curvalue = 0;
AdminGeneric_InitLists();
@ -2132,14 +2132,14 @@ static void AdminAudio_InitFilesList ( void )
strLen = trap_FS_FOpenFile( "ext_data/audioFileRoutes.dat", &f, FS_READ );
if ( !strLen ) {
Com_Printf( S_COLOR_RED "Warning: ext_data/audioFileRoutes.dat could not be found.\n" );
UI_Logger( LL_ERROR, "ext_data/audioFileRoutes.dat could not be found.\n" );
return;
}
trap_FS_Read( buffer, sizeof( buffer ), f );
if ( !buffer[0] ) {
Com_Printf( S_COLOR_RED "Warning: could not read ext_data/audio_dirs.dat\n" );
UI_Logger( LL_WARNING, "could not read ext_data/audio_dirs.dat\n" );
return;
}
@ -2182,7 +2182,7 @@ static void AdminAudio_InitFilesList ( void )
}
else
{
Com_Printf( "ERROR: musicFiles does not have an opening brace!\n" );
UI_Logger( LL_ERROR, "musicFiles does not have an opening brace!\n" );
continue;
}
}
@ -2214,7 +2214,7 @@ static void AdminAudio_InitFilesList ( void )
}
else
{
Com_Printf( "ERROR: soundFiles does not have an opening brace!\n" );
UI_Logger( LL_ERROR, "soundFiles does not have an opening brace!\n" );
continue;
}
}
@ -2230,7 +2230,7 @@ static void AdminAudio_InitFilesList ( void )
if ( !numFiles || !buffer[0] )
{
Com_Printf( S_COLOR_RED "WARNING: No songs found in directory: %s\n", musicDirs[i] );
UI_Logger( LL_WARN, "No songs found in directory: %s\n", musicDirs[i] );
continue;
}
@ -2262,7 +2262,7 @@ static void AdminAudio_InitFilesList ( void )
}
Com_sprintf( s_adminAudio.musicList[s_adminAudio.numSongs].fileRoute, sizeof( s_adminAudio.musicList[s_adminAudio.numSongs].fileRoute ), "%s/%s", musicDirs[i], strPtr );
/*Com_Printf( S_COLOR_RED "%s\n", s_adminAudio.musicList[s_adminAudio.numSongs] );*/
/*UI_Logger( LL_DEBUG, "%s\n", s_adminAudio.musicList[s_adminAudio.numSongs] );*/
s_adminAudio.musicList[s_adminAudio.numSongs].format = TYPE_MP3;
s_adminAudio.numSongs++;
@ -2307,7 +2307,7 @@ static void AdminAudio_InitFilesList ( void )
}
Com_sprintf( s_adminAudio.soundList[s_adminAudio.numSounds].fileRoute, sizeof( s_adminAudio.soundList[s_adminAudio.numSounds].fileRoute ), "%s/%s", soundDirs[i], strPtr );
/* Com_Printf( S_COLOR_RED "%s\n", s_adminAudio.soundList[s_adminAudio.numSounds] ); */
/*UI_Logger( LL_DEBUG, "%s\n", s_adminAudio.soundList[s_adminAudio.numSounds] ); */
s_adminAudio.soundList[s_adminAudio.numSounds].format = TYPE_MP3;
s_adminAudio.numSounds++;
@ -2349,7 +2349,7 @@ static void AdminAudio_InitFilesList ( void )
}
Com_sprintf( s_adminAudio.soundList[s_adminAudio.numSounds].fileRoute, sizeof( s_adminAudio.soundList[s_adminAudio.numSounds].fileRoute ), "%s/%s", soundDirs[i], strPtr );
/* Com_Printf( S_COLOR_RED "%s\n", s_adminAudio.soundList[s_adminAudio.numSounds] ); */
/*UI_Logger( LL_DEBUG, "%s\n", s_adminAudio.soundList[s_adminAudio.numSounds] ); */
s_adminAudio.soundList[s_adminAudio.numSounds].format = TYPE_WAV;
s_adminAudio.numSounds++;

View file

@ -582,7 +582,7 @@ static void AdminMenu_Event( void* ptr, int32_t event ) {
}
}
/* Com_Printf( "Cmd: %s\n", cmd ); */
/* UI_Logger( LL_DEBUG, "Cmd: %s\n", cmd ); */
trap_Cmd_ExecuteText( EXEC_APPEND, cmd );
}
@ -1558,7 +1558,7 @@ static void ClientAdmin_GetClient ( int32_t listNum )
/* holy crap this is bad. */
/* This could happen if a selected player disconnected at exactly the wrong time lol */
if ( !info[0] ) {
Com_Printf( S_COLOR_RED "ERROR: Selected player was not found. Please try again." );
UI_Logger( LL_ERROR, "Selected player was not found. Please try again." );
/* Re-Init. If it were a dud player, this'll probably get rid of them */
s_clientAdmin.clientList.curvalue = 0;
AdminGeneric_InitLists();
@ -2112,14 +2112,14 @@ static void AdminAudio_InitFilesList ( void )
strLen = trap_FS_FOpenFile( "ext_data/audioFileRoutes.dat", &f, FS_READ );
if ( !strLen ) {
Com_Printf( S_COLOR_RED "Warning: ext_data/audioFileRoutes.dat could not be found.\n" );
UI_Logger( LL_WARN, "ext_data/audioFileRoutes.dat could not be found.\n" );
return;
}
trap_FS_Read( buffer, sizeof( buffer ), f );
if ( !buffer[0] ) {
Com_Printf( S_COLOR_RED "Warning: could not read ext_data/audio_dirs.dat\n" );
UI_Logger( LL_WARN, "could not read ext_data/audio_dirs.dat\n" );
return;
}
@ -2162,7 +2162,7 @@ static void AdminAudio_InitFilesList ( void )
}
else
{
Com_Printf( "ERROR: musicFiles does not have an opening brace!\n" );
UI_Logger( LL_ERROR, "musicFiles does not have an opening brace!\n" );
continue;
}
}
@ -2194,7 +2194,7 @@ static void AdminAudio_InitFilesList ( void )
}
else
{
Com_Printf( "ERROR: soundFiles does not have an opening brace!\n" );
UI_Logger( LL_ERROR, "soundFiles does not have an opening brace!\n" );
continue;
}
}
@ -2210,7 +2210,7 @@ static void AdminAudio_InitFilesList ( void )
if ( !numFiles || !buffer[0] )
{
Com_Printf( S_COLOR_RED "WARNING: No songs found in directory: %s\n", musicDirs[i] );
UI_Logger( LL_WARN, "No songs found in directory: %s\n", musicDirs[i] );
continue;
}
@ -2241,7 +2241,7 @@ static void AdminAudio_InitFilesList ( void )
}
Com_sprintf( s_adminAudio.musicList[s_adminAudio.numSongs].fileRoute, sizeof( s_adminAudio.musicList[s_adminAudio.numSongs].fileRoute ), "%s/%s", musicDirs[i], strPtr );
/*Com_Printf( S_COLOR_RED "%s\n", s_adminAudio.musicList[s_adminAudio.numSongs] );*/
/*UI_Logger( LL_DEBUG, "%s\n", s_adminAudio.musicList[s_adminAudio.numSongs] );*/
s_adminAudio.musicList[s_adminAudio.numSongs].format = TYPE_MP3;
s_adminAudio.numSongs++;
@ -2286,7 +2286,7 @@ static void AdminAudio_InitFilesList ( void )
}
Com_sprintf( s_adminAudio.soundList[s_adminAudio.numSounds].fileRoute, sizeof( s_adminAudio.soundList[s_adminAudio.numSounds].fileRoute ), "%s/%s", soundDirs[i], strPtr );
/* Com_Printf( S_COLOR_RED "%s\n", s_adminAudio.soundList[s_adminAudio.numSounds] ); */
/*UI_Logger( LL_DEBUG, "%s\n", s_adminAudio.soundList[s_adminAudio.numSounds] ); */
s_adminAudio.soundList[s_adminAudio.numSounds].format = TYPE_MP3;
s_adminAudio.numSounds++;
@ -2328,7 +2328,7 @@ static void AdminAudio_InitFilesList ( void )
}
Com_sprintf( s_adminAudio.soundList[s_adminAudio.numSounds].fileRoute, sizeof( s_adminAudio.soundList[s_adminAudio.numSounds].fileRoute ), "%s/%s", soundDirs[i], strPtr );
/* Com_Printf( S_COLOR_RED "%s\n", s_adminAudio.soundList[s_adminAudio.numSounds] ); */
/*UI_Logger( LL_DEBUG, "%s\n", s_adminAudio.soundList[s_adminAudio.numSounds] ); */
s_adminAudio.soundList[s_adminAudio.numSounds].format = TYPE_WAV;
s_adminAudio.numSounds++;

View file

@ -553,7 +553,7 @@ static void UI_DrawProportionalString2( int32_t x, int32_t y, const char* str, v
ax += uis.widescreen.bias;
}
/*else
Com_Printf( S_COLOR_RED "CVAR: %i, Ratio: %f, State: %i\n", ui_handleWidescreen.integer, uis.widescreen.ratio, uis.widescreen.state );*/
UI_Logger( LL_DEBUG, "CVAR: %i, Ratio: %f, State: %i\n", ui_handleWidescreen.integer, uis.widescreen.ratio, uis.widescreen.state );*/
sizeScale = UI_ProportionalSizeScale( style );
@ -1570,7 +1570,7 @@ int32_t UI_InitClassData( char* fileName ) {
fileLen = trap_FS_FOpenFile( filePath, &f, FS_READ );
if ( !fileLen ) {
Com_Printf( S_COLOR_RED "ERROR: File not found: %s\n", fileName );
UI_Logger( LL_ERROR, "File not found: %s\n", fileName );
UI_LogFuncEnd();
return qfalse;
}
@ -1581,7 +1581,7 @@ int32_t UI_InitClassData( char* fileName ) {
trap_FS_Read( buffer, fileLen, f );
if ( !buffer[0] ) {
Com_Printf( S_COLOR_RED "ERROR: File could not be read: %s\n", fileName );
UI_Logger( LL_ERROR, "File could not be read: %s\n", fileName );
UI_LogFuncEnd();
return qfalse;
}
@ -1598,13 +1598,13 @@ int32_t UI_InitClassData( char* fileName ) {
token = COM_Parse( &textPtr );
if ( !token[0] ) {
Com_Printf( S_COLOR_RED "ERROR: File was loaded, but no data could be read: %s\n", fileName );
UI_Logger( LL_ERROR, "File was loaded, but no data could be read: %s\n", fileName );
UI_LogFuncEnd();
return qfalse;
}
if ( Q_stricmpn( token, "{", 1 ) ) {
Com_Printf( S_COLOR_RED "ERROR: No opening brace { found in: %s\n", fileName );
UI_Logger( LL_ERROR, "No opening brace { found in: %s\n", fileName );
UI_LogFuncEnd();
return qfalse;
}
@ -1619,7 +1619,7 @@ int32_t UI_InitClassData( char* fileName ) {
/* formal Name */
if ( !Q_stricmpn( token, "formalName", 10 ) ) {
if ( COM_ParseString( &textPtr, &token ) ) {
Com_Printf( S_COLOR_RED "ERROR: Error parsing formalName parameter in file: %s.\n", fileName );
UI_Logger( LL_ERROR, "Error parsing formalName parameter in file: %s.\n", fileName );
continue;
}
@ -1630,7 +1630,7 @@ int32_t UI_InitClassData( char* fileName ) {
/* console Name */
if ( !Q_stricmpn( token, "consoleName", 11 ) ) {
if ( COM_ParseString( &textPtr, &token ) ) {
Com_Printf( S_COLOR_RED "ERROR: Error parsing consoleName parameter in file: %s.\n", fileName );
UI_Logger( LL_ERROR, "Error parsing consoleName parameter in file: %s.\n", fileName );
continue;
}
@ -1793,7 +1793,7 @@ int32_t UI_GetRankSets( void )
int32_t fileLen;
numFiles = trap_FS_GetFileList("ext_data/ranksets", ".ranks", fileBuffer, sizeof(fileBuffer) );
/*Com_Printf( S_COLOR_RED "%s\n", filePtr);*/
/*UI_Logger( LL_DEBUG, "%s\n", filePtr);*/
if ( numFiles == 1 )
return 1;
@ -1817,7 +1817,7 @@ int32_t UI_GetRankSets( void )
filePtr[fileLen-6] = '\0';
}
/*Com_Printf( S_COLOR_RED "%s\n", filePtr );*/
/*UI_Logger( LL_DEBUG, "%s\n", filePtr );*/
Q_strncpyz( uis.rankSet.rankSetNames[i], filePtr, sizeof( uis.rankSet.rankSetNames[i] ) );
@ -1875,7 +1875,7 @@ int32_t UI_GetClassSets( void )
int32_t fileLen;
numFiles = trap_FS_GetFileList("ext_data/classes", ".classes", fileBuffer, sizeof(fileBuffer) );
/*Com_Printf( S_COLOR_RED "%s\n", filePtr);*/
/*UI_Logger( LL_DEBUG, "%s\n", filePtr);*/
if ( numFiles == 1 ){
UI_LogFuncEnd();
@ -1901,7 +1901,7 @@ int32_t UI_GetClassSets( void )
filePtr[fileLen-8] = '\0';
}
/* Com_Printf( S_COLOR_RED "%s\n", filePtr ); */
/*UI_Logger( LL_DEBUG, "%s\n", filePtr ); */
Q_strncpyz( uis.classList[i], filePtr, sizeof( uis.classList[i] ) );
@ -1950,7 +1950,7 @@ int32_t UI_PopulateClassSetArray( char *classSets[] ) {
numFiles = trap_FS_GetFileList("ext_data/ranksets", ".ranks", fileBuffer, sizeof(fileBuffer) );
filePtr = fileBuffer;
//Com_Printf( S_COLOR_RED "%s\n", filePtr);
//UI_Logger( LL_DEBUG, "%s\n", filePtr);
for ( i = 0, j = 0; i < numFiles && j < MAX_RANKSETS; i++, filePtr+=(int32_t)fileLen+1 ) {
fileLen = strlen(filePtr);
@ -1981,7 +1981,7 @@ UI_Init
void UI_Init( void ) {
UI_LogFuncBegin();
Com_Printf ("This is RPG-X version %s compiled by %s on %s.\n", RPGX_VERSION, RPGX_COMPILEDBY, RPGX_COMPILEDATE);
UI_Logger( LL_ALWAYS,"This is RPG-X version %s compiled by %s on %s.\n", RPGX_VERSION, RPGX_COMPILEDBY, RPGX_COMPILEDATE);
memset( &uis, 0, sizeof ( uis ) );
@ -2676,18 +2676,18 @@ static void UI_ParseMenuText(void)
}
if (uis.debug)
Com_Printf( S_COLOR_RED "UI_ParseMenuText - Line: %i, String: %s\n", i-1, menu_normal_text[i-1] );
UI_Logger( LL_DEBUG, "UI_ParseMenuText - Line: %i, String: %s\n", i-1, menu_normal_text[i-1] );
if (i> MNT_MAX)
{
Com_Printf( S_COLOR_RED "UI_ParseMenuText : too many values! Needed %d but got %d.\n",MNT_MAX,i);
UI_Logger( LL_ERROR, "UI_ParseMenuText : too many values! Needed %d but got %d.\n",MNT_MAX,i);
UI_LogFuncEnd();
return;
}
}
if (i != MNT_MAX)
{
Com_Printf( S_COLOR_RED "UI_ParseMenuText : not enough lines. Read %d of %d!\n",i,MNT_MAX);
UI_Logger( LL_ERROR, "UI_ParseMenuText : not enough lines. Read %d of %d!\n",i,MNT_MAX);
for(;i<MNT_MAX;i++) {
menu_normal_text[i] = "?";
}
@ -2791,18 +2791,18 @@ static void UI_ParseButtonText(void)
}
if (uis.debug)
Com_Printf( S_COLOR_RED "UI_ParseButtonText - Line: %i, String1: %s, String2: %s\n", i-1, menu_button_text[i-1][0], menu_button_text[i-1][1] );
UI_Logger( LL_DEBUG, "UI_ParseButtonText - Line: %i, String1: %s, String2: %s\n", i-1, menu_button_text[i-1][0], menu_button_text[i-1][1] );
if (i> MBT_MAX)
{
Com_Printf( S_COLOR_RED "UI_ParseButtonText : too many values! Needed %d but got %d.\n",MBT_MAX,i);
UI_Logger( LL_ERROR, "UI_ParseButtonText : too many values! Needed %d but got %d.\n",MBT_MAX,i);
UI_LogFuncEnd();
return;
}
}
if (i != MBT_MAX)
{
Com_Printf( S_COLOR_RED "UI_ParseButtonText : not enough lines. Read %d of %d!\n",i,MBT_MAX);
UI_Logger( LL_DEBUG, "UI_ParseButtonText : not enough lines. Read %d of %d!\n",i,MBT_MAX);
for(;i<MBT_MAX;i++) {
menu_button_text[i][0] = "?";
menu_button_text[i][1] = "?";
@ -2829,14 +2829,14 @@ void UI_LoadButtonText()
if ( !f )
{
Com_Printf( S_COLOR_RED "UI_LoadButtonText : MP_BUTTONTEXT.DAT file not found!\n");
UI_Logger( LL_ERROR, "UI_LoadButtonText : MP_BUTTONTEXT.DAT file not found!\n");
UI_LogFuncEnd();
return;
}
if ( len > MAXBUTTONTEXT )
{
Com_Printf( S_COLOR_RED "UI_LoadButtonText : MP_BUTTONTEXT.DAT too big!\n");
UI_Logger( LL_ERROR, "UI_LoadButtonText : MP_BUTTONTEXT.DAT too big!\n");
UI_LogFuncEnd();
return;
}
@ -2966,7 +2966,7 @@ void UI_SecurityCodeSetup ( void )
if ( fileLen != SECURITY_SIZE )
{
Com_Printf( S_COLOR_RED "rpgxid.dat is wrong size. %i, should be %i\n", fileLen, SECURITY_SIZE );
UI_Logger( LL_ERROR, "rpgxid.dat is wrong size. %i, should be %i\n", fileLen, SECURITY_SIZE );
UI_ConfirmMenu( menu_normal_text[MNT_ID_WRONGSIZE], 0, SecurityFeedback );
UI_LogFuncEnd();
return;
@ -2986,9 +2986,9 @@ void UI_SecurityCodeSetup ( void )
#endif
{
if ( !code )
Com_Printf( S_COLOR_RED "No data was able to be loaded\n" );
UI_Logger( LL_ERROR, "No data was able to be loaded\n" );
else
Com_Printf( S_COLOR_RED "ID was %lu, should be %u\n", code->ID, SECURITY_ID );
UI_Logger( LL_ERROR, "ID was %lu, should be %u\n", code->ID, SECURITY_ID );
UI_ConfirmMenu( menu_normal_text[MNT_ID_INVALID], 0, SecurityFeedback );
UI_LogFuncEnd();
@ -3003,7 +3003,7 @@ void UI_SecurityCodeSetup ( void )
fileHandle_t wf;
int32_t i;
/*Com_Printf( S_COLOR_RED "Building new key!\n" );*/
/*UI_Logger( LL_DEBUG, "Building new key!\n" );*/
memset( &wCode, 0, sizeof( rpgxSecurityFile_t ) );

View file

@ -161,7 +161,7 @@ static void ConfirmMenu_Draw( void )
height = (SMALLCHAR_HEIGHT + 4) * numLines;
y = 277 - (height * 0.5); //269
//Com_Printf( S_COLOR_RED "numLines: %i\n", numLines );
//UI_Logger( LL_DEBUG, "numLines: %i\n", numLines );
for ( i = 0; i < numLines; i++ )
{
@ -179,7 +179,7 @@ static void ConfirmMenu_Draw( void )
spacePoint = strlen(message);
Q_strncpyz( buffer, message, spacePoint + 1 );
//Com_Printf( S_COLOR_RED "%s\n", buffer );
//UI_Logger( LL_DEBUG, "%s\n", buffer );
UI_DrawProportionalString( 345, y, buffer, UI_SMALLFONT | UI_CENTER, color_red );

View file

@ -243,7 +243,7 @@ static void Player_DoEmote( int32_t emoteNum ) {
emote = &bg_emoteList[ emoteNum ];
//Com_Printf( S_COLOR_RED "Emote num: %i, Enum: %i, Legs time: %i\n", emoteNum, emote->enumName );
//UI_Logger( LL_DEBUG, "Emote num: %i, Enum: %i, Legs time: %i\n", emoteNum, emote->enumName );
if ( !emote ){
UI_LogFuncEnd();

View file

@ -87,12 +87,12 @@ int32_t UI_ParseInfos( char *buf, int32_t max, char *infos[] ) {
break;
}
if ( strcmp( token, "{" ) ) {
Com_Printf( "Missing { in info file\n" );
UI_Logger( LL_ERROR, "Missing { in info file\n" );
break;
}
if ( count == max ) {
Com_Printf( "Max infos exceeded\n" );
UI_Logger( LL_ERROR, "Max infos exceeded\n" );
break;
}
@ -100,7 +100,7 @@ int32_t UI_ParseInfos( char *buf, int32_t max, char *infos[] ) {
while ( 1 ) {
token = COM_ParseExt( &buf, qtrue );
if ( !token[0] ) {
Com_Printf( "Unexpected end of info file\n" );
UI_Logger( LL_ERROR, "Unexpected end of info file\n" );
break;
}
if ( !strcmp( token, "}" ) ) {

View file

@ -1518,7 +1518,7 @@ void UI_LibraryMenu_Cache (void)
if ( len > MAXLIBRARYTEXT )
{
Com_Printf( S_COLOR_RED "UI_LibraryMenu_Cache : sp_library.dat size (%d) > max (%d)!\n", len, MAXLIBRARYTEXT);
UI_Logger( LL_ERROR, "UI_LibraryMenu_Cache : sp_library.dat size (%d) > max (%d)!\n", len, MAXLIBRARYTEXT);
UI_LogFuncEnd();
return;
}

View file

@ -513,7 +513,7 @@ void UI_UpdateCvars( void ) {
for ( i = 0, cv = cvarTable ; i < cvarTableSize ; i++, cv++ ) {
if ( cv->vmCvar->handle >= 1024 || cv->vmCvar->handle <= 0 )
{
//Com_Printf( S_COLOR_RED "ERROR: CVAR: %s Handle: %i \n", cv->cvarName, cv->vmCvar->handle );
//UI_Logger( LL_ERROR, "CVAR: %s Handle: %i \n", cv->cvarName, cv->vmCvar->handle );
}
else
trap_Cvar_Update( cv->vmCvar );

View file

@ -1101,7 +1101,7 @@ static void MainArenaServers_StopRefresh( void )
if ( !s_main.networkParms.numservers )
s_main.networkParms.showNoServersAlert = qtrue;
//Com_Printf( S_COLOR_RED "OUTPUT: Name: %s, Map: %s\n", s_main.networkParms.table[1].servernode.hostname, s_main.networkParms.table[1].servernode.mapname );
//UI_Logger( LL_DEBUG, "OUTPUT: Name: %s, Map: %s\n", s_main.networkParms.table[1].servernode.hostname, s_main.networkParms.table[1].servernode.mapname );
MainArenaServers_UpdateMenu();
UI_LogFuncEnd();
@ -1175,7 +1175,7 @@ static void MainArenaServers_DoRefresh( void )
//TiM - testing the data output from this baby
//if ( !Q_stricmp( Info_ValueForKey( info, "game" ), "rpg-x" ) )
//Com_Printf( "%s", info );
//UI_Logger( LL_DEBUG, "%s", info );
}
// insert ping results
@ -2359,7 +2359,7 @@ void UI_PlayIntroCinematic( void )
UI_LogFuncBegin();
if ( !uis.playCinematic ) { //&& ( trap_Milliseconds() <=5000 )
uis.playCinematic = qtrue; //FIXME: Duhhh I'm a stupid function that completely ignores the value of uis.playCinematic O_o
//Com_Printf( "qtrue" );
//UI_Logger( LL_DEBUG, "qtrue" );
trap_Cmd_ExecuteText( EXEC_APPEND, "wait 5; wait 5; cinematic rpgx_intro.roq \n" );
}
UI_LogFuncEnd();

View file

@ -200,7 +200,7 @@ static int32_t PlayerModel_CheckInFilter( char* string, filterData_t *filter, in
while( filter[i].filterName[0] && i < width ) {
if ( !Q_stricmp( filter[i].filterName, string ) ) {
//Com_Printf( S_COLOR_RED "String %s already in cell %i\n", array[i], i );
//UI_Logger( LL_ERROR, "String %s already in cell %i\n", array[i], i );
UI_LogFuncEnd();
return i;
}
@ -216,7 +216,7 @@ static int32_t PlayerModel_CheckInFilter( char* string, filterData_t *filter, in
*num = *num + 1; //aah I see. You can't call *num++ since that increments the address, not the value XD
}
//Com_Printf( S_COLOR_RED "Added %s to cell %i", array[i], i );
//UI_Logger( LL_DEBUG, "Added %s to cell %i", array[i], i );
UI_LogFuncEnd();
return i;
@ -382,7 +382,7 @@ static void PlayerModel_LoadAvailableSkins( void ) {
if ( numFiles <= 0 )
{
Com_Printf( S_COLOR_RED "ERROR: No Skinset files found!\n" );
UI_Logger( LL_ERROR, "No Skinset files found!\n" );
UI_LogFuncEnd();
return;
}
@ -412,12 +412,12 @@ static void PlayerModel_LoadAvailableSkins( void ) {
Q_strncpyz( skins[j], token, sizeof( skins[j] ) );
//Com_Printf( S_COLOR_RED "%s\n", skins[j] );
//UI_Logger( LL_DEBUG, "%s\n", skins[j] );
j++;
}
//Com_Printf( "Model Break\n", skins[j] );
//UI_Logger( LL_DEBUG, "Model Break\n", skins[j] );
//Com_Printf( "%s\n", s_playermodel.modelNames[2] );
//UI_Logger( LL_DEBUG, "%s\n", s_playermodel.modelNames[2] );
j = 0;
while ( j < MAX_PLAYERMODELS )
{
@ -435,13 +435,13 @@ static void PlayerModel_LoadAvailableSkins( void ) {
fileLen = trap_FS_FOpenFile( filePath, &f, FS_READ);
if ( fileLen <= 0 ) {
Com_Printf( S_COLOR_RED "File not found: %s\n", filePath );
UI_Logger( LL_ERROR, "File not found: %s\n", filePath );
UI_LogFuncEnd();
return;
}
if ( fileLen > 20000 ) {
Com_Printf( S_COLOR_RED "File exceeded maximum size: %s\n", filePath );
UI_Logger( LL_ERROR, "File exceeded maximum size: %s\n", filePath );
UI_LogFuncEnd();
return;
}
@ -485,7 +485,7 @@ static void PlayerModel_LoadAvailableSkins( void ) {
if ( !strchr( skinSetFrame, '*' ) )
{
Com_Printf( S_COLOR_RED "ERROR: No '*' in skinset define for character: %s/%s\n", s_playermodel.charNames[s_playermodel.selectedChar].charName, s_playermodel.modelNames[j] );
UI_Logger( LL_ERROR, "No '*' in skinset define for character: %s/%s\n", s_playermodel.charNames[s_playermodel.selectedChar].charName, s_playermodel.modelNames[j] );
continue;
}
@ -548,7 +548,7 @@ static void PlayerModel_LoadAvailableSkins( void ) {
for ( i = 0; i < numSkins; i++ )
{
Q_strncpyz( s_playermodel.skinNamesUpr[j][i], s_playermodel.skinNames[j][i], sizeof( s_playermodel.skinNamesUpr[j][i] ) );
//Com_Printf( S_COLOR_BLUE "%s\n", s_playermodel.skinNamesUpr[j][i] );
//UI_Logger( LL_DEBUG, "%s\n", s_playermodel.skinNamesUpr[j][i] );
}
numSkins=0;
@ -567,7 +567,7 @@ static int32_t QDECL CharMediaList_Compare( const void *ptr1, const void *ptr2 )
str1 = (const char *)ptr1;
str2 = (const char *)ptr2;
//Com_Printf( "STR1: %s STR2: %s\n", str1, str2 );
//UI_Logger( LL_DEBUG, "STR1: %s STR2: %s\n", str1, str2 );
chr1 = *str1;
chr2 = *str2;
@ -638,7 +638,7 @@ static int32_t PlayerModel_PopulateSkinsList ( void ) {
UI_LogFuncBegin();
if ( !s_playermodel.skinNames[s_playermodel.charModel.curvalue][0][0] ) {
Com_Printf( S_COLOR_RED "ERROR: No valid skins found.\n" );
UI_Logger( LL_ERROR, "No valid skins found.\n" );
UI_LogFuncEnd();
return -1;
}
@ -704,7 +704,7 @@ static void PlayerModel_OffsetCharList( int32_t* offset ) {
buffer = s_playermodel.charNamesUpr[i + *offset];
//Q_strncpyz( buffer, s_playermodel.charNames[i + *offset], sizeof ( buffer ) );
//Com_Printf( "Buffer - %s, %s\n", buffer, s_playermodel.charNames[1] );
//UI_Logger( LL_DEBUG, "Buffer - %s, %s\n", buffer, s_playermodel.charNames[1] );
if ( !buffer[0] ) {
if ( s_playermodel.charMenu[i].generic.flags & ( QMF_INACTIVE | QMF_HIDDEN ) ) {
@ -753,7 +753,7 @@ static void PlayerModel_RebuildCharMenu( void ) {
genderValid = s_playermodel.genderFilter.curvalue == 0 ||
( s_playermodel.genderList[s_playermodel.genderFilter.curvalue].filterIndex == s_playermodel.charNames[i].gender );
//Com_Printf( "Char %s valid: %i %i\n", s_playermodel.charNames[i].charName, raceValid, genderValid );
//UI_Logger( LL_DEBUG, "Char %s valid: %i %i\n", s_playermodel.charNames[i].charName, raceValid, genderValid );
if ( raceValid && genderValid )
{
@ -1049,7 +1049,7 @@ static void PlayerModel_MenuEvent( void* ptr, int32_t event )
s_playermodel.selectedChar = s_playermodel.charNames[ s_playermodel.selectedChar ].index;
}
//Com_Printf( S_COLOR_RED "%i %i\n", s_playermodel.selectedChar, s_playermodel.charNames[ s_playermodel.selectedChar ].index );
//UI_Logger( LL_DEBUG, "%i %i\n", s_playermodel.selectedChar, s_playermodel.charNames[ s_playermodel.selectedChar ].index );
//safety net. Without this, if a player held down 'enter', the game would overflow trying to load the same file over and over really fast. bad, really bad lol
if ( oldChar == s_playermodel.selectedChar && s_playermodel.selectedChar != -1 )
@ -1180,7 +1180,7 @@ static void PlayerModel_BuildList( void )
numdirs = trap_FS_GetFileList("models/players_rpgx", "/", dirlist, sizeof(dirlist) );
dirptr = dirlist;
///Com_Printf("%i folders found\n", numdirs );
///UI_Logger( LL_DEBUG, "%i folders found\n", numdirs );
for (i=0; i<numdirs && s_playermodel.numChars < MAX_PLAYERCHARS; i++,dirptr+=dirlen+1)
{
@ -1235,21 +1235,21 @@ static void PlayerModel_BuildList( void )
Com_sprintf( filePath, sizeof(filePath), "models/players_rpgx/%s/race.cfg", dirptr );
fileLength = trap_FS_FOpenFile( filePath, &f, FS_READ );
//Com_Printf( S_COLOR_RED "File %s loaded.\n", dirptr );
//UI_Logger( LL_DEBUG, "File %s loaded.\n", dirptr );
if ( !fileLength ) {
continue;
}
//Com_Printf( S_COLOR_RED "We have length.\n" );
//UI_Logger( LL_DEBUG, "We have length.\n" );
if ( fileLength > sizeof( buffer ) - 1 ) {
continue;
}
//Com_Printf( S_COLOR_RED "Good size.\n" );
//UI_Logger( LL_DEBUG, "Good size.\n" );
memset( &buffer, 0, sizeof( buffer ) );
trap_FS_Read( buffer, fileLength, f );
//Com_Printf( S_COLOR_RED "Loaded data...\n" );
//UI_Logger( LL_DEBUG, "Loaded data...\n" );
trap_FS_FCloseFile( f );
@ -1266,20 +1266,20 @@ static void PlayerModel_BuildList( void )
if ( !token )
continue;
//Com_Printf( S_COLOR_RED "Race %s Loaded\n", token );
//UI_Logger( LL_DEBUG, "Race %s Loaded\n", token );
tempBuff->race = PlayerModel_CheckInFilter( token, s_playermodel.raceList, MAX_RACES, &s_playermodel.numRaces );
//Com_Printf( S_COLOR_RED "Number of races now: %i\n", s_playermodel.numRaces );
//UI_Logger( LL_DEBUG, "Number of races now: %i\n", s_playermodel.numRaces );
token = COM_Parse( &filePtr );
if ( !token )
continue;
//Com_Printf( S_COLOR_RED "Gender %s loaded\n", token );
//UI_Logger( LL_DEBUG, "Gender %s loaded\n", token );
//tempBuff->gender = PlayerModel_CheckInArray( token, s_playermodel.genderNames, MAX_GENDERS );
tempBuff->gender = PlayerModel_CheckInFilter( token, s_playermodel.genderList, MAX_GENDERS, &s_playermodel.numGenders );
//Com_Printf( S_COLOR_RED "%i\n", tempBuff[i].gender );
//UI_Logger( LL_DEBUG, "%i\n", tempBuff[i].gender );
}
s_playermodel.numChars++;
@ -1407,7 +1407,7 @@ static void PlayerModel_SetMenuItems( void )
}
}
//Com_Printf( S_COLOR_RED "Load model is %s %s %s\n", s_playermodel.modelName, model, skin );
//UI_Logger( LL_DEBUG, "Load model is %s %s %s\n", s_playermodel.modelName, model, skin );
// find model in our list
for (i=0; i<s_playermodel.numChars; i++)
@ -1674,7 +1674,7 @@ void PlayerModelMenu_Graphics (void)
( s_playermodel.charNames[i + s_playermodel.scrollOffset].index >= 0 && s_playermodel.charNames[i + s_playermodel.scrollOffset].index == s_playermodel.selectedChar )
)
{
//Com_Printf( S_COLOR_GREEN "%i %i %i\n", i, s_playermodel.selectedChar, s_playermodel.charNames[i + s_playermodel.scrollOffset].index );
//UI_Logger( LL_DEBUG, "%i %i %i\n", i, s_playermodel.selectedChar, s_playermodel.charNames[i + s_playermodel.scrollOffset].index );
s_playermodel.charMenu[i].textcolor = CT_WHITE;
s_playermodel.charMenu[i].textcolor2 = CT_WHITE;
}

View file

@ -239,13 +239,13 @@ int32_t PlayerModel_LoadAvailableSkins( char* charSkins[] ) {
fileLen = trap_FS_FOpenFile( filePath, &f, FS_READ);
if ( fileLen <= 0 ) {
Com_Printf( S_COLOR_RED "File not found: %s\n", filePath );
UI_Logger( LL_ERROR, "File not found: %s\n", filePath );
UI_LogFuncEnd();
return 0;
}
if ( fileLen > sizeof ( fileBuffer ) ) {
Com_Printf( S_COLOR_RED "File exceeded maximum size: %s\n", filePath );
UI_Logger( LL_ERROR, "File exceeded maximum size: %s\n", filePath );
UI_LogFuncEnd();
return 0;
}
@ -306,7 +306,7 @@ void PlayerModel_OffsetCharList( int32_t* offset ) {
for ( i = 0; i < MAX_MENULISTITEMS; i++ ) {
buffer = s_playermodel.charNames[i + *offset];
//Com_Printf( "Buffer - %s\n", buffer );
//UI_Logger( LL_DEBUG, "Buffer - %s\n", buffer );
if ( !buffer )
break;
@ -520,7 +520,7 @@ static void PlayerModel_BuildList( void )
numdirs = trap_FS_GetFileList("models/players_rpgx", "/", dirlist, sizeof(dirlist) );
dirptr = dirlist;
///Com_Printf("%i folders found\n", numdirs );
///UI_Logger( LL_DEBUG, "%i folders found\n", numdirs );
for (i=0; i<numdirs && s_playermodel.numChars < MAX_PLAYERCHARS; i++,dirptr+=dirlen+1)
{
@ -543,7 +543,7 @@ static void PlayerModel_BuildList( void )
numfiles = trap_FS_GetFileList( va("models/players_rpgx/%s",dirptr), ".model", filelist, sizeof(filelist) );
if ( numfiles > 0 && dirptr[0] ) {
//Com_Printf( "Hashed %s with %i model files\n", dirptr, numfiles);
//UI_Logger( LL_DEBUG, "Hashed %s with %i model files\n", dirptr, numfiles);
Q_strncpyz( s_playermodel.charNames[s_playermodel.numChars], dirptr, sizeof( s_playermodel.charNames[s_playermodel.numChars] ) );
s_playermodel.numChars++;

View file

@ -938,7 +938,7 @@ static qboolean UI_ParseAnimationFile( const char *filename, animation_t *animat
return qfalse;
}
if ( len >= ( sizeof( text ) - 1 ) ) {
Com_Printf( "File %s too long\n", filename );
UI_Logger( LL_ERROR, "File %s too long\n", filename );
UI_LogFuncEnd();
return qfalse;
}
@ -991,7 +991,7 @@ static qboolean UI_ParseAnimationFile( const char *filename, animation_t *animat
break;
}
Com_Printf( "unknown token '%s' is %s\n", token, filename );
UI_Logger( LL_WARN, "unknown token '%s' is %s\n", token, filename );//Reclassn this as error?
}
// read information for each frame
@ -1035,7 +1035,7 @@ static qboolean UI_ParseAnimationFile( const char *filename, animation_t *animat
}
if ( i != MAX_ANIMATIONS ) {
Com_Printf( "Error parsing animation file: %s", filename );
UI_Logger( LL_ERROR, "parsing animation file: %s", filename );
UI_LogFuncEnd();
return qfalse;
}
@ -1118,7 +1118,7 @@ static qboolean UI_ParseSkinSetDataFile( playerInfo_t *pi, const char *skinSetFr
if ( ( skinStar = strstr( skinSetFrame, "*" ) ) == NULL )
{
Com_Printf( S_COLOR_RED "ERROR: No '*' specified in model skin set!\n" );
UI_Logger( LL_ERROR, "No '*' specified in model skin set!\n" );
UI_LogFuncEnd();
return qfalse;
}
@ -1138,13 +1138,13 @@ static qboolean UI_ParseSkinSetDataFile( playerInfo_t *pi, const char *skinSetFr
}
else
{
Com_Printf( "ERROR: The '*' in %s must be on either the start or end, not the middle.\n", skinSetFrame );
UI_Logger( LL_ERROR, "The '*' in %s must be on either the start or end, not the middle.\n", skinSetFrame );
UI_LogFuncEnd();
return qfalse;
}
}
//Com_Printf( S_COLOR_RED "DEBUG: skinSetName = %s \n", skinSetName );
//CUI_Logger( LL_DEBUG, "skinSetName = %s \n", skinSetName );
Com_sprintf( skinSetRoute, sizeof( skinSetRoute ), "models/players_rpgx/%s/%s.skinset", charName, skinSetName );
@ -1152,14 +1152,14 @@ static qboolean UI_ParseSkinSetDataFile( playerInfo_t *pi, const char *skinSetFr
if ( len <= 0 )
{
Com_Printf( S_COLOR_RED "ERROR: Could not open file: %s\n", skinSetRoute );
UI_Logger( LL_ERROR, "Could not open file: %s\n", skinSetRoute );
UI_LogFuncEnd();
return qfalse;
}
if ( len > sizeof( buffer) - 1 )
{
Com_Printf( S_COLOR_RED "ERROR: Imported file is too big for buffer: %s. Len is %i\n", skinSetRoute, len );
UI_Logger( LL_ERROR, "Imported file is too big for buffer: %s. Len is %i\n", skinSetRoute, len );
UI_LogFuncEnd();
return qfalse;
}
@ -1170,7 +1170,7 @@ static qboolean UI_ParseSkinSetDataFile( playerInfo_t *pi, const char *skinSetFr
if ( !buffer[0] )
{
Com_Printf( S_COLOR_RED "ERROR: Could not import data from %s\n", skinSetRoute );
UI_Logger( LL_ERROR, "Could not import data from %s\n", skinSetRoute );
UI_LogFuncEnd();
return qfalse;
}
@ -1183,7 +1183,7 @@ static qboolean UI_ParseSkinSetDataFile( playerInfo_t *pi, const char *skinSetFr
if ( Q_stricmp( token, "{" ) )
{
Com_Printf( S_COLOR_RED "ERROR: Skinset %s did not start with a '{'\n", skinSetRoute );
UI_Logger( LL_ERROR, "Skinset %s did not start with a '{'\n", skinSetRoute );
return qfalse;
}
else
@ -1209,7 +1209,7 @@ static qboolean UI_ParseSkinSetDataFile( playerInfo_t *pi, const char *skinSetFr
if ( !noBlinking && !pi->headSkinBlink ) {
//We'll alert them, but not cancel the loop
Com_Printf( S_COLOR_RED "WARNING: Couldn't load headSkinBlink: %s\n", token);
UI_Logger( LL_WARN, "Couldn't load headSkinBlink: %s\n", token);
}
continue;
}
@ -1232,7 +1232,7 @@ static qboolean UI_ParseSkinSetDataFile( playerInfo_t *pi, const char *skinSetFr
//the minimum time larger than the max time >.<
if ( n > i )
{
Com_Printf( S_COLOR_RED "ERROR: Minimum blink time was larger than maximum blink time.\n" );
UI_Logger( LL_ERROR, "Minimum blink time was larger than maximum blink time.\n" );
continue;
}
@ -1250,7 +1250,7 @@ static qboolean UI_ParseSkinSetDataFile( playerInfo_t *pi, const char *skinSetFr
pi->torsoSkin = trap_R_RegisterSkin( token );
if (!pi->torsoSkin ) {
Com_Printf( S_COLOR_RED "ERROR: Couldn't load torsoSkin: %s\n", token);
UI_Logger( LL_ERROR, "Couldn't load torsoSkin: %s\n", token);
}
continue;
}
@ -1262,7 +1262,7 @@ static qboolean UI_ParseSkinSetDataFile( playerInfo_t *pi, const char *skinSetFr
pi->legsSkin = trap_R_RegisterSkin( token );
if (!pi->legsSkin ) {
Com_Printf( S_COLOR_RED "ERROR: Couldn't load legsSkin: %s\n", token);
UI_Logger( LL_ERROR, "Couldn't load legsSkin: %s\n", token);
}
continue;
}
@ -1281,7 +1281,7 @@ static qboolean UI_ParseSkinSetDataFile( playerInfo_t *pi, const char *skinSetFr
pi->headSkin = trap_R_RegisterSkin( token );
if ( !pi->headSkin ) {
Com_Printf( S_COLOR_RED "ERROR: Couldn't load headSkin: %s\n", token );
UI_Logger( LL_ERROR, "Couldn't load headSkin: %s\n", token );
return qfalse;
}
continue;
@ -1336,7 +1336,7 @@ qboolean UI_ParseModelDataFile( playerInfo_t *pi, const char *charName,
}
//Another error... if text is WAY bigger than our available buffer O_O
if ( file_len >= sizeof( charText ) - 1 ) {
Com_Printf( S_COLOR_RED "Model Data File %s too long... WAY too long\n", fileName );
UI_Logger( LL_ERROR, "Model Data File %s too long... WAY too long\n", fileName );
UI_LogFuncEnd();
return qfalse;
}
@ -1369,13 +1369,13 @@ qboolean UI_ParseModelDataFile( playerInfo_t *pi, const char *charName,
//from the looks of this, I think we have to do this after
//every parse call. O_O
if ( !token[0] ) {
Com_Printf( S_COLOR_RED "No data found in model data buffer!\n");
UI_Logger( LL_ERROR, "No data found in model data buffer!\n");
UI_LogFuncEnd();
return qfalse;
}
if ( Q_stricmp(token, "{" ) ) {
Com_Printf(S_COLOR_RED "Missing { in %s\n", fileName);
UI_Logger( LL_ERROR, "Missing { in %s\n", fileName);
UI_LogFuncEnd();
return qfalse;
}
@ -1401,7 +1401,7 @@ qboolean UI_ParseModelDataFile( playerInfo_t *pi, const char *charName,
//no valid anim file found. Don't give up hope though.
//We have a backup resort at the end if need be. :)
if ( ( didAnims = UI_ParseAnimationFile( token, pi->animations ) ) == qfalse ) {
Com_Printf( S_COLOR_RED "WARNING: Was unable to load file %s.\n", token );
UI_Logger( LL_WARN, "Was unable to load file %s.\n", token );
}
continue;
}
@ -1430,7 +1430,7 @@ qboolean UI_ParseModelDataFile( playerInfo_t *pi, const char *charName,
pi->legsModel = trap_R_RegisterModel( token );
if (!pi->legsModel) {
Com_Printf( S_COLOR_RED "ERROR: Unable to load legs model: %s\n", token);
UI_Logger( LL_ERROR, "Unable to load legs model: %s\n", token);
UI_LogFuncEnd();
return qfalse;
}
@ -1450,10 +1450,10 @@ qboolean UI_ParseModelDataFile( playerInfo_t *pi, const char *charName,
continue;
}
pi->torsoModel = trap_R_RegisterModel( token );
//Com_Printf("Torsomodel passed as %s, %i\n", token, (int32_t)ci->torsoModel);
//UI_Logger( LL_DEBUG, "Torsomodel passed as %s, %i\n", token, (int32_t)ci->torsoModel);
if (!pi->torsoModel) {
Com_Printf( S_COLOR_RED "ERROR: Unable to load torso model: %s\n", token);
UI_Logger( LL_ERROR, "Unable to load torso model: %s\n", token);
UI_LogFuncEnd();
return qfalse;
}
@ -1470,7 +1470,7 @@ qboolean UI_ParseModelDataFile( playerInfo_t *pi, const char *charName,
pi->headModel = trap_R_RegisterModel( token );
if (!pi->headModel) {
Com_Printf( S_COLOR_RED "ERROR: Unable to load head model: %s\n", token);
UI_Logger( LL_ERROR, "Unable to load head model: %s\n", token);
UI_LogFuncEnd();
return qfalse;
}
@ -1510,7 +1510,7 @@ qboolean UI_ParseModelDataFile( playerInfo_t *pi, const char *charName,
pi->boltonTags[i].tagModel = trap_R_RegisterModel( token );
if (!pi->boltonTags[i].tagModel) {
Com_Printf( S_COLOR_RED "WARNING: Unable to load bolton model: %s\n", token);
UI_Logger( LL_WARN, "Unable to load bolton model: %s\n", token);
}
i++;
@ -1521,7 +1521,7 @@ qboolean UI_ParseModelDataFile( playerInfo_t *pi, const char *charName,
}
}
//Com_Printf("Index: %i, Name: %s, Handle: %i\n", ci->boltonTags[ci->numBoltOns].modelBase, ci->boltonTags[ci->numBoltOns].tagName, ci->boltonTags[ci->numBoltOns].tagModel );
//UI_Logger( LL_DEBUG, "Index: %i, Name: %s, Handle: %i\n", ci->boltonTags[ci->numBoltOns].modelBase, ci->boltonTags[ci->numBoltOns].tagName, ci->boltonTags[ci->numBoltOns].tagModel );
token = COM_Parse( &textPtr );
if ( !token[0] ) {
break;
@ -1548,7 +1548,7 @@ qboolean UI_ParseModelDataFile( playerInfo_t *pi, const char *charName,
if ( !UI_ParseSkinSetDataFile( pi, token, charName, skinName ) )
{
Com_Printf( S_COLOR_RED "WARNING: Could not load data from specified skin set in char: %s. Attempting to load default.\n", charName );
UI_Logger( LL_WARN, "Could not load data from specified skin set in char: %s. Attempting to load default.\n", charName );
}
else
{
@ -1563,19 +1563,19 @@ qboolean UI_ParseModelDataFile( playerInfo_t *pi, const char *charName,
{
if ( !UI_ParseSkinSetDataFile( pi, va("%s_*", modelName ), charName, skinName ) )
{
Com_Printf( S_COLOR_RED "ERROR: Tried loading default skin set, however it failed.\n");
UI_Logger( LL_ERROR, "Tried loading default skin set, however it failed.\n");
}
}
//if any of the models or skins were left blank, then output false. Coz we need them. :P
if (!pi->headModel || !pi->torsoModel || !pi->legsModel ) {
Com_Printf( S_COLOR_RED "One or more necessary model files weren't loaded from %s\n", fileName );
UI_Logger( LL_ERROR, "One or more necessary model files weren't loaded from %s\n", fileName );
UI_LogFuncEnd();
return qfalse;
}
if (!pi->headSkin || !pi->torsoSkin || !pi->legsSkin ) {
Com_Printf( S_COLOR_RED "One or more necessary skin files weren't loaded from %s\n", fileName );
UI_Logger( LL_ERROR, "One or more necessary skin files weren't loaded from %s\n", fileName );
UI_LogFuncEnd();
return qfalse;
}
@ -1596,7 +1596,7 @@ qboolean UI_ParseModelDataFile( playerInfo_t *pi, const char *charName,
//if we looped all the way to the end.... ie BAD
if (i <= 0) {
//we obviously have no animation directory :(
Com_Printf(S_COLOR_RED "ERROR: Was unable to calculate location of animation.cfg for %s\n", fileName);
UI_Logger( LL_ERROR, "Was unable to calculate location of animation.cfg for %s\n", fileName);
UI_LogFuncEnd();
return qfalse;
}
@ -1613,18 +1613,18 @@ qboolean UI_ParseModelDataFile( playerInfo_t *pi, const char *charName,
//add animation.cfg to the end of the string
Q_strcat(legsFileRoute, sizeof(legsFileRoute), "animation.cfg");
//Com_Printf( S_COLOR_RED "WARNING: Failed to load animation file specified in model config, attempting to load %s\n", legsFileRoute );
//UI_Logger( LL_WARN, "Failed to load animation file specified in model config, attempting to load %s\n", legsFileRoute );
//Parse it
if ( !UI_ParseAnimationFile( legsFileRoute, pi->animations) ) {
Com_Printf( "Tried loading anim data from location %s, however nothing was valid.\n", legsFileRoute );
UI_Logger( LL_ERROR, "Tried loading anim data from location %s, however nothing was valid.\n", legsFileRoute );
UI_LogFuncEnd();
return qfalse;
}
}
else {
if ( !legsFileRoute[0] ) {
Com_Printf( S_COLOR_RED "Couldn't load/locate any player animation data for player: %s.\n", charName );
UI_Logger( LL_ERROR, "Couldn't load/locate any player animation data for player: %s.\n", charName );
UI_LogFuncEnd();
return qfalse;
}
@ -1669,7 +1669,7 @@ qboolean UI_RegisterClientModelname( playerInfo_t *pi, const char *modelSkinName
len = strlen( modelSkinName );
Q_strncpyz( charName, modelSkinName, ((int32_t)len - (int32_t)strlen(model)) + 1 );
}
//Com_Printf("%s\n", newInfo.charName);
//UI_Logger( LL_DEBUG, "%s\n", newInfo.charName);
//slash = strchr( newInfo.modelName, '/' );
if ( !model || !model[1] ) {
@ -1721,7 +1721,7 @@ qboolean UI_RegisterClientModelname( playerInfo_t *pi, const char *modelSkinName
//try loading the main model
if ( !UI_ParseModelDataFile( pi, charName, modelName, skinName ) )
{
Com_Printf( S_COLOR_RED "Was unable to parse model file for character: %s/%s/%s\n", charName, modelName, skinName );
UI_Logger( LL_WARN, "Was unable to parse model file for character: %s/%s/%s\n", charName, modelName, skinName );
//if that fails, try and load the model's default data at least
if ( !UI_ParseModelDataFile( pi, charName, DEFAULT_MODEL, DEFAULT_SKIN ) )
{

View file

@ -144,55 +144,55 @@ static qboolean PlayerSettings_SettingsAreDifferent ( void ) {
//Name
if ( Q_stricmp( s_playersettings.name.field.buffer, UI_Cvar_VariableString( "name" ) ) ) {
//Com_Printf( S_COLOR_RED "Name changed!\n");
//UI_Logger( LL_DEBUG, "Name changed!\n");
endResult = qtrue;
}
//Age
if ( Q_stricmp( s_playersettings.age.field.buffer, UI_Cvar_VariableString( "age" ) ) ) {
//Com_Printf( S_COLOR_RED "Age changed!\n");
//UI_Logger( LL_DEBUG, "Age changed!\n");
endResult = qtrue;
}
//Race
if ( Q_stricmp( s_playersettings.race.field.buffer, UI_Cvar_VariableString( "race" ) ) ) {
//Com_Printf( S_COLOR_RED "Race changed!\n");
//UI_Logger( LL_DEBUG, "Race changed!\n");
endResult = qtrue;
}
//playerClass field
if ( s_playersettings.pClass.curvalue != s_playersettings.initData.classIndex ) {
//Com_Printf( S_COLOR_RED "Class changed!\n");
//UI_Logger( LL_DEBUG, "Class changed!\n");
endResult = qtrue;
}
//playerRank field
if ( s_playersettings.pRank.curvalue != s_playersettings.initData.rankIndex ) {
//Com_Printf( S_COLOR_RED "Rank changed!\n");
//UI_Logger( LL_DEBUG, "Rank changed!\n");
endResult = qtrue;
}
//height... hackily normalized lol
if ( Q_stricmp( va( "%2.5f",s_playersettings.height.curvalue), va( "%2.5f", atof( UI_Cvar_VariableString( "height" ) ) ) ) ) {
//Com_Printf( S_COLOR_RED "Height changed!\n");
//UI_Logger( LL_DEBUG, "Height changed!\n");
endResult = qtrue;
}
//weight... see above rofl
if ( Q_stricmp( va( "%2.5f",s_playersettings.weight.curvalue), va( "%2.5f", atof( UI_Cvar_VariableString( "weight" ) ) ) ) ) {
//Com_Printf( S_COLOR_RED "Weight changed!\n");
//UI_Logger( LL_DEBUG, "Weight changed!\n");
endResult = qtrue;
}
//Class Text field
if ( s_playersettings.pClass.curvalue == s_playersettings.numClasses && Q_stricmp( s_playersettings.classTxt.field.buffer, UI_Cvar_VariableString( "ui_playerClass" ) ) ) {
//Com_Printf( S_COLOR_RED "Class text changed!\n");
//UI_Logger( LL_DEBUG, "Class text changed!\n");
endResult = qtrue;
}
//Rank Text field
if ( s_playersettings.pRank.curvalue == s_playersettings.numRanks && Q_stricmp( s_playersettings.rankTxt.field.buffer, UI_Cvar_VariableString( "ui_playerRank" ) ) ) {
//Com_Printf( S_COLOR_RED "Rank text changed!\n");
//UI_Logger( LL_DEBUG, "Rank text changed!\n");
endResult = qtrue;
}
UI_LogFuncEnd();

View file

@ -2126,7 +2126,7 @@ void Menu_AddItem( menuframework_s *menu, void *item )
break;
default:
//Com_Printf( S_COLOR_RED "Menu_Init: unknown type %d, ID was %i\n", itemptr->type, itemptr->id );
//UI_Logger( LL_ERROR, "Menu_Init: unknown type %d, ID was %i\n", itemptr->type, itemptr->id );
trap_Error( va("Menu_Init: unknown type %d, ID was %i", itemptr->type, itemptr->id) );
}
}

View file

@ -966,7 +966,7 @@ static void ArenaServers_DoRefresh( void )
//TiM - testing the data output from this baby
//if ( !Q_stricmp( Info_ValueForKey( info, "game" ), "rpg-x" ) )
//Com_Printf( "%s", info );
//UI_Logger( LL_DEBUG, "%s", info );
}
// insert ping results

View file

@ -236,7 +236,7 @@ static void UI_ManageWeaponLoading( void )
if ( file_len <= 1 )
{
//Com_Printf( S_COLOR_YELLOW "WARNING: Attempted to load %s, but wasn't found.\n", fileRoute );
//UI_Logger( LL_WARN, "Attempted to load %s, but wasn't found.\n", fileRoute );
UI_TacticalMenu_LoadWeapons();
UI_LogFuncEnd();
return;
@ -247,7 +247,7 @@ static void UI_ManageWeaponLoading( void )
if ( !buffer[0] )
{
Com_Printf( S_COLOR_RED "ERROR: Attempted to load %s, but no data was read.\n", fileRoute );
UI_Logger( LL_ERROR, "Attempted to load %s, but no data was read.\n", fileRoute );
UI_TacticalMenu_LoadWeapons();
UI_LogFuncEnd();
return;
@ -260,7 +260,7 @@ static void UI_ManageWeaponLoading( void )
COM_BeginParseSession();
textPtr = buffer;
//Com_Printf( S_COLOR_RED "Beginning Parse\n" );
//UI_Logger( LL_DEBUG, "Beginning Parse\n" );
//expected format is 'weapon num' <space> 'weapon desc' <space> 'weapon target'
while( 1 )
@ -269,7 +269,7 @@ static void UI_ManageWeaponLoading( void )
if ( !token[0] )
break;
//Com_Printf( S_COLOR_RED "First Token: %s\n", token );
//UI_Logger( LL_DEBUG, "First Token: %s\n", token );
//grab the weapon number
s_tactical.weaponData[s_tactical.numWeapons].weaponNum = atoi( token );
@ -278,7 +278,7 @@ static void UI_ManageWeaponLoading( void )
if (!token[0])
continue;
//Com_Printf( S_COLOR_RED "Second Token: %s\n", token );
//UI_Logger( LL_DEBUG, "Second Token: %s\n", token );
Q_strncpyz( s_tactical.weaponData[s_tactical.numWeapons].weaponName,
token,

View file

@ -431,7 +431,7 @@ static void UI_ManageDeckLoading( void )
if ( file_len <= 1 )
{
//Com_Printf( S_COLOR_YELLOW "WARNING: Attempted to load %s, but wasn't found.\n", fileRoute );
//UI_Logger( LL_WARN, "Attempted to load %s, but wasn't found.\n", fileRoute );
UI_TurboliftMenu_LoadDecks();
UI_LogFuncEnd();
return;
@ -442,7 +442,7 @@ static void UI_ManageDeckLoading( void )
if ( !buffer[0] )
{
Com_Printf( S_COLOR_RED "ERROR: Attempted to load %s, but no data was read.\n", fileRoute );
UI_Logger( LL_ERROR, "Attempted to load %s, but no data was read.\n", fileRoute );
UI_TurboliftMenu_LoadDecks();
UI_LogFuncEnd();
return;
@ -455,7 +455,7 @@ static void UI_ManageDeckLoading( void )
COM_BeginParseSession();
textPtr = buffer;
//Com_Printf( S_COLOR_RED "Beginning Parse\n" );
//UI_Logger( LL_DEBUG, "Beginning Parse\n" );
//expected format is 'decknum' <space> 'deck Desc'
while( 1 )
@ -464,7 +464,7 @@ static void UI_ManageDeckLoading( void )
if ( !token[0] )
break;
//Com_Printf( S_COLOR_RED "First Token: %s\n", token );
//UI_Logger( LL_DEBUG, "First Token: %s\n", token );
//in case of Scooter's EF SP style DAT files, which require 'DECK' in front of the number
if ( !Q_strncmp( token, "DECK", 4 ) )
@ -477,7 +477,7 @@ static void UI_ManageDeckLoading( void )
if (!token[0])
continue;
//Com_Printf( S_COLOR_RED "Second Token: %s\n", token );
//UI_Logger( LL_DEBUG, "Second Token: %s\n", token );
Q_strncpyz( s_turbolift.deckData[s_turbolift.numDecks].deckDesc,
token,