Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
733 | serge | 1 | |
2 | SOLID_FILL equ 1 |
||
3 | LINE2P equ 2 |
||
4 | |||
5 | |||
6 | io.code equ esp+4 |
||
7 | io.input equ esp+8 |
||
8 | io.inp_size equ esp+12 |
||
9 | io.output equ esp+16 |
||
10 | io.out_size equ esp+20 |
||
11 | |||
12 | |||
13 | |||
14 | |||
15 | ; ebx= service version |
||
16 | ; eax= error code |
||
17 | ; 0= no error |
||
18 | ; -1= common error |
||
19 | |||
20 | |||
21 | |||
22 | |||
23 | mov eax, 68 |
||
24 | mov ebx, 16 |
||
25 | mov ecx, szHDraw |
||
26 | int 0x40 |
||
27 | |||
28 | |||
29 | test eax, eax |
||
30 | jz .fail |
||
31 | |||
32 | |||
33 | mov eax, esp |
||
34 | xor ebx, ebx |
||
35 | |||
36 | |||
37 | push eax ;.output |
||
38 | push ebx ;.inp_size |
||
39 | push ebx ;.input |
||
40 | push SRV_GETVERSION ;.code |
||
41 | push [HDraw] ;.handle |
||
42 | |||
43 | |||
44 | mov ebx, 17 |
||
45 | mov ecx, esp |
||
46 | int 0x40 |
||
47 | add esp, IOSIZE |
||
48 | pop ebx ;version |
||
49 | ret |
||
50 | .fail: |
||
51 | or eax, -1 |
||
52 | ret |
||
53 | |||
54 | |||
55 | ; eax= color |
||
56 | ; ebx= x |
||
57 | ; ecx= y |
||
58 | ; edx= w |
||
59 | ; esi= h |
||
60 | |||
61 | |||
62 | ; eax= error code |
||
63 | |||
64 | |||
65 | solid_fill: |
||
66 | |||
67 | |||
68 | push edx |
||
69 | push ecx |
||
70 | push ebx |
||
71 | push eax |
||
72 | |||
73 | |||
74 | mov ebx, esp ;FILL |
||
75 | |||
76 | |||
77 | push eax ;.output |
||
78 | push 5 ;.inp_size |
||
79 | push ebx ;.input |
||
80 | push SOLID_FILL ;.code |
||
81 | push [HDraw] ;.handle |
||
82 | |||
83 | |||
84 | mov ebx, 17 |
||
85 | mov ecx, esp |
||
86 | int 0x40 |
||
87 | add esp, (IOSIZE+5*4) ;io_control+FILL |
||
88 | ret |
||
89 | |||
90 | |||
91 | line2p: |
||
92 | push esi ;y2 |
||
93 | push edx ;x2 |
||
94 | push ecx ;y1 |
||
95 | push ebx ;x1 |
||
96 | push eax ;color |
||
97 | |||
98 | |||
99 | mov ebx, esp ;LINE2P |
||
100 | |||
101 | |||
102 | push eax ;.output |
||
103 | push 5 ;.inp_size |
||
104 | push ebx ;.input |
||
105 | push LINE2P ;.code |
||
106 | push [HDraw] ;.handle |
||
107 | |||
108 | |||
109 | mov ebx, 17 |
||
110 | mov ecx, esp |
||
111 | int 0x40 |
||
112 | add esp, (IOSIZE+5*4) ;io_control+LINE2P |
||
113 | ret |
||
114 | |||
115 | |||
116 | |||
117 | HDraw rd 1 |
||
118 | |||
119 | |||
120 |