[comp.sources.games.bugs] wanderer 2.2 - a question about balloons

dg@lakart.UUCP (David Goodenough) (11/29/88)

I have ported wanderer 2.2 to my CP/M machine at home, and as has been
noted, due to stack space limitations, I had to completely re-write.
Along the way the code got put in place so that I can push balloons
aside. So in the situation below:

	O
	^@

I'd be able to push the balloon to the left, move back to the right, and
let the boulder fall. In the version on lakart (BSD4.3) I can't do that.
Is my version at home broken, or the version at lakart. Comments please
anyone (preferable Mr. Shipway)
-- 
	dg@lakart.UUCP - David Goodenough		+---+
							| +-+-+
	....... !harvard!xait!lakart!dg			+-+-+ |
AKA:	dg%lakart.uucp@harvard.harvard.edu	  	  +---+

dg@lakart.UUCP (David Goodenough) (11/29/88)

In article <353@lakart.UUCP> dg@lakart.UUCP (I) write:
>I have ported wanderer 2.2 to my CP/M machine at home, and as has been
>noted, due to stack space limitations, I had to completely re-write.
>Along the way the code got put in place so that I can push balloons
>aside. [which appeared to be absent from the version on lakart]

UGH - found the problem. I'm posting it because there may be others
who are suffering the same trouble. I took the posting of differences,
wrapped it up by going:

patch game.c - << FUNKY_STUFF
	...............
	patches go here
	...............
FUNKY_STUFF

and passed the whole mess to /bin/sh. I didn't keep an eye on what was
happening, and didn't notice that patch choked on the game.c bit (it
choked in a couple of other places, but saved the errors to xxxxx.rej).
game.c didn't patch because of backslashes on the end of lines, so
I was playing with everything set for 2.2, except I still had a 2.0
game.c. This caused my inability to shove the ballons around.

As an aside, all the .rej errors I got were also caused by backslashes:
notably in icon.c where a boulder has:

	"\\_/"

in it, but the patch file just said:

	"\_/"

This is why patch couldn't grok it, and generated a .rej file.
-- 
	dg@lakart.UUCP - David Goodenough		+---+
							| +-+-+
	....... !harvard!xait!lakart!dg			+-+-+ |
AKA:	dg%lakart.uucp@harvard.harvard.edu	  	  +---+

cosell@bbn.com (Bernie Cosell) (12/01/88)

In article <354@lakart.UUCP> dg@lakart.UUCP (David Goodenough) writes:
}In article <353@lakart.UUCP> dg@lakart.UUCP (I) write:
}>I have ported wanderer 2.2 to my CP/M machine at home, and as has been
}>noted, due to stack space limitations, I had to completely re-write.
}>Along the way the code got put in place so that I can push balloons
}>aside. [which appeared to be absent from the version on lakart]
}
}UGH - found the problem. I'm posting it because there may be others
}who are suffering the same trouble. I took the posting of differences,
}wrapped it up by going:
}
}patch game.c - << FUNKY_STUFF
}	...............
}	patches go here
}	...............
}FUNKY_STUFF

Actually, you DIDNT find the problem: you found the *symptom*.  Quoting
from the sh(1) man page entry for "<<word":

    If any character of {\it word} is quoted, no interpretation is placed
    upon the characters of the document; otherwise parameter and command
    substitution occurse, {\bf \\newline} is ignored, and \\ is used to quote
    the characters \\ \$ and ' and the first character of {\it word}.

In short, it means that if you want the shell to *see* the here document, you
write it the way you did (and now you have to double backslashes, worry about
dollar signs and all that crap).  OR you can opt to have the here document
passed through *uninterpreted* (as if it had single quotes around it), in
which case you should write:

       patch game.c - << \FUNKY_STUFF
    
   __
  /  )                              Bernie Cosell
 /--<  _  __  __   o _              BBN Sys & Tech, Cambridge, MA 02238
/___/_(<_/ (_/) )_(_(<_             cosell@bbn.com