#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" #include "ThemeManager.h" #define COLOR_P1 THEME->GetMetricC("Common","ColorP1") #define COLOR_P2 THEME->GetMetricC("Common","ColorP2") #define COLOR_EASY THEME->GetMetricC("Common","ColorEasy") #define COLOR_MEDIUM THEME->GetMetricC("Common","ColorMedium") #define COLOR_HARD THEME->GetMetricC("Common","ColorHard") D3DXCOLOR DifficultyClassToColor( DifficultyClass dc ) { switch( dc ) { case CLASS_EASY: return COLOR_EASY; case CLASS_MEDIUM: return COLOR_MEDIUM; case CLASS_HARD: return COLOR_HARD; 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