Guest Posted June 9, 2003 Report Posted June 9, 2003 I need a function that I can specify and that will be called by FS every frame. Does anyone know how to do this? I think Pete doesn't know. But maybe someone else knows. If I have this function, I can get rid of 1 extra thread in my program.
Pete Dowson Posted June 9, 2003 Report Posted June 9, 2003 I need a function that I can specify and that will be called by FS every frame. Does anyone know how to do this? I think Pete doesn't know. . It isn't that I don't know. It is just that it is relatively complicated and it is changing. You need to set a callback via routines currently (FS2002) in CHAIN.DLL. If you analyse any of the regular FS modules (try a relatively small one if I were you) you will find places where it installs callbacks by invoking procedures in CHAIN.DLL, and, likewise, other places where these are uninstalled, before exit. Start with the Module_Init and Module_Deinit procedures they all have. If those calls aren't in those they'll be someplace close. The next problem is that there are seemingly hundreds of different chains, all running either at different regular rates (eg Time Tick, multiples of timer ticks, frames, n Frames, n times per frame, or just on special events, like weather changes). To work out which does what needs a module to link into them ALL and log them, the accurate time, and their parameters. That's what I did years ago. I've not got it now. But I think chain 19 is mostly once per framein FS2002 in any case. But things change and it's different in FS2004. Once you start venturing down this path you'll find you've got more work cut and and it is never ending. I'm not going to do it all for you. Sorry. Good luck, Pete
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now