home *** CD-ROM | disk | FTP | other *** search
/ Stars of Shareware: Animation & Sound / SOS-ANIM_SOUND.ISO / archiv / alphapci.zip / BOBS.TXT < prev    next >
Text File  |  1993-07-23  |  846b  |  25 lines

  1. ;-------------
  2. ; Shadebobs
  3. ;-------------
  4.  
  5. In "Unreal", "Amnesia", "Delusion" and others there is a sort of shadebob
  6. technique that is used. This technique is pretty simple, any demo maker
  7. knows much slicker routines than this one, but this will give everyone else
  8. some ideas on how it's done.
  9.  
  10. What you do is move a set of X and Y coordinates around as you please. These
  11. represent the upper left corner of the bob. Then, you call a subroutine to
  12. draw the bob. The easiest way to explain this is a BASIC code chunk.
  13.  
  14. DEF SEG = &HA000
  15. FOR BX = X TO X+SHADEBOBSIZE
  16.   FOR BY = Y TO Y+SHADEBOBSIZE
  17.     POKE (Y*320+X),PEEK(Y*320+X)+4
  18.   NEXT BY
  19. NEXT BX
  20.  
  21. This is obviously going to be VERY slow... but with a little work, you can
  22. crank it out in ASM and even this algorithm (which is the one I used) can move
  23. at a decent speed.
  24.  
  25.