home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 1414 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.3 KB

  1. Path: informatik.tu-muenchen.de!fischerj
  2. From: fischerj@informatik.tu-muenchen.de (Juergen "Rally" Fischer)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: CODER NEEDED !
  5. Date: 18 Jan 1996 19:38:58 GMT
  6. Organization: Technische Universitaet Muenchen, Germany
  7. Distribution: world
  8. Message-ID: <4dm7ki$quu@sunsystem5.informatik.tu-muenchen.de>
  9. References: <w7lPPMD0aez4@p09.hotline.pfalz.de>
  10. NNTP-Posting-Host: hphalle5.informatik.tu-muenchen.de
  11. Originator: fischerj@hphalle5.informatik.tu-muenchen.de
  12.  
  13.  
  14. In article <w7lPPMD0aez4@p09.hotline.pfalz.de>, ROI@hotline.pfalz.de (Roi@hotline.pfalz.de) writes:
  15. |> Hello !
  16. |> 
  17. |> I am desperatly looking for a programmer who is able to
  18. |> develop fast routines for zooming/scaling and rotating
  19. |> sprites !
  20. |> The sprites are in 32 colours and the routine is needed
  21. |> for a Space-Combat-Simulator such as WingCommander.
  22.  
  23. Oki, I read this as rotzoomer on A500. Not easy.
  24. seems to be better if not c2ping whole disply.
  25. you wanna go 1x1 ? wow :)
  26.  
  27. I'd suggest to
  28.  
  29. 1) rotzoom the sprite to a planar bitmap with cpu
  30. 2) copy & stamp with blitter (so cpu rotzoomer doesn't need to handle
  31.    transparent pixels)
  32.  
  33. Fastest method would be a ship only having 3 out of 32 colors (only 3 :\)
  34.  
  35. reason: we puzzle together the data of planes in a word-register
  36.  
  37. add.w offset0(A0),d0  -------1-------0 <- this is how a pixel in source looks 
  38.                             ^plane1 ^plane0
  39.  
  40. add.w d0,d0
  41. add.w offset1(A0),d0  ------11------00
  42.  
  43. do this 8 times and you get: 1111111100000000 2 planar bytes.
  44.  
  45. you can now let cpu store the bytes to the planes separately or
  46. just store .w and let the blitter sort it (needs 1 pass) out before doing 2)
  47.  
  48. the longword method gives you 16 colors out of 32:
  49.  
  50. -------3-------2-------1-------0
  51.  
  52. but source data needs lot of mem (4byte/pixel!) and .l operations
  53. are evil to 68k...
  54.  
  55. another one: word again, but nibbles, best imho for 68000 doing 16 colors.
  56.  
  57. ---3---2---1---0   let the blitter sort the nibbles to plane (needs 2 passes)
  58.  
  59. on A1200 I would suggest to do a chunky to planar routine.
  60. I don't know, maybe blitter4pass is not that bad on A500 ?
  61.  
  62. don't know...
  63.  
  64. |> Any suggestions about the method or the maths of doing
  65. |> such routines are welcome !
  66. |> 
  67. |> Thank You,
  68. |> 
  69. |> Roi
  70. |> 
  71. ------------------------------------------------------------------------
  72.    fischerj@Informatik.TU-Muenchen.DE (Juergen "Rally" Fischer)   =:)
  73.  
  74.