Orbiter-Forum  

Go Back   Orbiter-Forum > Orbiter Addons > Addon Development
Register Blogs Orbinauts List Social Groups FAQ Projects Mark Forums Read

Notices

Addon Development Developers post news, updates, & discussions here about your projects in development.

Reply
 
Thread Tools
  #1  
Old
SolarLiner's Avatar
SolarLiner SolarLiner is offline
wow so image such alpha wow
Default Shuttle PB Mk2 developpement thread
by SolarLiner 07-04-2012, 04:43 PM

Hi, welcome to my first add-on development thread !


Here is my Shuttle PB Mk2 Developpement thread, about a new version of my Shuttle PB Mk2 Spacecraft 3 vessel.Here is a non-exhaustive TODO list:
  • Custom UMmu adding in the vessel
  • Dynamic Airlocks: When landed, the airlock shape is as a different place than while in flight.
  • Action Areas repairs: If you land too hard, you should need to go out and repair the Hovers.
  • Hard-landing (more than 15 m/s) kills the crew.
  • Redo the animation code
  • Depressurisation system
  • 2D Panel
  • New 2048 textures, including normal maps for external graphics clients
  • Environnement Map ready (for D3D9)

You can download the semi-stable 1.02 beta : https://sourceforge.net/projects/shu...atest/download

The Blog: http://www.orbiter-forum.com/blog.php?u=4605

Using SVN, export this link to have the lastest alpha version of it : https://svn.code.sf.net/p/shuttlepbm...eleases/latest

See the code: https://sourceforge.net/projects/shuttlepbmk2/

Last edited by SolarLiner; 07-14-2013 at 05:28 PM. Reason: Updating the front page
Reply With Quote
Views 3967 Comments 33
Thanked by:
Total Comments 33

Comments

Old 07-04-2012, 05:06 PM   #2
Urwumpe
Certain Super User
 
Urwumpe's Avatar

Default

Would need to know which library your linker failed to discover, stands a bit earlier in the log.
Urwumpe is offline   Reply With Quote
Old 07-04-2012, 06:52 PM   #3
SolarLiner
wow so image such alpha wow
 
SolarLiner's Avatar
Default

Here is the apprently problem:
Code:
1>ShuttlePBMk2.obj : error LNK2001: symbole externe non résolu "public: static double ShuttlePBMk2::lvl" (?lvl@ShuttlePBMk2@@2NA)
SolarLiner is offline   Reply With Quote
Old 07-04-2012, 07:00 PM   #4
orb
O-F Administrator
Ninja
 
orb's Avatar

Default

You haven't defined `double ShuttlePBMk2::lvl` static variable in your code.
orb is offline   Reply With Quote
Old 07-04-2012, 07:04 PM   #5
SolarLiner
wow so image such alpha wow
 
SolarLiner's Avatar
Default

Quote:
Originally Posted by orb View Post
 You haven't defined `double ShuttlePBMk2::lvl` in your code.
Of course I have:
PHP Code:
PSTREAM_HANDLE pSmoke;
static 
double lvl
But should I declare a simple "double lvl" variable ? I is used for my Particle Stream declared above.
SolarLiner is offline   Reply With Quote
Old 07-04-2012, 07:06 PM   #6
orb
O-F Administrator
Ninja
 
orb's Avatar

Default

Quote:
Originally Posted by SolarLiner View Post
 Of course I have:
PHP Code:
PSTREAM_HANDLE pSmoke;
static 
double lvl
Of course you haven't. That's declaration of `static double lvl` not definition of `double ShuttlePBMk2::lvl`.
orb is offline   Reply With Quote
Old 07-04-2012, 07:10 PM   #7
SolarLiner
wow so image such alpha wow
 
SolarLiner's Avatar
Default

Quote:
Originally Posted by orb View Post
 Of course you haven't. That's declaration of `static double lvl` not definition of `double ShuttlePBMk2::lvl`.
I have declared all in my Header file (ShuttlePBMk2.h), inside the
"class ShuttlePBMk2:public VESSEL3 {
public:" part. It taht not equal to ShuttlePBMk2::lvl ?
SolarLiner is offline   Reply With Quote
Old 07-04-2012, 07:11 PM   #8
Urwumpe
Certain Super User
 
Urwumpe's Avatar

Default

yes - you need to define this static variable in a cpp file - outside the class definition.
Urwumpe is offline   Reply With Quote
Old 07-04-2012, 07:12 PM   #9
orb
O-F Administrator
Ninja
 
orb's Avatar

Default

Quote:
Originally Posted by SolarLiner View Post
 I have declared all in my Header file (ShuttlePBMk2.h), inside the
"class ShuttlePBMk2:public VESSEL3 {
public:" part. It taht not equal to ShuttlePBMk2::lvl ?
The variable is declared, but not defined. See for example this page for details:
http://weblogs.asp.net/whaggard/arch...05/252685.aspx
orb is offline   Reply With Quote
Old 07-04-2012, 07:21 PM   #10
SolarLiner
wow so image such alpha wow
 
SolarLiner's Avatar
Default

I'm afraid it is going to be an annoying conversation !
Quote:
Originally Posted by orb View Post
 The variable is declared, but not defined. See for example this page for details:
http://weblogs.asp.net/whaggard/arch...05/252685.aspx
It is, in Set ClassCaps:
PHP Code:
lvl 0.0
And toggleled by the "Q" key in ConsumeBufferedKey:
PHP Code:
if(!Smoke)
{
    
lvl=1.0;
    
Smoke=TRUE;
}
if(
Smoke)
{
    
lvl=0.0;
    
Smoke=FALSE;

SolarLiner is offline   Reply With Quote
Old 07-04-2012, 07:31 PM   #11
orb
O-F Administrator
Ninja
 
orb's Avatar

Default

Please put in your ShuttlePBMk2.cpp (on the global scope):
Code:
double ShuttlePBMk2::lvl;
orb is offline   Reply With Quote
Thanked by:
Old 07-04-2012, 07:50 PM   #12
Urwumpe
Certain Super User
 
Urwumpe's Avatar

Default

Exactly. In the class { ... }, you only declare what an object of the class will be able to see and how it can be accessed. Outside the class declaration, you define them. In which code object and how should a static variable exist in memory? How should it be initialized on start up?
Urwumpe is offline   Reply With Quote
Old 07-04-2012, 07:51 PM   #13
SolarLiner
wow so image such alpha wow
 
SolarLiner's Avatar
Default

Quote:
Originally Posted by orb View Post
 Please put in your ShuttlePBMk2.cpp (on the global scope):
Code:
double ShuttlePBMk2::lvl;

Thanks orb ! Here is a screenshot of the actual state:


Last edited by SolarLiner; 07-04-2012 at 07:54 PM.
SolarLiner is offline   Reply With Quote
Old 07-04-2012, 07:54 PM   #14
Urwumpe
Certain Super User
 
Urwumpe's Avatar

Default

Now, the problem is just, that all of your vessels will share the same variable with the resulting terrible effects for the particle stream.

You would better have it defined as object variable.
Urwumpe is offline   Reply With Quote
Old 07-04-2012, 07:58 PM   #15
SolarLiner
wow so image such alpha wow
 
SolarLiner's Avatar
Default

OK, now, When I type "Q", tht "lvl" variable pass to 1.0, but the particle stream does not seems to emit something ...
Here is the part of the SetClassCaps containing the declarations:
PARTICLESTREAMSPEC smoke = {
0, 0.01, 100, 10.0, 0.01, 3, 10, 1.0, PARTICLESTREAMSPEC::EMISSIVE,
PARTICLESTREAMSPEC::LVL_PSQRT, 0, 2,
PARTICLESTREAMSPEC::ATM_PLIN, 1e-4, 1};
pSmoke = AddParticleStream (&smoke, _V(0.00317, -1.3027, -4.5340), _V(0, -1, 0), &lvl);
:help:
And thanks again !
SolarLiner is offline   Reply With Quote
Reply

  Orbiter-Forum > Orbiter Addons > Addon Development


Thread Tools

Posting Rules
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Jump


All times are GMT. The time now is 10:19 PM.

Quick Links Need Help?


About Us | Rules & Guidelines | TOS Policy | Privacy Policy

Orbiter-Forum is hosted at Orbithangar.com
Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright ©2007 - 2012, Orbiter-Forum.com. All rights reserved.