Fix: SE028 Problem: Conditional compilation is broken in a number of ways in 5E7. There are problems with FIREARMS, DWARF and FILE_AREAS. Compatible with: Slash'EM 0.0.5E7 (DOS only) Author: J. Ali Harlow, ali@avrc.city.ac.uk Date: 2 Dec 1999 *** src/mkobj.c.orig Wed Dec 1 15:24:26 1999 --- src/mkobj.c Wed Dec 1 16:17:15 1999 *************** *** 356,365 **** --- 356,367 ---- otmp->opoisoned = 1; if (artif && !rn2(20)) otmp = mk_artifact(otmp, (aligntyp)A_NONE); + #ifdef FIREARMS if (otmp->otyp == STICK_OF_DYNAMITE) { otmp->age = (otmp->cursed ? rn2(15) + 2 : (otmp->blessed ? 15 : rn2(10) + 10)); } + #endif break; case FOOD_CLASS: otmp->oeaten = 0; *** src/timeout.c.orig Wed Dec 1 16:32:33 1999 --- src/timeout.c Wed Dec 1 16:44:38 1999 *************** *** 566,571 **** --- 566,572 ---- return; } + #ifdef FIREARMS /* Attach an explosion timeout to a given explosive device */ void attach_bomb_blow_timeout(bomb, fuse, yours) *************** *** 642,647 **** --- 643,649 ---- obfree(bomb, (struct obj *)0); if (redraw) newsym(x, y); } + #endif /* Attach an egg hatch timeout to the given egg. */ void *************** *** 1614,1624 **** TTAB(burn_object, "burn_object"), TTAB(hatch_egg, "hatch_egg"), TTAB(unpoly_mon, "unpoly_mon"), ! #ifdef UNPOLYPILE TTAB(bomb_blow, "bomb_blow"), ! TTAB(unpoly_obj, "unpoly_obj") ! #else ! TTAB(bomb_blow, "bomb_blow") #endif }; #undef TTAB --- 1616,1626 ---- TTAB(burn_object, "burn_object"), TTAB(hatch_egg, "hatch_egg"), TTAB(unpoly_mon, "unpoly_mon"), ! #ifdef FIREARMS TTAB(bomb_blow, "bomb_blow"), ! #endif ! #ifdef UNPOLYPILE ! TTAB(unpoly_obj, "unpoly_obj"), #endif }; #undef TTAB *** win/share/tilemap.c.orig Wed Dec 1 17:01:25 1999 --- win/share/tilemap.c Wed Dec 1 17:01:30 1999 *************** *** 84,90 **** #ifndef DWARF { MON_GLYPH, PM_TRANSMUTER, "Smaug" }, - { MON_GLYPH, PM_SHIFTER*, "dwarf warrior" }, #endif #ifndef YEOMAN --- 84,89 ---- *************** *** 113,124 **** --- 112,125 ---- { OBJ_GLYPH, SLING, "shotgun" }, { OBJ_GLYPH, SLING, "auto shotgun" }, { OBJ_GLYPH, SLING, "rocket launcher" }, + { OBJ_GLYPH, SLING, "grenade launcher" }, { OBJ_GLYPH, SLING, "bullet" }, { OBJ_GLYPH, SLING, "silver bullet" }, { OBJ_GLYPH, SLING, "shotgun shell" }, { OBJ_GLYPH, SLING, "rocket" }, { OBJ_GLYPH, SLING, "frag grenade" }, { OBJ_GLYPH, SLING, "gas grenade" }, + { OBJ_GLYPH, SLING, "stick of dynamite" }, #endif #ifndef KOPS *** win/X11/wintext.c.orig Wed Dec 1 17:27:32 1999 --- win/X11/wintext.c Wed Dec 1 17:28:18 1999 *************** *** 595,601 **** --- 595,606 ---- attributes.valuemask = XpmCloseness; attributes.closeness = 65535; /* Try anything */ + + #ifndef FILE_AREAS + rip_file = appResources.tombstone; + #else rip_file = make_file_name(FILE_AREA_SHARE, appResources.tombstone); + #endif errorcode = XpmReadFileToImage(XtDisplay(parent), rip_file, &rip_image, 0, &attributes); free(rip_file); *** include/dlb.h.orig Thu Dec 2 09:30:58 1999 --- include/dlb.h Thu Dec 2 09:33:13 1999 *************** *** 69,75 **** --- 69,79 ---- # define dlb_init() # define dlb_cleanup() + #ifndef FILE_AREAS # define dlb_fopen fopen + #else + # define dlb_fopen_area fopen_datafile_area + #endif # define dlb_fclose fclose # define dlb_fread fread # define dlb_fseek fseek *** sys/unix/Makefile.utl.orig Thu Dec 2 10:08:00 1999 --- sys/unix/Makefile.utl Thu Dec 2 10:08:49 1999 *************** *** 249,255 **** dlb: dlb_main.o ../src/dlb.o ../src/alloc.o panic.o $(CC) $(LFLAGS) -o dlb dlb_main.o ../src/dlb.o ../src/alloc.o panic.o ! dlb_main.o: dlb_main.c ../include/config.h ../include/dlb.h $(CC) $(CFLAGS) -c dlb_main.c # dependencies for tile utilities --- 249,256 ---- dlb: dlb_main.o ../src/dlb.o ../src/alloc.o panic.o $(CC) $(LFLAGS) -o dlb dlb_main.o ../src/dlb.o ../src/alloc.o panic.o ! dlb_main.o: dlb_main.c ../include/config.h ../include/dlb.h \ ! ../include/unixconf.h $(CC) $(CFLAGS) -c dlb_main.c # dependencies for tile utilities