home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / games / volume18 / spllcast / patch1 < prev    next >
Encoding:
Internet Message Format  |  1993-08-30  |  8.3 KB

  1. Path: uunet!news.tek.com!saab!billr
  2. From: billr@saab.CNA.TEK.COM (Bill Randle)
  3. Newsgroups: comp.sources.games
  4. Subject: v18i052:  spellcast - strategy game for X11, Patch1
  5. Date: 23 Jul 1993 22:25:16 GMT
  6. Organization: Tektronix, Inc, Redmond, OR, USA
  7. Lines: 233
  8. Approved: billr@saab.CNA.TEK.COM
  9. Message-ID: <22pogc$lgb@ying.cna.tek.com>
  10. NNTP-Posting-Host: saab.cna.tek.com
  11. Xref: uunet comp.sources.games:1852
  12.  
  13. Submitted-by: "Andrew C. Plotkin" <ap1i+@andrew.cmu.edu>
  14. Posting-number: Volume 18, Issue 52
  15. Archive-name: spellcast/patch1
  16. Patch-To: spellcast: Volume 18, Issue 27-33
  17. Environment: X11, Xlib
  18.  
  19.  
  20. [[From the author...
  21. The following patch file fixes a number of minor bugs. The biggest is that, 
  22. basically, SunOS hates realloc(), and I use realloc() all the time, so people 
  23. on Sun machines were getting incredible numbers of crashes and memory
  24. problems. The fix is to uncomment the line
  25. #OTHERLIBS = -lbsdmalloc
  26. in the patched Makefile, which links against a working malloc library.
  27.  
  28. Thanks to the many people who sent me bug reports and patches. There
  29. were a couple of actual game improvements, which are not included
  30. below. If I ever get around to the Great Rewrite, I'll put them in then.
  31.  
  32. Note: All of the bug fixes below were in my post to
  33. comp.sources.games.bugs on July 20th. (Except for the changes to
  34. patchlevel.h, Makefile, README.)
  35.  
  36. --Z]]
  37.  
  38. #! /bin/sh
  39. # This is a shell archive.  Remove anything before this line, then unpack
  40. # it by saving it into a file and typing "sh file".  To overwrite existing
  41. # files, type "sh file -c".  You can also feed this as standard input via
  42. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  43. # will see the following message at the end:
  44. #        "End of shell archive."
  45. # Contents:  patches01
  46. # Wrapped by billr@saab on Fri Jul 23 15:22:40 1993
  47. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  48. if test -f 'patches01' -a "${1}" != "-c" ; then 
  49.   echo shar: Will not clobber existing file \"'patches01'\"
  50. else
  51. echo shar: Extracting \"'patches01'\" \(6055 characters\)
  52. sed "s/^X//" >'patches01' <<'END_OF_FILE'
  53. Xdiff -c ./Makefile /tmp/nspel/Makefile
  54. X*** ./Makefile    Fri Jul 23 15:44:17 1993
  55. X--- /tmp/nspel/Makefile    Fri Jul 23 14:46:32 1993
  56. X***************
  57. X*** 18,23 ****
  58. X--- 18,27 ----
  59. X  DESTMAN=$(DESTDIR)/man/man6
  60. X  DESTLIB=$(DESTDIR)/lib/spellcast
  61. X  
  62. X+ # If you are compiling on a Sun and you find the game crashes
  63. X+ # all the time, try uncommenting the next line.
  64. X+ #OTHERLIBS = -lbsdmalloc
  65. X+ 
  66. X  CFLAGS = -g -I/usr/local/include -I./bitmaps -DBODYFONT=$(FONT1) \
  67. X      -DBODYFONT_ALT=$(FONT2) -DBODYFONT_ALT2=$(FONT3) -DTRANSCRIPTDIR=$(LOGDIR)
  68. X  LFLAGS = -g
  69. X***************
  70. X*** 31,37 ****
  71. X  
  72. X  # spellcast: the X executable
  73. X  spellcast: $(OBJS) $(XOBJS)
  74. X!     $(CC) $(LFLAGS) -o spellcast $(OBJS) $(XOBJS) $(XLIB)
  75. X  
  76. X  # stupid: the stupid stdin/stdout version of the game
  77. X  stupid: stupid.o $(OBJS)
  78. X--- 35,41 ----
  79. X  
  80. X  # spellcast: the X executable
  81. X  spellcast: $(OBJS) $(XOBJS)
  82. X!     $(CC) $(LFLAGS) -o spellcast $(OBJS) $(XOBJS) $(XLIB) $(OTHERLIBS)
  83. X  
  84. X  # stupid: the stupid stdin/stdout version of the game
  85. X  stupid: stupid.o $(OBJS)
  86. Xdiff -c ./README /tmp/nspel/README
  87. X*** ./README    Fri Jul 23 15:44:16 1993
  88. X--- /tmp/nspel/README    Fri Jul 23 14:43:23 1993
  89. X***************
  90. X*** 7,14 ****
  91. X  exhaustive detail.
  92. X  
  93. X  Compiling should be straightforward; spellcast uses only 
  94. X! Xlib, with no widget sets or other libraries. The Makefile
  95. X! begins with a few definitions which you can change:
  96. X  the directories where everything gets installed;
  97. X  the default fonts that the program tries to load (usually 
  98. X      times 14, helvetica 12, and fixed, in that order);
  99. X--- 7,22 ----
  100. X  exhaustive detail.
  101. X  
  102. X  Compiling should be straightforward; spellcast uses only 
  103. X! Xlib, with no widget sets or other libraries. 
  104. X! 
  105. X! NOTE: Some (all?) versions of SunOS have a buggy
  106. X! realloc(), which causes spellcast to crash early and often.
  107. X! If you're on a Sparc and you have this problem, the fix
  108. X! is to compile with -lbsdmalloc. Uncomment the OTHERLIBS
  109. X! line in the Makefile.
  110. X! 
  111. X! The Makefile begins with a few definitions which you 
  112. X! can change:
  113. X  the directories where everything gets installed;
  114. X  the default fonts that the program tries to load (usually 
  115. X      times 14, helvetica 12, and fixed, in that order);
  116. Xdiff -c ./engine.c /tmp/nspel/engine.c
  117. X*** ./engine.c    Fri Jul 23 15:46:05 1993
  118. X--- /tmp/nspel/engine.c    Tue Jul 20 15:06:24 1993
  119. X***************
  120. X*** 73,78 ****
  121. X--- 73,80 ----
  122. X      fred->both.fl_resist_heat = 0;
  123. X      fred->both.resistant_cold = 0;
  124. X      fred->both.fl_resist_cold = 0;
  125. X+     fred->both.fl_resist_icestorm = 0;
  126. X+     fred->both.mind_spell = -1;
  127. X      fred->both.disease_time = (-1);
  128. X      fred->both.poison_time = (-1);
  129. X      fred->both.prot_from_evil = 0;
  130. X***************
  131. X*** 96,105 ****
  132. X--- 98,110 ----
  133. X      fred->both.prot_from_evil = 0;
  134. X      fred->both.haste = 0;
  135. X      fred->both.timestop = 0;
  136. X+     fred->both.invisibility = 0;
  137. X+     fred->both.blindness = 0;
  138. X      fred->both.poison_time = -1;
  139. X      fred->both.disease_time = -1;
  140. X      fred->both.mind_spell = -1;
  141. X      clear_permstats(&(fred->both.perm));
  142. X+     clear_round(fred);
  143. X  }
  144. X  
  145. X  char *gesture_name(val)
  146. Xdiff -c ./execute.c /tmp/nspel/execute.c
  147. X*** ./execute.c    Fri Jul 23 15:45:56 1993
  148. X--- /tmp/nspel/execute.c    Tue Jul 20 13:29:05 1993
  149. X***************
  150. X*** 11,17 ****
  151. X  static void exec_counters(), exec_summons(), check_elements(), exec_cancels(), exec_protects();
  152. X  extern void exec_enchants(), exec_attacks(), exec_heals();
  153. X  
  154. X! static void clear_round(fred)
  155. X  union being *fred;
  156. X  {
  157. X      int ix;
  158. X--- 11,17 ----
  159. X  static void exec_counters(), exec_summons(), check_elements(), exec_cancels(), exec_protects();
  160. X  extern void exec_enchants(), exec_attacks(), exec_heals();
  161. X  
  162. X! void clear_round(fred)
  163. X  union being *fred;
  164. X  {
  165. X      int ix;
  166. Xdiff -c ./patchlevel.h /tmp/nspel/patchlevel.h
  167. X*** ./patchlevel.h    Fri Jul 23 15:44:38 1993
  168. X--- /tmp/nspel/patchlevel.h    Fri Jul 23 14:35:02 1993
  169. X***************
  170. X*** 1 ****
  171. X! #define PATCHLEVEL "0"
  172. X--- 1 ----
  173. X! #define PATCHLEVEL "1"
  174. Xdiff -c ./xloop.c /tmp/nspel/xloop.c
  175. X*** ./xloop.c    Fri Jul 23 15:44:32 1993
  176. X--- /tmp/nspel/xloop.c    Tue Jul 20 14:09:28 1993
  177. X***************
  178. X*** 300,310 ****
  179. X      py = &(players[pnum]);
  180. X      for (ix=0; ix<py->sistats.visible; ix++) {
  181. X          qline = py->sistats.top + ix;
  182. X          if (py->statlist[qline].type == QuVal_Target_Wizard
  183. X          && py->statlist[qline].index == pdonenum)
  184. X          break;
  185. X      }
  186. X!     if (ix<py->sistats.visible) {
  187. X          ypos = STATS_Y+ix*py->lineheight+py->lineheight;
  188. X          py->gotexpose = 1;
  189. X          if (!py->backstore) {
  190. X--- 300,312 ----
  191. X      py = &(players[pnum]);
  192. X      for (ix=0; ix<py->sistats.visible; ix++) {
  193. X          qline = py->sistats.top + ix;
  194. X+         if (qline >= py->sistats.nlines) break;
  195. X          if (py->statlist[qline].type == QuVal_Target_Wizard
  196. X          && py->statlist[qline].index == pdonenum)
  197. X          break;
  198. X      }
  199. X!     if (ix<py->sistats.visible
  200. X!         && !(qline >= py->sistats.nlines)) {
  201. X          ypos = STATS_Y+ix*py->lineheight+py->lineheight;
  202. X          py->gotexpose = 1;
  203. X          if (!py->backstore) {
  204. Xdiff -c ./xtalk.c /tmp/nspel/xtalk.c
  205. X*** ./xtalk.c    Fri Jul 23 15:44:40 1993
  206. X--- /tmp/nspel/xtalk.c    Tue Jul 20 15:56:31 1993
  207. X***************
  208. X*** 123,128 ****
  209. X--- 123,129 ----
  210. X          redraw_talk_only(py, 1);
  211. X          break;
  212. X          case '\177':
  213. X+         case '\010':
  214. X          if (py->talk_pt) {
  215. X              py->talk_pt--;
  216. X              for (cp = &(py->talk_buf[py->talk_pt]); *cp; cp++)
  217. Xdiff -c ./xtext.c /tmp/nspel/xtext.c
  218. X*** ./xtext.c    Fri Jul 23 15:44:34 1993
  219. X--- /tmp/nspel/xtext.c    Fri Jul 23 15:45:34 1993
  220. X***************
  221. X*** 115,121 ****
  222. X      /* len will not be computed until line is finished */
  223. X      py->lineindex[ln+1].width = 0;
  224. X      start = NULL;
  225. X!     if (py->lineindex[ln+1].start >= py->linebuf_size+MAXLINESIZE) {
  226. X      py->linebuf_size *= 2;
  227. X      py->linebuf = (char *)realloc(py->linebuf, py->linebuf_size);
  228. X      }
  229. X--- 115,121 ----
  230. X      /* len will not be computed until line is finished */
  231. X      py->lineindex[ln+1].width = 0;
  232. X      start = NULL;
  233. X!     if (py->lineindex[ln+1].start+MAXLINESIZE >= py->linebuf_size) {
  234. X      py->linebuf_size *= 2;
  235. X      py->linebuf = (char *)realloc(py->linebuf, py->linebuf_size);
  236. X      }
  237. X
  238. END_OF_FILE
  239. if test 6055 -ne `wc -c <'patches01'`; then
  240.     echo shar: \"'patches01'\" unpacked with wrong size!
  241. fi
  242. # end of 'patches01'
  243. fi
  244. echo shar: End of shell archive.
  245. exit 0
  246.