Rev 944 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 944 | Rev 975 | ||
---|---|---|---|
Line 44... | Line 44... | ||
44 | $int 0x40 |
44 | $int 0x40 |
45 | $mov ebx, eax |
45 | $mov ebx, eax |
46 | $shr eax, 16 |
46 | $shr eax, 16 |
47 | $and ebx,0x0000FFFF |
47 | $and ebx,0x0000FFFF |
48 | x = EAX; |
48 | x = EAX; |
49 | y = EBX-skin_width; |
49 | y = EBX; |
50 | EAX = 37; |
50 | EAX = 37; |
51 | EBX = 2; |
51 | EBX = 2; |
52 | $int 0x40 |
52 | $int 0x40 |
53 | $mov ebx, eax |
53 | $mov ebx, eax |
54 | $and eax, 0x00000001 |
54 | $and eax, 0x00000001 |
Line 65... | Line 65... | ||
65 | //hor = EAX; |
65 | //hor = EAX; |
66 | vert = EBX; |
66 | vert = EBX; |
67 | } |
67 | } |
Line 68... | Line 68... | ||
68 | 68 | ||
69 | //--------------------------------------------------------------------------- |
- | |
70 | struct BDVK{ |
- | |
71 | dword attr; |
- | |
72 | byte type_name; |
- | |
73 | byte rez1, rez2, rez3; |
- | |
74 | dword timecreate; |
- | |
75 | dword datecreate; |
- | |
76 | dword timelastaccess; |
- | |
77 | dword datelastaccess; |
- | |
78 | dword timelastedit; |
- | |
79 | dword datelastedit; |
- | |
80 | dword sizelo; |
- | |
81 | dword sizehi; |
- | |
82 | char name[518]; |
- | |
83 | }; |
- | |
84 | //--------------------------------------------------------------------------- |
69 | //--------------------------------------------------------------------------- |
85 | struct proc_info{ |
70 | struct proc_info{ |
86 | dword use_cpu; |
71 | dword use_cpu; |
87 | word pos_in_stack,num_slot,rezerv1; |
72 | word pos_in_stack,num_slot,rezerv1; |
88 | char name[11]; |
73 | char name[11]; |
Line 146... | Line 131... | ||
146 | ESI = headerType << 24 | headerColor; |
131 | ESI = headerType << 24 | headerColor; |
147 | $xor eax,eax |
132 | $xor eax,eax |
148 | $int 0x40 |
133 | $int 0x40 |
149 | } |
134 | } |
Line -... | Line 135... | ||
- | 135 | ||
- | 136 | inline fastcall dword CreateThread(dword ECX,EDX) |
|
- | 137 | { |
|
- | 138 | EAX = 51; |
|
- | 139 | EBX = 1; |
|
- | 140 | $int 0x40 |
|
- | 141 | } |
|
150 | 142 | ||
151 | inline fastcall void DrawTitle(dword ECX){ |
143 | inline fastcall void DrawTitle(dword ECX){ |
152 | EAX = 71; |
144 | EAX = 71; |
153 | EBX = 1; |
145 | EBX = 1; |
154 | $int 0x40; |
146 | $int 0x40; |
Line 219... | Line 211... | ||
219 | $mov eax, #buffer |
211 | $mov eax, #buffer |
220 | $ret |
212 | $ret |
221 | } |
213 | } |
Line 222... | Line 214... | ||
222 | 214 | ||
223 | 215 | ||
224 | inline fastcall int strcmp(dword EAX,EBX) |
216 | inline fastcall int strcmp(ESI, EDI) |
- | 217 | { |
|
- | 218 | loop() |
|
- | 219 | { |
|
- | 220 | IF (DSBYTE[ESI] |
|
225 | { |
221 | IF (DSBYTE[ESI]>DSBYTE[EDI]) RETURN 1; |
226 | #speed |
222 | IF (DSBYTE[ESI]=='\0') RETURN 0; |
- | 223 | ESI++; |
|
- | 224 | EDI++; |
|
- | 225 | } |
|
- | 226 | } |
|
- | 227 | ||
- | 228 | ||
- | 229 | inline fastcall unsigned int find_symbol(ESI,BL) |
|
227 | ESI=EAX; |
230 | { |
228 | EBX--; |
231 | int jj=0, last=-1; |
229 | TOP: |
232 | do{ |
- | 233 | jj++; |
|
- | 234 | $lodsb |
|
- | 235 | IF(AL==BL) last=jj; |
|
- | 236 | } while(AL!=0); |
|
- | 237 | return last; |
|
- | 238 | } |
|
- | 239 | ||
- | 240 | ||
- | 241 | inline fastcall memmov( EDI, ESI, ECX) |
|
- | 242 | { |
|
230 | EBX++; |
243 | asm { |
- | 244 | MOV EAX, ECX |
|
231 | $LODSB |
245 | CMP EDI, ESI |
- | 246 | JG L1 |
|
- | 247 | JE L2 |
|
- | 248 | SAR ECX, 2 |
|
- | 249 | JS L2 |
|
- | 250 | REP MOVSD |
|
- | 251 | MOV ECX, EAX |
|
- | 252 | AND ECX, 3 |
|
- | 253 | REP MOVSB |
|
- | 254 | JMP SHORT L2 |
|
232 | $CMP AL,0 |
255 | L1: LEA ESI, DSDWORD[ ESI+ECX-4] |
233 | $JE HERE |
256 | LEA EDI, DSDWORD[ EDI+ECX-4] |
234 | $CMP DSBYTE[EBX],AL |
257 | SAR ECX, 2 |
- | 258 | JS L2 |
|
- | 259 | STD |
|
- | 260 | REP MOVSD |
|
- | 261 | MOV ECX, EAX |
|
235 | $JE TOP |
262 | AND ECX, 3 |
236 | HERE: |
263 | ADD ESI, 3 |
237 | AL-=DSBYTE[EBX]; |
264 | ADD EDI, 3 |
- | 265 | REP MOVSB |
|
- | 266 | CLD |
|
238 | return AL; |
267 | L2: |
Line 239... | Line 268... | ||
239 | #codesize |
268 | } |
240 | } |
269 | } |
241 | - | ||
242 | 270 | ||
243 | inline fastcall dword ChangeCase(dword EDX) |
271 | |
- | 272 | inline fastcall dword ChangeCase(dword EDX) |
|
244 | { |
273 | { |
245 | #speed |
274 | AL=DSBYTE[EDX]; |
246 | AL=DSBYTE[EDX]; |
- | |
247 | IF(AL>='a')&&(AL<='z')DSBYTE[EDX]=AL&0x5f; |
- | |
248 | EDX++; |
275 | IF(AL>='a')&&(AL<='z')DSBYTE[EDX]=AL&0x5f; |
- | 276 | IF (AL>=160) && (AL<=175) DSBYTE[EDX] = AL - 32; //à-ï |
|
- | 277 | IF (AL>=224) && (AL<=239) DSBYTE[EDX] = AL - 80; //à-ï |
|
- | 278 | do{ |
|
- | 279 | EDX++; |
|
249 | do{ |
280 | AL=DSBYTE[EDX]; |
250 | AL=DSBYTE[EDX]; |
- | |
251 | IF(AL>='A')&&(AL<='Z')DSBYTE[EDX]=AL|0x20; |
281 | IF(AL>='A')&&(AL<='Z'){DSBYTE[EDX]=AL|0x20; continue;} |
Line -... | Line 282... | ||
- | 282 | IF(AL>='')&&(AL<='')DSBYTE[EDX]=AL|0x20; // -¯ |
|
252 | EDX++; |
283 | IF (AL>=144) && (AL<=159) DSBYTE[EDX] = AL + 80; //à-ï |
253 | }while(AL!=0); |
284 | }while(AL!=0); |
254 | #codesize |
285 | } |
255 | } |
- | |
256 | 286 | ||
257 | //------------------------------------------------------------------------------ |
287 | |
Line 258... | Line 288... | ||
258 | inline fastcall void PutPixel(dword EBX,ECX,EDX){ |
288 | //------------------------------------------------------------------------------ |
259 | EAX=1; |
289 | inline fastcall void PutPixel(dword EBX,ECX,EDX){ |
260 | ECX+=skin_width; |
290 | EAX=1; |
261 | $int 0x40 |
291 | $int 0x40 |
262 | } |
292 | } |
263 | 293 | ||
Line 264... | Line 294... | ||
264 | void DefineButton(dword x,y,w,h,EDX,ESI){ |
294 | void DefineButton(dword x,y,w,h,EDX,ESI){ |
265 | EAX = 8; |
295 | EAX = 8; |
Line 276... | Line 306... | ||
276 | } |
306 | } |
Line 277... | Line 307... | ||
277 | 307 | ||
278 | void WriteText(dword x,y,byte fontType, dword color, EDX, ESI) |
308 | void WriteText(dword x,y,byte fontType, dword color, EDX, ESI) |
279 | { |
309 | { |
280 | EAX = 4; |
310 | EAX = 4; |
281 | EBX = x<<16+skin_width+y; |
311 | EBX = x<<16+y; |
282 | ECX = fontType<<24+color; |
312 | ECX = fontType<<24+color; |
283 | $int 0x40; |
313 | $int 0x40; |
Line 284... | Line 314... | ||
284 | } |
314 | } |
285 | 315 | ||
286 | void DrawBar(dword x,y,w,h,EDX) |
316 | void DrawBar(dword x,y,w,h,EDX) |
287 | { |
317 | { |
288 | #speed |
318 | #speed |
289 | EAX = 13; |
319 | EAX = 13; |
290 | EBX = x<<16+w; |
320 | EBX = x<<16+w; |
291 | ECX = skin_width+y<<16+h; |
321 | ECX = y<<16+h; |
292 | $int 0x40 |
322 | $int 0x40 |
Line 293... | Line 323... | ||
293 | #codesize |
323 | #codesize |
294 | } |
324 | } |
295 | 325 | ||
296 | void DrawRegion(dword x,y,width,height,color1) |
326 | void DrawRegion_3D(dword x,y,width,height,color1,color2) |
297 | { |
327 | { |
298 | DrawBar(x,y,width,1,color1); //¯®«®á £®à ᢥàåã |
328 | DrawBar(x,y,width+1,1,color1); //¯®«®á £®à ᢥàåã |
299 | DrawBar(x,y+height,width,1,color1); //¯®«®á £®à ᨧã |
329 | DrawBar(x,y+1,1,height-1,color1); //¯®«®á á«¥¢ |
Line 300... | Line 330... | ||
300 | DrawBar(x,y,1,height,color1); //¯®«®á ¢¥àåã á«¥¢ |
330 | DrawBar(x+width,y+1,1,height,color2); //¯®«®á á¯à ¢ |
301 | DrawBar(x+width,y,1,height+1,color1); //¯®«®á ¢¥àåã á¯à ¢ |
331 | DrawBar(x,y+height,width,1,color2); //¯®«®á £®à ᨧã |
302 | } |
332 | } |
303 | - | ||
304 | void DrawFlatButton(dword x,y,width,height,id,color,text) |
- | |
305 | { |
- | |
306 | DrawRegion(x,y,width,height,0x94AECE); |
333 | |
307 | DrawBar(x+1,y+1,width-1,1,0xFFFFFF); //¯®«®á £®à ¡¥« ï |
334 | void DrawFlatButton(dword x,y,width,height,id,color,text) |
308 | DrawBar(x+1,y+height-1,width-2,1,0xC7C7C7); //¢¥¬ ¢¥à¢ |
335 | { |
309 | DrawBar(x+1,y+1,1,height-1,0xFFFFFF); //¯®«®á ¢¥à¢ ¡¥« ¯ |
336 | DrawRegion_3D(x,y,width,height,0x94AECE,0x94AECE); |
310 | DrawBar(x+width-1,y+2,1,height-2,0xC7C7C7); //¢¥¬ ¢¥à¢ |
337 | DrawRegion_3D(x+1,y+1,width-2,height-2,0xFFFFFF,0xC7C7C7); |
Line 311... | Line 338... | ||
311 | DrawBar(x+2,y+2,width-3,height-3,color); //§ «¨¢ª |
338 | DrawBar(x+2,y+2,width-3,height-3,color); //§ «¨¢ª |
312 | IF (id<>0) DefineButton(x,y,width,height,id+BT_HIDE,0xEFEBEF); //ª®¯ª |
339 | IF (id<>0) DefineButton(x,y,width,height,id+BT_HIDE,0xEFEBEF); //ª®¯ª |
313 | WriteText(-strlen(text)*6+width/2+x+1,height/2-3+y,0x80,0,text,0); |
340 | WriteText(-strlen(text)*6+width/2+x+1,height/2-3+y,0x80,0,text,0); |
314 | } |
341 | } |
315 | 342 | ||
316 | void PutImage(dword EBX,w,h,x,y) |
343 | void PutImage(dword EBX,w,h,x,y) |
317 | { |
344 | { |
Line 318... | Line 345... | ||
318 | EAX = 7; |
345 | EAX = 7; |
319 | ECX = w<<16+h; |
346 | ECX = w<<16+h; |
320 | EDX = x<<16+y+skin_width; |
347 | EDX = x<<16+y; |
321 | $int 0x40 |
348 | $int 0x40 |
322 | } |
349 | } |
323 | 350 | ||
324 | void PutPaletteImage(dword EBX,w,h,x,y, EDI) |
351 | void PutPaletteImage(dword EBX,w,h,x,y, EDI) |
325 | { |
352 | { |
326 | EAX = 65; |
353 | EAX = 65; |