diff -rc mux-1.6p0.orig/src/Makefile.in mux-1.6p0/src/Makefile.in *** mux-1.6p0.orig/src/Makefile.in Thu Nov 5 21:06:00 1998 --- mux-1.6p0/src/Makefile.in Sun Feb 14 16:53:50 1999 *************** *** 163,168 **** --- 163,176 ---- NET_S = bsd.c NET_O = bsd.o + + # Use the first line if you wish to enable the space engine. Use the second + # line if you don't. If you use the engine, make sure that the #define SPACE + # line is uncommented in config.h. + + SPACE_O = space/space.o + #SPACE_O = + # ================== END OF CONFIGURATION SECTION ================= # Auxiliary source files: only used by offline utilities. *************** *** 196,202 **** $(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) # Files in the standard distribution DIST = $(ALLSRC) $(ALLINC) $(AUXIL) --- 204,210 ---- $(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) $(SPACE_O) # Files in the standard distribution DIST = $(ALLSRC) $(ALLINC) $(AUXIL) *************** *** 259,264 **** --- 267,273 ---- depend: $(ALLSRC) unsplit for i in $(D_SRC) $(COM_SRC) $(SA_SRC) $(UDBA_SRC) $(UDBO_SRC) $(AUX_SRC) $(LIB_SRC) $(MALLOC_S) $(CONC_S) slave.c portconc.c ; do $(CPP) $(ALLCFLAGS) -M $$i; done | sed -e 's:/usr[^ ]* ::g' | unsplit > .depend~ mv .depend~ .depend + make -C space depend INCDIR="-I`pwd`" MUDCFLAGS="$(ALLCFLAGS)" index: help.indx news.indx wizhelp.indx *************** *** 276,286 **** --- 285,303 ---- realclean: -rm -f *.o a.out core gmon.out mux.*log mux.*sum $(OUT) netmux~ + make -C space clean INCDIR="-I`pwd`" MUDCFLAGS="$(ALLCFLAGS) -DMUX" clean: -rm -f *.o a.out core gmon.out mux.*log mux.*sum slave conc $(OUT) + make -C space clean INCDIR="-I`pwd`" MUDCFLAGS="$(ALLCFLAGS) -DMUX" 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 + + space/space.o: dummy + make -C space engine INCDIR="-I`pwd`" MUDCFLAGS="$(ALLCFLAGS) -DMUX" + + dummy: + include .depend diff -rc mux-1.6p0.orig/src/attrs.h mux-1.6p0/src/attrs.h *** mux-1.6p0.orig/src/attrs.h Wed Nov 12 23:14:15 1997 --- mux-1.6p0/src/attrs.h Sun Feb 14 16:41:19 1999 *************** *** 161,166 **** --- 161,176 ---- #define A_TEMP 255 #define A_USER_START 256 /* Start of user-named attributes */ + + /* Space engine attributes */ + + #ifdef SPACE + + #define A_USER_DBREF 250 /* Console user */ + #define A_DATA_DBREF 251 /* Data object pertaining to ship */ + + #endif + #define ATR_BUF_CHUNK 100 /* Min size to allocate for attribute buffer */ #define ATR_BUF_INCR 6 /* Max size of one attribute */ diff -rc mux-1.6p0.orig/src/conf.c mux-1.6p0/src/conf.c *** mux-1.6p0.orig/src/conf.c Wed Nov 12 23:14:16 1997 --- mux-1.6p0/src/conf.c Sun Feb 14 16:41:19 1999 *************** *** 253,259 **** mudconf.cache_depth = CACHE_DEPTH; mudconf.cache_width = CACHE_WIDTH; mudconf.cache_names = 1; - mudstate.events_flag = 0; mudstate.initializing = 0; mudstate.panicking = 0; --- 253,258 ---- diff -rc mux-1.6p0.orig/src/config.h mux-1.6p0/src/config.h *** mux-1.6p0.orig/src/config.h Wed Apr 16 02:00:48 1997 --- mux-1.6p0/src/config.h Sun Feb 14 16:41:19 1999 *************** *** 33,38 **** --- 33,43 ---- #define StringCopy strcpy #define StringCopyTrunc strncpy + /* + * Enable space engine + */ + #define SPACE + /* Do NOT define these. */ /* #define DSPACE */ /* Lauren's hardcoded DSPACE */ diff -rc mux-1.6p0.orig/src/db.c mux-1.6p0/src/db.c *** mux-1.6p0.orig/src/db.c Thu Jun 4 14:42:42 1998 --- mux-1.6p0/src/db.c Sun Feb 14 16:41:19 1999 *************** *** 439,444 **** --- 439,448 ---- 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 *************** *** 1024,1032 **** */ ATTR *atr_str(s) ! char *s; { ! char *buff, *p, *q; ATTR *a; VATTR *va; static ATTR tattr; --- 1028,1037 ---- */ ATTR *atr_str(s) ! const char *s; { ! char *buff, *p; ! const char *q; ATTR *a; VATTR *va; static ATTR tattr; *************** *** 1092,1103 **** */ ATTR *atr_str(s) ! char *s; { ATTR *ap; VATTR *va; static ATTR tattr; ! char *buff, *p, *q; buff = alloc_sbuf("atr_str"); for (p = buff, q = s; *q && ((p - buff) < (SBUF_SIZE - 1)); p++, q++) --- 1097,1109 ---- */ ATTR *atr_str(s) ! const char *s; { ATTR *ap; VATTR *va; static ATTR tattr; ! char *buff, *p; ! const char *q; buff = alloc_sbuf("atr_str"); for (p = buff, q = s; *q && ((p - buff) < (SBUF_SIZE - 1)); p++, q++) *************** *** 1573,1580 **** * * atr_encode: Encode an attribute string. */ ! static char *atr_encode(iattr, thing, owner, flags, atr) ! char *iattr; dbref thing, owner; int flags, atr; { --- 1579,1586 ---- * * atr_encode: Encode an attribute string. */ ! static const char *atr_encode(iattr, thing, owner, flags, atr) ! const char *iattr; dbref thing, owner; int flags, atr; { diff -rc mux-1.6p0.orig/src/db.h mux-1.6p0/src/db.h *** mux-1.6p0.orig/src/db.h Wed Apr 16 02:00:53 1997 --- mux-1.6p0/src/db.h Sun Feb 14 16:41:19 1999 *************** *** 63,69 **** }; extern ATTR * FDECL(atr_num, (int anum)); ! extern ATTR * FDECL(atr_str, (char *s)); extern ATTR attr[]; --- 63,69 ---- }; extern ATTR * FDECL(atr_num, (int anum)); ! extern ATTR * FDECL(atr_str, (const char *s)); extern ATTR attr[]; diff -rc mux-1.6p0.orig/src/externs.h mux-1.6p0/src/externs.h *** mux-1.6p0.orig/src/externs.h Mon Jun 8 22:58:45 1998 --- mux-1.6p0/src/externs.h Sun Feb 14 16:41:19 1999 *************** *** 169,175 **** extern void FDECL(badname_list, (dbref, const char *)); /* From predicates.c */ ! extern char * VDECL(tprintf, (char *, ...)); extern void VDECL(safe_tprintf_str, (char *, char **, char *, ...)); extern dbref FDECL(insert_first, (dbref, dbref)); extern dbref FDECL(remove_first, (dbref, dbref)); --- 169,175 ---- extern void FDECL(badname_list, (dbref, const char *)); /* From predicates.c */ ! extern char * VDECL(tprintf, (const char *, ...)); extern void VDECL(safe_tprintf_str, (char *, char **, char *, ...)); extern dbref FDECL(insert_first, (dbref, dbref)); extern dbref FDECL(remove_first, (dbref, dbref)); *************** *** 230,236 **** extern int FDECL(prefix_match, (const char *, const char *)); extern int FDECL(minmatch, (char *, char *, int)); extern char * FDECL(strsave, (const char *)); ! extern int FDECL(safe_copy_str, (char *, char *, char **, int)); extern int FDECL(safe_copy_chr, (char, char *, char **, int)); extern int FDECL(matches_exit_from_list, (char *, char *)); extern char * FDECL(translate_string, (const char *, int)); --- 230,236 ---- extern int FDECL(prefix_match, (const char *, const char *)); extern int FDECL(minmatch, (char *, char *, int)); extern char * FDECL(strsave, (const char *)); ! extern int FDECL(safe_copy_str, (const char *, char *, char **, int)); extern int FDECL(safe_copy_chr, (char, char *, char **, int)); extern int FDECL(matches_exit_from_list, (char *, char *)); extern char * FDECL(translate_string, (const char *, int)); *************** *** 306,311 **** --- 306,322 ---- extern int FDECL(check_zone, (dbref, dbref)); extern int FDECL(check_zone_for_player, (dbref, dbref)); extern void FDECL(toast_player, (dbref)); + + /* Space update routine */ + #ifdef SPACE + 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 /* Command handler keys */ diff -rc mux-1.6p0.orig/src/flags.c mux-1.6p0/src/flags.c *** mux-1.6p0.orig/src/flags.c Wed Apr 16 02:01:00 1997 --- mux-1.6p0/src/flags.c Sun Feb 14 16:41:19 1999 *************** *** 336,341 **** --- 336,345 ---- FLAG_WORD2, CA_GOD|CA_NO_DECOMP, fh_god}, {"HTML", HTML, '(', FLAG_WORD2, 0, fh_any}, + #ifdef SPACE + {"SPACE", SPACECOMPONENT, 'y', + FLAG_WORD3, CA_WIZARD, fh_wiz}, + #endif { NULL, 0, ' ', 0, 0, NULL}}; diff -rc mux-1.6p0.orig/src/flags.h mux-1.6p0/src/flags.h *** mux-1.6p0.orig/src/flags.h Wed Apr 16 02:01:01 1997 --- mux-1.6p0/src/flags.h Sun Feb 14 16:41:19 1999 *************** *** 243,248 **** --- 243,254 ---- #define MUD_ROBOT 0x00004000 #define MUD_CHOWN_OK 0x00008000 + /* Space Flag */ + + #ifdef SPACE + #define SPACECOMPONENT 0x00000001 + #endif + /* --------------------------------------------------------------------------- * FLAGENT: Information about object flags. */ *************** *** 431,436 **** --- 437,446 ---- (Typeof(x) == TYPE_PLAYER)) #define Slave(x) ((Flags2(Owner(x)) & SLAVE) != 0) #define Hidden(x) ((Flags(x) & DARK) != 0) + + #ifdef SPACE + #define Space(x) (((Flags3(x) & SPACECOMPONENT) != 0) || God(x)) + #endif #define H_Startup(x) ((Flags(x) & HAS_STARTUP) != 0) #define H_Fwdlist(x) ((Flags2(x) & HAS_FWDLIST) != 0) diff -rc mux-1.6p0.orig/src/functions.c mux-1.6p0/src/functions.c *** mux-1.6p0.orig/src/functions.c Sun Oct 25 14:24:17 1998 --- mux-1.6p0/src/functions.c Sun Feb 14 16:41:19 1999 *************** *** 118,123 **** --- 118,129 ---- XFUNCTION(fun_regmatch); XFUNCTION(fun_translate); + #ifdef SPACE + + XFUNCTION(fun_spacecall); + + #endif + /* * This is the prototype for functions */ *************** *** 5067,5072 **** --- 5073,5081 ---- {"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 -rc mux-1.6p0.orig/src/game.c mux-1.6p0/src/game.c *** mux-1.6p0.orig/src/game.c Mon Jun 8 23:00:05 1998 --- mux-1.6p0/src/game.c Sun Feb 14 16:41:19 1999 *************** *** 1560,1565 **** --- 1560,1572 ---- for (mindb = 0; mindb < MAX_GLOBAL_REGS; mindb++) mudstate.global_regs[mindb] = alloc_lbuf("main.global_reg"); mudstate.now = time(NULL); + + #ifdef SPACE + + /* Initialize space engine */ + spaceInit(); + + #endif process_preload(); load_restart_db(); diff -rc mux-1.6p0.orig/src/predicates.c mux-1.6p0/src/predicates.c *** mux-1.6p0.orig/src/predicates.c Sun Oct 25 14:09:17 1998 --- mux-1.6p0/src/predicates.c Sun Feb 14 16:41:19 1999 *************** *** 34,40 **** #endif #ifdef STDC_HEADERS ! char *tprintf(char *format,...) #else char *tprintf(va_alist) va_dcl --- 34,40 ---- #endif #ifdef STDC_HEADERS ! char *tprintf(const char *format,...) #else char *tprintf(va_alist) va_dcl diff -rc mux-1.6p0.orig/src/stringutil.c mux-1.6p0/src/stringutil.c *** mux-1.6p0.orig/src/stringutil.c Thu Nov 13 10:55:24 1997 --- mux-1.6p0/src/stringutil.c Sun Feb 14 16:41:19 1999 *************** *** 548,554 **** */ int safe_copy_str(src, buff, bufp, max) ! char *src, *buff, **bufp; int max; { char *tp; --- 548,555 ---- */ int safe_copy_str(src, buff, bufp, max) ! const char *src; ! char *buff, **bufp; int max; { char *tp; diff -rc mux-1.6p0.orig/src/timer.c mux-1.6p0/src/timer.c *** mux-1.6p0.orig/src/timer.c Wed Apr 16 02:01:57 1997 --- mux-1.6p0/src/timer.c Sun Feb 14 16:41:19 1999 *************** *** 139,144 **** --- 139,150 ---- } #endif + #ifdef SPACE + + spaceUpdate(); + + #endif + /* * reset alarm */ diff -rc mux-1.6p0.orig/src/version.c mux-1.6p0/src/version.c *** mux-1.6p0.orig/src/version.c Wed Apr 16 02:02:06 1997 --- mux-1.6p0/src/version.c Sun Feb 14 16:41:19 1999 *************** *** 58,63 **** --- 58,67 ---- buff = alloc_mbuf("do_version"); sprintf(buff, "Build date: %s", MUX_BUILD_DATE); notify(player, buff); + #ifdef SPACE + /* Show space version */ + spaceVersion(player); + #endif free_mbuf(buff); }