moved PlayerNumber into a separate header to reduce dependences on GameConstantsAndTypes.h

default mappings for menu buttons
items in battle now have a duration
fix VC6 compile errors
This commit is contained in:
Chris Danford
2003-02-26 00:20:00 +00:00
parent ad40c01161
commit 22ef6c358b
46 changed files with 417 additions and 132 deletions
+35
View File
@@ -0,0 +1,35 @@
#include "global.h"
/*
-----------------------------------------------------------------------------
File: PlayerNumber.cpp
Desc: See header.
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
Chris Danford
-----------------------------------------------------------------------------
*/
#include "PlayerNumber.h"
#include "ThemeManager.h"
#define COLOR_P1 THEME->GetMetricC("Common","ColorP1")
#define COLOR_P2 THEME->GetMetricC("Common","ColorP2")
RageColor PlayerToColor( PlayerNumber pn )
{
switch( pn )
{
case PLAYER_1: return COLOR_P1;
case PLAYER_2: return COLOR_P2;
default: ASSERT(0); return RageColor(0.5f,0.5f,0.5f,1);
}
};
RageColor PlayerToColor( int p )
{
return PlayerToColor( (PlayerNumber)p );
}