home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 3 / 3019 < prev    next >
Encoding:
Internet Message Format  |  1991-03-08  |  1.6 KB

  1. From: nazgul@alphalpha.com (Kee Hinckley)
  2. Newsgroups: alt.sources
  3. Subject: Re: oneko dumps core!
  4. Message-ID: <1991Mar7.070930.3084@alphalpha.com>
  5. Date: 7 Mar 91 07:09:30 GMT
  6.  
  7. In article <MICHEL.91Mar5164822@eutes3.es.ele.tue.nl> michel@es.ele.tue.nl (Michel Berkelaar) writes:
  8. >
  9. >The oneko version I took from alt.sources dumps core on Apollo workstations
  10. >and an Alliant FX/8 computer in our group, whether compiled with cc or gcc.
  11. >It looks as if it can only work with compilers which allow NULL pointer
  12. >dereferencing ... Or else something is going wrong completely.
  13.  
  14. The declaration
  15.  
  16. Animation    AnimationPattern[][2] =
  17.  
  18. looks bogus to me.  Although I'm not sure why the compiler didn't
  19. complain.  If you put in actual lengths there you'll get a complaint
  20. because the bracketed structures ought to be double bracketed in pairs
  21. for each subarray.
  22.  
  23. I changed it to 
  24.  
  25. Animation    AnimationPattern[] =
  26.  
  27. Then change the references to:
  28.  
  29.     if (NekoState != NEKO_SLEEP) {
  30.     DrawNeko(NekoX, NekoY,
  31.         AnimationPattern[(NekoTickCount & 0x1) + NekoState*2]);
  32.     } else {
  33.     DrawNeko(NekoX, NekoY,
  34.         AnimationPattern[((NekoTickCount >> 2) & 0x1) + NekoState*2]);
  35.  
  36.  
  37. Now, can anyone figure out a way to get the cat to show up without
  38. a white box around her, or does that require the SHAPE extension?
  39.  
  40. -- 
  41. Alfalfa Software, Inc.          |       Poste:  The EMail for Unix
  42. nazgul@alfalfa.com              |       Send Anything... Anywhere
  43. 617/646-7703 (voice/fax)        |       info@alfalfa.com
  44.  
  45. I'm not sure which upsets me more: that people are so unwilling to accept
  46. responsibility for their own actions, or that they are so eager to regulate
  47. everyone else's.
  48.