I know being superstitious isnt what a programmer should be, but im a little that way when it comes to really strange bugs.
At the moment, my application suddenly stopped cycling quickly and started going with a really poor framerate… All I do is uncomment
this for loop and then all of sudden it starts going really slow.
all tiles have 0 astones so it shouldnt even be accessing the loops even though it somehow is, and the simple commented out for loop iterating
the v variable is enough to make it go slow for no reason.
I thought maybe it was because I had too much stuff in a single file, so I broke the program up to another file but it didnt make a difference, for
some reason its going slow and I have NO IDEA WHY.
As soon as I comment out the for loop it decides to go quick, and note ITS NOT RENDERING ANYTHING.
for(i=0;i<btile[edit_tile].astones;i++)
{
if(btile[edit_tile].astone[i].enabled)
{
if(btile[edit_tile].astone[i].selected && fading_trim==false && fading_trim_depth==false && fading_depth==false)
{
// eng.render(btile[edit_tile].astone[i].vs,btile[edit_tile].astone[i].v,btile[edit_tile].astone[i].ts,btile[edit_tile].astone[i].t,id,false, btile[edit_tile].astone[i].blight);
}
else
{
// eng.render(btile[edit_tile].astone[i].vs,btile[edit_tile].astone[i].v,btile[edit_tile].astone[i].ts,btile[edit_tile].astone[i].t,id,true, btile[edit_tile].astone[i].blight);
}
}
}
int v;
for(v=0;v<8;v++)
{
/*
switch(v)
{
case 0:trans.set_trans(-2, 0, 2);break;
case 1:trans.set_trans(0, 0, 2);break;
case 2:trans.set_trans(2, 0, 2);break;
case 3:trans.set_trans(-2, 0, 0);break;
case 4:trans.set_trans(2, 0, 0);break;
case 5:trans.set_trans(-2, 0, -2);break;
case 6:trans.set_trans(0, 0, -2);break;
case 7:trans.set_trans(2, 0, -2);break;
}
for(i=0;i<btile[view_tile[v]].astones;i++)
{
if(btile[view_tile[v]].astone[i].enabled)
{
// eng.render(btile[view_tile[v]].astone[i].vs,btile[view_tile[v]].astone[i].v,btile[view_tile[v]].astone[i].ts,btile[view_tile[v]].astone[i].t,trans,true, btile[view_tile[v]].astone[i].blight);
}
}
*/
}