From 51fb74519d4c60fdae40072e8fa6c1906c616a05 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 5 Nov 2014 22:23:18 +0300 Subject: Add empty char server plugin. --- src/Makefile.am | 22 ++++++++++++++-------- src/char/init.c | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+), 8 deletions(-) create mode 100644 src/char/init.c (limited to 'src') diff --git a/src/Makefile.am b/src/Makefile.am index 4d80375..22f7c53 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,22 +1,28 @@ AUTOMAKE_OPTIONS = subdir-objects +CHAR_SRC = char/init.c + +LOGIN_SRC = login/init.c + MAP_SRC = map/dummy.c \ map/dummy.h \ map/init.c \ map/script.c \ map/script.h -LOGIN_SRC = login/init.c - -lib_LTLIBRARIES = libevol_login.la libevol_map.la -libevol_map_la_SOURCES = ${MAP_SRC} -libevol_map_la_LDFLAGS = -avoid-version -libevol_map_la_CFLAGS = -pipe -ffast-math -Wall -Wextra -Wno-sign-compare +SHARED_FLAGS = -pipe -ffast-math -Wall -Wextra -Wno-sign-compare +lib_LTLIBRARIES = libevol_char.la libevol_login.la libevol_map.la +libevol_char_la_SOURCES = ${CHAR_SRC} +libevol_char_la_LDFLAGS = -avoid-version +libevol_char_la_CFLAGS = ${SHARED_FLAGS} libevol_login_la_SOURCES = ${LOGIN_SRC} libevol_login_la_LDFLAGS = -avoid-version -libevol_login_la_CFLAGS = -pipe -ffast-math -Wall -Wextra -Wno-sign-compare +libevol_login_la_CFLAGS = ${SHARED_FLAGS} +libevol_map_la_SOURCES = ${MAP_SRC} +libevol_map_la_LDFLAGS = -avoid-version +libevol_map_la_CFLAGS = ${SHARED_FLAGS} -all-local: libevol_login.la libevol_map.la +all-local: libevol_char.la libevol_login.la libevol_map.la cp .libs/*.so ../../../plugins cp .libs/*.so ../../../../server-data/plugins diff --git a/src/char/init.c b/src/char/init.c new file mode 100644 index 0000000..b1f31f2 --- /dev/null +++ b/src/char/init.c @@ -0,0 +1,37 @@ +// Copyright (c) Copyright (c) Hercules Dev Team, licensed under GNU GPL. +// Copyright (c) 2014 Evol developers + +#include +#include +#include + +#include "../../../common/HPMi.h" +#include "../../../common/malloc.h" +#include "../../../common/mmo.h" +#include "../../../common/socket.h" +#include "../../../common/strlib.h" + +#include "../../../common/HPMDataCheck.h" /* should always be the last file included! (if you don't make it last, it'll intentionally break compile time) */ + +HPExport struct hplugin_info pinfo = +{ + "evol_char", + SERVER_TYPE_CHAR, + "0.1", + HPM_VERSION +}; + +/* run when server starts */ +HPExport void plugin_init (void) { + /* core interfaces */ + iMalloc = GET_SYMBOL("iMalloc"); +} + +HPExport void server_preinit (void) { +} + +HPExport void server_online (void) { +} + +HPExport void plugin_final (void) { +} -- cgit v1.2.3-70-g09d2