Try this:
Code:
void make_identity_matrix(var *mat)
{
   int i,j; 
   for( i= 0 ; i< 4 ; i++ )
	for( j= 0 ; j< 4 ; j++ )
	{
		if(i==j)
		{
			mat[i * 4 + j]=1;
		}
		else
		{
			mat[i * 4 + j]=0;
		}
	}
}


It seems Lite-C doesn't support passing multi-dimensional arrays at all (my line before wouldn't have worked whether it was Lite-C or ANSI C, but Sepiantum's should've). Here we treat the array as a 1-dimensional array.

Jibb


Formerly known as JulzMighty.
I made KarBOOM!