2006-12-29 15:50:24 +01:00
|
|
|
;-----------------------------------------------------------
|
|
|
|
;------------------SaveFonForSprite-------------------------
|
|
|
|
;-----------------------------------------------------------
|
|
|
|
SaveFonForSprite:
|
|
|
|
|
|
|
|
mov edi,[PointerToSpriteBufer]
|
|
|
|
mov ecx,[SpriteSizeX]
|
|
|
|
mov edx,[Picture_SizeX]
|
|
|
|
sub edx,[SpriteSizeX]
|
|
|
|
mov esi,[SpriteCoordinatY]
|
|
|
|
imul esi,[Picture_SizeX]
|
|
|
|
add esi,[SpriteCoordinatX]
|
|
|
|
lea edx,[edx+edx*2]
|
|
|
|
lea esi,[esi+esi*2]
|
|
|
|
add esi,[PointerToPicture]
|
|
|
|
mov ebx,[SpriteSizeY]
|
|
|
|
mov [counter],ecx
|
|
|
|
|
|
|
|
next_line_sprite_save:
|
|
|
|
mov ecx,[counter]
|
|
|
|
|
|
|
|
next_pixel_sprite_save:
|
2016-03-15 23:30:18 +01:00
|
|
|
movsw
|
|
|
|
movsb
|
2006-12-29 15:50:24 +01:00
|
|
|
dec ecx
|
|
|
|
jnz next_pixel_sprite_save
|
|
|
|
|
|
|
|
add esi,edx
|
|
|
|
dec ebx
|
|
|
|
jnz next_line_sprite_save
|
|
|
|
|
|
|
|
ret
|
|
|
|
;-----------------------------------------------------------
|
|
|
|
;-------------------PutFonForSprite-------------------------
|
|
|
|
;-----------------------------------------------------------
|
|
|
|
PutFonForSprite:
|
|
|
|
|
|
|
|
mov esi,[PointerToSpriteBufer]
|
|
|
|
mov ecx,[SpriteSizeX]
|
|
|
|
mov edx,[Picture_SizeX]
|
|
|
|
sub edx,[SpriteSizeX]
|
|
|
|
mov edi,[SpriteOldCoordinatY]
|
|
|
|
imul edi,[Picture_SizeX]
|
|
|
|
add edi,[SpriteOldCoordinatX]
|
|
|
|
lea edx,[edx+edx*2]
|
|
|
|
lea edi,[edi+edi*2]
|
|
|
|
add edi,[PointerToPicture]
|
|
|
|
mov ebx,[SpriteSizeY]
|
|
|
|
mov [counter],ecx
|
|
|
|
|
|
|
|
next_line_sprite_put:
|
|
|
|
mov ecx,[counter]
|
|
|
|
|
|
|
|
next_pixel_sprite_put:
|
2016-03-15 23:30:18 +01:00
|
|
|
movsw
|
|
|
|
movsb
|
2006-12-29 15:50:24 +01:00
|
|
|
dec ecx
|
|
|
|
jnz next_pixel_sprite_put
|
|
|
|
|
|
|
|
add edi,edx
|
|
|
|
dec ebx
|
|
|
|
jnz next_line_sprite_put
|
|
|
|
|
|
|
|
ret
|
|
|
|
;-----------------------------------------------------------
|
|
|
|
;------------------DrawFonForSprite-------------------------
|
|
|
|
;-----------------------------------------------------------
|
|
|
|
DrawSprite:
|
|
|
|
|
|
|
|
mov esi,[PointerToEditBufer]
|
|
|
|
mov ecx,[SpriteSizeX]
|
|
|
|
mov edx,[Picture_SizeX]
|
|
|
|
sub edx,[SpriteSizeX]
|
|
|
|
mov edi,[SpriteCoordinatY]
|
|
|
|
imul edi,[Picture_SizeX]
|
|
|
|
add edi,[SpriteCoordinatX]
|
|
|
|
lea edx,[edx+edx*2]
|
|
|
|
lea edi,[edi+edi*2]
|
|
|
|
add edi,[PointerToPicture]
|
|
|
|
mov ebx,[SpriteSizeY]
|
|
|
|
mov [counter],ecx
|
|
|
|
|
|
|
|
next_line_sprite_draw:
|
|
|
|
mov ecx,[counter]
|
|
|
|
|
|
|
|
next_pixel_sprite_draw:
|
2016-03-15 23:30:18 +01:00
|
|
|
movsw
|
|
|
|
movsb
|
2006-12-29 15:50:24 +01:00
|
|
|
dec ecx
|
|
|
|
jnz next_pixel_sprite_draw
|
|
|
|
|
|
|
|
add edi,edx
|
|
|
|
dec ebx
|
|
|
|
jnz next_line_sprite_draw
|
|
|
|
|
|
|
|
ret
|