diff -ruN tinymush-3.0b19.orig/src/Makefile.in tinymush-3.0b19/src/Makefile.in --- tinymush-3.0b19.orig/src/Makefile.in Mon Nov 29 07:58:37 1999 +++ tinymush-3.0b19/src/Makefile.in Wed Dec 1 23:37:15 1999 @@ -248,12 +248,15 @@ INSTALL_TARG = $(INSTALL_PROG) *.txt *.conf REINSTALL_TARG = $(INSTALL_PROG) help.txt wizhelp.txt alias.conf compat.conf +# Object files for the Portable Space Engine +SPACE_O = space/space.o + #compiliation source files ALLSRC = $(D_SRC) $(UDB_SRC) $(UDBA_SRC) $(UDBO_SRC) $(VER_SRC) \ $(COM_SRC) $(SA_SRC) $(AUX_SRC) $(LIB_SRC) ALLINC = $(D_INC) $(UDB_INC) $(VER_INC) $(NET_INC) $(LIB_INC) SRC = $(D_SRC) $(COM_SRC) $(UDB_S) $(MALLOC_S) $(CONC_S) -OBJ = $(D_OBJ) $(COM_OBJ) $(UDB_O) $(MALLOC_O) $(CONC_O) +OBJ = $(D_OBJ) $(COM_OBJ) $(UDB_O) $(MALLOC_O) $(CONC_O) $(SPACE_O) # Files in the standard distribution DIST = $(ALLSRC) $(ALLINC) $(AUXIL) @@ -376,9 +379,16 @@ realclean: -rm -f *.o a.out core gmon.out mush.*log mush.*sum $(OUT) netmush~ slave conc + make -C space clean INCDIR="-I`pwd`" MUDCFLAGS="$(ALLCFLAGS) -DMUSH3" clean: -rm -f *.o a.out core gmon.out mush.*log mush.*sum + make -C space clean INCDIR="-I`pwd`" MUDCFLAGS="$(ALLCFLAGS) -DMUSH3" + +space/space.o: dummy + make -C space engine INCDIR="-I`pwd`" MUDCFLAGS="$(ALLCFLAGS) -DMUSH3" + +dummy: indent: indent -bad -bap -ncdb -nsob -fca -sc -br -ce -ss -npcs -nbc -lp -i8 -ip0 -cp5 -ncs -npsl -di1 *.c radixlib/*.c tools/*.c web/*.c diff -ruN tinymush-3.0b19.orig/src/attrs.h tinymush-3.0b19/src/attrs.h --- tinymush-3.0b19.orig/src/attrs.h Mon Nov 29 07:58:37 1999 +++ tinymush-3.0b19/src/attrs.h Wed Dec 1 23:37:15 1999 @@ -175,4 +175,13 @@ #define ATR_BUF_CHUNK 100 /* Min size to allocate for attribute buffer */ #define ATR_BUF_INCR 6 /* Max size of one attribute */ +/* Space engine attributes */ + +#ifdef SPACE + +#define A_USER_DBREF 256 /* Console user */ +#define A_DATA_DBREF 257 /* Data object pertaining to ship */ + +#endif + #endif diff -ruN tinymush-3.0b19.orig/src/config.h tinymush-3.0b19/src/config.h --- tinymush-3.0b19.orig/src/config.h Mon Nov 29 07:58:40 1999 +++ tinymush-3.0b19/src/config.h Wed Dec 1 23:37:15 1999 @@ -27,6 +27,11 @@ #define OUTPUT_BLOCK_SIZE 16384 +/* + * Enable space engine + */ +#define SPACE + /* length of the DOING field in WHO */ #define DOING_LEN 41 diff -ruN tinymush-3.0b19.orig/src/db.c tinymush-3.0b19/src/db.c --- tinymush-3.0b19.orig/src/db.c Mon Nov 29 07:58:42 1999 +++ tinymush-3.0b19/src/db.c Wed Dec 1 23:37:15 1999 @@ -432,6 +432,10 @@ NULL}, {"*Money", A_MONEY, AF_DARK | AF_NOPROG | AF_NOCMD | AF_INTERNAL, NULL}, +#ifdef SPACE + {"UserDBREF", A_USER_DBREF, AF_ODARK, NULL}, + {"DataDBREF", A_DATA_DBREF, AF_ODARK, NULL}, +#endif {NULL, 0, 0, NULL}}; #ifndef STANDALONE --- tinymush-3.0b19.orig/src/externs.h Mon Nov 29 07:58:43 1999 +++ tinymush-3.0b19/src/externs.h Thu Jan 6 17:48:11 2000 @@ -227,7 +227,7 @@ extern char * FDECL(skip_space, (const char *)); extern char * FDECL(seek_char, (const char *, char)); extern int FDECL(minmatch, (char *, char *, int)); -extern INLINE int FDECL(safe_copy_str, (char *, char *, char **, int)); +extern INLINE int FDECL(safe_copy_str, (const char *, char *, char **, int)); extern int FDECL(safe_copy_long_str, (char *, char *, char **, int)); extern INLINE void FDECL(safe_copy_known_str, (char *, int, char *, char **, int)); @@ -631,5 +631,16 @@ #define safe_dbref(b,p,n) \ safe_chr('#',(b),(p)); \ safe_ltos((b),(p),(n)); + +#ifdef SPACE +/* Space Engine Functions */ +extern void NDECL(spaceInit); +extern void NDECL(spaceUpdate); +extern void FDECL(spaceVersion, (dbref)); +extern dbref FDECL(getLocation, (dbref)); +extern int FDECL(validObject, (dbref)); +extern dbref FDECL(getDebugCharacter, ()); +extern int FDECL(isGoodObject, (dbref)); +#endif #endif /* __EXTERNS_H */ --- tinymush-3.0b19.orig/src/stringutil.c Mon Nov 29 07:58:51 1999 +++ tinymush-3.0b19/src/stringutil.c Thu Jan 6 17:47:45 2000 @@ -585,7 +585,8 @@ INLINE int safe_copy_str(src, buff, bufp, max) - char *src, *buff, **bufp; + const char *src; + char *buff, **bufp; int max; { char *tp, *maxtp, *longtp; diff -ruN tinymush-3.0b19.orig/src/flags.c tinymush-3.0b19/src/flags.c --- tinymush-3.0b19.orig/src/flags.c Mon Nov 29 07:58:43 1999 +++ tinymush-3.0b19/src/flags.c Wed Dec 1 23:37:15 1999 @@ -383,6 +383,10 @@ FLAG_WORD3, 0, fh_god}, {"MARKER9", MARK_9, '9', FLAG_WORD3, 0, fh_god}, +#ifdef SPACE +{"SPACE", SPACECOMPONENT, 'y', + FLAG_WORD3, 0, fh_wiz}, +#endif { NULL, 0, ' ', 0, 0, NULL}}; diff -ruN tinymush-3.0b19.orig/src/flags.h tinymush-3.0b19/src/flags.h --- tinymush-3.0b19.orig/src/flags.h Mon Nov 29 07:58:43 1999 +++ tinymush-3.0b19/src/flags.h Wed Dec 1 23:37:15 1999 @@ -90,6 +90,7 @@ #define SLAVE 0x80000000 /* Disallow most commands */ /* Third word of flags */ +#define SPACECOMPONENT 0x00200000 /* Space flag */ #define MARK_0 0x00400000 /* User-defined flags */ #define MARK_1 0x00800000 #define MARK_2 0x01000000 @@ -466,6 +467,10 @@ #define H_Marker7(x) ((Flags3(x) & MARK_7) != 0) #define H_Marker8(x) ((Flags3(x) & MARK_8) != 0) #define H_Marker9(x) ((Flags3(x) & MARK_9) != 0) + +#ifdef SPACE +#define Space(x) ((Flags3(x) & SPACECOMPONENT) != 0) +#endif #define s_Halted(x) s_Flags((x), Flags(x) | HALT) #define s_Going(x) s_Flags((x), Flags(x) | GOING) diff -ruN tinymush-3.0b19.orig/src/functions.c tinymush-3.0b19/src/functions.c --- tinymush-3.0b19.orig/src/functions.c Mon Nov 29 07:58:46 1999 +++ tinymush-3.0b19/src/functions.c Wed Dec 1 23:39:06 1999 @@ -46,6 +46,10 @@ #define XFUNCTION(x) \ extern void x(); +#ifdef SPACE +extern void FDECL(fun_spacecall, (char *, dbref, dbref, char **, int, char **, int)); +#endif + #ifdef USE_COMSYS XFUNCTION(fun_cwho); #endif @@ -6179,6 +6183,9 @@ {"ZFUN", fun_zfun, 0, FN_VARARGS, CA_PUBLIC}, {"ZONE", fun_zone, 1, 0, CA_PUBLIC}, {"ZWHO", fun_zwho, 1, 0, CA_PUBLIC}, +#ifdef SPACE +{"SC", fun_spacecall, 0, FN_VARARGS, CA_PUBLIC}, +#endif {NULL, NULL, 0, 0, 0}}; /* *INDENT-ON* */ diff -ruN tinymush-3.0b19.orig/src/game.c tinymush-3.0b19/src/game.c --- tinymush-3.0b19.orig/src/game.c Mon Nov 29 07:58:46 1999 +++ tinymush-3.0b19/src/game.c Wed Dec 1 23:37:15 1999 @@ -1814,6 +1814,11 @@ sql_init(); /* Make a connection to external SQL db */ +#ifdef SPACE + /* Initialise the space engine */ + spaceInit(); +#endif + /* You must do your startups AFTER you load your restart database, * or softcode that depends on knowing who is connected and so forth * will be hosed. diff -ruN tinymush-3.0b19.orig/src/timer.c tinymush-3.0b19/src/timer.c --- tinymush-3.0b19.orig/src/timer.c Mon Nov 29 07:58:51 1999 +++ tinymush-3.0b19/src/timer.c Wed Dec 1 23:37:15 1999 @@ -550,6 +550,10 @@ } #endif +#ifdef SPACE + spaceUpdate(); +#endif + /* * reset alarm */ diff -ruN tinymush-3.0b19.orig/src/version.c tinymush-3.0b19/src/version.c --- tinymush-3.0b19.orig/src/version.c Mon Nov 29 07:58:52 1999 +++ tinymush-3.0b19/src/version.c Wed Dec 1 23:37:15 1999 @@ -58,6 +58,9 @@ buff = alloc_mbuf("do_version"); sprintf(buff, "Build date: %s", MUSH_BUILD_DATE); notify(player, buff); +#ifdef SPACE + spaceVersion(player); +#endif free_mbuf(buff); }