Rev 976 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 976 | Rev 984 | ||
---|---|---|---|
1 | //CODED by Veliant, Leency. GNU GPL licence. |
1 | //CODED by Veliant, Leency. GNU GPL licence. |
2 | 2 | ||
3 | #startaddress 0 |
3 | #startaddress 0 |
4 | #code32 TRUE |
4 | #code32 TRUE |
5 | 5 | ||
6 | byte os_name[8] = {'M','E','N','U','E','T','0','1'}; |
6 | byte 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; // 0x0007fff0; |
11 | dword x86esp_reg = 0x00100000; // 0x0007fff0; |
12 | dword I_Param = #param; |
12 | dword I_Param = #param; |
13 | dword I_Icon = 0x0; |
13 | dword I_Icon = 0x0; |
14 | dword skin_width; |
- | |
15 | char param[256]=""; |
14 | char param[256]=""; |
16 | 15 | ||
17 | //Events |
16 | //Events |
18 | #define evMouse 6 |
17 | #define evMouse 6 |
19 | #define evButton 3 |
18 | #define evButton 3 |
20 | #define evKey 2 |
19 | #define evKey 2 |
21 | #define evReDraw 1 |
20 | #define evReDraw 1 |
22 | 21 | ||
23 | //Button options |
22 | //Button options |
24 | #define BT_DEL 0x80000000 |
23 | #define BT_DEL 0x80000000 |
25 | #define BT_HIDE 0x40000000 |
24 | #define BT_HIDE 0x40000000 |
26 | #define BT_NOFRAME 0x20000000 |
25 | #define BT_NOFRAME 0x20000000 |
27 | 26 | ||
28 | #define OLD -1 |
27 | #define OLD -1 |
29 | #define true 1 |
28 | #define true 1 |
30 | #define false 0 |
29 | #define false 0 |
31 | 30 | ||
32 | 31 | ||
33 | 32 | ||
34 | struct mouse{ |
33 | struct mouse{ |
35 | int x,y,lkm,pkm,hor,vert; |
34 | int x,y,lkm,pkm,hor,vert; |
36 | void get(); |
35 | void get(); |
37 | }; |
36 | }; |
38 | 37 | ||
39 | void mouse::get() |
38 | void mouse::get() |
40 | { |
39 | { |
41 | EAX = 37; |
40 | EAX = 37; |
42 | EBX = 1; |
41 | EBX = 1; |
43 | $int 0x40 |
42 | $int 0x40 |
44 | $mov ebx, eax |
43 | $mov ebx, eax |
45 | $shr eax, 16 |
44 | $shr eax, 16 |
46 | $and ebx,0x0000FFFF |
45 | $and ebx,0x0000FFFF |
47 | x = EAX; |
46 | x = EAX; |
48 | y = EBX; |
47 | y = EBX; |
49 | EAX = 37; |
48 | EAX = 37; |
50 | EBX = 2; |
49 | EBX = 2; |
51 | $int 0x40 |
50 | $int 0x40 |
52 | $mov ebx, eax |
51 | $mov ebx, eax |
53 | $and eax, 0x00000001 |
52 | $and eax, 0x00000001 |
54 | $shr ebx, 1 |
53 | $shr ebx, 1 |
55 | $and ebx, 0x00000001 |
54 | $and ebx, 0x00000001 |
56 | lkm = EAX; |
55 | lkm = EAX; |
57 | pkm = EBX; |
56 | pkm = EBX; |
58 | EAX = 37; //áªà®«« |
57 | EAX = 37; //áªà®«« |
59 | EBX = 7; |
58 | EBX = 7; |
60 | $int 0x40 |
59 | $int 0x40 |
61 | $mov ebx, eax |
60 | $mov ebx, eax |
62 | $shr eax, 16 |
61 | $shr eax, 16 |
63 | $and ebx,0x0000FFFF |
62 | $and ebx,0x0000FFFF |
64 | //hor = EAX; |
63 | //hor = EAX; |
65 | vert = EBX; |
64 | vert = EBX; |
66 | } |
65 | } |
67 | 66 | ||
68 | //--------------------------------------------------------------------------- |
67 | //--------------------------------------------------------------------------- |
69 | struct proc_info{ |
68 | struct proc_info{ |
70 | dword use_cpu; |
69 | dword use_cpu; |
71 | word pos_in_stack,num_slot,rezerv1; |
70 | word pos_in_stack,num_slot,rezerv1; |
72 | char name[11]; |
71 | char name[11]; |
73 | char rezerv2; |
72 | char rezerv2; |
74 | dword adress,use_memory,ID,left,top,width,height; |
73 | dword adress,use_memory,ID,left,top,width,height; |
75 | word status_slot,rezerv3; |
74 | word status_slot,rezerv3; |
76 | dword work_left,work_top,work_width,work_height; |
75 | dword work_left,work_top,work_width,work_height; |
77 | char status_window; |
76 | char status_window; |
78 | void GetInfo(dword ECX); |
77 | void GetInfo(dword ECX); |
79 | #define SelfInfo -1 |
78 | #define SelfInfo -1 |
80 | }; |
79 | }; |
81 | 80 | ||
82 | void proc_info::GetInfo(dword ECX) |
81 | void proc_info::GetInfo(dword ECX) |
83 | { |
82 | { |
84 | EAX = 9; |
83 | EAX = 9; |
85 | EBX = #use_cpu; |
84 | EBX = #use_cpu; |
86 | $int 0x40 |
85 | $int 0x40 |
87 | } |
86 | } |
88 | //------------------------------------------------------------------------------- |
87 | //------------------------------------------------------------------------------- |
89 | 88 | ||
90 | inline fastcall dword WaitEvent(){ |
89 | inline fastcall dword WaitEvent(){ |
91 | EAX = 10; // wait here for event |
90 | EAX = 10; // wait here for event |
92 | $int 0x40 |
91 | $int 0x40 |
93 | } |
92 | } |
94 | 93 | ||
95 | inline fastcall void SetEventMask(dword EBX) |
94 | inline fastcall void SetEventMask(dword EBX) |
96 | { |
95 | { |
97 | EAX = 40; |
96 | EAX = 40; |
98 | $int 0x40 |
97 | $int 0x40 |
99 | } |
98 | } |
100 | 99 | ||
101 | inline fastcall word GetKey(){ |
100 | inline fastcall word GetKey(){ |
102 | EAX = 2; // just read this key from buffer |
101 | EAX = 2; // just read this key from buffer |
103 | $int 0x40 |
102 | $int 0x40 |
104 | EAX = EAX >> 8; |
103 | EAX = EAX >> 8; |
105 | } |
104 | } |
106 | 105 | ||
107 | inline fastcall word GetButtonID(){ |
106 | inline fastcall word GetButtonID(){ |
108 | EAX = 17; // Get ID |
107 | EAX = 17; // Get ID |
109 | $int 0x40 |
108 | $int 0x40 |
110 | EAX = EAX >> 8; |
109 | EAX = EAX >> 8; |
111 | } |
110 | } |
112 | 111 | ||
113 | inline fastcall void ExitProcess(){ |
112 | inline fastcall void ExitProcess(){ |
114 | EAX = -1; // close this program |
113 | EAX = -1; // close this program |
115 | $int 0x40 |
114 | $int 0x40 |
116 | } |
115 | } |
117 | 116 | ||
118 | void Pause(dword EBX){ |
117 | inline fastcall void Pause(dword EBX){ |
119 | $mov eax, 5 // 㧠, ¢ á®âëå ¤®«ïå ᥪã¤ë |
118 | $mov eax, 5 // 㧠, ¢ á®âëå ¤®«ïå ᥪã¤ë |
120 | $int 0x40 |
119 | $int 0x40 |
121 | } |
120 | } |
122 | 121 | ||
123 | //------------------------------------------------------------------------------ |
122 | //------------------------------------------------------------------------------ |
124 | void DefineAndDrawWindow(dword x,y,sizeX,sizeY,byte mainAreaType,dword |
123 | void DefineAndDrawWindow(dword x,y,sizeX,sizeY,byte mainAreaType,dword |
125 | mainAreaColor,byte headerType,dword headerColor,EDI) |
124 | mainAreaColor,byte headerType,dword headerColor,EDI) |
126 | { |
125 | { |
127 | EBX = x << 16 + sizeX; |
126 | EBX = x << 16 + sizeX; |
128 | ECX = y << 16 + sizeY; |
127 | ECX = y << 16 + sizeY; |
129 | EDX = mainAreaType << 24 | mainAreaColor; |
128 | EDX = mainAreaType << 24 | mainAreaColor; |
130 | ESI = headerType << 24 | headerColor; |
129 | ESI = headerType << 24 | headerColor; |
131 | $xor eax,eax |
130 | $xor eax,eax |
132 | $int 0x40 |
131 | $int 0x40 |
133 | } |
132 | } |
134 | 133 | ||
135 | inline fastcall dword CreateThread(dword ECX,EDX) |
134 | inline fastcall void CreateThread(dword ECX,EDX) |
136 | { |
135 | { |
137 | EAX = 51; |
136 | EAX = 51; |
138 | EBX = 1; |
137 | EBX = 1; |
139 | $int 0x40 |
138 | $int 0x40 |
140 | } |
139 | } |
141 | 140 | ||
142 | inline fastcall void DrawTitle(dword ECX){ |
141 | inline fastcall void DrawTitle(dword ECX){ |
143 | EAX = 71; |
142 | EAX = 71; |
144 | EBX = 1; |
143 | EBX = 1; |
145 | $int 0x40; |
144 | $int 0x40; |
146 | } |
145 | } |
147 | 146 | ||
148 | 147 | ||
149 | inline fastcall void WindowRedrawStatus(dword EBX){ |
148 | inline fastcall void WindowRedrawStatus(dword EBX){ |
150 | EAX = 12; //tell os about windowdraw |
149 | EAX = 12; //tell os about windowdraw |
151 | $int 0x40 |
150 | $int 0x40 |
152 | } |
151 | } |
153 | 152 | ||
154 | inline fastcall dword GetSkinWidth(){ |
153 | inline fastcall dword GetSkinWidth(){ |
155 | EAX = 48; |
154 | EAX = 48; |
156 | EBX = 4; |
155 | EBX = 4; |
157 | $int 0x40 |
156 | $int 0x40 |
158 | } |
157 | } |
159 | 158 | ||
160 | inline fastcall dword MoveSize(dword EBX,ECX,EDX,ESI){ |
159 | inline fastcall void MoveSize(dword EBX,ECX,EDX,ESI){ |
161 | EAX = 67; |
160 | EAX = 67; |
162 | $int 0x40 |
161 | $int 0x40 |
163 | } |
162 | } |
164 | 163 | ||
165 | //------------------------------------------------------------------------------ |
164 | //------------------------------------------------------------------------------ |
166 | 165 | ||
167 | inline fastcall dword strlen(dword EDI){ |
166 | inline fastcall dword strlen(dword EDI){ |
168 | EAX=0; |
167 | EAX=0; |
169 | ECX=-1; |
168 | ECX=-1; |
170 | $REPNE $SCASB |
169 | $REPNE $SCASB |
171 | EAX-=2+ECX; |
170 | EAX-=2+ECX; |
172 | } |
171 | } |
173 | 172 | ||
174 | 173 | ||
175 | inline fastcall copystr(dword ESI,EDI) |
174 | inline fastcall copystr(dword ESI,EDI) |
176 | { |
175 | { |
177 | $cld |
176 | $cld |
178 | l1: |
177 | l1: |
179 | $lodsb |
178 | $lodsb |
180 | $stosb |
179 | $stosb |
181 | $test al,al |
180 | $test al,al |
182 | $jnz l1 |
181 | $jnz l1 |
183 | } |
182 | } |
184 | 183 | ||
- | 184 | ||
- | 185 | byte fastcall TestBit(EAX, CL) |
|
- | 186 | { |
|
- | 187 | $shr eax,cl |
|
- | 188 | $and eax,1 |
|
- | 189 | } |
|
- | 190 | ||
185 | 191 | ||
186 | char buffer[11]=""; |
192 | char buffer[11]=""; |
187 | inline fastcall dword IntToStr(dword ESI) |
193 | inline fastcall dword IntToStr(dword ESI) |
188 | { |
194 | { |
189 | $mov edi, #buffer |
195 | $mov edi, #buffer |
190 | $mov ecx, 10 |
196 | $mov ecx, 10 |
191 | $test esi, esi |
197 | $test esi, esi |
192 | $jns f1 |
198 | $jns f1 |
193 | $mov al, '-' |
199 | $mov al, '-' |
194 | $stosb |
200 | $stosb |
195 | $neg esi |
201 | $neg esi |
196 | f1: |
202 | f1: |
197 | $mov eax, esi |
203 | $mov eax, esi |
198 | $push -'0' |
204 | $push -'0' |
199 | f2: |
205 | f2: |
200 | $xor edx, edx |
206 | $xor edx, edx |
201 | $div ecx |
207 | $div ecx |
202 | $push edx |
208 | $push edx |
203 | $test eax, eax |
209 | $test eax, eax |
204 | $jnz f2 |
210 | $jnz f2 |
205 | f3: |
211 | f3: |
206 | $pop eax |
212 | $pop eax |
207 | $add al, '0' |
213 | $add al, '0' |
208 | $stosb |
214 | $stosb |
209 | $jnz f3 |
215 | $jnz f3 |
210 | $mov eax, #buffer |
216 | $mov eax, #buffer |
211 | $ret |
217 | $ret |
212 | } |
218 | } |
213 | 219 | ||
- | 220 | ||
- | 221 | dword StrToCol(char* htmlcolor) |
|
- | 222 | { |
|
- | 223 | dword j=1, color=0; char ch=0x00; |
|
- | 224 | IF (ESBYTE[htmlcolor]<>'#') RETURN; |
|
- | 225 | FOR (;j<7;j++) |
|
- | 226 | { |
|
- | 227 | ch=ESBYTE[htmlcolor+j]; |
|
- | 228 | IF ((ch>='0') && (ch<='9')) ch -= '0'; |
|
- | 229 | IF ((ch>='A') && (ch<='F')) ch -= 'A'-10; |
|
- | 230 | IF ((ch>='a') && (ch<='f')) ch -= 'a'-10; |
|
- | 231 | color = color*0x10 + ch; |
|
- | 232 | } |
|
- | 233 | EAX=color; |
|
- | 234 | } |
|
- | 235 | ||
214 | 236 | ||
215 | inline fastcall int strcmp(ESI, EDI) |
237 | inline fastcall int strcmp(ESI, EDI) |
216 | { |
238 | { |
217 | loop() |
239 | loop() |
218 | { |
240 | { |
219 | IF (DSBYTE[ESI] |
241 | IF (DSBYTE[ESI] |
220 | IF (DSBYTE[ESI]>DSBYTE[EDI]) RETURN 1; |
242 | IF (DSBYTE[ESI]>DSBYTE[EDI]) RETURN 1; |
221 | IF (DSBYTE[ESI]=='\0') RETURN 0; |
243 | IF (DSBYTE[ESI]=='\0') RETURN 0; |
222 | ESI++; |
244 | ESI++; |
223 | EDI++; |
245 | EDI++; |
224 | } |
246 | } |
225 | } |
247 | } |
226 | 248 | ||
227 | 249 | ||
228 | inline fastcall unsigned int find_symbol(ESI,BL) |
250 | inline fastcall unsigned int find_symbol(ESI,BL) |
229 | { |
251 | { |
230 | int jj=0, last=-1; |
252 | int jj=0, last=-1; |
231 | do{ |
253 | do{ |
232 | jj++; |
254 | jj++; |
233 | $lodsb |
255 | $lodsb |
234 | IF(AL==BL) last=jj; |
256 | IF(AL==BL) last=jj; |
235 | } while(AL!=0); |
257 | } while(AL!=0); |
236 | return last; |
258 | return last; |
237 | } |
259 | } |
238 | 260 | ||
239 | 261 | ||
240 | inline fastcall memmov( EDI, ESI, ECX) |
262 | inline fastcall memmov( EDI, ESI, ECX) |
241 | { |
263 | { |
242 | asm { |
264 | asm { |
243 | MOV EAX, ECX |
265 | MOV EAX, ECX |
244 | CMP EDI, ESI |
266 | CMP EDI, ESI |
245 | JG L1 |
267 | JG L1 |
246 | JE L2 |
268 | JE L2 |
247 | SAR ECX, 2 |
269 | SAR ECX, 2 |
248 | JS L2 |
270 | JS L2 |
249 | REP MOVSD |
271 | REP MOVSD |
250 | MOV ECX, EAX |
272 | MOV ECX, EAX |
251 | AND ECX, 3 |
273 | AND ECX, 3 |
252 | REP MOVSB |
274 | REP MOVSB |
253 | JMP SHORT L2 |
275 | JMP SHORT L2 |
254 | L1: LEA ESI, DSDWORD[ ESI+ECX-4] |
276 | L1: LEA ESI, DSDWORD[ ESI+ECX-4] |
255 | LEA EDI, DSDWORD[ EDI+ECX-4] |
277 | LEA EDI, DSDWORD[ EDI+ECX-4] |
256 | SAR ECX, 2 |
278 | SAR ECX, 2 |
257 | JS L2 |
279 | JS L2 |
258 | STD |
280 | STD |
259 | REP MOVSD |
281 | REP MOVSD |
260 | MOV ECX, EAX |
282 | MOV ECX, EAX |
261 | AND ECX, 3 |
283 | AND ECX, 3 |
262 | ADD ESI, 3 |
284 | ADD ESI, 3 |
263 | ADD EDI, 3 |
285 | ADD EDI, 3 |
264 | REP MOVSB |
286 | REP MOVSB |
265 | CLD |
287 | CLD |
266 | L2: |
288 | L2: |
267 | } |
289 | } |
268 | } |
290 | } |
269 | 291 | ||
270 | 292 | ||
271 | inline fastcall dword ChangeCase(dword EDX) |
293 | inline fastcall ChangeCase(dword EDX) |
272 | { |
294 | { |
273 | AL=DSBYTE[EDX]; |
295 | AL=DSBYTE[EDX]; |
274 | IF(AL>='a')&&(AL<='z')DSBYTE[EDX]=AL&0x5f; |
296 | IF(AL>='a')&&(AL<='z')DSBYTE[EDX]=AL&0x5f; |
275 | IF (AL>=160) && (AL<=175) DSBYTE[EDX] = AL - 32; //à-ï |
297 | IF (AL>=160) && (AL<=175) DSBYTE[EDX] = AL - 32; //à-ï |
276 | IF (AL>=224) && (AL<=239) DSBYTE[EDX] = AL - 80; //à-ï |
298 | IF (AL>=224) && (AL<=239) DSBYTE[EDX] = AL - 80; //à-ï |
277 | do{ |
299 | do{ |
278 | EDX++; |
300 | EDX++; |
279 | AL=DSBYTE[EDX]; |
301 | AL=DSBYTE[EDX]; |
280 | IF(AL>='A')&&(AL<='Z'){DSBYTE[EDX]=AL|0x20; continue;} |
302 | IF(AL>='A')&&(AL<='Z'){DSBYTE[EDX]=AL|0x20; continue;} |
281 | IF(AL>='')&&(AL<='')DSBYTE[EDX]=AL|0x20; // -¯ |
303 | IF(AL>='')&&(AL<='')DSBYTE[EDX]=AL|0x20; // -¯ |
282 | IF (AL>=144) && (AL<=159) DSBYTE[EDX] = AL + 80; //à-ï |
304 | IF (AL>=144) && (AL<=159) DSBYTE[EDX] = AL + 80; //à-ï |
283 | }while(AL!=0); |
305 | }while(AL!=0); |
284 | } |
306 | } |
285 | 307 | ||
286 | 308 | ||
287 | //------------------------------------------------------------------------------ |
309 | //------------------------------------------------------------------------------ |
288 | inline fastcall void PutPixel(dword EBX,ECX,EDX){ |
310 | inline fastcall void PutPixel(dword EBX,ECX,EDX){ |
289 | EAX=1; |
311 | EAX=1; |
290 | $int 0x40 |
312 | $int 0x40 |
291 | } |
313 | } |
292 | 314 | ||
293 | void DefineButton(dword x,y,w,h,EDX,ESI){ |
315 | void DefineButton(dword x,y,w,h,EDX,ESI){ |
294 | EAX = 8; |
316 | EAX = 8; |
295 | EBX = x<<16+w; |
317 | EBX = x<<16+w; |
296 | ECX = y<<16+h; |
318 | ECX = y<<16+h; |
297 | $int 0x40 |
319 | $int 0x40 |
298 | } |
320 | } |
299 | 321 | ||
300 | inline fastcall void DeleteButton(dword EDX) |
322 | inline fastcall void DeleteButton(dword EDX) |
301 | { |
323 | { |
302 | EAX = 8; |
324 | EAX = 8; |
303 | EDX += BT_DEL; |
325 | EDX += BT_DEL; |
304 | $int 0x40; |
326 | $int 0x40; |
305 | } |
327 | } |
306 | 328 | ||
307 | void WriteText(dword x,y,byte fontType, dword color, EDX, ESI) |
329 | void WriteText(dword x,y,byte fontType, dword color, EDX, ESI) |
308 | { |
330 | { |
309 | EAX = 4; |
331 | EAX = 4; |
310 | EBX = x<<16+y; |
332 | EBX = x<<16+y; |
311 | ECX = fontType<<24+color; |
333 | ECX = fontType<<24+color; |
312 | $int 0x40; |
334 | $int 0x40; |
313 | } |
335 | } |
314 | 336 | ||
315 | void DrawBar(dword x,y,w,h,EDX) |
337 | void DrawBar(dword x,y,w,h,EDX) |
316 | { |
338 | { |
317 | #speed |
339 | #speed |
318 | EAX = 13; |
340 | EAX = 13; |
319 | EBX = x<<16+w; |
341 | EBX = x<<16+w; |
320 | ECX = y<<16+h; |
342 | ECX = y<<16+h; |
321 | $int 0x40 |
343 | $int 0x40 |
322 | #codesize |
344 | #codesize |
323 | } |
345 | } |
324 | 346 | ||
325 | void DrawRegion_3D(dword x,y,width,height,color1,color2) |
347 | void DrawRegion_3D(dword x,y,width,height,color1,color2) |
326 | { |
348 | { |
327 | DrawBar(x,y,width+1,1,color1); //¯®«®á £®à ᢥàåã |
349 | DrawBar(x,y,width+1,1,color1); //¯®«®á £®à ᢥàåã |
328 | DrawBar(x,y+1,1,height-1,color1); //¯®«®á á«¥¢ |
350 | DrawBar(x,y+1,1,height-1,color1); //¯®«®á á«¥¢ |
329 | DrawBar(x+width,y+1,1,height,color2); //¯®«®á á¯à ¢ |
351 | DrawBar(x+width,y+1,1,height,color2); //¯®«®á á¯à ¢ |
330 | DrawBar(x,y+height,width,1,color2); //¯®«®á £®à ᨧã |
352 | DrawBar(x,y+height,width,1,color2); //¯®«®á £®à ᨧã |
331 | } |
353 | } |
332 | 354 | ||
333 | void DrawFlatButton(dword x,y,width,height,id,color,text) |
355 | void DrawFlatButton(dword x,y,width,height,id,color,text) |
334 | { |
356 | { |
335 | DrawRegion_3D(x,y,width,height,0x94AECE,0x94AECE); |
357 | DrawRegion_3D(x,y,width,height,0x94AECE,0x94AECE); |
336 | DrawRegion_3D(x+1,y+1,width-2,height-2,0xFFFFFF,0xC7C7C7); |
358 | DrawRegion_3D(x+1,y+1,width-2,height-2,0xFFFFFF,0xC7C7C7); |
337 | DrawBar(x+2,y+2,width-3,height-3,color); //§ «¨¢ª |
359 | DrawBar(x+2,y+2,width-3,height-3,color); //§ «¨¢ª |
338 | IF (id<>0) DefineButton(x,y,width,height,id+BT_HIDE,0xEFEBEF); //ª®¯ª |
360 | IF (id<>0) DefineButton(x,y,width,height,id+BT_HIDE,0xEFEBEF); //ª®¯ª |
339 | WriteText(-strlen(text)*6+width/2+x+1,height/2-3+y,0x80,0,text,0); |
361 | WriteText(-strlen(text)*6+width/2+x+1,height/2-3+y,0x80,0,text,0); |
340 | } |
362 | } |
341 | 363 | ||
342 | void PutImage(dword EBX,w,h,x,y) |
364 | void PutImage(dword EBX,w,h,x,y) |
343 | { |
365 | { |
344 | EAX = 7; |
366 | EAX = 7; |
345 | ECX = w<<16+h; |
367 | ECX = w<<16+h; |
346 | EDX = x<<16+y; |
368 | EDX = x<<16+y; |
347 | $int 0x40 |
369 | $int 0x40 |
348 | } |
370 | } |
349 | 371 | ||
350 | void PutPaletteImage(dword EBX,w,h,x,y, EDI) |
372 | void PutPaletteImage(dword EBX,w,h,x,y, EDI) |
351 | { |
373 | { |
352 | EAX = 65; |
374 | EAX = 65; |
353 | ECX = w<<16+h; |
375 | ECX = w<<16+h; |
354 | EDX = x<<16+y; |
376 | EDX = x<<16+y; |
355 | ESI = 8; |
377 | ESI = 8; |
356 | EBP = 0; |
378 | EBP = 0; |
357 | $int 0x40 |
379 | $int 0x40 |
358 | } |
380 | } |
359 | 381 | ||
360 | //------------------------------------------------------------------------------ |
382 | //------------------------------------------------------------------------------ |
361 | inline fastcall dword WriteDebug(dword EDX) |
383 | inline fastcall dword WriteDebug(dword EDX) |
362 | { |
384 | { |
363 | $push ebx |
385 | $push ebx |
364 | $push ecx |
386 | $push ecx |
365 | $mov eax, 63 |
387 | $mov eax, 63 |
366 | $mov ebx, 1 |
388 | $mov ebx, 1 |
367 | next_char: |
389 | next_char: |
368 | $mov ecx, DSDWORD[edx] |
390 | $mov ecx, DSDWORD[edx] |
369 | $or cl, cl |
391 | $or cl, cl |
370 | $jz done |
392 | $jz done |
371 | $int 0x40 |
393 | $int 0x40 |
372 | $inc edx |
394 | $inc edx |
373 | $jmp next_char |
395 | $jmp next_char |
374 | done: |
396 | done: |
375 | $mov cl, 13 |
397 | $mov cl, 13 |
376 | $int 0x40 |
398 | $int 0x40 |
377 | $mov cl, 10 |
399 | $mov cl, 10 |
378 | $int 0x40 |
400 | $int 0x40 |
379 | $pop ecx |
401 | $pop ecx |
380 | $pop ebx |
402 | $pop ebx |
381 | }16+y; |
403 | }16+y; |
382 | ><16+y; |
404 | ><16+y; |
383 | >16+h; |
405 | >16+h; |
384 | ><16+h; |
406 | ><16+h; |
385 | >16+y; |
407 | >16+y; |
386 | ><16+y; |
408 | ><16+y; |
387 | >16+h; |
409 | >16+h; |
388 | ><16+h; |
410 | ><16+h; |
389 | >>16+h; |
411 | >>16+h; |
390 | ><16+h; |
412 | ><16+h; |
391 | >16+w; |
413 | >16+w; |
392 | ><16+w; |
414 | ><16+w; |
393 | >24+color; |
415 | >24+color; |
394 | ><24+color; |
416 | ><24+color; |
395 | >16+y; |
417 | >16+y; |
396 | ><16+y; |
418 | ><16+y; |
397 | >16+h; |
419 | >16+h; |
398 | ><16+h; |
420 | ><16+h; |
399 | >16+w; |
421 | >16+w; |
400 | ><16+w; |
422 | ><16+w; |
401 | >=159)>='')DSBYTE[EDX]=AL|0x20;>='Z'){DSBYTE[EDX]=AL|0x20;>=239)>=175)>='z')DSBYTE[EDX]=AL&0x5f; |
423 | >=159)>='')DSBYTE[EDX]=AL|0x20;>='Z'){DSBYTE[EDX]=AL|0x20;>=239)>=175)>='z')DSBYTE[EDX]=AL&0x5f; |
402 | >><>><>><>><> |
424 | >='f'))>='F'))>='9'))>7;j++) |
- | 425 | >>><>><>><>><> |