~z88dk-team/z88dk-pkg/trunk

« back to all changes in this revision

Viewing changes to libsrc/rect/RIsPtInRect8.asm

  • Committer: Bazaar Package Importer
  • Author(s): Luca Falavigna
  • Date: 2008-02-12 08:23:49 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20080212082349-wgijt44scmgje90o
Tags: 1.7.ds1-1ubuntu1
* Merge from Debian unstable. Remaining Ubuntu changes:
  - build z88dk and z88dk-bin binary packages for lpia too
  - update Maintainer field as per spec

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
; Rectangle, Intervals and Points
 
3
; 05.2006 aralbrec
 
4
 
 
5
XLIB RIsPtInRect8
 
6
 
 
7
; Determine if 8-bit (x,y) point lies in an 8-bit bounding
 
8
; rectangle.  Rectangle bounds wrap across 0-255 boundaries.
 
9
;
 
10
; enter :  a = x coordinate of point
 
11
;          l = y coordinate of point
 
12
;          b = x coordinate of rect
 
13
;          c = width of rect
 
14
;          d = y coordinate of rect
 
15
;          e = height of rect
 
16
; exit  : carry flag set = in rectangle
 
17
; uses  : af
 
18
 
 
19
.RIsPtInRect8
 
20
 
 
21
   sub b
 
22
   cp c
 
23
   ret nc
 
24
   
 
25
   ld a,l
 
26
   sub d
 
27
   cp e
 
28
   ret