Editing Vessel code
Jump to navigation
Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 3: | Line 3: | ||
'''--- THIS IS WORK IN PROGRESS ---''' | '''--- THIS IS WORK IN PROGRESS ---''' | ||
− | This is a quick guide to create your own vessel dll with VC++. It's not suited for | + | This is a quick guide to create your own vessel dll with VC++. It's not suited for newbees to c++. If you are new to orbiter, make a config based vessel first, or one based on vinkas spacecraft.dll or spacecraft2.dll. |
− | You will find here | + | You will find here wich API functions are necessary to get a project running. This is basically just a very cut down version from one of the sample ships included in Orbiter SDK. |
− | ==Adding | + | ==Adding sourcecode files to your project== |
After you have set up the compiler, it's time to start setting up the actual code. | After you have set up the compiler, it's time to start setting up the actual code. | ||
− | Try to settle on a name for your vessel class first. | + | Try to settle on a name for your vessel class first. Dont choose "testship" or "spacecraft". Try a unique name, like "ProtonLV", "HeavyCruiserHC" or whatever suits you. Save the project under that name and add the following two files (with your vessels name) |
*Source *.cpp file | *Source *.cpp file | ||
Line 20: | Line 20: | ||
===Example Code=== | ===Example Code=== | ||
− | |||
#define ORBITER_MODULE | #define ORBITER_MODULE | ||
Line 86: | Line 85: | ||
{ | { | ||
} | } | ||
− | |||
− | |||
==Functions in your *.h file== | ==Functions in your *.h file== | ||
Line 93: | Line 90: | ||
===Example Code=== | ===Example Code=== | ||
− | + | <nowiki> | |
− | |||
#ifndef __TEMPLATE_H | #ifndef __TEMPLATE_H | ||
#define __TEMPLATE_H | #define __TEMPLATE_H | ||
Line 118: | Line 114: | ||
#endif | #endif | ||
</nowiki> | </nowiki> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |