~z88dk-team/z88dk-pkg/trunk

« back to all changes in this revision

Viewing changes to libsrc/rect/r_IsRectInRect16.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 r_IsRectInRect16
 
6
LIB RIsRectInRect16
 
7
 
 
8
; int r_IsRectInRect16(struct r_Rect16 *r1, struct r_Rect16 *r2)
 
9
 
 
10
.r_IsRectInRect16
 
11
 
 
12
   ld hl,5
 
13
   add hl,sp
 
14
   ld d,(hl)
 
15
   dec hl
 
16
   ld e,(hl)
 
17
   dec hl
 
18
   push de
 
19
   ld d,(hl)
 
20
   dec hl
 
21
   ld e,(hl)
 
22
   ex de,hl
 
23
   ld c,(hl)
 
24
   inc hl
 
25
   ld b,(hl)
 
26
   inc hl
 
27
   ld e,(hl)
 
28
   inc hl
 
29
   ld d,(hl)
 
30
   inc hl
 
31
   ex (sp),hl
 
32
   ld a,(hl)
 
33
   inc hl
 
34
   push hl
 
35
   ld h,(hl)
 
36
   ld l,a
 
37
 
 
38
   ; stack = r2.y, r1.width-1
 
39
 
 
40
   exx
 
41
   
 
42
   pop hl
 
43
   inc hl
 
44
   pop de
 
45
   ld a,(hl)
 
46
   inc hl
 
47
   ex af,af
 
48
   ld a,(hl)
 
49
   inc hl
 
50
   ld c,(hl)
 
51
   inc hl
 
52
   ld b,(hl)
 
53
   inc hl
 
54
   push bc
 
55
   ld c,(hl)
 
56
   inc hl
 
57
   ld b,(hl)
 
58
   push bc
 
59
   ex de,hl
 
60
   ld e,(hl)
 
61
   inc hl
 
62
   ld d,(hl)
 
63
   inc hl
 
64
   push de
 
65
   ld e,(hl)
 
66
   inc hl
 
67
   ld d,(hl)
 
68
   push de
 
69
   ld d,a
 
70
   ex af,af
 
71
   ld e,a
 
72
   
 
73
   exx
 
74
   
 
75
   call RIsRectInRect16
 
76
   ld hl,0
 
77
   ret nc
 
78
   inc l
 
79
   ret