--- deliantra/server/include/plugin.h 2006/08/25 13:24:50 1.11 +++ deliantra/server/include/plugin.h 2006/12/11 19:46:46 1.15 @@ -13,20 +13,9 @@ /*****************************************************************************/ /* This one does not exist under Win32. */ /*****************************************************************************/ -#ifndef WIN32 #include -#endif -#undef MODULEAPI -#ifdef WIN32 -#ifdef PYTHON_PLUGIN_EXPORTS -#define MODULEAPI __declspec(dllexport) -#else -#define MODULEAPI __declspec(dllimport) -#endif -#else #define MODULEAPI -#endif #include #include @@ -41,49 +30,7 @@ /*****************************************************************************/ /* This one does not exist under Win32. */ /*****************************************************************************/ -#ifndef WIN32 #include -#endif - -/*****************************************************************************/ -/* Event ID codes. I sorted them to present local events first, but it is */ -/* just a 'cosmetic' thing. */ -/*****************************************************************************/ -/*****************************************************************************/ -/* Local events. Those are always linked to a specific object. */ -/*****************************************************************************/ -// how about making this an enum -#define EVENT_NONE 0 /* No event. This exists only to reserve the "0". */ -#define EVENT_APPLY 1 /* Object applied-unapplied. */ -#define EVENT_ATTACK 2 /* Monster attacked or Scripted Weapon used. */ -#define EVENT_DEATH 3 -#define EVENT_DROP 4 /* Object dropped on the floor. */ -#define EVENT_PICKUP 5 /* Object picked up. */ -#define EVENT_SAY 6 /* Someone speaks. */ -#define EVENT_STOP 7 /* Thrown object stopped. */ -#define EVENT_TIME 8 /* Triggered each time the object can react/move. */ -#define EVENT_THROW 9 /* Object is thrown. */ -#define EVENT_TRIGGER 10 /* Button pushed, lever pulled, etc. */ -#define EVENT_CLOSE 11 /* Container closed. */ -#define EVENT_TIMER 12 /* Timer connected triggered it. */ -#define EVENT_MOVE 28 /* Monster move */ -/*****************************************************************************/ -/* Global events. Those are never linked to a specific object. */ -/*****************************************************************************/ -#define EVENT_CLOCK 14 /* Global time event. */ -#define EVENT_CRASH 15 /* Triggered when the server crashes. Not recursive*/ -#define EVENT_GKILL 17 /* Triggered when anything got killed by anyone. */ -#define EVENT_SHOUT 24 /* A player 'shout' something. */ -#define EVENT_TELL 25 /* A player 'tell' something. */ -#define EVENT_MUZZLE 26 /* A player was Muzzled (no_shout set). */ -#define EVENT_KICK 27 /* A player was Kicked by a DM */ -#define EVENT_PLAYER_USE_SKILL 36 /* player was just trying to use a skill */ -#define EVENT_MONSTER_USE_SKILL 37 /* monster was just trying to use a skill*/ -#define EVENT_FIND_UNARMED_SKILL 38 /* lets a plugin find the unarmed skill */ -#define EVENT_EXTCMD 39 /* Low-Level socket command */ -#define EVENT_CAST_SPELL 40 /* Something successfully casted a spell */ -#define EVENT_DROP_ON 41 /* Something was dropped on this (floor) */ -/* should add FREE_MAP, FREE_PLAYER */ #define NR_EVENTS 42 @@ -109,11 +56,7 @@ typedef int (*f_plug_postinit) (void); typedef int (*f_plug_init)(const char* iversion, f_plug_api gethooksptr); -#ifndef WIN32 #define LIBPTRTYPE void* -#else -#define LIBPTRTYPE HMODULE -#endif typedef struct _crossfire_plugin { @@ -131,19 +74,10 @@ extern int plugin_number; extern crossfire_plugin* plugins_list; -#ifdef WIN32 - -#define plugins_dlopen(fname) LoadLibrary(fname) -#define plugins_dlclose(lib) FreeLibrary(lib) -#define plugins_dlsym(lib,name) GetProcAddress(lib,name) - -#else /*WIN32 */ - #define plugins_dlopen(fname) dlopen(fname,RTLD_NOW|RTLD_GLOBAL) #define plugins_dlclose(lib) dlclose(lib) #define plugins_dlsym(lib,name) dlsym(lib,name) #define plugins_dlerror() dlerror() -#endif /* WIN32 */ /* OBJECT-RELATED HOOKS */