home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 22 / AACD 22.iso / AACD / Programming / powerd / lib / chunky.lha / chunky_ppc / PutPixelFast.ass < prev    next >
Encoding:
Text File  |  1980-07-13  |  505 b   |  20 lines

  1. # this function writes a coloured pixel into the chunky buffer
  2.  
  3. # use this function with care, it doesn't check for bounds or if chunky array is correct
  4.  
  5. # PutPixelFast(chunky:r3:PTR TO chunky,x:r4:LONG,y:r5:LONG,colour:r6:LONG)
  6.  
  7.     .text
  8.     .global    _PutPixelFast
  9.  
  10. _PutPixelFast:
  11.     lwz    r0,0(r3)
  12.     mullw    r5,r5,r0
  13.     add    r4,r5,r4        # r4 now contains position in buffer
  14.     lwz    r3,8(r3)        # r3 now contains pointer to chunky buffer
  15.     stbx    r6,r3,r4
  16.     blr
  17.  
  18.     .type    _PutPixelFast,@function
  19.     .size    _PutPixelFast,$-_PutPixelFast
  20.