#include "stdafx.h" /* ----------------------------------------------------------------------------- Class: AnnouncerManager Desc: See header. Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved. Chris Danford ----------------------------------------------------------------------------- */ #include "AnnouncerManager.h" #include "PrefsManager.h" #include "RageLog.h" AnnouncerManager* ANNOUNCER = NULL; // global object accessable from anywhere in the program const CString EZ2_ANNOUNCER_NAME = "ez2"; const CString ANNOUNER_BASE_DIR = "Announcers\\"; AnnouncerManager::AnnouncerManager() { CStringArray arrayAnnouncerNames; GetAnnouncerNames( arrayAnnouncerNames ); // for( int i=0; im_sAnnouncer ); } void AnnouncerManager::GetAnnouncerNames( CStringArray& AddTo ) { GetDirListing( ANNOUNER_BASE_DIR+"*", AddTo, true ); // strip out the folder called "CVS" for( int i=AddTo.GetSize()-1; i>=0; i-- ) { if( 0 == stricmp( AddTo[i], "cvs" ) ) AddTo.RemoveAt(i); } } void AnnouncerManager::SwitchAnnouncer( CString sAnnouncerName ) { if( sAnnouncerName == "" ) { m_sCurAnnouncerName = ""; return; } CStringArray asAnnouncerNames; GetAnnouncerNames( asAnnouncerNames ); for( int i=0; i