#include "stdafx.h" /* ----------------------------------------------------------------------------- File: GameConstantsAndTypes.cpp Desc: See header. Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved. Chris Danford ----------------------------------------------------------------------------- */ #include "GameConstantsAndTypes.h" D3DXCOLOR DifficultyClassToColor( DifficultyClass dc ) { switch( dc ) { case CLASS_EASY: return D3DXCOLOR(1,1,0,1); // yellow case CLASS_MEDIUM: return D3DXCOLOR(1,0,0,1); // red case CLASS_HARD: return D3DXCOLOR(0,1,0,1); // green default: ASSERT(0); return D3DXCOLOR(); // invalid DifficultyClass } } CString DifficultyClassToString( DifficultyClass dc ) { switch( dc ) { case CLASS_EASY: return "easy"; case CLASS_MEDIUM: return "medium"; case CLASS_HARD: return "hard"; default: ASSERT(0); return ""; // invalid DifficultyClass } } DifficultyClass StringToDifficultyClass( CString sDC ) { for( int i=0; i