Rev 7054 | Rev 7160 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 7054 | Rev 7089 | ||
---|---|---|---|
Line 438... | Line 438... | ||
438 | EAX = 35; |
438 | EAX = 35; |
439 | EBX = _y * screen.width + _x; |
439 | EBX = _y * screen.width + _x; |
440 | $int 64 |
440 | $int 64 |
441 | } |
441 | } |
Line -... | Line 442... | ||
- | 442 | ||
- | 443 | #define DRAW_DESKTOP_BG_TILE 1 |
|
- | 444 | #define DRAW_DESKTOP_BG_STRETCH 2 |
|
- | 445 | void SetBackgroundImage(dword w,h, image, mode) |
|
- | 446 | { |
|
- | 447 | $mov eax,15 // SF_BACKGROUND_SET 15 - work with desktop background graphics |
|
- | 448 | $mov ebx,4 // SSF_MODE_BG 4 - set drawing mode for the background |
|
- | 449 | $mov ecx,mode // drawing mode - tile (1), stretch (2) |
|
- | 450 | $int 64 |
|
- | 451 | ||
- | 452 | $mov eax,15 // SF_BACKGROUND_SET 15 - work with desktop background graphics |
|
- | 453 | $mov ebx,1 // SSF_SIZE_BG=1 - set a size of the background image |
|
- | 454 | $mov ecx,w // width |
|
- | 455 | $mov edx,h // height |
|
- | 456 | $int 64 |
|
- | 457 | ||
- | 458 | $mov eax,15 // SF_BACKGROUND_SET 15 - work with desktop background graphics |
|
- | 459 | $mov ebx,5 // SSF_IMAGE_BG=5 - put block of pixels on the background image |
|
- | 460 | $mov ecx,image // pointer to the data in the format BBGGRRBBGGRR... |
|
- | 461 | $mov edx,0 // offset in data of the background image |
|
- | 462 | ESI = 3*w*h; // size of data in bytes = 3 * number of pixels |
|
- | 463 | $int 64 |
|
- | 464 | ||
- | 465 | $mov eax,15 // SF_BACKGROUND_SET 15 - work with desktop background graphics |
|
- | 466 | $mov ebx,3 // SSF_REDRAW_BG=3 - redraw background |
|
- | 467 | $int 64 |
|
- | 468 | } |
|
442 | 469 | ||
443 | :void _PutImage(dword x,y, w,h, data_offset) |
470 | :void _PutImage(dword x,y, w,h, data_offset) |
444 | { |
471 | { |
445 | EAX = 7; |
472 | EAX = 7; |
446 | EBX = data_offset; |
473 | EBX = data_offset; |
Line 572... | Line 599... | ||
572 | X_EventRedrawWindow = x; |
599 | X_EventRedrawWindow = x; |
573 | Y_EventRedrawWindow = y; |
600 | Y_EventRedrawWindow = y; |
574 | CreateThread(#_EventRedrawWindow,#REDRAW_BUFF_EVENT_+4092); |
601 | CreateThread(#_EventRedrawWindow,#REDRAW_BUFF_EVENT_+4092); |
575 | } |
602 | } |
Line 576... | Line 603... | ||
576 | 603 | ||
577 | :struct obj |
604 | :struct rect |
578 | { |
605 | { |
579 | dword x,y,w,h; |
606 | dword x,y,w,h; |
580 | void set_size(); |
607 | void set_size(); |
Line 581... | Line 608... | ||
581 | }; |
608 | }; |
582 | 609 | ||
583 | :void obj::set_size(dword _x, _y, _w, _h) |
610 | :void rect::set_size(dword _x, _y, _w, _h) |
584 | { |
611 | { |
585 | x=_x; |
612 | x=_x; |
586 | y=_y; |
613 | y=_y; |