Rev 3076 | Rev 3107 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3076 | Rev 3081 | ||
---|---|---|---|
1 | //CODED by Veliant, Leency, Nable. GNU GPL licence. |
1 | //CODED by Veliant, Leency, Nable. GNU GPL licence. |
2 | 2 | ||
3 | #startaddress 0 |
3 | #startaddress 0 |
4 | #code32 TRUE |
4 | #code32 TRUE |
5 | 5 | ||
6 | char os_name[8] = {'M','E','N','U','E','T','0','1'}; |
6 | char os_name[8] = {'M','E','N','U','E','T','0','1'}; |
7 | dword os_version = 0x00000001; |
7 | dword os_version = 0x00000001; |
8 | dword start_addr = #main; |
8 | dword start_addr = #main; |
9 | dword final_addr = #stop+32; |
9 | dword final_addr = #stop+32; |
10 | dword alloc_mem = #0x00100000; |
10 | dword alloc_mem = #0x00100000; |
11 | dword x86esp_reg = #0x00100000; |
11 | dword x86esp_reg = #0x00100000; |
12 | dword I_Param = #param; |
12 | dword I_Param = #param; |
13 | dword I_Path = #program_path; |
13 | dword I_Path = #program_path; |
14 | char param[4096]; |
14 | char param[4096]; |
15 | char program_path[4096]; |
15 | char program_path[4096]; |
16 | 16 | ||
17 | //Events |
17 | //Events |
18 | #define evMouse 6 |
18 | #define evMouse 6 |
19 | #define evButton 3 |
19 | #define evButton 3 |
20 | #define evKey 2 |
20 | #define evKey 2 |
21 | #define evReDraw 1 |
21 | #define evReDraw 1 |
22 | 22 | ||
23 | #define OLD -1 |
23 | #define OLD -1 |
24 | #define true 1 |
24 | #define true 1 |
25 | #define false 0 |
25 | #define false 0 |
26 | 26 | ||
27 | #define NULL 0 |
27 | #define NULL 0 |
28 | 28 | ||
29 | //Button options |
29 | //Button options |
30 | #define BT_DEL 0x80000000 |
30 | #define BT_DEL 0x80000000 |
31 | #define BT_HIDE 0x40000000 |
31 | #define BT_HIDE 0x40000000 |
32 | #define BT_NOFRAME 0x20000000 |
32 | #define BT_NOFRAME 0x20000000 |
33 | 33 | ||
34 | //------------------------------------------------------------------------- |
34 | //------------------------------------------------------------------------- |
35 | 35 | ||
36 | struct mouse |
36 | struct mouse |
37 | { |
37 | { |
38 | int x,y,lkm,pkm,hor,vert; |
38 | int x,y,lkm,pkm,hor,vert; |
39 | void get(); |
39 | void get(); |
40 | }; |
40 | }; |
41 | 41 | ||
42 | void mouse::get() |
42 | void mouse::get() |
43 | { |
43 | { |
44 | EAX = 37; |
44 | EAX = 37; |
45 | EBX = 1; |
45 | EBX = 1; |
46 | $int 0x40 |
46 | $int 0x40 |
47 | $mov ebx, eax |
47 | $mov ebx, eax |
48 | $shr eax, 16 |
48 | $shr eax, 16 |
49 | $and ebx,0x0000FFFF |
49 | $and ebx,0x0000FFFF |
50 | x = EAX; |
50 | x = EAX; |
51 | y = EBX; |
51 | y = EBX; |
52 | EAX = 37; |
52 | EAX = 37; |
53 | EBX = 2; |
53 | EBX = 2; |
54 | $int 0x40 |
54 | $int 0x40 |
55 | $mov ebx, eax |
55 | $mov ebx, eax |
56 | $and eax, 0x00000001 |
56 | $and eax, 0x00000001 |
57 | $shr ebx, 1 |
57 | $shr ebx, 1 |
58 | $and ebx, 0x00000001 |
58 | $and ebx, 0x00000001 |
59 | lkm = EAX; |
59 | lkm = EAX; |
60 | pkm = EBX; |
60 | pkm = EBX; |
61 | EAX = 37; //áªà®«« |
61 | EAX = 37; //áªà®«« |
62 | EBX = 7; |
62 | EBX = 7; |
63 | $int 0x40 |
63 | $int 0x40 |
64 | $mov ebx, eax |
64 | $mov ebx, eax |
65 | $shr eax, 16 |
65 | $shr eax, 16 |
66 | $and ebx,0x0000FFFF |
66 | $and ebx,0x0000FFFF |
67 | //hor = EAX; |
67 | //hor = EAX; |
68 | vert = EBX; |
68 | vert = EBX; |
69 | } |
69 | } |
70 | 70 | ||
71 | 71 | ||
72 | struct system_colors |
72 | struct system_colors |
73 | { |
73 | { |
74 | dword frame,grab,grab_button,grab_button_text,grab_text, |
74 | dword frame,grab,grab_button,grab_button_text,grab_text, |
75 | work,work_button,work_button_text,work_text,work_graph; |
75 | work,work_button,work_button_text,work_text,work_graph; |
76 | void get(); |
76 | void get(); |
77 | }; |
77 | }; |
78 | 78 | ||
79 | void system_colors::get() |
79 | void system_colors::get() |
80 | { |
80 | { |
81 | EAX = 48; |
81 | EAX = 48; |
82 | EBX = 3; |
82 | EBX = 3; |
83 | ECX = #frame; |
83 | ECX = #frame; |
84 | EDX = 40; |
84 | EDX = 40; |
85 | $int 0x40 |
85 | $int 0x40 |
86 | } |
86 | } |
87 | 87 | ||
88 | //------------------------------------------------------------------------------ |
88 | //------------------------------------------------------------------------------ |
89 | 89 | ||
90 | inline fastcall dword WaitEvent() |
90 | inline fastcall dword WaitEvent() |
91 | { |
91 | { |
92 | $mov eax,10 |
92 | $mov eax,10 |
93 | $int 0x40 |
93 | $int 0x40 |
94 | } |
94 | } |
95 | 95 | ||
96 | inline fastcall dword CheckEvent() |
96 | inline fastcall dword CheckEvent() |
97 | { |
97 | { |
98 | $mov eax,11 |
98 | $mov eax,11 |
99 | $int 0x40 |
99 | $int 0x40 |
100 | } |
100 | } |
101 | 101 | ||
102 | inline fastcall dword WaitEventTimeout( EBX) |
102 | inline fastcall dword WaitEventTimeout( EBX) |
103 | { |
103 | { |
104 | $mov eax,23 |
104 | $mov eax,23 |
105 | $int 0x40 |
105 | $int 0x40 |
106 | } |
106 | } |
107 | 107 | ||
108 | inline fastcall SetEventMask( EBX) |
108 | inline fastcall SetEventMask( EBX) |
109 | { |
109 | { |
110 | $mov eax,40 |
110 | $mov eax,40 |
111 | $int 0x40 |
111 | $int 0x40 |
112 | } |
112 | } |
113 | 113 | ||
114 | inline fastcall ScancodesGeting(){ |
114 | inline fastcall ScancodesGeting(){ |
115 | $mov eax,66 |
115 | $mov eax,66 |
116 | $mov ebx,1 |
116 | $mov ebx,1 |
117 | $mov ecx,1 //᪠ª®¤ë |
117 | $mov ecx,1 //᪠ª®¤ë |
118 | $int 0x40 |
118 | $int 0x40 |
119 | } |
119 | } |
120 | 120 | ||
121 | inline fastcall word GetKey() //+Gluk fix |
121 | inline fastcall word GetKey() //+Gluk fix |
122 | { |
122 | { |
123 | $push edx |
123 | $push edx |
124 | @getkey: |
124 | @getkey: |
125 | $mov eax,2 |
125 | $mov eax,2 |
126 | $int 0x40 |
126 | $int 0x40 |
127 | $cmp eax,1 |
127 | $cmp eax,1 |
128 | $jne getkeyi |
128 | $jne getkeyi |
129 | $mov ah,dh |
129 | $mov ah,dh |
130 | $jmp getkeyii //jz? |
130 | $jmp getkeyii //jz? |
131 | @getkeyi: |
131 | @getkeyi: |
132 | $mov dh,ah |
132 | $mov dh,ah |
133 | $jmp getkey |
133 | $jmp getkey |
134 | @getkeyii: |
134 | @getkeyii: |
135 | $pop edx |
135 | $pop edx |
136 | $shr eax,8 |
136 | $shr eax,8 |
137 | } |
137 | } |
138 | 138 | ||
139 | 139 | ||
140 | inline fastcall pause( EBX) |
140 | inline fastcall pause( EBX) |
141 | { |
141 | { |
142 | $mov eax, 5 |
142 | $mov eax, 5 |
143 | $int 0x40 |
143 | $int 0x40 |
144 | } |
144 | } |
145 | 145 | ||
146 | inline fastcall word GetButtonID() |
146 | inline fastcall word GetButtonID() |
147 | { |
147 | { |
148 | $mov eax,17 |
148 | $mov eax,17 |
149 | $int 0x40 |
149 | $int 0x40 |
150 | $shr eax,8 |
150 | $shr eax,8 |
151 | } |
151 | } |
152 | 152 | ||
153 | //---------------------------------------- |
153 | //---------------------------------------- |
154 | 154 | ||
155 | inline fastcall dword GetFreeRAM() |
155 | inline fastcall dword GetFreeRAM() |
156 | { |
156 | { |
157 | $mov eax, 18 |
157 | $mov eax, 18 |
158 | $mov ebx, 16 |
158 | $mov ebx, 16 |
159 | $int 0x40 |
159 | $int 0x40 |
160 | //return eax = ðàçìåð ñâîáîäíîé ïàìÿòè â êèëîáàéòàõ |
160 | //return eax = ðàçìåð ñâîáîäíîé ïàìÿòè â êèëîáàéòàõ |
161 | } |
161 | } |
162 | 162 | ||
163 | inline fastcall dword LoadDriver( ECX) //ECX - èìÿ äðàéâåðà |
163 | inline fastcall dword LoadDriver( ECX) //ECX - èìÿ äðàéâåðà |
164 | { |
164 | { |
165 | $mov eax, 68 |
165 | $mov eax, 68 |
166 | $mov ebx, 16 |
166 | $mov ebx, 16 |
167 | $int 0x40 |
167 | $int 0x40 |
168 | //return 0 - íåóäà÷à, èíà÷å eax = õýíäë äðàéâåðà |
168 | //return 0 - íåóäà÷à, èíà÷å eax = õýíäë äðàéâåðà |
169 | } |
169 | } |
170 | 170 | ||
171 | inline fastcall dword RuleDriver( ECX) //óêàçàòåëü íà óïðàâëÿþùóþ ñòðóêòóðó |
171 | inline fastcall dword RuleDriver( ECX) //óêàçàòåëü íà óïðàâëÿþùóþ ñòðóêòóðó |
172 | { |
172 | { |
173 | $mov eax, 68 |
173 | $mov eax, 68 |
174 | $mov ebx, 17 |
174 | $mov ebx, 17 |
175 | $int 0x40 |
175 | $int 0x40 |
176 | //return eax = îïðåäåëÿåòñÿ äðàéâåðîì |
176 | //return eax = îïðåäåëÿåòñÿ äðàéâåðîì |
177 | } |
177 | } |
178 | 178 | ||
179 | struct proc_info |
179 | struct proc_info |
180 | { |
180 | { |
181 | #define SelfInfo -1 |
181 | #define SelfInfo -1 |
182 | dword use_cpu; |
182 | dword use_cpu; |
183 | word pos_in_stack,num_slot,rezerv1; |
183 | word pos_in_stack,num_slot,rezerv1; |
184 | char name[11]; |
184 | char name[11]; |
185 | char rezerv2; |
185 | char rezerv2; |
186 | dword adress,use_memory,ID,left,top,width,height; |
186 | dword adress,use_memory,ID,left,top,width,height; |
187 | word status_slot,rezerv3; |
187 | word status_slot,rezerv3; |
188 | dword work_left,work_top,work_width,work_height; |
188 | dword work_left,work_top,work_width,work_height; |
189 | char status_window; |
189 | char status_window; |
190 | void GetInfo( ECX); |
190 | void GetInfo( ECX); |
191 | byte reserved[1024-71]; |
191 | byte reserved[1024-71]; |
192 | }; |
192 | }; |
193 | 193 | ||
194 | inline fastcall void GetProcessInfo( EBX, ECX) |
194 | inline fastcall void GetProcessInfo( EBX, ECX) |
195 | { |
195 | { |
196 | $mov eax,9; |
196 | $mov eax,9; |
197 | $int 0x40 |
197 | $int 0x40 |
198 | } |
198 | } |
199 | 199 | ||
200 | inline fastcall int GetPointOwner( EBX, ECX) //ebx=m.x, ecx=m.y |
200 | inline fastcall int GetPointOwner( EBX, ECX) //ebx=m.x, ecx=m.y |
201 | { |
201 | { |
202 | $mov eax,34 |
202 | $mov eax,34 |
203 | $int 0x40 |
203 | $int 0x40 |
204 | } |
204 | } |
205 | 205 | ||
206 | inline fastcall int GetProcessSlot( ECX) |
206 | inline fastcall int GetProcessSlot( ECX) |
207 | { |
207 | { |
208 | EAX = 18; |
208 | EAX = 18; |
209 | EBX = 21; |
209 | EBX = 21; |
210 | $int 0x40 |
210 | $int 0x40 |
211 | } |
211 | } |
212 | 212 | ||
213 | inline fastcall int GetActiveProcess() |
213 | inline fastcall int GetActiveProcess() |
214 | { |
214 | { |
215 | EAX = 18; |
215 | EAX = 18; |
216 | EBX = 7; |
216 | EBX = 7; |
217 | $int 0x40 |
217 | $int 0x40 |
218 | } |
218 | } |
219 | 219 | ||
220 | inline fastcall int CreateThread( ECX,EDX) |
220 | inline fastcall int CreateThread( ECX,EDX) |
221 | { |
221 | { |
222 | $mov eax,51 |
222 | $mov eax,51 |
223 | $mov ebx,1 |
223 | $mov ebx,1 |
224 | $int 0x40 |
224 | $int 0x40 |
225 | } |
225 | } |
226 | 226 | ||
227 | inline fastcall void SwitchToAnotherThread() |
227 | inline fastcall void SwitchToAnotherThread() |
228 | { |
228 | { |
229 | $mov eax,68 |
229 | $mov eax,68 |
230 | $mov ebx,1 |
230 | $mov ebx,1 |
231 | $int 0x40 |
231 | $int 0x40 |
232 | } |
232 | } |
233 | 233 | ||
234 | inline fastcall int KillProcess( ECX) |
234 | inline fastcall int KillProcess( ECX) |
235 | { |
235 | { |
236 | $mov eax,18; |
236 | $mov eax,18; |
237 | $mov ebx,18; |
237 | $mov ebx,18; |
238 | $int 0x40 |
238 | $int 0x40 |
239 | } |
239 | } |
240 | 240 | ||
241 | #define TURN_OFF 2 |
241 | #define TURN_OFF 2 |
242 | #define REBOOT 3 |
242 | #define REBOOT 3 |
243 | #define KERNEL 4 |
243 | #define KERNEL 4 |
244 | inline fastcall int ExitSystem( ECX) |
244 | inline fastcall int ExitSystem( ECX) |
245 | { |
245 | { |
246 | $mov eax, 18 |
246 | $mov eax, 18 |
247 | $mov ebx, 9 |
247 | $mov ebx, 9 |
248 | $int 0x40 |
248 | $int 0x40 |
249 | } |
249 | } |
250 | 250 | ||
251 | inline fastcall ExitProcess() |
251 | inline fastcall ExitProcess() |
252 | { |
252 | { |
253 | $mov eax,-1; |
253 | $mov eax,-1; |
254 | $int 0x40 |
254 | $int 0x40 |
255 | } |
255 | } |
256 | 256 | ||
257 | //------------------------------------------------------------------------------ |
257 | //------------------------------------------------------------------------------ |
258 | 258 | ||
259 | //eax = ÿçûê ñèñòåìû (1=eng, 2=fi, 3=ger, 4=rus) |
259 | //eax = ÿçûê ñèñòåìû (1=eng, 2=fi, 3=ger, 4=rus) |
260 | inline fastcall int GetSystemLanguage() |
260 | inline fastcall int GetSystemLanguage() |
261 | { |
261 | { |
262 | EAX = 26; |
262 | EAX = 26; |
263 | EBX = 5; |
263 | EBX = 5; |
264 | $int 0x40 |
264 | $int 0x40 |
265 | } |
265 | } |
266 | 266 | ||
267 | inline fastcall GetSkinHeight() |
267 | inline fastcall GetSkinHeight() |
268 | { |
268 | { |
269 | $push ebx |
269 | $push ebx |
270 | $mov eax,48 |
270 | $mov eax,48 |
271 | $mov ebx,4 |
271 | $mov ebx,4 |
272 | $int 0x40 |
272 | $int 0x40 |
273 | $pop ebx |
273 | $pop ebx |
274 | } |
274 | } |
275 | 275 | ||
276 | inline fastcall void SetSystemSkin( ECX) |
276 | inline fastcall void SetSystemSkin( ECX) |
277 | { |
277 | { |
278 | EAX = 48; |
278 | EAX = 48; |
279 | EBX = 8; |
279 | EBX = 8; |
280 | $int 0x40 |
280 | $int 0x40 |
281 | } |
281 | } |
282 | 282 | ||
283 | inline fastcall int GetScreenWidth() |
283 | inline fastcall int GetScreenWidth() |
284 | { |
284 | { |
285 | $mov eax, 14 |
285 | $mov eax, 14 |
286 | $int 0x40 |
286 | $int 0x40 |
287 | $shr eax, 16 |
287 | $shr eax, 16 |
288 | } |
288 | } |
289 | 289 | ||
290 | inline fastcall int GetScreenHeight() |
290 | inline fastcall int GetScreenHeight() |
291 | { |
291 | { |
292 | $mov eax, 14 |
292 | $mov eax, 14 |
293 | $int 0x40 |
293 | $int 0x40 |
294 | $and eax,0x0000FFFF |
294 | $and eax,0x0000FFFF |
295 | } |
295 | } |
296 | 296 | ||
297 | inline fastcall dword LoadLibrary( ECX) |
297 | inline fastcall dword LoadLibrary( ECX) |
298 | { |
298 | { |
299 | $mov eax, 68 |
299 | $mov eax, 68 |
300 | $mov ebx, 19 |
300 | $mov ebx, 19 |
301 | $int 0x40 |
301 | $int 0x40 |
302 | } |
302 | } |
303 | 303 | ||
304 | inline fastcall int TestBit( EAX, CL) |
304 | inline fastcall int TestBit( EAX, CL) |
305 | { |
305 | { |
306 | $shr eax,cl |
306 | $shr eax,cl |
307 | $and eax,1 |
307 | $and eax,1 |
308 | } |
308 | } |
309 | 309 | ||
310 | inline fastcall int PlaySpeaker( ESI) |
310 | inline fastcall int PlaySpeaker( ESI) |
311 | { |
311 | { |
312 | $mov eax, 55 |
312 | $mov eax, 55 |
313 | $mov ebx, 55 |
313 | $mov ebx, 55 |
314 | $int 0x40 |
314 | $int 0x40 |
315 | } |
315 | } |
316 | 316 | ||
317 | inline fastcall void debug( EDX) |
317 | inline fastcall void debug( EDX) |
318 | { |
318 | { |
319 | $push ebx |
319 | $push ebx |
320 | $push ecx |
320 | $push ecx |
321 | $mov eax, 63 |
321 | $mov eax, 63 |
322 | $mov ebx, 1 |
322 | $mov ebx, 1 |
323 | next_char: |
323 | next_char: |
324 | $mov ecx, DSDWORD[edx] |
324 | $mov ecx, DSDWORD[edx] |
325 | $or cl, cl |
325 | $or cl, cl |
326 | $jz done |
326 | $jz done |
327 | $int 0x40 |
327 | $int 0x40 |
328 | $inc edx |
328 | $inc edx |
329 | $jmp next_char |
329 | $jmp next_char |
330 | done: |
330 | done: |
331 | $mov cl, 13 |
331 | $mov cl, 13 |
332 | $int 0x40 |
332 | $int 0x40 |
333 | $mov cl, 10 |
333 | $mov cl, 10 |
334 | $int 0x40 |
334 | $int 0x40 |
335 | $pop ecx |
335 | $pop ecx |
336 | $pop ebx |
336 | $pop ebx |
337 | } |
337 | } |
- | 338 | ||
- | 339 | inline fastcall void debugch( ECX) |
|
- | 340 | { |
|
- | 341 | $mov eax,63 |
|
- | 342 | $mov ebx,1 |
|
- | 343 | $int 0x40 |
|
- | 344 | } |
|
338 | //------------------------------------------------------------------------------ |
345 | //------------------------------------------------------------------------------ |
339 | 346 | ||
340 | void DefineAndDrawWindow(dword x,y, sizeX,sizeY, byte WindowType,dword WindowAreaColor, EDI, ESI) |
347 | void DefineAndDrawWindow(dword x,y, sizeX,sizeY, byte WindowType,dword WindowAreaColor, EDI, ESI) |
341 | { |
348 | { |
342 | EAX = 12; // function 12:tell os about windowdraw |
349 | EAX = 12; // function 12:tell os about windowdraw |
343 | EBX = 1; |
350 | EBX = 1; |
344 | $int 0x40 |
351 | $int 0x40 |
345 | 352 | ||
346 | EAX = 0; |
353 | EAX = 0; |
347 | EBX = x << 16 + sizeX; |
354 | EBX = x << 16 + sizeX; |
348 | ECX = y << 16 + sizeY; |
355 | ECX = y << 16 + sizeY; |
349 | EDX = WindowType << 24 | WindowAreaColor; |
356 | EDX = WindowType << 24 | WindowAreaColor; |
350 | $int 0x40 |
357 | $int 0x40 |
351 | 358 | ||
352 | EAX = 12; // function 12:tell os about windowdraw |
359 | EAX = 12; // function 12:tell os about windowdraw |
353 | EBX = 2; |
360 | EBX = 2; |
354 | $int 0x40 |
361 | $int 0x40 |
355 | } |
362 | } |
356 | 363 | ||
357 | inline fastcall DeleteAllButtons() |
364 | inline fastcall DeleteAllButtons() |
358 | { |
365 | { |
359 | EAX = 12; // function 12:tell os about windowdraw |
366 | EAX = 12; // function 12:tell os about windowdraw |
360 | EBX = 1; |
367 | EBX = 1; |
361 | $int 0x40 |
368 | $int 0x40 |
362 | EBX = 2; |
369 | EBX = 2; |
363 | $int 0x40 |
370 | $int 0x40 |
364 | } |
371 | } |
365 | 372 | ||
366 | inline fastcall MoveSize( EBX,ECX,EDX,ESI) |
373 | inline fastcall MoveSize( EBX,ECX,EDX,ESI) |
367 | { |
374 | { |
368 | $mov eax, 67 |
375 | $mov eax, 67 |
369 | $int 0x40 |
376 | $int 0x40 |
370 | } |
377 | } |
371 | 378 | ||
372 | inline fastcall void DrawTitle( ECX) |
379 | inline fastcall void DrawTitle( ECX) |
373 | { |
380 | { |
374 | EAX = 71; |
381 | EAX = 71; |
375 | EBX = 1; |
382 | EBX = 1; |
376 | $int 0x40; |
383 | $int 0x40; |
377 | } |
384 | } |
378 | 385 | ||
379 | void WriteText(dword x,y,byte fontType, dword color, EDX, ESI) |
386 | void WriteText(dword x,y,byte fontType, dword color, EDX, ESI) |
380 | { |
387 | { |
381 | EAX = 4; |
388 | EAX = 4; |
382 | EBX = x<<16+y; |
389 | EBX = x<<16+y; |
383 | ECX = fontType<<24+color; |
390 | ECX = fontType<<24+color; |
384 | $int 0x40; |
391 | $int 0x40; |
385 | } |
392 | } |
386 | 393 | ||
387 | void WriteNumber(dword x,y,byte fontType, dword color, count, ECX) |
394 | void WriteNumber(dword x,y,byte fontType, dword color, count, ECX) |
388 | { |
395 | { |
389 | EAX = 47; |
396 | EAX = 47; |
390 | EBX = count<<16; |
397 | EBX = count<<16; |
391 | EDX = x<<16+y; |
398 | EDX = x<<16+y; |
392 | ESI = fontType<<24+color; |
399 | ESI = fontType<<24+color; |
393 | $int 0x40; |
400 | $int 0x40; |
394 | } |
401 | } |
395 | 402 | ||
396 | void CopyScreen(dword EBX, x, y, sizeX, sizeY) |
403 | void CopyScreen(dword EBX, x, y, sizeX, sizeY) |
397 | { |
404 | { |
398 | EAX = 36; |
405 | EAX = 36; |
399 | ECX = sizeX << 16 + sizeY; |
406 | ECX = sizeX << 16 + sizeY; |
400 | EDX = x << 16 + y; |
407 | EDX = x << 16 + y; |
401 | $int 0x40; |
408 | $int 0x40; |
402 | } |
409 | } |
403 | 410 | ||
404 | dword GetPixelColor(dword x, x_size, y) |
411 | dword GetPixelColor(dword x, x_size, y) |
405 | { |
412 | { |
406 | $mov eax, 35 |
413 | $mov eax, 35 |
407 | EBX= y*x_size+x; |
414 | EBX= y*x_size+x; |
408 | $int 0x40 |
415 | $int 0x40 |
409 | } |
416 | } |
410 | 417 | ||
411 | void PutImage(dword EBX,w,h,x,y) |
418 | void PutImage(dword EBX,w,h,x,y) |
412 | { |
419 | { |
413 | EAX = 7; |
420 | EAX = 7; |
414 | ECX = w<<16+h; |
421 | ECX = w<<16+h; |
415 | EDX = x<<16+y; |
422 | EDX = x<<16+y; |
416 | $int 0x40 |
423 | $int 0x40 |
417 | } |
424 | } |
418 | 425 | ||
419 | void _PutImage(dword x,y, w,h, EBX) |
426 | void _PutImage(dword x,y, w,h, EBX) |
420 | { |
427 | { |
421 | EAX = 7; |
428 | EAX = 7; |
422 | ECX = w<<16+h; |
429 | ECX = w<<16+h; |
423 | EDX = x<<16+y; |
430 | EDX = x<<16+y; |
424 | $int 0x40 |
431 | $int 0x40 |
425 | } |
432 | } |
426 | 433 | ||
427 | void PutPaletteImage(dword EBX,w,h,x,y,ESI,EDI) |
434 | void PutPaletteImage(dword EBX,w,h,x,y,ESI,EDI) |
428 | { |
435 | { |
429 | EAX = 65; |
436 | EAX = 65; |
430 | ECX = w<<16+h; |
437 | ECX = w<<16+h; |
431 | EDX = x<<16+y; |
438 | EDX = x<<16+y; |
432 | EBP = 0; |
439 | EBP = 0; |
433 | $int 0x40 |
440 | $int 0x40 |
434 | } |
441 | } |
435 | 442 | ||
436 | inline fastcall void PutPixel( EBX,ECX,EDX) |
443 | inline fastcall void PutPixel( EBX,ECX,EDX) |
437 | { |
444 | { |
438 | EAX=1; |
445 | EAX=1; |
439 | $int 0x40 |
446 | $int 0x40 |
440 | } |
447 | } |
441 | 448 | ||
442 | void DrawBar(dword x,y,w,h,EDX) |
449 | void DrawBar(dword x,y,w,h,EDX) |
443 | { |
450 | { |
444 | EAX = 13; |
451 | EAX = 13; |
445 | EBX = x<<16+w; |
452 | EBX = x<<16+w; |
446 | ECX = y<<16+h; |
453 | ECX = y<<16+h; |
447 | $int 0x40 |
454 | $int 0x40 |
448 | } |
455 | } |
449 | 456 | ||
450 | void DefineButton(dword x,y,w,h,EDX,ESI) |
457 | void DefineButton(dword x,y,w,h,EDX,ESI) |
451 | { |
458 | { |
452 | EAX = 8; |
459 | EAX = 8; |
453 | EBX = x<<16+w; |
460 | EBX = x<<16+w; |
454 | ECX = y<<16+h; |
461 | ECX = y<<16+h; |
455 | $int 0x40 |
462 | $int 0x40 |
456 | } |
463 | } |
457 | 464 | ||
458 | inline fastcall void DeleteButton( EDX) |
465 | inline fastcall void DeleteButton( EDX) |
459 | { |
466 | { |
460 | EAX = 8; |
467 | EAX = 8; |
461 | EDX += BT_DEL; |
468 | EDX += BT_DEL; |
462 | $int 0x40; |
469 | $int 0x40; |
463 | }16+h; |
470 | }16+h; |
464 | ><16+h; |
471 | ><16+h; |
465 | >16+w; |
472 | >16+w; |
466 | ><16+w; |
473 | ><16+w; |
467 | >16+h; |
474 | >16+h; |
468 | ><16+h; |
475 | ><16+h; |
469 | >16+w; |
476 | >16+w; |
470 | ><16+w; |
477 | ><16+w; |
471 | >16+y; |
478 | >16+y; |
472 | ><16+y; |
479 | ><16+y; |
473 | >16+h; |
480 | >16+h; |
474 | ><16+h; |
481 | ><16+h; |
475 | >16+y; |
482 | >16+y; |
476 | ><16+y; |
483 | ><16+y; |
477 | >16+h; |
484 | >16+h; |
478 | ><16+h; |
485 | ><16+h; |
479 | >16+y; |
486 | >16+y; |
480 | ><16+y; |
487 | ><16+y; |
481 | >16+h; |
488 | >16+h; |
482 | ><16+h; |
489 | ><16+h; |
483 | >><>><>24+color; |
490 | >><>><>24+color; |
484 | ><24+color; |
491 | ><24+color; |
485 | >16+y; |
492 | >16+y; |
486 | ><16+y; |
493 | ><16+y; |
487 | >16; |
494 | >16; |
488 | ><16; |
495 | ><16; |
489 | >24+color; |
496 | >24+color; |
490 | ><24+color; |
497 | ><24+color; |
491 | >16+y; |
498 | >16+y; |
492 | ><16+y; |
499 | ><16+y; |
493 | >><>><>><> |
500 | >><>><>><> |