SDK Question Dragonfly Sample

huddi

New member
Joined
Apr 20, 2009
Messages
38
Reaction score
0
Points
0
Hi,

I've got some questions about the Dragonfly sample.

1. This Vessel is not Vessel2 derived. Is there an easy way to change
it to vessel2?

2. I can't find any function for the HUD. Just creating the Function clbkDrawHUD compiles fine, but has no result.

3. is there a reason for the outputpath "H:\Orbiter stuff\OrbiterRel\Modules\Dragonfly.dll"
(in opposition to the usual .\..\..\..\Modules/(vesselname).dll

thanks,
Huddi
 
1. This Vessel is not Vessel2 derived. Is there an easy way to change
it to vessel2?
Change "class Dragonfly: public VESSEL" to "class Dragonfly: public VESSEL2".

Optional, but a good idea, is to replace the ovcXXX functions with their VESSEL2::clbkXXX equivalents.

2. I can't find any function for the HUD. Just creating the Function clbkDrawHUD compiles fine, but has no result.
It will compile fine as a member function of the Dragonfly class but it will never get called by Orbiter since there is no entry for it in the VESSEL class virtual method table. Change it to a VESSEL2 and it will get called.

3. is there a reason for the outputpath "H:\Orbiter stuff\OrbiterRel\Modules\Dragonfly.dll"
(in opposition to the usual .\..\..\..\Modules/(vesselname).dll
None that I can see. Its just how the author had it setup. Change it to suit your needs.
 
I tried to just change that point in the code.

But this didn't help much. I think you also have to change the orbitersdk.h to the one as eg deltaglider has it. then dragonfly.cpp compiles, but the whole project cannot be build.
I've got no idea how to solve this. Isn't there a function in the VESSEL class
thats responsible for the hud?
 
But this didn't help much. I think you also have to change the orbitersdk.h to the one as eg deltaglider has it.
Both should be using the same orbitersdk.h, ie, the one that ships with the SDK download. I am confused.

You need to declare clbkDrawHUD as a member of Dragonfly, and then define it also.

Isn't there a function in the VESSEL class
thats responsible for the hud?
Not that you have access to. You need VESSEL2.
 
Both should be using the same orbitersdk.h, ie, the one that ships with the SDK download. I am confused.

Dragonfly uses its own orbitersdk.h - it's in the Dragonfly folder.
 
Dragonfly uses its own orbitersdk.h - it's in the Dragonfly folder.
I see now. It looks like an old version, you should rename it an use the 2006P1 orbitersdk.h. It is the best way to get access to the VESSEL2 class. There may be some incompatibilities in the code for you to work through though.
 
Back
Top