include/GizegoEngine.h
//DO NOT USE. This is integrated in the terrain class.
DO NOT USE. This is integrated in the terrain class.
DO NOT USE . This is integrated in the terrain class .
inline void SetTileColor(Color c, int x, int y, unsigned int id, bool avg)
		{
			if (x < m_width && y < m_height)
			{
				if (avg)
				{ 
					if (m_data[x][y].id != id)
					{ 
					unsigned int r = m_data[x][y].c.R * m_data[x][y].averages + c.R, g = m_data[x][y].c.G * m_data[x][y].averages + c.G,
						b = m_data[x][y].c.B * m_data[x][y].averages + c.B, a = m_data[x][y].c.A * m_data[x][y].averages + c.A;
					m_data[x][y].averages++;
					m_data[x][y].c = Color(r / m_data[x][y].averages, g / m_data[x][y].averages, b / m_data[x][y].averages, a / m_data[x][y].averages);					
					m_data[x][y].id = id;
					}
				}
				else
				{ 
					m_data[x][y].c = c;
					m_data[x][y].id = id;
				}
			}
		}
inline void SetTileColor ( Color c , int x , int y , unsigned int id , bool avg ) { if ( x < m_width && y < m_height ) { if ( avg ) { if ( m_data [ x ] [ y ] . id != id ) { unsigned int r = m_data [ x ] [ y ] . c . R * m_data [ x ] [ y ] . averages + c . R , g = m_data [ x ] [ y ] . c . G * m_data [ x ] [ y ] . averages + c . G , b = m_data [ x ] [ y ] . c . B * m_data [ x ] [ y ] . averages + c . B , a = m_data [ x ] [ y ] . c . A * m_data [ x ] [ y ] . averages + c . A ; m_data [ x ] [ y ] . averages ++ ; m_data [ x ] [ y ] . c = Color ( r / m_data [ x ] [ y ] . averages , g / m_data [ x ] [ y ] . averages , b / m_data [ x ] [ y ] . averages , a / m_data [ x ] [ y ] . averages ) ; m_data [ x ] [ y ] . id = id ; } } else { m_data [ x ] [ y ] . c = c ; m_data [ x ] [ y ] . id = id ; } } }
DO NOT USE.
DO NOT USE .