Advertisement

Lesson 33 again!

Started by September 23, 2001 12:38 PM
1 comment, last by _Titan_ 23 years, 5 months ago
In Lesson 33, the update function will call this line of code roll-=milliseconds*0.00005f; // Roll The Clouds now, i have the same code in my mina_loop function, which basically is th eupdate function, but with different code. I have texRoll-=milliseconds*0.00005f; in lesson 33, the roll var will update everytime but in mine it will update a few times then quit, then maybe once or twice if i move my mouse and get a tool tip. Any reason why? I have a feeling it could be my winmain function, its not the same as in lesson 33. Let me know if it is o not or just smack me for not seeing a typo again lol!
I''m not sure what you mean, but I will mention that NeHe has a really annoying habit of overusing global variables. You may have forgotten to change something somewhere from NeHe''s "roll" to your "texRoll." Try just putting "#define roll texRoll" at the beginning of your code. It''s a very messy solution, but, if it works, then at least you''ll know what your problem is: You need to seek and destroy all references to "roll" by replacing them with "texRoll."
Advertisement
I dont have that many calls to it, just one in the main loop and then in my draw code for the texture coordinates. So i know its not that. Its just that the value of his variable is always like this:

-0.647584

and mine comes out like this:

-1756.298237

WTF? Its all messed up, i tried initializing it equaling to 1.0f 0.0f and alot of other values but no luck. I know he doesnt set his variable to anything before using it i looked all over his code. So why do i get such different numbers?

This topic is closed to new replies.

Advertisement