Project Westcott RPE (Upgrade)

Just a quick question before I wander off down a dead-end.
Want to make a 2d panel for the cockpit view, and looking at how ShuttleA does it, and the relevant parts of API_Guide.

I get a "Resource editing is not supported on the Visual Express SKU" message. Thats fairly straightforward.

Does this mean I can't make any 2d panels in 2008 Express version?
Done the usual searches here, can't find much info.

Mny thanks, N.
 
Just a quick question before I wander off down a dead-end.
Want to make a 2d panel for the cockpit view, and looking at how ShuttleA does it, and the relevant parts of API_Guide.

I get a "Resource editing is not supported on the Visual Express SKU" message. Thats fairly straightforward.

Does this mean I can't make any 2d panels in 2008 Express version?
Done the usual searches here, can't find much info.

Mny thanks, N.

The new Panel2D interface from Orbiter 2010 should work with the Express version, but it is one level less straight forward.
 
Thanks Urwumpe, regarding less straight forward...could you point me toward the documentation, or is it in the API_Guide/Reference?

EDIT: in the API_Refernce, that will keep me quiet for a while by the look of it!

N.
 
Last edited:
Thanks Urwumpe, regarding less straight forward...could you point me toward the documentation, or is it in the API_Guide/Reference?

EDIT: in the API_Refernce, that will keep me quiet for a while by the look of it!

N.

The DeltaGlider Source code and martins blog here will be more of a help.
 
I see what you mean now about martins blog. Must be some irony there.

N.
 
Saving versions of .cpp and .h files.

Is the only way to save versions of the .cpp and .h files just from the "file" menu?

http://i89.photobucket.com/albums/k207/Notebook_04/WestcottP2_1_.jpg

i.e "Save Wescott_P2_1_.cpp/.h" and so on as I make changes to the files.

Seems a bit clumsy, so must be missing something.

Realised if you highlight the various heirachies in the solution explorer window, you can save as .prj or solutions.
http://i89.photobucket.com/albums/k207/Notebook_04/WestcottP2_2_.jpg

what could possibly go wrong

N.
 
Last edited:
Working through martins's Developer Masterclass on 2-D panels, got up to lesson 4 ok, then this:
Code:
void Westcott_P2::DefineMainPanel (PANELHANDLE hPanel)
{
  static DWORD panelW = 1280;
  static DWORD panelH =  400;
  float fpanelW = (float)panelW;
  float fpanelH = (float)panelH;
  static DWORD texW   = 2048;
  static DWORD texH   =  512;
  float ftexW   = (float)texW;
  float ftexH   = (float)texH;

  static NTVERTEX VTX[4] = {
    {      0,      0,0,   0,0,0,                0.0f,1.0f–fpanelH/ftexH},
    {      0,fpanelH,0,   0,0,0,                0.0f,1.0f              },
    {fpanelW,fpanelH,0,   0,0,0,       fpanelW/ftexW,1.0f              },
    {fpanelW,      0,0,   0,0,0,       fpanelW/ftexW,1.0f-fpanelH/ftexH}
  };
  static WORD IDX[6] = {
    0,2,1,
    2,0,3
  };
is giving me
Code:
.\Westcott_P2_2_.cpp(65) : error C2146: syntax error : missing '}' before identifier '–fpanelH'

Can't see the missing brace, any one else?

Many thank, N.
 
What's the definition of NTVERTEX? Are you supposed to use any initializer?
 
Replace the "–" (en dash / u8211 character) before fpanelH with "-" (minus sign / u45 character) and it should be fine.
 
Good Greif Orb, well spotted, compiles and links now, no errors or warnings.

Would never have seen that myself, hard to see on this laptop, but I'll keep that in mind.

Works nicely in the cockpit too, scrolls up and down, onto part 2 tommorow...

Many thanks, N.
 
Last edited:
Would never have seen that myself, hard to see on this laptop, but I'll keep that in mind.

{...}

Many thanks, N.
You're welcome. :tiphat:

I wouldn't have spotted it myself if I hadn't changed color for operators in the editor of the VS IDE (Tools -> Options... -> Environment -> Fonts and Colors -> Operator).
 
Thats a good idea, I have enough fun and games without fighting the IDE!

N.
 
I'm not getting any MFD buttons after completing Part 2:
http://www.orbiter-forum.com/blog.php?b=576

Haven't put the second code segment in relating to fonts, I'm hoping I can get away with that. I'll be happy with blank buttons till I understand the fonts and labelling stuff.

Attached "instruments.cpp" & "instuments.cpp" to the project, and corrected as per Bibi Uncle's comments.

Compiles, links and runs OK, no buttons though, just my plain background and the surface MFD.

I think it may be due to the third code segemnt not relating to my vessel?
MFDButtonCol (VESSEL3 *v, DWORD _lr);
Should *v be pointing to Westcott_P2 vessel?

All help appreciated, N.
 
I think it may be due to the third code segemnt not relating to my vessel?
MFDButtonCol (VESSEL3 *v, DWORD _lr);
Should *v be pointing to Westcott_P2 vessel?
Yes, *v should be pointing to your vessel. Inside of your vessel class it's `this`.

What do you mean by "third code segment not relating to vessel"? Is it outside of the vessel class or something?
 
Thaknks for the reply Orb.
Bigger problems I think!

While I added the instrument.h and instruments.cpp to the project, I didn't #iinclude them in Westcott_P2.cpp (or Westcott_P2.h)?.

Done that now, and its happy #including Instruments.h, but I get lots of linker errors if I try to include Instruments.cpp.

I guess I'll have to sort this out before I get any further?

Thanks, N.
 
Don't know...how does the file begin, maybe one of the includes has a tiny error.
 
Back
Top