I was actually thinking about this in the shower.... and although Bob's already working on it, I decided I might as well get some opinions on my thinking 'ere. I know sod all of the FS2 code, and less of C++ so correct me please
Ok, assumptions;
1/ FS2 uses some sort of animation 'trigger' when starting the mission to start rotations. Hoepfully, this can also be halted. Also, this function (hopefully, again) is setup to use a 360 rotation - which can hoepfully be altered whent eh function is adapted. Also, that the rotations in an FS2 model can be reversed in-mission.
My 'idea' (probably not original)
Firstly, rotations are specified by a 3rd value in the tbl for the physcial subsystem entry, defining a clockwise roatation in degrees (can be negative). If this entry is present and correct (< +360 || >-360 degrees), the ship is 'flagged' as using special rotation when it is loaded into a mission.
The actual rotations are defined by a new funciton, which effectively rotaets the object for xx degrees (as defined in the tbl entry). A single bit / value integer is used as a 'flag', to indicate the current status of the rotation. I.e. it's set to 0 when the object is at the start, and 1 when it is at the end of the rotation path. this is used to define the 'next' rotation (so objects can go 'back' into position). This is so the system can't be broken by using seperate methods to rotate forward and back.
The standard properties for rot time, etc, defined in the pof are used for the speed of this movement.
(
It could be that FOV could be used instead of the previously mentioned tbl entry for the rotation params..depends on relative parsing speed, i guess).
An SEXP is 'hooked' onto the new function, to call rotations (using ship name and subsys name, and only when the subobject is not destroyed). I'm not sure on the logistics of stopping a rotation and reversing it before it 'finishes' - some protection may be needed here.
Still obviosuly thinking of technical details, though.... not looked at the actual rotation code in FS2 yet, so I'm just throwing out ideas.
I should say, I'm just wanting opinions on my thinking here.... I'm not looking to step on anyones toes.