Rev 6342 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
255 | heavyiron | 1 | ;----------------------------------------------------------- |
6369 | IgorA | 2 | ;SaveFonForSprite: |
3 | ; PointerToPicture -> PointerToSpriteBufer |
||
4 | ; |
||
5 | ;PutFonForSprite: |
||
6 | ; PointerToSpriteBufer -> PointerToPicture |
||
7 | ; |
||
8 | ;DrawSprite: |
||
9 | ; PointerToEditBufer -> PointerToPicture |
||
255 | heavyiron | 10 | ;----------------------------------------------------------- |
6369 | IgorA | 11 | |
12 | align 4 |
||
255 | heavyiron | 13 | SaveFonForSprite: |
14 | mov ecx,[SpriteSizeX] |
||
6369 | IgorA | 15 | or ecx,ecx |
16 | jz .end_f |
||
255 | heavyiron | 17 | mov edx,[Picture_SizeX] |
6369 | IgorA | 18 | sub edx,ecx |
255 | heavyiron | 19 | mov esi,[SpriteCoordinatY] |
20 | imul esi,[Picture_SizeX] |
||
21 | add esi,[SpriteCoordinatX] |
||
22 | lea edx,[edx+edx*2] |
||
23 | lea esi,[esi+esi*2] |
||
24 | add esi,[PointerToPicture] |
||
6369 | IgorA | 25 | mov edi,[PointerToSpriteBufer] |
255 | heavyiron | 26 | mov ebx,[SpriteSizeY] |
27 | mov [counter],ecx |
||
28 | |||
6369 | IgorA | 29 | .next_line_sprite_save: |
255 | heavyiron | 30 | mov ecx,[counter] |
6369 | IgorA | 31 | align 4 |
32 | @@: |
||
6342 | IgorA | 33 | movsw |
34 | movsb |
||
255 | heavyiron | 35 | dec ecx |
6369 | IgorA | 36 | jnz @b |
255 | heavyiron | 37 | |
38 | add esi,edx |
||
39 | dec ebx |
||
6369 | IgorA | 40 | jnz .next_line_sprite_save |
41 | .end_f: |
||
255 | heavyiron | 42 | ret |
43 | ;----------------------------------------------------------- |
||
6369 | IgorA | 44 | |
45 | align 4 |
||
255 | heavyiron | 46 | PutFonForSprite: |
47 | mov ecx,[SpriteSizeX] |
||
6369 | IgorA | 48 | or ecx,ecx |
49 | jz .end_f |
||
255 | heavyiron | 50 | mov edx,[Picture_SizeX] |
6369 | IgorA | 51 | sub edx,ecx |
255 | heavyiron | 52 | mov edi,[SpriteOldCoordinatY] |
53 | imul edi,[Picture_SizeX] |
||
54 | add edi,[SpriteOldCoordinatX] |
||
55 | lea edx,[edx+edx*2] |
||
56 | lea edi,[edi+edi*2] |
||
57 | add edi,[PointerToPicture] |
||
6369 | IgorA | 58 | mov esi,[PointerToSpriteBufer] |
255 | heavyiron | 59 | mov ebx,[SpriteSizeY] |
60 | mov [counter],ecx |
||
61 | |||
6369 | IgorA | 62 | .next_line_sprite_put: |
255 | heavyiron | 63 | mov ecx,[counter] |
6369 | IgorA | 64 | align 4 |
65 | @@: |
||
6342 | IgorA | 66 | movsw |
67 | movsb |
||
255 | heavyiron | 68 | dec ecx |
6369 | IgorA | 69 | jnz @b |
255 | heavyiron | 70 | |
71 | add edi,edx |
||
72 | dec ebx |
||
6369 | IgorA | 73 | jnz .next_line_sprite_put |
74 | .end_f: |
||
255 | heavyiron | 75 | ret |
76 | ;----------------------------------------------------------- |
||
6369 | IgorA | 77 | |
78 | align 4 |
||
255 | heavyiron | 79 | DrawSprite: |
80 | mov ecx,[SpriteSizeX] |
||
6369 | IgorA | 81 | or ecx,ecx |
82 | jz .end_f |
||
255 | heavyiron | 83 | mov edx,[Picture_SizeX] |
6369 | IgorA | 84 | sub edx,ecx |
255 | heavyiron | 85 | mov edi,[SpriteCoordinatY] |
86 | imul edi,[Picture_SizeX] |
||
87 | add edi,[SpriteCoordinatX] |
||
88 | lea edx,[edx+edx*2] |
||
89 | lea edi,[edi+edi*2] |
||
90 | add edi,[PointerToPicture] |
||
6369 | IgorA | 91 | mov esi,[PointerToEditBufer] |
255 | heavyiron | 92 | mov ebx,[SpriteSizeY] |
93 | mov [counter],ecx |
||
94 | |||
6369 | IgorA | 95 | .next_line_sprite_draw: |
255 | heavyiron | 96 | mov ecx,[counter] |
6369 | IgorA | 97 | align 4 |
98 | @@: |
||
6342 | IgorA | 99 | movsw |
100 | movsb |
||
255 | heavyiron | 101 | dec ecx |
6369 | IgorA | 102 | jnz @b |
255 | heavyiron | 103 | |
104 | add edi,edx |
||
105 | dec ebx |
||
6369 | IgorA | 106 | jnz .next_line_sprite_draw |
107 | .end_f: |
||
255 | heavyiron | 108 | ret |