-
Notifications
You must be signed in to change notification settings - Fork 59
1.Getting Started with NERvSDK
This tutorial will show you the basic information of the NERvSDK and how to use the sample projects.
Folders | Descriptions |
---|---|
bin | A minimal NERvGear environment for testing or debugging. |
docs | Guides and references for components, interfaces, files and etc. |
include | Header files of interfaces, templates and etc. |
lib | NERvSDK and NERvRES libraries for both VC and GCC. |
samples | Demo projects for both VS and Code::Blocks. |
To get started with the Demo Plug-in for 64 bit Windows, you could:
- Open
samples\SAO Utils Plugin Demo.sln
with Vistual Studio. - Switch into
x64
solution platform. - Build
Plug-in Demo
project. - Copy
samples\Release\Plug-in Demo\module64.dll
tobin\win64\Plugins\Plug-in Demo
. - Run
bin\win64\NERvSDK.exe
to test the plug-in.
The sample solution and its projects require VS2005(VC8) or above, however you're still able to compile a plug-in with at least VS2003(VC7) according to the configurations of the sample projects.
- Open
samples\SAO Utils Plugin Demo.workspace
with Code::Blocks. - Switch into
win64
build target. - Build
Plug-in Demo
project. - Copy
samples\Release\Plug-in Demo\module64.dll
tobin\win64\Plugins\Plug-in Demo
. - Run
bin\win64\NERvSDK.exe
to test the plug-in.
NERvSDK use both namespaces and macros to classify APIs and simplify codes.
NERvSDK enclose all the functions, classes, structures, templates and types in the NERvGear
namespace.
We use sub-namespaces to arrange these APIs according to their category. For example, the 'NERvGear::UI' namespace includes all the user interface related functions, types and some other things.
We also use namespaces to enclose some enumerators or types for the purpose of readable codes. For example, the NERvGear::DATA
namespace defines TYPE
enumerator inside it, then we could use NERvGear::DATA::TYPE type
to declare variables or parameters.
We use NERv
as a prefix for all the C-Style API functions, such as NERvGear::NERvCreateObject()
, NERvGear::NERvSound()
, etc. In fact, these functions are exported with version signature like NERvGear::NERv1Sound()
, you should always use the no version signature one in your code to link against the latest APIs.
Macros in form NVG_*
are reserved and also part of the NERvSDK APIs, such as NVG_TEXT()
, NVG_VERSION()
, etc.
The NERvSDK also provide a plug-in manager witch allows you to run, debug or view the components service and usage of your plug-in.