View Single Post
Old 09-23-2012   #99
Shadow Hog
Developer
 
Shadow Hog's Avatar
Default

Quote:
Originally Posted by AlamGBC View Post
wow, GCC really inline alot of code:

skyscale = FixedDiv(FRACUNIT/2, (((vid.height*viewwidth)/vid.width)<<FRACBITS)/BASEVIDHEIGHT)<<1; src/r_sky.c:89

Code:
skyscale = FixedDiv(FRACUNIT/2, (((vid.height*viewwidth)/vid.width)<<FRACBITS)/BASEVIDHEIGHT)<<1;
what we have is it divide by 0 or a large number
aka, x/0 or x/inf
It looks like that code's already changed in 2.1:

Code:
fixed_t difference = vid.fdupx-(vid.dupx<<FRACBITS);
skyscale = FixedDiv(FRACUNIT, vid.fdupx+difference);
src/r_sky.c:89 here, as well.
Shadow Hog is offline