G
Guest
Guest
Archived from groups: comp.sys.ibm.pc.games.flight-sim (More info?)
Hello, my goal is to drive microsoft flight sim using an external data
source. I read the netpipes SDK and am in the process of creating the
binary conversion program from my data source to the "flight video"
..fsr format. I have questions about the section regarding the
"ObjectID" field in the "OBID" data section. According to the SDK:
"The object ID is an ID for a class of objects. Specific instances of
the object will be given a compound ID created from two keys. The
object ID will be in the upper 4 bits of the word, and the lower 12
bits will be the instance ID. Because of this arrangement, the object
ID in the Object Definition must be provided under the mask 0xf000. The
lower 12 bits of this field MUST be 0 in this record."
3 questions arise from this. First, it's my assumption that this
objectID has a direct relationship to a single plane i.e. the one
you're flying. Am I correct?
Second, if my first assumption is true then that means that there are
only 4 bits or 16 unique IDs available. Meaning that there can only be
16 planes (15 surrounding + the one you're flying) that can be
recorded/played back in the flight video. This seems small but then
again, 16 planes in your field of view is a lot I guess. Again, is
this a correct assumption?
Third, I haven't worked with bitwise operations in a while. How do I
get my identifying bits to the left-most 4 bit positions? i.e. WORD
objectID = 12; would have the following bit positions:
0000000000001100
Since I need to use only the left-most 4 bit positions for my objectID,
then I need to somehow move the rightmost 4 bits to the opposite side.
How do I do this in c++?
Thanks for any help/pointers anyone can provide. If I'm in the wrong
group for this, please _kindly_ point me to the correct group.
Hello, my goal is to drive microsoft flight sim using an external data
source. I read the netpipes SDK and am in the process of creating the
binary conversion program from my data source to the "flight video"
..fsr format. I have questions about the section regarding the
"ObjectID" field in the "OBID" data section. According to the SDK:
"The object ID is an ID for a class of objects. Specific instances of
the object will be given a compound ID created from two keys. The
object ID will be in the upper 4 bits of the word, and the lower 12
bits will be the instance ID. Because of this arrangement, the object
ID in the Object Definition must be provided under the mask 0xf000. The
lower 12 bits of this field MUST be 0 in this record."
3 questions arise from this. First, it's my assumption that this
objectID has a direct relationship to a single plane i.e. the one
you're flying. Am I correct?
Second, if my first assumption is true then that means that there are
only 4 bits or 16 unique IDs available. Meaning that there can only be
16 planes (15 surrounding + the one you're flying) that can be
recorded/played back in the flight video. This seems small but then
again, 16 planes in your field of view is a lot I guess. Again, is
this a correct assumption?
Third, I haven't worked with bitwise operations in a while. How do I
get my identifying bits to the left-most 4 bit positions? i.e. WORD
objectID = 12; would have the following bit positions:
0000000000001100
Since I need to use only the left-most 4 bit positions for my objectID,
then I need to somehow move the rightmost 4 bits to the opposite side.
How do I do this in c++?
Thanks for any help/pointers anyone can provide. If I'm in the wrong
group for this, please _kindly_ point me to the correct group.