I've introduced my idea to extend the FS2 engine with the capatibility of seamless planetary flights and solar-system travelling in
http://www.hard-light.net/forums/index.php/topic,49754.0.htmlAs I said I'm going to implement the following stuff:
The thing is that every object in FS2 is instanced with the structure called "object" (in object.h). The problem is now that their coordinates are lying in the global coordinate system. What we need is to place every object into the local coordinate system of a parental segment later.
Currently, FS2 performs calculations with the object's coordinates by accessing position variables directly.
So the next step would be to forbid any direct access to these variables and use an interface instead.
The interface could contain functions like these:
- Delta vector between object1 and object2
- Distance between object1 and object2
- get local position
- set local position
aso.
After that a back-end can be implemented behind this interface in different manner. And it allows us to switch between the current FS2 engine and the extension.
I would like to get some programming help because there are over 2000 accesses all over the source. If we get it working then we have done near the half way to the finish. Any help would be really welcome.
By the way, I renamed the structures "object" to "object_t" today because it's a problem to distinguish between the datatype and the word "object" in the code. (You can get my updates from:
www.razorjack.de/code.zip)