home *** CD-ROM | disk | FTP | other *** search
/ RISC DISC 1 / RISC_DISC_1.iso / pd_share / code / desklib / Libraries / Sprite / s / WimpPlot < prev   
Encoding:
Text File  |  1994-03-02  |  2.1 KB  |  70 lines

  1. ;
  2. ;       Title                  : Wimp Plot
  3. ;       System                 : Sprite Library
  4. ;       Version                : 1.0
  5. ;       Copyright              : (C) Ainsley Pereira
  6. ;       Date                   : Sun 27th February 94
  7. ;       Author                 : Ainsley M. Pereira
  8. ;
  9. ;       Function               : Plots sprite in window
  10. ;
  11. ;
  12. ;       Modification history.
  13. ;
  14. ;       Version                : (Reflect in header IDENT)
  15. ;       Date                   : 
  16. ;       Author                 : 
  17. ;       Changes                : 
  18. ;
  19. ;
  20. ;============================================================================
  21. ;
  22. ;  Include files.
  23. ;
  24. ;============================================================================
  25. ;
  26.         GET     h.regdefs
  27.         GET     h.swinos
  28.         GET     h.macros
  29. ;
  30. ;============================================================================
  31. ;
  32. ;  Code.
  33. ;
  34. ;============================================================================
  35. ;
  36.         PREAMBLE
  37.         STARTCODE Sprite_WimpPlot
  38. ;
  39.         MOV       ip, sp
  40.         STMFD     sp!, {a1-a4, v1-v6, lr}
  41.         SUB       v3, sp, #16               ; v3 -> scale block
  42.         SUB       v4, v6, #16               ; v4 -> pix trans block
  43.         SUB       sp, sp, #32
  44.         MOV       a3,a2
  45.         MOV       a2,a1
  46.         MOV       a1,#&100
  47.         SWI       Wimp_ReadPixTrans + XOS_Bit
  48.         LDR       v6, [sp, #32 +8]
  49.         LDR       v5, [v6, #4]    ; Y
  50.         LDR       v1, [a4, #20]   ; scroll.y
  51.         SUB       v5, v5, v1      ; y - scroll.y
  52.         LDR       v1, [a4, #12]   ; screenrect.max.y
  53.         ADD       v1, v5, v1
  54.         LDR       v5, [v6]        ; X
  55.         LDR       v6, [a4, #16]   ; scroll.x
  56.         SUB       v5, v5, v6      ; x - scroll.x
  57.         LDR       v6, [a4, #0]    ; screenrect.min.x
  58.         ADD       a4, v5, v6
  59.         LDR       v2, [ip]
  60.         LDR       a3, [sp, #32 +4]
  61.         LDR       a2, [sp, #32 +0]
  62.         MOV       a1,#256
  63.         ADD      a1, a1, #52
  64.         SWI       OS_SpriteOp + XOS_Bit
  65.         ADD       sp, sp, #36
  66.         MOVVC     a1, #0
  67.         LDMFD     sp!, {a2-a4, v1-v6, pc}^
  68. ;
  69.     END
  70.