Problem Use of oapi::Sketchpad::TextW in 2016 branch

kuddel

Donator
Donator
Joined
Apr 1, 2008
Messages
2,064
Reaction score
507
Points
113
Hi,
I've noticed something that doesn't seem to be right:
When compiling the Orbiter2016 branch, ApolloRTCCMFD_Display.cpp uses oapi::Sketchpad::TextW method, although that method is only available in Orbiter BETA (DrawAPI.h) as far as I can tell...

DrawAPI.h
PHP:
// Present in 2016 (and BETA)
virtual bool Text (int x, int y, const char *str, int len) { return false; }

// Present only in BETA
virtual bool TextW (int x, int y, const LPWSTR str, int len) { return false; }

It might work, but I'm concerned that the automatic build system compiles against a mix of headers that might lead into serious problems.

If you have the guarantee (from Martin) that the TextW method is accessible even in Orbiter 2016 than I would recommend having a pre-build-step to get that new DrawAPI.h file from somewhere (something like "copy DrawAPI_NASSP.h DrawAPI.h").
 

indy91

Addon Developer
Addon Developer
Joined
Oct 26, 2011
Messages
1,226
Reaction score
591
Points
128
Ah, I didn't know it wasn't available in Orbiter 2016 yet. I was so happy when I figured out I could draw greek symbols in the RTCC MFD with TextW :lol:

NASSP is being developed for the Orbiter Beta and I think the auto builds use the right Orbiter API files for that, dseageav should know. But I'll consider removing the cases of TextW anyway, I don't really want some greek symbols in the RTCC MFD to be the reason that NASSP is completely broken in Orbiter 2016.
 

kuddel

Donator
Donator
Joined
Apr 1, 2008
Messages
2,064
Reaction score
507
Points
113
...or Martin releases the first patch for Orbiter 2016 ...:hmm:
2016-P1 : allowing oapi::Sketchpad::TextW (a very minor patch I guess).

I haven't checked what exactly happens when calling oapi::Sketchpad::TextW on Orbiter 2016, though.
The inline client definitely does not provide that "feature", but when D3D9Client is used this might work.
That would of course make the external graphic client a requirement for NASSP to run, which is also not optimal.
 

Thymo

I like breaking things
Addon Developer
Joined
Jun 26, 2016
Messages
120
Reaction score
148
Points
58
Website
nassp.space
Releasing a patch for Orbiter would be great IMO. I haven't kept a list but there a quite a few things that NASSP depends on that are only in the beta and make the sim unusable on 2016.
 
Top