00001 /* This is just cached song data. Not all of it may actually be displayed 00002 * in the radar. */ 00003 00004 #ifndef RARAR_VALUES_H 00005 #define RARAR_VALUES_H 00006 00007 #include "GameConstantsAndTypes.h" 00008 00009 #define RADAR_VAL_UNKNOWN -1 00010 00011 struct XNode; 00012 00013 struct RadarValues 00014 { 00015 float m_fValues[NUM_RADAR_CATEGORIES]; 00016 00017 operator const float* () const { return m_fValues; }; 00018 operator float* () { return m_fValues; }; 00019 00020 RadarValues(); 00021 void MakeUnknown(); 00022 void Zero(); 00023 00024 00025 RadarValues& operator+=( const RadarValues& other ) 00026 { 00027 FOREACH_RadarCategory( rc ) 00028 m_fValues[rc] += other.m_fValues[rc]; 00029 return *this; 00030 } 00031 bool operator==( const RadarValues& other ) const 00032 { 00033 FOREACH_RadarCategory( rc ) 00034 { 00035 if( m_fValues[rc] != other.m_fValues[rc] ) 00036 return false; 00037 } 00038 return true; 00039 } 00040 bool operator!=( const RadarValues& other ) const 00041 { 00042 return !operator==( other ); 00043 } 00044 00045 XNode* CreateNode() const; 00046 void LoadFromNode( const XNode* pNode ); 00047 }; 00048 00049 00050 #endif 00051 00052 /* 00053 * (c) 2001-2004 Chris Danford 00054 * All rights reserved. 00055 * 00056 * Permission is hereby granted, free of charge, to any person obtaining a 00057 * copy of this software and associated documentation files (the 00058 * "Software"), to deal in the Software without restriction, including 00059 * without limitation the rights to use, copy, modify, merge, publish, 00060 * distribute, and/or sell copies of the Software, and to permit persons to 00061 * whom the Software is furnished to do so, provided that the above 00062 * copyright notice(s) and this permission notice appear in all copies of 00063 * the Software and that both the above copyright notice(s) and this 00064 * permission notice appear in supporting documentation. 00065 * 00066 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 00067 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 00068 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF 00069 * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS 00070 * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT 00071 * OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS 00072 * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 00073 * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 00074 * PERFORMANCE OF THIS SOFTWARE. 00075 */