Hi,
Today, while improving GCC warnings for the engine, I've found several small bugs here and there. All were almost harmless and are now fixed.
All, except one
I don't know whats the current state of "matrix4x4" code in math module, but I think there's a serious trouble in raydium_matrix_internal_adjoint() (math.c, line 226 of current rev [870])
Here's what I read, basically, despite the broken indent
:
Code:
for(row = 0; row < dimension; row++)
{
for(col = 0; col < dimension; col++)
{
...
...
...
for(row = 0; row < dimension; row++)
{
for(col = 0; col < dimension; col++)
{
...
}
}
}
}
The trouble here is the usage of
row and
col vars
inside the previous for loops that already use these vars.
It shows that:
- This code does not work, and probably never worked.
- Broken indentation is evil. It took me ages to understand that the second pair of
for loops were inside the first one.
I see two options here, then:
- We fix that function, and makes sure all that matrix4x4 things
really works (used in the engine or in a demo, for instance)
- We remove all these stuffs until we need it.
Anyone ?