Path: utzoo!attcan!uunet!lll-winken!lll-tis!helios.ee.lbl.gov!pasteur!ames!mailrus!tut.cis.ohio-state.edu!bloom-beacon!mit-eddie!bbn!gatech!rebel!didsgn!allan From: allan@didsgn.UUCP (didsgn) Newsgroups: comp.sources.games.bugs Subject: Re: play.c> and a fix(?) Summary: What about the assignment? Keywords: spacewar, bug, play.c Message-ID: <283@didsgn.UUCP> Date: 15 Jun 88 15:41:44 GMT References: <870@flatline.UUCP> Organization: Digital Design Inc., Norcross GA Lines: 32 In article <870@flatline.UUCP>, erict@flatline.UUCP (j eric townsend) writes: > In play.c around line 930 or so...: > for (i=0;i<3;++i) { > * ptorp->tp_pstn[i] = ADD(pcrft->cr_pstn[i], > * ptorp->tp_thr[i]=MUL(tmpvec[i],50.)); > ptorp->tp_vel[i] = ADD(pcrft->cr_vel[i],MUL(tmpvec[i],10.)); > } > etc.etc. > > The *'d lines cause a compiler error, of course. I'm not sure what > the author wanted to do, so I replaced the two *'d lines with: > > ptorp->tp_pstn[i]=ADD(pcrft->cr_pstn[i],MUL(tmpvec[i],50.)); > > I know that this ignores ptorp->tp_thr[i]. Maybe it doesn't matter? :-) > > What did you do to fix this? While I still can't link (I don't have the "dbm" routines), the play.c module does compile (I'm using Greenhills 1.8.0 Compiler on a CRDS UNOS (SYSV) machine). Your change above removes the assignment ptorp->tp_thr[i]=MUL(tmpvec[i],50.) If you change the *'d lines to the following, maybe your compiler will work. ptorp->tp_thr[i]=MUL(tmpvec[i],50.); ptorp->tp_pstn[i] = ADD(pcrft->cr_pstn[i], ptorp->tp_thr[i]); -Allan G. Schrum P.S. Does somebody have a SYSV module for the DBM stuff?