diff options
| author | Petr Mrázek | 2012-02-21 18:19:17 +0100 |
|---|---|---|
| committer | Petr Mrázek | 2012-02-21 18:19:17 +0100 |
| commit | 2cd2ee9b0cc10b79f264c3a9a4597f59835fd419 (patch) | |
| tree | 7d95cbe0b7abd5d42990a15ed8b8d801a08a48ad /plugins/skeleton | |
| parent | 0b9e849096c95d68c6235c266560a2fb58908151 (diff) | |
| download | dfhack-2cd2ee9b0cc10b79f264c3a9a4597f59835fd419.tar.gz dfhack-2cd2ee9b0cc10b79f264c3a9a4597f59835fd419.tar.bz2 dfhack-2cd2ee9b0cc10b79f264c3a9a4597f59835fd419.tar.xz | |
New plugin interface
Diffstat (limited to 'plugins/skeleton')
| -rw-r--r-- | plugins/skeleton/skeleton.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/plugins/skeleton/skeleton.cpp b/plugins/skeleton/skeleton.cpp index a5a66f35..b2db81ff 100644 --- a/plugins/skeleton/skeleton.cpp +++ b/plugins/skeleton/skeleton.cpp @@ -21,11 +21,9 @@ using namespace df::enums; // mostly to allow having the mandatory stuff on top of the file and commands on the bottom command_result skeleton (Core * c, std::vector <std::string> & parameters); -// A plugins must be able to return its name. This must correspond to the filename - skeleton.plug.so or skeleton.plug.dll -DFhackCExport const char * plugin_name ( void ) -{ - return "skeleton"; -} +// A plugin must be able to return its name and version. +// The name string provided must correspond to the filename - skeleton.plug.so or skeleton.plug.dll in this case +DFHACK_PLUGIN("skeleton"); // Mandatory init function. If you have some global state, create it here. DFhackCExport command_result plugin_init ( Core * c, std::vector <PluginCommand> &commands) @@ -48,7 +46,7 @@ DFhackCExport command_result plugin_init ( Core * c, std::vector <PluginCommand> DFhackCExport command_result plugin_shutdown ( Core * c ) { // You *MUST* kill all threads you created before this returns. - // If everythin fails, just return CR_FAILURE. Your plugin will be + // If everything fails, just return CR_FAILURE. Your plugin will be // in a zombie state, but things won't crash. return CR_OK; } |
