Rev 6738 | Rev 6746 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 6738 | Rev 6742 | ||
---|---|---|---|
Line 64... | Line 64... | ||
64 | 64 | ||
65 | #include "../lib/system.h" |
65 | #include "../lib/system.h" |
66 | #include "../lib/mouse.h" |
66 | #include "../lib/mouse.h" |
Line -... | Line 67... | ||
- | 67 | #include "../lib/keyboard.h" |
|
- | 68 | ||
67 | #include "../lib/keyboard.h" |
69 | :dword calc(EAX) { return EAX; } |
68 | 70 | ||
69 | :struct raw_image { |
71 | :struct raw_image { |
Line 70... | Line 72... | ||
70 | dword w, h, data; |
72 | dword w, h, data; |
Line 327... | Line 329... | ||
327 | $and eax,1 |
329 | $and eax,1 |
328 | } |
330 | } |
Line 329... | Line 331... | ||
329 | 331 | ||
Line 330... | Line 332... | ||
330 | //------------------------------------------------------------------------------ |
332 | //------------------------------------------------------------------------------ |
331 | 333 | ||
332 | void DefineAndDrawWindow(dword x, y, size_w, size_h, byte WindowType,dword WindowAreaColor, EDI, ESI) |
334 | :void DefineAndDrawWindow(dword x, y, size_w, size_h, byte WindowType,dword WindowAreaColor, bgcolor, title) |
333 | { |
335 | { |
334 | EAX = 12; // function 12:tell os about windowdraw |
336 | EAX = 12; // function 12:tell os about windowdraw |
Line 335... | Line 337... | ||
335 | EBX = 1; |
337 | EBX = 1; |
336 | $int 0x40 |
338 | $int 0x40 |
337 | 339 | ||
338 | $xor EAX,EAX |
- | |
339 | EBX = x << 16 + size_w; |
340 | $xor EAX,EAX |
- | 341 | EBX = x << 16 + size_w; |
|
- | 342 | ECX = y << 16 + size_h; |
|
340 | ECX = y << 16 + size_h; |
343 | EDX = WindowType << 24 | WindowAreaColor; |
Line -... | Line 344... | ||
- | 344 | EDI = bgcolor; |
|
341 | 345 | ESI = title; |
|
342 | EDX = WindowType << 24 | WindowAreaColor; |
346 | $int 0x40 |
343 | $int 0x40 |
347 | |
344 | 348 | ||
Line 379... | Line 383... | ||
379 | ECX = fontType<<24+color; |
383 | ECX = fontType<<24+color; |
380 | EDX = str_offset; |
384 | EDX = str_offset; |
381 | $int 0x40; |
385 | $int 0x40; |
382 | } |
386 | } |
Line 383... | Line 387... | ||
383 | 387 | ||
384 | dword WriteBufText(dword x,y,byte fontType, dword color, EDX, EDI) |
388 | :dword WriteBufText(dword x,y,byte fontType, dword color, str_offset, buf_offset) |
385 | { |
389 | { |
386 | EAX = 4; |
390 | EAX = 4; |
387 | EBX = x<<16+y; |
391 | EBX = x<<16+y; |
- | 392 | ECX = fontType<<24+color; |
|
- | 393 | EDX = str_offset; |
|
388 | ECX = fontType<<24+color; |
394 | EDI = buf_offset; |
389 | $int 0x40; |
395 | $int 0x40; |
Line 390... | Line 396... | ||
390 | } |
396 | } |
391 | 397 | ||
392 | void WriteNumber(dword x,y,byte fontType, dword color, count, number_or_offset) |
398 | :void WriteNumber(dword x,y,byte fontType, dword color, count, number_or_offset) |
393 | { |
399 | { |
394 | EAX = 47; |
400 | EAX = 47; |
395 | EBX = count<<16; |
401 | EBX = count<<16; |
Line 437... | Line 443... | ||
437 | { |
443 | { |
438 | EAX=1; |
444 | EAX=1; |
439 | $int 0x40 |
445 | $int 0x40 |
440 | } |
446 | } |
Line 441... | Line 447... | ||
441 | 447 | ||
442 | void DrawBar(dword x,y,w,h,EDX) |
448 | :void DrawBar(dword x,y,w,h,color) |
443 | { |
449 | { |
444 | if (h<=0) || (h>60000) || (w<=0) || (w>60000) return; //bad boy :) |
450 | if (h<=0) || (h>60000) || (w<=0) || (w>60000) return; //bad boy :) |
445 | EAX = 13; |
451 | EAX = 13; |
446 | EBX = x<<16+w; |
452 | EBX = x<<16+w; |
- | 453 | ECX = y<<16+h; |
|
447 | ECX = y<<16+h; |
454 | EDX = color; |
448 | $int 0x40 |
455 | $int 0x40 |
Line 449... | Line 456... | ||
449 | } |
456 | } |
450 | 457 | ||
Line 471... | Line 478... | ||
471 | EBX = 3; |
478 | EBX = 3; |
472 | EDX = ID_ACTIVE; |
479 | EDX = ID_ACTIVE; |
473 | $int 0x40 |
480 | $int 0x40 |
474 | } |
481 | } |
Line 475... | Line 482... | ||
475 | 482 | ||
476 | void UnsafeDefineButton(dword x,y,w,h,EDX,ESI) |
483 | :void UnsafeDefineButton(dword x,y,w,h,id,color) |
477 | { |
484 | { |
478 | EAX = 8; |
485 | EAX = 8; |
479 | EBX = x<<16+w; |
486 | EBX = x<<16+w; |
- | 487 | ECX = y<<16+h; |
|
- | 488 | EDX = id; |
|
480 | ECX = y<<16+h; |
489 | ESI = color; |
481 | $int 0x40 |
490 | $int 0x40 |
Line 482... | Line 491... | ||
482 | } |
491 | } |
483 | 492 | ||
Line 606... | Line 615... | ||
606 | 615 | ||
607 | skin_height = GetSkinHeight(); |
616 | skin_height = GetSkinHeight(); |
608 | screen.width = GetScreenWidth(); |
617 | screen.width = GetScreenWidth(); |
Line 609... | Line -... | ||
609 | screen.height = GetScreenHeight(); |
- | |
610 | 618 | screen.height = GetScreenHeight(); |
|
611 | //program_path_length = strlen(I_Path); |
619 | |
Line 612... | Line 620... | ||
612 | DOUBLE_CLICK_DELAY = GetMouseDoubleClickDelay(); |
620 | DOUBLE_CLICK_DELAY = GetMouseDoubleClickDelay(); |