diff -rcN mux-1.4p16.orig/src/Makefile.in mux-1.4p16/src/Makefile.in *** mux-1.4p16.orig/src/Makefile.in Wed Apr 16 20:25:16 1997 --- mux-1.4p16/src/Makefile.in Sat Jul 4 17:05:14 1998 *************** *** 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) *************** *** 275,282 **** --- 283,297 ---- 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 -cdb -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 -rcN mux-1.4p16.orig/src/attrs.h mux-1.4p16/src/attrs.h *** mux-1.4p16.orig/src/attrs.h Wed Apr 16 07:00:37 1997 --- mux-1.4p16/src/attrs.h Sat Jul 4 17:05:14 1998 *************** *** 160,165 **** --- 160,175 ---- #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 -rcN mux-1.4p16.orig/src/config.h mux-1.4p16/src/config.h *** mux-1.4p16.orig/src/config.h Wed Apr 16 07:00:48 1997 --- mux-1.4p16/src/config.h Sat Jul 4 17:05:14 1998 *************** *** 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 -rcN mux-1.4p16.orig/src/db.c mux-1.4p16/src/db.c *** mux-1.4p16.orig/src/db.c Thu Jun 4 19:21:09 1998 --- mux-1.4p16/src/db.c Sat Jul 4 18:40:02 1998 *************** *** 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++) diff -rcN mux-1.4p16.orig/src/db.h mux-1.4p16/src/db.h *** mux-1.4p16.orig/src/db.h Wed Apr 16 07:00:53 1997 --- mux-1.4p16/src/db.h Sat Jul 4 18:38:24 1998 *************** *** 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 -rcN mux-1.4p16.orig/src/externs.h mux-1.4p16/src/externs.h *** mux-1.4p16.orig/src/externs.h Thu Jun 4 18:46:16 1998 --- mux-1.4p16/src/externs.h Sat Jul 4 18:47:37 1998 *************** *** 222,228 **** 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 *)); --- 222,228 ---- 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 *)); *************** *** 296,301 **** --- 296,312 ---- 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 -rcN mux-1.4p16.orig/src/flags.c mux-1.4p16/src/flags.c *** mux-1.4p16.orig/src/flags.c Wed Apr 16 07:01:00 1997 --- mux-1.4p16/src/flags.c Sat Jul 4 17:05:14 1998 *************** *** 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 -rcN mux-1.4p16.orig/src/flags.h mux-1.4p16/src/flags.h *** mux-1.4p16.orig/src/flags.h Wed Apr 16 07:01:01 1997 --- mux-1.4p16/src/flags.h Sat Jul 4 17:05:14 1998 *************** *** 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 -rcN mux-1.4p16.orig/src/functions.c mux-1.4p16/src/functions.c *** mux-1.4p16.orig/src/functions.c Sat Jun 6 20:55:20 1998 --- mux-1.4p16/src/functions.c Sat Jul 4 17:11:15 1998 *************** *** 116,121 **** --- 116,127 ---- XFUNCTION(fun_items); XFUNCTION(fun_lstack); + #ifdef SPACE + + XFUNCTION(fun_spacecall); + + #endif + /* * This is the prototype for functions */ *************** *** 5059,5064 **** --- 5065,5073 ---- {"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 -rcN mux-1.4p16.orig/src/game.c mux-1.4p16/src/game.c *** mux-1.4p16.orig/src/game.c Wed Apr 16 07:01:06 1997 --- mux-1.4p16/src/game.c Sat Jul 4 17:11:48 1998 *************** *** 1464,1469 **** --- 1464,1476 ---- 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 -rcN mux-1.4p16.orig/src/stringutil.c mux-1.4p16/src/stringutil.c *** mux-1.4p16.orig/src/stringutil.c Wed Apr 16 07:01:56 1997 --- mux-1.4p16/src/stringutil.c Sat Jul 4 18:47:12 1998 *************** *** 384,390 **** */ int safe_copy_str(src, buff, bufp, max) ! char *src, *buff, **bufp; int max; { char *tp; --- 384,390 ---- */ int safe_copy_str(src, buff, bufp, max) ! const char *src; char *buff, **bufp; int max; { char *tp; diff -rcN mux-1.4p16.orig/src/timer.c mux-1.4p16/src/timer.c *** mux-1.4p16.orig/src/timer.c Wed Apr 16 07:01:57 1997 --- mux-1.4p16/src/timer.c Sat Jul 4 17:05:14 1998 *************** *** 139,144 **** --- 139,150 ---- } #endif + #ifdef SPACE + + spaceUpdate(); + + #endif + /* * reset alarm */ diff -rcN mux-1.4p16.orig/src/version.c mux-1.4p16/src/version.c *** mux-1.4p16.orig/src/version.c Wed Apr 16 07:02:06 1997 --- mux-1.4p16/src/version.c Sat Jul 4 17:05:14 1998 *************** *** 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); }