2010-07-29 23:20:45 +02:00
format MS COFF
public EXPORTS
section '.flat' code readable al ign 16
include '../../../../macros.inc'
include '../../../../proc32.inc'
;-----------------------------------------------------------------------------
mem.alloc dd ? ;<3B> 㭪<EFBFBD> <E3ADAA> <EFBFBD> <20> <> <EFBFBD> <20> 뤥<EFBFBD> <EBA4A5> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
mem.free dd ? ;<3B> 㭪<EFBFBD> <E3ADAA> <EFBFBD> <20> <> <EFBFBD> <20> <EFBFBD> <E1A2AE> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
mem.realloc dd ? ;<3B> 㭪<EFBFBD> <E3ADAA> <EFBFBD> <20> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ।<EFBFBD> <E0A5A4> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
dll.load dd ?
BUF_STRUCT_SIZE equ 21
buf2d_data equ dword [ edi ] ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD>
buf2d_w equ dword [ edi + 8 ] ;<3B> <> ਭ<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
buf2d_h equ dword [ edi + 12 ] ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
2010-07-30 19:42:39 +02:00
buf2d_l equ word [ edi + 4 ]
2010-07-29 23:20:45 +02:00
buf2d_t equ word [ edi + 6 ] ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ᢥ<> <E1A2A5> <EFBFBD>
buf2d_size_lt equ dword [ edi + 4 ] ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <> <E1ABA5> <20> <20> <> ࠢ<EFBFBD> <20> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
buf2d_color equ dword [ edi + 16 ] ;梥<> 䮭<> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
buf2d_bits equ byte [ edi + 20 ] ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ⢮ <20> <> <EFBFBD> <20> 1-<2D> <20> <> 窥 <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD>
struc t buf_2d_header
img_data dd ?
left dw ? ;+4 left
top dw ? ;+6 top
size_x dd ? ;+8 w
size_y dd ? ;+12 h
color dd ? ;+16 color
bit_pp db ? ;+21 bit in pixel
ends
macro swap v1 , v2 {
push v1
push v2
pop v1
pop v2
}
;䫠<> <E4ABA0> , <20> <> <EFBFBD> <20> 㭪樨 <20> <> १<EFBFBD> <E0A5A7> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
BUF2D_OPT_CROP_TOP equ 1 ;<3B> <> १<EFBFBD> <E0A5A7> ᢥ<> <E1A2A5> <EFBFBD>
BUF2D_OPT_CROP_LEFT equ 2 ;<3B> <> १<EFBFBD> <E0A5A7> <> <E1ABA5>
BUF2D_OPT_CROP_BOTTOM equ 4 ;<3B> <> १<EFBFBD> <E0A5A7> ᭨<> <E1ADA8>
BUF2D_OPT_CROP_RIGHT equ 8 ;<3B> <> १<EFBFBD> <E0A5A7> <20> <> ࠢ<EFBFBD>
BUF2D_BIT_OPT_CROP_TOP equ 0
BUF2D_BIT_OPT_CROP_LEFT equ 1
BUF2D_BIT_OPT_CROP_BOTTOM equ 2
BUF2D_BIT_OPT_CROP_RIGHT equ 3
2012-06-05 17:33:54 +02:00
vox_offs_tree_table equ 4
vox_offs_data equ 12
2010-07-29 23:20:45 +02:00
;input:
; eax = 㪠<> <E3AAA0> ⥫<EFBFBD> <20> <> <20> 㭪<EFBFBD> <E3ADAA> <EFBFBD> <20> 뤥<EFBFBD> <EBA4A5> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
; ebx = ... <20> <EFBFBD> <E1A2AE> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
; ecx = ... <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ।<EFBFBD> <E0A5A4> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
; edx = ... <20> <> <EFBFBD> <EFBFBD> 㧪<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ⥪<EFBFBD> (<28> <> <EFBFBD> <EFBFBD> <20> <> <20> ᯮ<EFBFBD> <E1AFAE> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> )
align 16
lib_init:
mov dword [ mem.alloc ], eax
mov dword [ mem.free ], ebx
mov dword [ mem.realloc ], ecx
mov dword [ dl l.load ], edx
ret
;input:
; ebx = coord x
; ecx = coord y
; edx = pixel color
; edi = pointer to buffer struct
align 4
draw_pixel:
;cmp buf2d_bits,24
;jne @f
bt ebx , 31
jc @ f
bt ecx , 31
jc @ f
cmp ebx , buf2d_w
jge @ f
cmp ecx , buf2d_h
jge @ f
push esi
mov esi , buf2d_w ;size x
imul esi , ecx ;size_x*y
add esi , ebx ;size_x*y+x
2012-02-20 13:10:29 +01:00
cmp buf2d_bits , 8
je .beg8
2012-05-11 12:11:27 +02:00
cmp buf2d_bits , 32
je .beg32
2012-02-20 13:10:29 +01:00
lea esi ,[ esi + esi * 2 ] ;(size_x*y+x)*3
add esi , buf2d_data ;ptr+(size_x*y+x)*3
mov word [ esi ], dx ;copy pixel color
ror edx , 16
mov byte [ esi + 2 ], dl
ror edx , 16
jmp .end_draw
.beg8: ;<3B> <> ᮢ<EFBFBD> <E1AEA2> <EFBFBD> <EFBFBD> <20> <> 窨 <20> 8 <20> <> ⭮<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
add esi , buf2d_data ;ptr+(size_x*y+x)
mov byte [ esi ], dl
2012-05-11 12:11:27 +02:00
jmp .end_draw
.beg32: ;<3B> <> ᮢ<EFBFBD> <E1AEA2> <EFBFBD> <EFBFBD> <20> <> 窨 <20> 32 <20> <> ⭮<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
shl esi , 2
add esi , buf2d_data ;ptr+(size_x*y+x)
mov dword [ esi ], edx
2012-02-20 13:10:29 +01:00
.end_draw:
2010-07-29 23:20:45 +02:00
pop esi
@ @ :
ret
2010-11-02 20:34:57 +01:00
2012-05-11 12:11:27 +02:00
;input:
; ebx = coord x
; ecx = coord y
; edi = pointer to buffer struct
;output:
; eax = 梥<> <20> <> 窨
; <20> <20> <> <EFBFBD> 砥 <20> 訡<EFBFBD> <E8A8A1> eax = 0xffffffff
align 4
get_pixel_8:
mov eax , 0xffffffff
bt ebx , 31
jc @ f
bt ecx , 31
jc @ f
cmp ebx , buf2d_w
jge @ f
cmp ecx , buf2d_h
jge @ f
push esi
mov esi , buf2d_w ;size x
imul esi , ecx ;size_x*y
add esi , ebx ;size_x*y+x
add esi , buf2d_data ;ptr+(size_x*y+x)
movzx eax , byte [ esi ] ;copy pixel color
pop esi
@ @ :
ret
2010-11-02 20:34:57 +01:00
;input:
; ebx = coord x
; ecx = coord y
; edi = pointer to buffer struct
;output:
; eax = 梥<> <20> <> 窨
; <20> <20> <> <EFBFBD> 砥 <20> 訡<EFBFBD> <E8A8A1> eax = 0xffffffff
align 4
get_pixel_24:
mov eax , 0xffffffff
bt ebx , 31
jc @ f
bt ecx , 31
jc @ f
cmp ebx , buf2d_w
jge @ f
cmp ecx , buf2d_h
jge @ f
push esi
mov esi , buf2d_w ;size x
imul esi , ecx ;size_x*y
add esi , ebx ;size_x*y+x
lea esi ,[ esi + esi * 2 ] ;(size_x*y+x)*3
add esi , buf2d_data ;ptr+(size_x*y+x)*3
xor eax , eax
mov ax , word [ esi ] ;copy pixel color
ror eax , 16
mov al , byte [ esi + 2 ]
ror eax , 16
pop esi
@ @ :
ret
2012-05-11 12:11:27 +02:00
;input:
; ebx = coord x
; ecx = coord y
; edi = pointer to buffer struct
;output:
; eax = 梥<> <20> <> 窨
; <20> <20> <> <EFBFBD> 砥 <20> 訡<EFBFBD> <E8A8A1> eax = 0xffffffff
align 4
get_pixel_32:
mov eax , 0xffffffff
bt ebx , 31
jc @ f
bt ecx , 31
jc @ f
cmp ebx , buf2d_w
jge @ f
cmp ecx , buf2d_h
jge @ f
push esi
mov esi , buf2d_w ;size x
imul esi , ecx ;size_x*y
add esi , ebx ;size_x*y+x
shl esi , 2
add esi , buf2d_data ;ptr+(size_x*y+x)*4
mov eax , dword [ esi ] ;copy pixel color
pop esi
@ @ :
ret
2011-09-22 17:38:57 +02:00
;input:
; ebx = coord x
; ecx = coord y
; edx = pixel color + transparent
; edi = pointer to buffer struct
; t_prop, m_prop - <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 樥<EFBFBD> <E6A8A5> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> 室<EFBFBD> <E5AEA4> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <E1ABA5> <EFBFBD> <20> ⥯<EFBFBD> <E2A5AF> <EFBFBD> <20> <EFBFBD> <E0AEA7> 筮<EFBFBD> <E7ADAE> <EFBFBD>
align 4
transp_32 dd 0 ;梥<> <20> <> <EFBFBD> 㥬<EFBFBD> <E3A5AC> <20> <> 窨 + <20> <EFBFBD> <E0AEA7> 筮<EFBFBD> <E7ADAE> <EFBFBD>
align 4
proc draw_pixel_transp , t_prop : dword , m_prop : dword
;cmp buf2d_bits,24
;jne @f
bt ebx , 31
jc @ f
bt ecx , 31
jc @ f
cmp ebx , buf2d_w
jge @ f
cmp ecx , buf2d_h
jge @ f
push eax ebx edx edi esi
mov esi , buf2d_w ;size x
imul esi , ecx ;size_x*y
add esi , ebx ;size_x*y+x
lea esi ,[ esi + esi * 2 ] ;(size_x*y+x)*3
add esi , buf2d_data ;ptr+(size_x*y+x)*3
mov edi , esi ;㪠<> <E3AAA0> ⥫<EFBFBD> <20> <> 梥<> 䮭<>
mov dword [ transp_32 ], edx ;梥<> <20> <> <EFBFBD> 㥬<EFBFBD> <E3A5AC> <20> <> 窨
xor edx , edx
mov eax ,[ t_prop ]
shl eax , 8 ;*=256
mov ebx ,[ m_prop ]
div ebx ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 塞 <20> <> <EFBFBD> <EFBFBD> . <20> <EFBFBD> <E0AEA7> 筮<EFBFBD> <E7ADAE> <EFBFBD> (<28> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <20> <> 0 <20> <> 255)
bt ax , 8
jnc .over_255
;<3B> <20> <> <EFBFBD> <EFBFBD> . <20> <EFBFBD> <E0AEA7> 筮<EFBFBD> <E7ADAE> <EFBFBD> >=256 <20> <> 㬥<> <E3ACA5> 蠥<EFBFBD> <20> <> <EFBFBD> <20> <> 255
mov al , 0xff
.over_255:
mov byte [ transp_32 + 3 ], al ;<3B> <EFBFBD> <E0AEA7> 筮<EFBFBD> <E7ADAE> <EFBFBD> <20> <> <EFBFBD> 㥬<EFBFBD> <E3A5AC> <20> <> 窨
mov esi , dword transp_32 ;㪠<> <E3AAA0> ⥫<EFBFBD> <20> <> 梥<> <20> <> <EFBFBD> 㥬<EFBFBD> <E3A5AC> <20> <> 窨
2012-08-11 20:05:17 +02:00
call combine_colors_0
2011-09-22 17:38:57 +02:00
pop esi edi edx ebx eax
@ @ :
ret
endp
2010-07-29 23:20:45 +02:00
;ᮧ<> <E1AEA7> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
align 4
proc buf_create , buf_struc : dword
pushad
mov edi , dword [ buf_struc ]
mov ecx , buf2d_w
mov ebx , buf2d_h
imul ecx , ebx
cmp buf2d_bits , 24
jne @ f
lea ecx ,[ ecx + ecx * 2 ] ; 24 bit = 3
;;;inc ecx ;<3B> <> <EFBFBD> <EFBFBD> ᭮<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <20> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> , <20> <> <EFBFBD> -<2D> <> <20> <> <20> <> <EFBFBD> 稫<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> 㭪樨 <20> <> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 4<>
@ @ :
cmp buf2d_bits , 32
jne @ f
shl ecx , 2 ; 32 bit = 4
@ @ :
invoke mem.alloc , ecx
mov buf2d_data , eax
stdcall buf_clear , edi , buf2d_color ;<3B> <> <EFBFBD> <EFBFBD> ⪠ <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 䮭<> <E4AEAD> <EFBFBD> <EFBFBD> 梥⮬
popad
ret
endp
;ᮧ<> <E1AEA7> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> ᭮<EFBFBD> <E1ADAE> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD> rgb
align 4
proc buf_create_f_img , buf_struc : dword , rgb_data : dword
pushad
mov edi , dword [ buf_struc ]
mov ecx , buf2d_w
mov ebx , buf2d_h
imul ecx , ebx
cmp buf2d_bits , 24
jne @ f
lea ecx ,[ ecx + ecx * 2 ] ; 24 bit = 3
;;;inc ecx ;<3B> <> <EFBFBD> <EFBFBD> ᭮<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <20> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> , <20> <> <EFBFBD> -<2D> <> <20> <> <20> <> <EFBFBD> 稫<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> 㭪樨 <20> <> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 4<>
@ @ :
cmp buf2d_bits , 32
jne @ f
shl ecx , 2 ; 32 bit = 4
@ @ :
invoke mem.alloc , ecx
mov buf2d_data , eax
cmp buf2d_bits , 24
jne @ f
cld
mov esi ,[ rgb_data ]
mov edi , eax ;eax=buf2d_data
rep movsb ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> 㥬 <20> <> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD> <20> <20> <> <EFBFBD> <EFBFBD> <EFBFBD>
jmp .end_create
@ @ :
stdcall buf_clear , edi , buf2d_color ;<3B> <> <EFBFBD> <EFBFBD> ⪠ <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 䮭<> <E4AEAD> <EFBFBD> <EFBFBD> 梥⮬
.end_create:
popad
ret
endp
align 4
proc buf_clear , buf_struc : dword , color : dword ;<3B> <> <EFBFBD> <EFBFBD> ⪠ <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 梥⮬
pushad
mov edi , dword [ buf_struc ]
mov ecx , buf2d_w
mov ebx , buf2d_h
imul ecx , ebx
cld
cmp buf2d_bits , 8
jne .end_clear_8
mov edi , buf2d_data
mov al , byte [ color ]
rep stosb
jmp .end_clear_32
.end_clear_8:
cmp buf2d_bits , 24
jne .end_clear_24
mov edi , buf2d_data
mov eax , dword [ color ]
mov ebx , eax
shr ebx , 16
@ @ :
stosw
mov byte [ edi ], bl
inc edi
loop @ b
jmp .end_clear_32
.end_clear_24:
cmp buf2d_bits , 32
jne .end_clear_32
mov edi , buf2d_data
mov eax , dword [ color ]
rep stosd
;jmp .end_clear_32
.end_clear_32:
popad
ret
endp
2010-07-30 19:42:39 +02:00
;<3B> 㭪<EFBFBD> <E3ADAA> <EFBFBD> <20> <> <EFBFBD> <20> <> १<EFBFBD> <E0A5A7> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> 8 <20> 24 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> , <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 梥<> <E6A2A5> .
;<3B> <> ࠬ<EFBFBD> <E0A0AC> <EFBFBD> opt <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 樥<EFBFBD> <20> <> <EFBFBD> <EFBFBD> ⠭<EFBFBD> :
; BUF2D_OPT_CROP_TOP - <20> <> १<EFBFBD> <E0A5A7> ᢥ<> <E1A2A5> <EFBFBD>
; BUF2D_OPT_CROP_LEFT - <20> <> १<EFBFBD> <E0A5A7> <> <E1ABA5>
; BUF2D_OPT_CROP_BOTTOM - <20> <> १<EFBFBD> <E0A5A7> ᭨<> <E1ADA8>
; BUF2D_OPT_CROP_RIGHT - <20> <> १<EFBFBD> <E0A5A7> <20> <> ࠢ<EFBFBD>
2010-07-29 23:20:45 +02:00
align 4
2010-07-30 19:42:39 +02:00
proc buf_crop_color , buf_struc : dword , color : dword , opt : dword
2010-07-29 23:20:45 +02:00
locals
crop_r dd ?
endl
pushad
mov edi , dword [ buf_struc ]
cmp buf2d_bits , 24
jne .24end_f
bt dword [ opt ], BUF2D_BIT_OPT_CROP_BOTTOM
jae .24no_crop_bottom
mov eax , dword [ color ]
mov edx , eax ;ax = colors - r,g
shr edx , 16 ;dl = color - b
mov ecx , buf2d_h
2010-08-04 13:40:19 +02:00
cmp ecx , 1
jle .24no_crop_bottom ;<3B> <EFBFBD> <E0AEA2> 塞 <20> <> <20> <> <EFBFBD> 砩 <20> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 1 <20> <> <EFBFBD> ᥫ<EFBFBD>
2010-07-29 23:20:45 +02:00
mov ebx , buf2d_w
imul ecx , ebx
lea esi ,[ ecx + ecx * 2 ] ;esi=3*ecx
add esi , buf2d_data
cld
@ @ :
sub esi , 3
cmp word [ esi ], ax
jne @ f
cmp byte [ esi + 2 ], dl
jne @ f
loop @ b
@ @ :
lea ebx ,[ ebx + ebx * 2 ]
xor edx , edx
mov eax , buf2d_h
imul eax , ebx
add eax , buf2d_data ;eax - 㪠<> <E3AAA0> ⥫<EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD>
@ @ :
add esi , ebx
cmp esi , eax
jge @ f
inc edx ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 塞 <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> ப <20> <> <EFBFBD> <20> <> १<EFBFBD> <E0A5A7> <EFBFBD> <EFBFBD>
loop @ b
@ @ :
cmp edx , 0
je .24no_crop_bottom
cmp edx , buf2d_h
jge .24no_crop_bottom ;<3B> <> <EFBFBD> -<2D> <> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> ⮩ <20> <> <EFBFBD> <EFBFBD> <EFBFBD>
sub buf2d_h , edx ;㬥<> <E3ACA5> 蠥<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
mov ecx , buf2d_h
imul ecx , ebx ;ecx = <20> <> <EFBFBD> <EFBFBD> <EFBFBD> ࠧ<> <E0A0A7> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD>
invoke mem.realloc , buf2d_data , ecx
mov buf2d_data , eax ;<3B> <> <20> <> <EFBFBD> 砩 <20> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 㪠<> <E3AAA0> ⥫<EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
.24no_crop_bottom:
bt dword [ opt ], BUF2D_BIT_OPT_CROP_TOP
jae .24no_crop_top
mov eax , dword [ color ]
mov edx , eax ;ax = colors - r,g
shr edx , 16 ;dl = color - b
mov esi , buf2d_data
mov ecx , buf2d_h
2010-08-04 13:40:19 +02:00
cmp ecx , 1
jle .24no_crop_top ;<3B> <EFBFBD> <E0AEA2> 塞 <20> <> <20> <> <EFBFBD> 砩 <20> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 1 <20> <> <EFBFBD> ᥫ<EFBFBD>
2010-07-29 23:20:45 +02:00
dec ecx ;<3B> <> <EFBFBD> <20> <> १<EFBFBD> <E0A5A7> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 1-<2D> <> <20> <> ப<EFBFBD> <20> <> <EFBFBD> ᥫ<EFBFBD> <E1A5AB>
mov ebx , buf2d_w
imul ecx , ebx
cld
@ @ :
cmp word [ esi ], ax
jne @ f
cmp byte [ esi + 2 ], dl
jne @ f
add esi , 3
loop @ b
@ @ :
lea ebx ,[ ebx + ebx * 2 ]
xor edx , edx
@ @ :
sub esi , ebx
cmp esi , buf2d_data
jl @ f
inc edx ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 塞 <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> ப <20> <> <EFBFBD> <20> <> १<EFBFBD> <E0A5A7> <EFBFBD> <EFBFBD>
loop @ b
@ @ :
cmp edx , 0
je .24no_crop_top
xor eax , eax
sub eax , edx
mov ebx , buf2d_h
sub ebx , edx
stdcall buf_offset_h , edi , eax , edx , ebx ;ᤢ<> <E1A4A2> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD> <20> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> (eax<0)
sub buf2d_h , edx ;㬥<> <E3ACA5> 蠥<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
mov ecx , buf2d_h
add buf2d_t , dx ;ᤢ<> <E1A4A2> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> , <20> <> <20> <> <20> <> १<EFBFBD> <E0A5A7> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> ப
mov ebx , buf2d_w
imul ecx , ebx
lea ecx ,[ ecx + ecx * 2 ]
invoke mem.realloc , buf2d_data , ecx
mov buf2d_data , eax ;<3B> <> <20> <> <EFBFBD> 砩 <20> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 㪠<> <E3AAA0> ⥫<EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
.24no_crop_top:
bt dword [ opt ], BUF2D_BIT_OPT_CROP_RIGHT
jae .24no_crop_right
mov eax , dword [ color ]
mov edx , eax ;ax = colors - r,g
shr edx , 16 ;dl = color - b
mov ebx , buf2d_w
2010-08-04 13:40:19 +02:00
cmp ebx , 1
jle .24no_crop_right ;<3B> <> <20> <> <EFBFBD> 砩 <20> <20> <> ਭ<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 1 <20> <> <EFBFBD> ᥫ<EFBFBD>
2010-07-29 23:20:45 +02:00
lea ebx ,[ ebx + ebx * 2 ]
mov esi , ebx
imul esi , buf2d_h
add esi , buf2d_data ;esi - 㪠<> <E3AAA0> ⥫<EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD>
mov dword [ crop_r ], 0
cld
2010-07-30 19:42:39 +02:00
.24found_beg_right:
2010-07-29 23:20:45 +02:00
sub esi , 3 ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> 1-<2D> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD>
mov ecx , buf2d_h ;<3B> <> <EFBFBD> <EFBFBD> ⠭<EFBFBD> <E2A0AD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ecx <20> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 横<> <E6A8AA>
@ @ :
cmp word [ esi ], ax
2010-07-30 19:42:39 +02:00
jne .24found_right
2010-07-29 23:20:45 +02:00
cmp byte [ esi + 2 ], dl
2010-07-30 19:42:39 +02:00
jne .24found_right
2010-07-29 23:20:45 +02:00
sub esi , ebx ;<3B> <> 룠<EFBFBD> <EBA3A0> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> ப<EFBFBD>
loop @ b
inc dword [ crop_r ]
mov ecx , buf2d_w
dec ecx ;1 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD>
cmp dword [ crop_r ], ecx
2010-07-30 19:42:39 +02:00
jge .24found_right
2010-07-29 23:20:45 +02:00
sub esi , 3 ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> 1-<2D> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD>
mov ecx , buf2d_h ;<3B> <> <EFBFBD> <EFBFBD> ⠭<EFBFBD> <E2A0AD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ecx <20> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 横<> <E6A8AA>
@ @ :
add esi , ebx ;<3B> <> 룠<EFBFBD> <EBA3A0> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> ப<EFBFBD>
cmp word [ esi ], ax
2010-07-30 19:42:39 +02:00
jne .24found_right
2010-07-29 23:20:45 +02:00
cmp byte [ esi + 2 ], dl
2010-07-30 19:42:39 +02:00
jne .24found_right
2010-07-29 23:20:45 +02:00
loop @ b
inc dword [ crop_r ]
mov ecx , buf2d_w
dec ecx ;1 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD>
cmp dword [ crop_r ], ecx
2010-07-30 19:42:39 +02:00
jl .24found_beg_right
2010-07-29 23:20:45 +02:00
2010-07-30 19:42:39 +02:00
.24found_right:
2010-07-29 23:20:45 +02:00
cmp dword [ crop_r ], 0
je .24no_crop_right
mov ecx , buf2d_w
sub ecx , dword [ crop_r ]
2010-07-30 19:42:39 +02:00
stdcall img_rgb_crop_r , buf2d_data , buf2d_w , ecx , buf2d_h ;<3B> <> १<EFBFBD> <E0A5A7> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> , <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ࠧ<> <E0A0A7> <EFBFBD> <EFBFBD>
2010-07-29 23:20:45 +02:00
mov buf2d_w , ecx ;<3B> ⠢<EFBFBD> <E2A0A2> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> ਭ<EFBFBD> <20> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
mov ebx , buf2d_h
imul ecx , ebx
lea ecx ,[ ecx + ecx * 2 ]
invoke mem.realloc , buf2d_data , ecx
mov buf2d_data , eax ;<3B> <> <20> <> <EFBFBD> 砩 <20> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 㪠<> <E3AAA0> ⥫<EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
.24no_crop_right:
2010-07-30 19:42:39 +02:00
bt dword [ opt ], BUF2D_BIT_OPT_CROP_LEFT
jae .24no_crop_left
mov eax , dword [ color ]
mov edx , eax ;ax = colors - r,g
shr edx , 16 ;dl = color - b
mov ebx , buf2d_w
2010-08-04 13:40:19 +02:00
cmp ebx , 1
jle .24no_crop_left ;<3B> <> <20> <> <EFBFBD> 砩 <20> <20> <> ਭ<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 1 <20> <> <EFBFBD> ᥫ<EFBFBD>
2010-07-30 19:42:39 +02:00
lea ebx ,[ ebx + ebx * 2 ]
mov esi , buf2d_data ;esi - 㪠<> <E3AAA0> ⥫<EFBFBD> <20> <> <20> <> 箫<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD>
mov dword [ crop_r ], 0
cld
.24found_beg_left:
mov ecx , buf2d_h ;<3B> <> <EFBFBD> <EFBFBD> ⠭<EFBFBD> <E2A0AD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ecx <20> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 横<> <E6A8AA>
@ @ :
cmp word [ esi ], ax
jne .24found_left
cmp byte [ esi + 2 ], dl
jne .24found_left
add esi , ebx ;<3B> <> 룠<EFBFBD> <EBA3A0> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> ப<EFBFBD>
loop @ b
inc dword [ crop_r ]
add esi , 3 ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> 1-<2D> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> ࠢ<EFBFBD>
mov ecx , buf2d_w
dec ecx ;1 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD>
cmp dword [ crop_r ], ecx
jge .24found_left
mov ecx , buf2d_h ;<3B> <> <EFBFBD> <EFBFBD> ⠭<EFBFBD> <E2A0AD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ecx <20> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 横<> <E6A8AA>
@ @ :
sub esi , ebx ;<3B> <> 룠<EFBFBD> <EBA3A0> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> ப<EFBFBD>
cmp word [ esi ], ax
jne .24found_left
cmp byte [ esi + 2 ], dl
jne .24found_left
loop @ b
inc dword [ crop_r ]
add esi , 3 ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> 1-<2D> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> ࠢ<EFBFBD>
mov ecx , buf2d_w
dec ecx ;1 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD>
cmp dword [ crop_r ], ecx
jl .24found_beg_left
.24found_left:
cmp dword [ crop_r ], 0
je .24no_crop_left
mov ecx , buf2d_w
sub ecx , dword [ crop_r ]
stdcall img_rgb_crop_l , buf2d_data , buf2d_w , ecx , buf2d_h ;<3B> <> १<EFBFBD> <E0A5A7> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> , <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ࠧ<> <E0A0A7> <EFBFBD> <EFBFBD>
mov buf2d_w , ecx ;<3B> ⠢<EFBFBD> <E2A0A2> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> ਭ<EFBFBD> <20> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
mov ebx , buf2d_h
imul ecx , ebx
lea ecx ,[ ecx + ecx * 2 ]
invoke mem.realloc , buf2d_data , ecx
mov buf2d_data , eax ;<3B> <> <20> <> <EFBFBD> 砩 <20> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 㪠<> <E3AAA0> ⥫<EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
mov eax , dword [ crop_r ]
add buf2d_l , ax
.24no_crop_left:
2010-07-29 23:20:45 +02:00
.24end_f:
cmp buf2d_bits , 8
jne .8end_f
bt dword [ opt ], BUF2D_BIT_OPT_CROP_BOTTOM
jae .8no_crop_bottom
mov eax , dword [ color ]
mov esi , buf2d_data
mov ecx , buf2d_h
2010-08-04 13:40:19 +02:00
cmp ecx , 1
jle .8no_crop_bottom ;<3B> <EFBFBD> <E0AEA2> 塞 <20> <> <20> <> <EFBFBD> 砩 <20> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 1 <20> <> <EFBFBD> ᥫ<EFBFBD>
2010-07-29 23:20:45 +02:00
mov ebx , buf2d_w
imul ecx , ebx
mov esi , ecx
add esi , buf2d_data
cld
@ @ :
dec esi
cmp byte [ esi ], al
jne @ f
loop @ b
@ @ :
xor edx , edx
mov eax , buf2d_h
imul eax , ebx
add eax , buf2d_data ;eax - 㪠<> <E3AAA0> ⥫<EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD>
@ @ :
add esi , ebx
cmp esi , eax
jge @ f
inc edx
loop @ b
@ @ :
cmp edx , 0
je .8no_crop_bottom
cmp edx , buf2d_h
jge .8no_crop_bottom ;<3B> <> <EFBFBD> -<2D> <> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> ⮩ <20> <> <EFBFBD> <EFBFBD> <EFBFBD>
sub buf2d_h , edx ;㬥<> <E3ACA5> 蠥<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
mov ecx , buf2d_h
imul ecx , ebx ;ecx = <20> <> <EFBFBD> <EFBFBD> <EFBFBD> ࠧ<> <E0A0A7> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD>
invoke mem.realloc , buf2d_data , ecx
mov buf2d_data , eax ;<3B> <> <20> <> <EFBFBD> 砩 <20> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 㪠<> <E3AAA0> ⥫<EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
.8no_crop_bottom:
bt dword [ opt ], BUF2D_BIT_OPT_CROP_TOP
jae .8no_crop_top
mov eax , dword [ color ]
mov esi , buf2d_data
mov ecx , buf2d_h
2010-08-04 13:40:19 +02:00
cmp ecx , 1
jle .8no_crop_top ;<3B> <EFBFBD> <E0AEA2> 塞 <20> <> <20> <> <EFBFBD> 砩 <20> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 1 <20> <> <EFBFBD> ᥫ<EFBFBD>
2010-07-29 23:20:45 +02:00
dec ecx ;<3B> <> <EFBFBD> <20> <> १<EFBFBD> <E0A5A7> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 1-<2D> <> <20> <> ப<EFBFBD> <20> <> <EFBFBD> ᥫ<EFBFBD> <E1A5AB>
mov ebx , buf2d_w
imul ecx , ebx
cld
@ @ :
cmp byte [ esi ], al
jne @ f
inc esi
loop @ b
@ @ :
xor edx , edx
@ @ :
sub esi , ebx
cmp esi , buf2d_data
jl @ f
inc edx
loop @ b
@ @ :
cmp edx , 0
je .8no_crop_top
xor eax , eax
sub eax , edx
mov ebx , buf2d_h
sub ebx , edx
stdcall buf_offset_h , edi , eax , edx , ebx
mov ecx , buf2d_h
sub ecx , edx
mov buf2d_h , ecx ;㬥<> <E3ACA5> 蠥<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
add buf2d_t , dx ;ᤢ<> <E1A4A2> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> , <20> <> <20> <> <20> <> १<EFBFBD> <E0A5A7> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> ப
mov ebx , buf2d_w
imul ecx , ebx
invoke mem.realloc , buf2d_data , ecx
mov buf2d_data , eax ;<3B> <> <20> <> <EFBFBD> 砩 <20> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 㪠<> <E3AAA0> ⥫<EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
.8no_crop_top:
bt dword [ opt ], BUF2D_BIT_OPT_CROP_RIGHT
jae .8no_crop_right
mov eax , dword [ color ]
mov ebx , buf2d_w
2010-08-04 13:40:19 +02:00
cmp ebx , 1
jle .8no_crop_right ;<3B> <> <20> <> <EFBFBD> 砩 <20> <20> <> ਭ<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 1 <20> <> <EFBFBD> ᥫ<EFBFBD>
2010-07-29 23:20:45 +02:00
mov esi , ebx
imul esi , buf2d_h
add esi , buf2d_data ;esi - 㪠<> <E3AAA0> ⥫<EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD>
xor edx , edx
cld
.8found_beg:
dec esi ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> 1-<2D> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD>
mov ecx , buf2d_h ;<3B> <> <EFBFBD> <EFBFBD> ⠭<EFBFBD> <E2A0AD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ecx <20> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 横<> <E6A8AA>
@ @ :
cmp byte [ esi ], al
jne .8found
sub esi , ebx ;<3B> <> 룠<EFBFBD> <EBA3A0> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> ப<EFBFBD>
loop @ b
inc edx
mov ecx , buf2d_w
dec ecx ;1 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD>
cmp edx , ecx
jge .8found
dec esi ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> 1-<2D> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD>
mov ecx , buf2d_h ;<3B> <> <EFBFBD> <EFBFBD> ⠭<EFBFBD> <E2A0AD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ecx <20> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 横<> <E6A8AA>
@ @ :
add esi , ebx ;<3B> <> 룠<EFBFBD> <EBA3A0> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> ப<EFBFBD>
cmp byte [ esi ], al
jne .8found
loop @ b
inc edx
mov ecx , buf2d_w
dec ecx ;1 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD>
cmp edx , ecx
jl .8found_beg
.8found:
cmp edx , 0
je .8no_crop_right
mov ecx , buf2d_w
sub ecx , edx
2010-07-30 19:42:39 +02:00
stdcall img_gray_crop_r , buf2d_data , buf2d_w , ecx , buf2d_h ;<3B> <> १<EFBFBD> <E0A5A7> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> , <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ࠧ<> <E0A0A7> <EFBFBD> <EFBFBD>
2010-07-29 23:20:45 +02:00
mov buf2d_w , ecx ;<3B> ⠢<EFBFBD> <E2A0A2> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> ਭ<EFBFBD> <20> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
mov ebx , buf2d_h
imul ecx , ebx
invoke mem.realloc , buf2d_data , ecx
mov buf2d_data , eax ;<3B> <> <20> <> <EFBFBD> 砩 <20> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 㪠<> <E3AAA0> ⥫<EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
.8no_crop_right:
2010-07-30 19:42:39 +02:00
bt dword [ opt ], BUF2D_BIT_OPT_CROP_LEFT
jae .8no_crop_left
mov eax , dword [ color ]
mov ebx , buf2d_w
2010-08-04 13:40:19 +02:00
cmp ebx , 1
jle .8no_crop_left ;<3B> <> <20> <> <EFBFBD> 砩 <20> <20> <> ਭ<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 1 <20> <> <EFBFBD> ᥫ<EFBFBD>
2010-07-30 19:42:39 +02:00
mov esi , buf2d_data ;esi - 㪠<> <E3AAA0> ⥫<EFBFBD> <20> <> <20> <> 箫<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD>
mov edx , 0
cld
.8found_beg_left:
mov ecx , buf2d_h ;<3B> <> <EFBFBD> <EFBFBD> ⠭<EFBFBD> <E2A0AD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ecx <20> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 横<> <E6A8AA>
@ @ :
cmp word [ esi ], ax
jne .8found_left
add esi , ebx ;<3B> <> 룠<EFBFBD> <EBA3A0> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> ப<EFBFBD>
loop @ b
inc edx
inc esi ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> 1-<2D> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> ࠢ<EFBFBD>
mov ecx , buf2d_w
dec ecx ;1 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD>
cmp edx , ecx
jge .8found_left
mov ecx , buf2d_h ;<3B> <> <EFBFBD> <EFBFBD> ⠭<EFBFBD> <E2A0AD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ecx <20> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 横<> <E6A8AA>
@ @ :
sub esi , ebx ;<3B> <> 룠<EFBFBD> <EBA3A0> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> ப<EFBFBD>
cmp word [ esi ], ax
jne .8found_left
loop @ b
inc edx
inc esi ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> 1-<2D> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> ࠢ<EFBFBD>
mov ecx , buf2d_w
dec ecx ;1 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD>
cmp edx , ecx
jl .8found_beg_left
.8found_left:
cmp edx , 0
je .8no_crop_left
mov ecx , buf2d_w
sub ecx , edx
stdcall img_gray_crop_l , buf2d_data , buf2d_w , ecx , buf2d_h ;<3B> <> १<EFBFBD> <E0A5A7> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> , <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ࠧ<> <E0A0A7> <EFBFBD> <EFBFBD>
mov buf2d_w , ecx ;<3B> ⠢<EFBFBD> <E2A0A2> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> ਭ<EFBFBD> <20> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
mov ebx , buf2d_h
imul ecx , ebx
invoke mem.realloc , buf2d_data , ecx
mov buf2d_data , eax ;<3B> <> <20> <> <EFBFBD> 砩 <20> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 㪠<> <E3AAA0> ⥫<EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
mov eax , edx
add buf2d_l , ax
.8no_crop_left:
2010-07-29 23:20:45 +02:00
.8end_f:
popad
ret
endp
2010-07-30 19:42:39 +02:00
;<3B> <> १<EFBFBD> <E0A5A7> <EFBFBD> 梥⭮<E6A2A5> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD> <20> <20> ࠢ<EFBFBD> <E0A0A2> <20> <> <EFBFBD> <EFBFBD>
2010-07-29 23:20:45 +02:00
;input:
;data_rgb - pointer to rgb data
;size_w_old - width img in pixels
;size_w_new - new width img in pixels
;size_h - height img in pixels
align 4
2010-07-30 19:42:39 +02:00
proc img_rgb_crop_r , data_rgb : dword , si ze_w_old : dword , si ze_w_new : dword , si ze_h : dword
2010-07-29 23:20:45 +02:00
pushad
mov eax , dword [ si ze_w_old ]
lea eax , dword [ eax + eax * 2 ] ;eax = width(old) * 3(rgb)
mov ebx , dword [ si ze_w_new ]
lea ebx , dword [ ebx + ebx * 2 ] ;ebx = width(new) * 3(rgb)
mov edx , dword [ si ze_h ]
mov edi , dword [ data_rgb ] ;edi - <20> <> <EFBFBD> <EFBFBD> 砥<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
mov esi , edi
add edi , ebx
add esi , eax
cld
@ @ :
dec edx ;㬥<> <E3ACA5> 蠥<EFBFBD> <20> <> <EFBFBD> <EFBFBD> 稪 <20> <> ⠢<EFBFBD> <E2A0A2> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> ப <20> <> 1
cmp edx , 0
jle @ f
mov ecx , ebx
rep movsb ;<3B> <> ७<EFBFBD> <E0A5AD> (<28> <> <EFBFBD> <EFBFBD> <EFBFBD> <E0AEA2> <EFBFBD> <EFBFBD> ) <20> <> ப<EFBFBD> <20> <> <EFBFBD> ᥫ<EFBFBD> <E1A5AB>
add esi , eax ;<3B> <> <EFBFBD> <EFBFBD> 室 <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD>
sub esi , ebx
jmp @ b
@ @ :
popad
ret
endp
2010-07-30 19:42:39 +02:00
;<3B> <> १<EFBFBD> <E0A5A7> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD> <20> <20> ࠢ<EFBFBD> <E0A0A2> <20> <> <EFBFBD> <EFBFBD>
2010-07-29 23:20:45 +02:00
;input:
;data_gray - pointer to gray data
;size_w_old - width img in pixels
;size_w_new - new width img in pixels
;size_h - height img in pixels
align 4
2010-07-30 19:42:39 +02:00
proc img_gray_crop_r , data_gray : dword , si ze_w_old : dword , si ze_w_new : dword , si ze_h : dword
2010-07-29 23:20:45 +02:00
pushad
mov eax , dword [ si ze_w_old ]
mov ebx , dword [ si ze_w_new ]
mov edx , dword [ si ze_h ]
mov edi , dword [ data_gray ] ;edi - <20> <> <EFBFBD> <EFBFBD> 砥<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
mov esi , edi
add edi , ebx
add esi , eax
cld
@ @ :
dec edx ;㬥<> <E3ACA5> 蠥<EFBFBD> <20> <> <EFBFBD> <EFBFBD> 稪 <20> <> ⠢<EFBFBD> <E2A0A2> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> ப <20> <> 1
cmp edx , 0
jle @ f
mov ecx , ebx
rep movsb ;<3B> <> ७<EFBFBD> <E0A5AD> (<28> <> <EFBFBD> <EFBFBD> <EFBFBD> <E0AEA2> <EFBFBD> <EFBFBD> ) <20> <> ப<EFBFBD> <20> <> <EFBFBD> ᥫ<EFBFBD> <E1A5AB>
add esi , eax ;<3B> <> <EFBFBD> <EFBFBD> 室 <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD>
sub esi , ebx
jmp @ b
@ @ :
popad
ret
endp
2010-07-30 19:42:39 +02:00
;<3B> <> १<EFBFBD> <E0A5A7> <EFBFBD> 梥⭮<E6A2A5> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD> <20> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD>
;input:
;data_rgb - pointer to rgb data
;size_w_old - width img in pixels
;size_w_new - new width img in pixels
;size_h - height img in pixels
align 4
proc img_rgb_crop_l , data_rgb : dword , si ze_w_old : dword , si ze_w_new : dword , si ze_h : dword
pushad
mov edi , dword [ data_rgb ]
mov esi , edi
mov eax , dword [ si ze_w_old ]
mov ebx , dword [ si ze_w_new ]
cmp eax , ebx
jle .end_f ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ࠧ<> <E0A0A7> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> (<28> <> <EFBFBD> <20> <EFBFBD> <E1ABAE> <EFBFBD> <20> <> १<EFBFBD> <E0A5A7> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> ⨭<EFBFBD> <E2A8AD> )
lea eax ,[ eax + eax * 2 ]
lea ebx ,[ ebx + ebx * 2 ]
sub eax , ebx
mov edx , dword [ si ze_h ] ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD>
cld
@ @ :
add esi , eax
mov ecx , ebx
rep movsb
dec edx
cmp edx , 0
jg @ b
.end_f:
popad
ret
endp
;<3B> <> १<EFBFBD> <E0A5A7> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD> <20> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD>
;input:
;data_gray - pointer to gray data
;size_w_old - width img in pixels
;size_w_new - new width img in pixels
;size_h - height img in pixels
align 4
proc img_gray_crop_l , data_gray : dword , si ze_w_old : dword , si ze_w_new : dword , si ze_h : dword
pushad
mov edi , dword [ data_gray ]
mov esi , edi
mov eax , dword [ si ze_w_old ]
mov ebx , dword [ si ze_w_new ]
cmp eax , ebx
jle .end_f ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ࠧ<> <E0A0A7> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> (<28> <> <EFBFBD> <20> <EFBFBD> <E1ABAE> <EFBFBD> <20> <> १<EFBFBD> <E0A5A7> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> ⨭<EFBFBD> <E2A8AD> )
sub eax , ebx
mov edx , dword [ si ze_h ] ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD>
cld
@ @ :
add esi , eax
mov ecx , ebx
rep movsb
dec edx
cmp edx , 0
jg @ b
.end_f:
popad
ret
endp
2010-07-29 23:20:45 +02:00
;hoffs - <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ⢮ <20> <> <EFBFBD> ᥫ<EFBFBD> <E1A5AB> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> /<2F> <> <EFBFBD> ᪠<EFBFBD> <E1AAA0> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD>
;img_t - <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> , <20> <20> <> <EFBFBD> <EFBFBD> ன <20> <> 稭<EFBFBD> <E7A8AD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD>
align 4
proc buf_offset_h , buf_struc : dword , hoffs : dword , img_t : dword , img_h : dword ;ᤢ<> <E1A4A2> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
pushad
mov edi , dword [ buf_struc ]
cmp buf2d_bits , 24
jne .end_move_24
mov eax ,[ hoffs ]
cmp eax , 0
je .end_move_24
mov ebx , buf2d_w
mov edx , dword [ img_t ]
mov ecx , dword [ img_h ] ;ecx - <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ᤢ<> <E1A4A2> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
cmp ecx , buf2d_h
jge .end_f ;<3B> 訡<EFBFBD> 筮<EFBFBD> <20> <EFBFBD> <E1ABAE> <EFBFBD> , <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 祬 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ᤢ<> <E1A4A2> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD>
imul ecx , ebx ;ecx - <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ⢮ <20> <> <EFBFBD> ᥫ<EFBFBD> <E1A5AB> <20> ᤢ<> <E1A4A2> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
lea ecx ,[ ecx + ecx * 2 ]
imul ebx , edx
lea ebx ,[ ebx + ebx * 2 ]
mov esi , buf2d_data
add esi , ebx
add edx , eax ;edx = img_t+hoffs (hoffs<0)
mov ebx , buf2d_w
imul ebx , edx
lea ebx ,[ ebx + ebx * 2 ]
mov edi , buf2d_data ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> , <20> 㤠 <20> 㤥<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD>
add edi , ebx
cmp eax , 0
jg .move_down_24
;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD>
cld
rep movsb
jmp .end_f
.move_down_24:
;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD>
add esi , ecx
dec esi
add edi , ecx
dec edi
std
rep movsb
jmp .end_f
.end_move_24:
;stdcall print_err,sz_buf2d_offset_h,txt_err_n24b
cmp buf2d_bits , 8
jne .end_move_8
mov eax ,[ hoffs ]
cmp eax , 0
je .end_move_8
;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD>
mov ebx , buf2d_w
mov edx , dword [ img_t ]
mov ecx , dword [ img_h ] ;ecx - <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ᤢ<> <E1A4A2> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
cmp ecx , buf2d_h
jge .end_f ;<3B> 訡<EFBFBD> 筮<EFBFBD> <20> <EFBFBD> <E1ABAE> <EFBFBD> , <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 祬 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ᤢ<> <E1A4A2> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD>
imul ecx , ebx ;ecx - <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ⢮ <20> <> <EFBFBD> ᥫ<EFBFBD> <E1A5AB> <20> ᤢ<> <E1A4A2> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
imul ebx , edx
mov esi , buf2d_data
add esi , ebx
add edx , eax ;edx = img_t+hoffs (hoffs<0)
mov ebx , buf2d_w
imul ebx , edx
mov edi , buf2d_data ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> , <20> 㤠 <20> 㤥<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD>
add edi , ebx
cmp eax , 0
jg .move_down_8
cld
rep movsb
jmp .end_f
.move_down_8:
;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD>
add esi , ecx
dec esi
add edi , ecx
dec edi
std
rep movsb
jmp .end_f
.end_move_8:
.end_f:
popad
ret
endp
align 4
proc buf_draw_buf , buf_struc : dword
pushad
mov edi , dword [ buf_struc ]
cmp buf2d_bits , 24
jne .error
mov eax , 7
mov ebx , buf2d_data
mov ecx , buf2d_w
ror ecx , 16
mov edx , buf2d_h
mov cx , dx
mov edx , buf2d_size_lt
ror edx , 16
int 0x40
jmp .end_draw_24
.error:
stdcall print_err , sz_buf2d_draw , txt_err_n24b
.end_draw_24:
popad
ret
endp
align 4
proc buf_delete , buf_struc : dword
2011-08-30 13:10:56 +02:00
push eax edi
2010-07-29 23:20:45 +02:00
mov edi , dword [ buf_struc ]
invoke mem.free , buf2d_data
2011-08-30 13:10:56 +02:00
pop edi eax
ret
endp
align 4
proc buf_resize , buf_struc : dword , new_w : dword , new_h : dword
pushad
mov edi , dword [ buf_struc ]
cmp buf2d_bits , 24
jne .24bit
mov eax , dword [ new_w ]
cmp eax , 1
jl @ f
mov buf2d_w , eax
@ @ :
mov ecx , buf2d_w
mov eax , dword [ new_h ]
cmp eax , 1
jl @ f
mov buf2d_h , eax
@ @ :
mov ebx , buf2d_h
imul ecx , ebx
lea ecx ,[ ecx + ecx * 2 ] ; 24 bit = 3
invoke mem.realloc , buf2d_data , ecx ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> 塞 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD>
mov buf2d_data , eax ;<3B> <> <20> <> <EFBFBD> 砩 <20> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 㪠<> <E3AAA0> ⥫<EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
.24bit:
popad
2010-07-29 23:20:45 +02:00
ret
endp
2012-10-01 12:45:57 +02:00
align 4
rot_table: ;⠡<> <E2A0A1> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> 㪠<> <E3AAA0> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> 㭪樨 <20> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ⮢
dd buf_rotate.8b90 , buf_rotate.24b90 , buf_rotate.32b90 , \
buf_rotate.8b180 , buf_rotate.24b180 , buf_rotate.32b180
;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD> <20> <> 90 <20> <> <EFBFBD> 180 <20> ࠤ<EFBFBD> ᮢ
align 4
proc buf_rotate , buf_struc : dword , angle : dword
locals
n_data dd ?
dec_h dd ? ;<3B> <> <20> <> <EFBFBD> <EFBFBD> , <20> <> <EFBFBD> 㬥<> <E3ACA5> 襭<EFBFBD> <E8A5AD> <20> <> <EFBFBD> न<EFBFBD> <E0A4A8> <EFBFBD> <EFBFBD> y
endl
pushad
mov edi ,[ buf_struc ]
mov ebx , buf2d_w
mov ecx , buf2d_h
lea eax ,[ rot_table ]
cmp dword [ angle ], 90 ;<3B> <EFBFBD> ઠ 㣫<> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
je .beg_0
cmp dword [ angle ], 180
jne @ f
add eax , 12
jmp .beg_0
@ @ :
jmp .end_f
.beg_0: ;<3B> <EFBFBD> ઠ <20> <> ⭮<EFBFBD> <E2ADAE> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
cmp buf2d_bits , 8
jne @ f
jmp dword [ eax ]
@ @ :
cmp buf2d_bits , 24
jne @ f
add eax , 4
jmp dword [ eax ]
@ @ :
cmp buf2d_bits , 32
jne @ f
add eax , 8
jmp dword [ eax ]
@ @ :
jmp .end_f
.8b90: ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 8 <20> <> ⭮<EFBFBD> <E2ADAE> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> 90 <20> ࠤ<EFBFBD> ᮢ
mov edx , ecx ;edx - buf_h
imul ecx , ebx
invoke mem.alloc , ecx ;<3B> 뤥<EFBFBD> 塞 <20> ६<EFBFBD> <E0A5AC> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
cmp eax , 0
je .end_f
mov [ n_data ], eax
mov [ dec_h ], ecx
inc dword [ dec_h ]
;copy buf --> mem
mov edi ,[ buf_struc ]
mov esi , buf2d_data
mov edi , eax ;[n_data]
dec edx ;<3B> <> ४<EFBFBD> <E0A5AA> <EFBFBD> 㥬 edx <20> <> 1 <20> <> <EFBFBD> <EFBFBD> , <20> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 樨 ᤢ<> <E1A4A2> <EFBFBD> <20> movsb
add edi , edx
xor eax , eax
cld
.cycle_0:
movsb
add edi , edx
inc eax
cmp eax , ebx
jl @ f
xor eax , eax
sub edi ,[ dec_h ]
@ @ :
loop .cycle_0
;change buf_w <---> buf_h
mov esi ,[ n_data ]
mov edi ,[ buf_struc ]
mov edi , buf2d_data
mov ecx , ebx
inc edx ;<3B> <> <EFBFBD> ࠢ<EFBFBD> 塞 ४<E1AAAE> <E0A5AA> <EFBFBD> <E0AEA2> <EFBFBD> <EFBFBD> <EFBFBD> edx
imul ecx , edx
;copy buf <-- mem
;cld
rep movsb
invoke mem.free ,[ n_data ]
jmp .change_w_h
.24b90: ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 24 <20> <> ⭮<EFBFBD> <E2ADAE> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> 90 <20> ࠤ<EFBFBD> ᮢ
mov esi , ecx
imul esi , ebx
lea ecx ,[ ecx + ecx * 2 ]
mov edx , ecx ;edx - buf_h * 3
imul ecx , ebx
invoke mem.alloc , ecx ;<3B> 뤥<EFBFBD> 塞 <20> ६<EFBFBD> <E0A5AC> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
cmp eax , 0
je .end_f
mov [ n_data ], eax
mov [ dec_h ], ecx
add dword [ dec_h ], 3
;copy buf --> mem
mov edi ,[ buf_struc ]
mov ecx , esi
mov esi , buf2d_data
mov edi , eax ;[n_data]
sub edx , 3 ;<3B> <> ४<EFBFBD> <E0A5AA> <EFBFBD> 㥬 edx <20> <> 3 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> , <20> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 樨 ᤢ<> <E1A4A2> <EFBFBD>
add edi , edx
xor eax , eax
cld
.cycle_1:
movsw
movsb
add edi , edx
inc eax
cmp eax , ebx
jl @ f
xor eax , eax
sub edi ,[ dec_h ]
@ @ :
loop .cycle_1
;copy buf <-- mem
mov esi ,[ n_data ]
mov edi ,[ buf_struc ]
mov edi , buf2d_data
mov ecx , ebx
add edx , 3 ;<3B> <> <EFBFBD> ࠢ<EFBFBD> 塞 ४<E1AAAE> <E0A5AA> <EFBFBD> <E0AEA2> <EFBFBD> <EFBFBD> <EFBFBD> edx
imul ecx , edx
;cld
rep movsb
invoke mem.free ,[ n_data ]
jmp .change_w_h
.32b90: ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 32 <20> <> ⭮<EFBFBD> <E2ADAE> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> 90 <20> ࠤ<EFBFBD> ᮢ
shl ecx , 2
mov edx , ecx ;edx - buf_h * 4
imul ecx , ebx
invoke mem.alloc , ecx ;<3B> 뤥<EFBFBD> 塞 <20> ६<EFBFBD> <E0A5AC> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
cmp eax , 0
je .end_f
mov [ n_data ], eax
mov [ dec_h ], ecx
add dword [ dec_h ], 4
;copy buf --> mem
mov edi ,[ buf_struc ]
shr ecx , 2
mov esi , buf2d_data
mov edi , eax ;[n_data]
sub edx , 4 ;<3B> <> ४<EFBFBD> <E0A5AA> <EFBFBD> 㥬 edx <20> <> 4 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> , <20> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 樨 ᤢ<> <E1A4A2> <EFBFBD> <20> movsd
add edi , edx
xor eax , eax
cld
.cycle_2:
movsd
add edi , edx
inc eax
cmp eax , ebx
jl @ f
xor eax , eax
sub edi ,[ dec_h ]
@ @ :
loop .cycle_2
;copy buf <-- mem
mov esi ,[ n_data ]
mov edi ,[ buf_struc ]
mov edi , buf2d_data
mov ecx , ebx
add edx , 4 ;<3B> <> <EFBFBD> ࠢ<EFBFBD> 塞 ४<E1AAAE> <E0A5AA> <EFBFBD> <E0AEA2> <EFBFBD> <EFBFBD> <EFBFBD> edx
imul ecx , edx
shr ecx , 2
;cld
rep movsd
invoke mem.free ,[ n_data ]
;jmp .change_w_h
.change_w_h: ;change buf_w <---> buf_h
mov edi ,[ buf_struc ]
mov eax , buf2d_w
mov ebx , buf2d_h
mov buf2d_h , eax
mov buf2d_w , ebx
jmp .end_f
.8b180: ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 8 <20> <> ⭮<EFBFBD> <E2ADAE> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> 180 <20> ࠤ<EFBFBD> ᮢ
mov edi , buf2d_data
mov esi , edi
imul ecx , ebx
add esi , ecx
dec esi
shr ecx , 1 ;ecx - <20> <> <20> <> <EFBFBD> ᥫ<EFBFBD> <E1A5AB> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> : 2
std
@ @ :
lodsb
mov ah , byte [ edi ]
mov byte [ esi + 1 ], ah
mov byte [ edi ], al
inc edi
loop @ b
jmp .end_f
.24b180: ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 24 <20> <> ⭮<EFBFBD> <E2ADAE> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> 180 <20> ࠤ<EFBFBD> ᮢ
mov esi , buf2d_data
mov edi , esi
imul ecx , ebx
mov eax , ecx
lea ecx ,[ ecx + ecx * 2 ]
add edi , ecx
sub edi , 3
shr eax , 1
mov ecx , eax ;ecx - <20> <> <20> <> <EFBFBD> ᥫ<EFBFBD> <E1A5AB> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> : 2
cld
@ @ :
lodsw
mov edx , eax
lodsb
mov bx , word [ edi ]
mov word [ esi - 3 ], bx
mov bl , byte [ edi + 2 ]
mov byte [ esi - 1 ], bl
mov byte [ edi + 2 ], al
mov word [ edi ], dx
sub edi , 3
loop @ b
jmp .end_f
.32b180: ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 32 <20> <> ⭮<EFBFBD> <E2ADAE> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> 180 <20> ࠤ<EFBFBD> ᮢ
mov edi , buf2d_data
mov esi , edi
imul ecx , ebx
shl ecx , 2
add esi , ecx
sub esi , 4
shr ecx , 3 ;ecx - <20> <> <20> <> <EFBFBD> ᥫ<EFBFBD> <E1A5AB> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> : 2
std
@ @ :
lodsd
mov ebx , dword [ edi ]
mov dword [ esi + 4 ], ebx
mov dword [ edi ], eax
add edi , 4
loop @ b
;jmp .end_f
.end_f:
popad
ret
endp
2010-07-29 23:20:45 +02:00
align 4
proc buf_line_brs , buf_struc : dword , coord_x0 : dword , coord_y0 : dword , coord_x1 : dword , coord_y1 : dword , color : dword
locals
loc_1 dd ?
loc_2 dd ?
napravl db ?
endl
pushad
mov eax , dword [ coord_x1 ]
sub eax , dword [ coord_x0 ]
bt eax , 31
jae @ f
neg eax
inc eax
@ @ :
mov ebx , dword [ coord_y1 ]
sub ebx , dword [ coord_y0 ]
2011-09-22 17:38:57 +02:00
jnz @ f
;<3B> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> ਧ<EFBFBD> <E0A8A7> ⠫쭠<E2A0AB> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> y0=y1
stdcall buf_line_h , [ buf_struc ], [ coord_x0 ], [ coord_y0 ], [ coord_x1 ], [ color ]
jmp .coord_end
@ @ :
2010-07-29 23:20:45 +02:00
bt ebx , 31
jae @ f
neg ebx
inc ebx
@ @ :
2011-09-22 17:38:57 +02:00
mov edx , dword [ color ]
2010-07-29 23:20:45 +02:00
mov [ napravl ], byte 0 ;bool steep=false
cmp eax , ebx
jle @ f
mov [ napravl ], byte 1 ;bool steep=true
swap dword [ coord_x0 ], dword [ coord_y0 ] ;swap(x0, y0);
swap dword [ coord_x1 ], dword [ coord_y1 ] ;swap(x1, y1);
@ @ :
mov eax , dword [ coord_y0 ] ;x0
cmp eax , dword [ coord_y1 ] ;if(x0>x1)
jle @ f
swap dword [ coord_y0 ], dword [ coord_y1 ] ;swap(x0, x1);
swap dword [ coord_x0 ], dword [ coord_x1 ] ;swap(y0, y1);
@ @ :
; int deltax esi
; int deltay edi
; int error ebp-6
; int ystep ebp-8
mov eax , dword [ coord_y0 ]
mov esi , dword [ coord_y1 ]
sub esi , eax ;deltax = y1-y0
mov ebx , esi
shr ebx , 1
mov [ loc_1 ], ebx ;error = deltax/2
mov eax , dword [ coord_x0 ]
mov edi , dword [ coord_x1 ]
mov [ loc_2 ], dword - 1 ;ystep = -1
cmp eax , edi ;if (x0<x1) ystep = 1;
jge @ f
mov [ loc_2 ], dword 1 ;ystep = 1
@ @ :
sub edi , eax ;x1-x0
bts edi , 31
jae @ f
neg edi
inc edi
@ @ :
and edi , 0x7fffffff ;deltay = abs(x1-x0)
mov eax , edi
mov edi ,[ buf_struc ]
2012-02-20 13:10:29 +01:00
cmp buf2d_bits , 8
je @ f
2010-07-29 23:20:45 +02:00
cmp buf2d_bits , 24
2012-02-20 13:10:29 +01:00
je @ f
jmp .coord_end
@ @ :
2010-07-29 23:20:45 +02:00
cmp [ napravl ], 0
jne .coord_yx
mov ebx , dword [ coord_x0 ]
mov ecx , dword [ coord_y0 ]
@ @ : ;for (x=x0 ; x<x1; x++) ;------------------------------------
cmp ecx , dword [ coord_y1 ]
jg @ f ;jge ???
call draw_pixel
sub dword [ loc_1 ], eax ;error -= deltay
cmp dword [ loc_1 ], 0 ;if(error<0)
jge .if0
add ebx ,[ loc_2 ] ;y += ystep
add [ loc_1 ], esi ;error += deltax
.if0:
inc ecx
jmp @ b
@ @ :
jmp .coord_end
.coord_yx:
mov ebx , dword [ coord_y0 ]
mov ecx , dword [ coord_x0 ]
@ @ : ;for (x=x0 ; x<x1; x++) ;------------------------------------
cmp ebx , dword [ coord_y1 ]
jg @ f ;jge ???
call draw_pixel
sub dword [ loc_1 ], eax ;error -= deltay
cmp dword [ loc_1 ], 0 ;if(error<0)
jge .if1
add ecx ,[ loc_2 ] ;y += ystep
add [ loc_1 ], esi ;error += deltax
.if1:
inc ebx
jmp @ b
@ @ :
.coord_end:
popad
ret
endp
2011-09-22 17:38:57 +02:00
;<3B> <> ᮢ<EFBFBD> <E1AEA2> <EFBFBD> <EFBFBD> ᣫ<> <E1A3AB> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD>
align 4
proc buf_line_brs_sm , buf_struc : dword , coord_x0 : dword , coord_y0 : dword , coord_x1 : dword , coord_y1 : dword , color : dword
locals
loc_1 dd ?
loc_2 dd ?
napravl db ?
endl
pushad
mov eax , dword [ coord_x1 ]
sub eax , dword [ coord_x0 ]
bt eax , 31
jae @ f
neg eax
inc eax
@ @ :
mov ebx , dword [ coord_y1 ]
sub ebx , dword [ coord_y0 ]
jnz @ f
;<3B> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> ਧ<EFBFBD> <E0A8A7> ⠫쭠<E2A0AB> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> y0=y1
stdcall buf_line_h , [ buf_struc ], [ coord_x0 ], [ coord_y0 ], [ coord_x1 ], [ color ]
jmp .coord_end
@ @ :
bt ebx , 31
jae @ f
neg ebx
inc ebx
@ @ :
mov edx , dword [ color ]
mov [ napravl ], byte 0 ;bool steep=false
cmp eax , ebx
jle @ f
mov [ napravl ], byte 1 ;bool steep=true
swap dword [ coord_x0 ], dword [ coord_y0 ] ;swap(x0, y0);
swap dword [ coord_x1 ], dword [ coord_y1 ] ;swap(x1, y1);
@ @ :
mov eax , dword [ coord_y0 ] ;x0
cmp eax , dword [ coord_y1 ] ;if(x0>x1)
jle @ f
swap dword [ coord_y0 ], dword [ coord_y1 ] ;swap(x0, x1);
swap dword [ coord_x0 ], dword [ coord_x1 ] ;swap(y0, y1);
@ @ :
; int deltax esi
; int deltay edi
; int error ebp-6
; int ystep ebp-8
mov eax , dword [ coord_y0 ]
mov esi , dword [ coord_y1 ]
sub esi , eax ;deltax = y1-y0
mov ebx , esi
shr ebx , 1
mov [ loc_1 ], ebx ;error = deltax/2
mov eax , dword [ coord_x0 ]
mov edi , dword [ coord_x1 ]
mov [ loc_2 ], dword - 1 ;ystep = -1
cmp eax , edi ;if (x0<x1) ystep = 1;
jge @ f
mov [ loc_2 ], dword 1 ;ystep = 1
@ @ :
sub edi , eax ;x1-x0
bts edi , 31
jae @ f
neg edi
inc edi
@ @ :
and edi , 0x7fffffff ;deltay = abs(x1-x0)
mov eax , edi
mov edi ,[ buf_struc ]
cmp buf2d_bits , 24
jne .coord_end
cmp [ napravl ], 0
jne .coord_yx
mov ebx , dword [ coord_x0 ]
mov ecx , dword [ coord_y0 ]
@ @ : ;for (x=x0 ; x<x1; x++) ;------------------------------------
cmp ecx , dword [ coord_y1 ]
jg @ f ;jge ???
push eax
mov eax , esi
sub eax ,[ loc_1 ]
stdcall draw_pixel_transp , eax , esi
pop eax
add ebx ,[ loc_2 ]
stdcall draw_pixel_transp , [ loc_1 ], esi
sub ebx ,[ loc_2 ]
sub dword [ loc_1 ], eax ;error -= deltay
cmp dword [ loc_1 ], 0 ;if(error<0)
jge .if0
add ebx ,[ loc_2 ] ;y += ystep
add [ loc_1 ], esi ;error += deltax
.if0:
inc ecx
jmp @ b
@ @ :
jmp .coord_end
.coord_yx:
mov ebx , dword [ coord_y0 ]
mov ecx , dword [ coord_x0 ]
@ @ : ;for (x=x0 ; x<x1; x++) ;------------------------------------
cmp ebx , dword [ coord_y1 ]
jg @ f ;jge ???
push eax
mov eax , esi
sub eax ,[ loc_1 ]
stdcall draw_pixel_transp , eax , esi
pop eax
add ecx ,[ loc_2 ]
stdcall draw_pixel_transp , [ loc_1 ], esi
sub ecx ,[ loc_2 ]
sub dword [ loc_1 ], eax ;error -= deltay
cmp dword [ loc_1 ], 0 ;if(error<0)
jge .if1
add ecx ,[ loc_2 ] ;y += ystep
add [ loc_1 ], esi ;error += deltax
.if1:
inc ebx
jmp @ b
@ @ :
.coord_end:
popad
ret
endp
2010-10-11 14:07:55 +02:00
;<3B> <> ᮢ<EFBFBD> <E1AEA2> <EFBFBD> <EFBFBD> <20> <> ਧ<EFBFBD> <E0A8A7> ⠫쭮<E2A0AB> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> , <20> <> ⮬<EFBFBD> <20> <> <EFBFBD> <20> <> ࠬ<EFBFBD> <E0A0AC> <EFBFBD> <EFBFBD> coord_y1
2010-09-30 23:07:09 +02:00
align 4
proc buf_line_h , buf_struc : dword , coord_x0 : dword , coord_y0 : dword , coord_x1 : dword , color : dword
pushad
2012-02-20 13:10:29 +01:00
pushfd
2010-09-30 23:07:09 +02:00
mov edi ,[ buf_struc ]
2012-02-20 13:10:29 +01:00
cmp buf2d_bits , 8
je @ f
2010-09-30 23:07:09 +02:00
cmp buf2d_bits , 24
2012-02-20 13:10:29 +01:00
je @ f
jmp .end24
@ @ : ;<3B> <> ।<EFBFBD> <E0A5A4> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> न<EFBFBD> <E0A4A8> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> ⭮<EFBFBD> <E2ADAE> ⥫쭮 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
2010-09-30 23:07:09 +02:00
mov ecx , dword [ coord_y0 ]
2011-09-13 00:34:41 +02:00
bt ecx , 31
jc .end24 ;<3B> <20> <> <EFBFBD> न<EFBFBD> <E0A4A8> <EFBFBD> <EFBFBD> y0 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ⥫쭠<E2A5AB>
cmp ecx , buf2d_h
jge .end24 ;<3B> <20> <> <EFBFBD> न<EFBFBD> <E0A4A8> <EFBFBD> <EFBFBD> y0 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
mov ebx , dword [ coord_x0 ]
2010-09-30 23:07:09 +02:00
mov esi , dword [ coord_x1 ]
2010-12-13 16:21:52 +01:00
cmp ebx , esi
jle @ f
xchg ebx , esi ;<3B> x0 > x1 <20> <> <20> <> <EFBFBD> 塞 <20> <> <EFBFBD> ⠬<EFBFBD> x0 <20> x1
2011-09-13 00:34:41 +02:00
@ @ :
2011-09-13 22:27:29 +02:00
bt ebx , 31
jae @ f
;<3B> <20> <> <EFBFBD> न<EFBFBD> <E0A4A8> <EFBFBD> <EFBFBD> x0 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ⥫쭠<E2A5AB>
xor ebx , ebx
@ @ :
2011-09-13 00:34:41 +02:00
cmp esi , buf2d_w
jl @ f
2011-09-13 22:27:29 +02:00
;<3B> <20> <> <EFBFBD> न<EFBFBD> <E0A4A8> <EFBFBD> <EFBFBD> x0 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> ਭ<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
2011-09-13 00:34:41 +02:00
mov esi , buf2d_w
2012-02-20 15:24:37 +01:00
dec esi
2011-09-13 00:34:41 +02:00
@ @ :
2011-09-13 22:27:29 +02:00
cmp ebx , esi
2012-02-20 13:10:29 +01:00
jg .end24 ;<3B> x0 > x1 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <20> <> <EFBFBD> न<EFBFBD> <E0A4A8> <EFBFBD> <EFBFBD> x0, x1 <20> <> 室<EFBFBD> <E5AEA4> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> ।<EFBFBD> <E0A5A4> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
2011-09-13 00:34:41 +02:00
2012-02-20 13:10:29 +01:00
cmp buf2d_bits , 24
je .beg24
;<3B> <> ᮢ<EFBFBD> <E1AEA2> <EFBFBD> <EFBFBD> <20> 8 <20> <> ⭮<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
;<3B> edx <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 塞 <20> <> 砫<EFBFBD> 1-<2D> <20> <> 窨 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD>
mov edx , buf2d_w ;size x
imul edx , ecx ;size_x*y
add edx , ebx ;size_x*y+x
add edx , buf2d_data ;ptr+(size_x*y+x)
mov edi , edx ;⥯<> <E2A5AF> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 㪠<> <E3AAA0> ⥫<EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD>
mov ecx , esi
sub ecx , ebx ;<3B> ecx <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ⢮ <20> <> 祪 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> 뢮<EFBFBD> <EBA2AE> <EFBFBD> <EFBFBD> <EFBFBD> <20> <20> <> <EFBFBD> <EFBFBD> <EFBFBD>
inc ecx ;<3B> <> <EFBFBD> -<2D> <> <20> <> <EFBFBD> <E1ABA5> <EFBFBD> <EFBFBD> <20> <> 窠 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> ⠪<> <E2A0AA> <20> ⮡ࠦ<E2AEA1> <E0A0A6> <EFBFBD> <EFBFBD> <EFBFBD>
mov eax , dword [ color ] ;<3B> 㤥<EFBFBD> <20> ᯮ<EFBFBD> 짮<EFBFBD> <ECA7AE> <EFBFBD> <EFBFBD> ⮫쪮 <20> <> <EFBFBD> 祭<EFBFBD> <E7A5AD> <20> al
cld
rep stosb ;横<> <20> <> <20> <> <EFBFBD> x <20> <> x0 <20> <> x1 (<28> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> x1)
jmp .end24
.beg24: ;<3B> <> ᮢ<EFBFBD> <E1AEA2> <EFBFBD> <EFBFBD> <20> 24 <20> <> ⭮<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
2011-09-13 00:34:41 +02:00
;<3B> eax <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 塞 <20> <> 砫<EFBFBD> 1-<2D> <20> <> 窨 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD>
mov eax , buf2d_w ;size x
imul eax , ecx ;size_x*y
add eax , ebx ;size_x*y+x
lea eax ,[ eax + eax * 2 ] ;(size_x*y+x)*3
add eax , buf2d_data ;ptr+(size_x*y+x)*3
2010-12-13 16:21:52 +01:00
2011-09-13 22:27:29 +02:00
mov ecx , esi
sub ecx , ebx ;<3B> ecx <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ⢮ <20> <> 祪 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> 뢮<EFBFBD> <EBA2AE> <EFBFBD> <EFBFBD> <EFBFBD> <20> <20> <> <EFBFBD> <EFBFBD> <EFBFBD>
2012-02-20 13:10:29 +01:00
inc ecx ;<3B> <> <EFBFBD> -<2D> <> <20> <> <EFBFBD> <E1ABA5> <EFBFBD> <EFBFBD> <20> <> 窠 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> ⠪<> <E2A0AA> <20> ⮡ࠦ<E2AEA1> <E0A0A6> <EFBFBD> <EFBFBD> <EFBFBD>
2011-09-13 00:34:41 +02:00
mov edx , dword [ color ]
2011-09-13 22:27:29 +02:00
mov ebx , edx ;<3B> <> <EFBFBD> न<EFBFBD> <E0A4A8> <EFBFBD> <EFBFBD> x0 <20> ebx 㦥 <20> <> <20> 㦭<EFBFBD>
ror edx , 16 ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 稢<EFBFBD> <E7A8A2> <EFBFBD> ॣ<> <E0A5A3> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <20> <> 3-<2D> <20> <> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> dl
cld
2012-02-20 13:10:29 +01:00
@ @ : ;横<> <20> <> <20> <> <EFBFBD> x <20> <> x0 <20> <> x1 (<28> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> x1)
2011-09-13 22:27:29 +02:00
mov word [ eax ], bx ;copy pixel color
mov byte [ eax + 2 ], dl
add eax , 3
loop @ b
2010-11-02 20:34:57 +01:00
.end24:
2012-02-20 13:10:29 +01:00
popfd
2010-09-30 23:07:09 +02:00
popad
ret
endp
align 4
proc buf_rect_by_size , buf_struc : dword , coord_x : dword , coord_y : dword , w : dword , h : dword , color : dword
pushad
mov edi ,[ buf_struc ]
2012-02-20 13:10:29 +01:00
cmp buf2d_bits , 8
je @ f
2010-09-30 23:07:09 +02:00
cmp buf2d_bits , 24
2012-02-20 13:10:29 +01:00
je @ f
jmp .coord_end
@ @ :
2010-09-30 23:07:09 +02:00
mov eax ,[ coord_x ]
mov ebx ,[ coord_y ]
mov ecx ,[ w ]
2012-02-20 13:10:29 +01:00
;cmp ecx,1
;jl .coord_end
cmp ecx , 0
je .coord_end
jg @ f
add eax , ecx
inc eax
neg ecx
@ @ :
2010-09-30 23:07:09 +02:00
add ecx , eax
2010-10-04 13:51:03 +02:00
dec ecx
2010-09-30 23:07:09 +02:00
mov edx ,[ h ]
2012-02-20 13:10:29 +01:00
;cmp edx,1
;jl .coord_end
cmp edx , 0
je .coord_end
jg @ f
add ebx , edx
inc ebx
neg edx
@ @ :
2010-10-04 13:51:03 +02:00
2010-09-30 23:07:09 +02:00
add edx , ebx
2010-10-04 13:51:03 +02:00
dec edx
2010-09-30 23:07:09 +02:00
mov esi , dword [ color ]
stdcall buf_line_h , edi , eax , ebx , ecx , esi ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> -
stdcall buf_line_brs , edi , eax , ebx , eax , edx , esi ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> |
stdcall buf_line_h , edi , eax , edx , ecx , esi ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> -
stdcall buf_line_brs , edi , ecx , ebx , ecx , edx , esi ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> |
.coord_end:
popad
ret
endp
2010-10-04 13:51:03 +02:00
align 4
proc buf_filled_rect_by_size , buf_struc : dword , coord_x : dword , coord_y : dword , w : dword , h : dword , color : dword
pushad
mov edi ,[ buf_struc ]
2012-02-20 13:10:29 +01:00
cmp buf2d_bits , 8
je @ f
2010-10-04 13:51:03 +02:00
cmp buf2d_bits , 24
2012-02-20 13:10:29 +01:00
je @ f
jmp .coord_end
@ @ :
2010-10-04 13:51:03 +02:00
mov eax ,[ coord_x ]
mov ebx ,[ coord_y ]
mov edx ,[ w ]
2012-02-20 13:10:29 +01:00
cmp edx , 0
je .coord_end ;<3B> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 0 <20> <> <EFBFBD> ᥫ<EFBFBD> <E1A5AB>
jg @ f ;<3B> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ⥫쭠<E2A5AB>
add eax , edx
inc eax
neg edx ;<3B> <> ਭ<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ⥫쭮<E2A5AB>
;inc edx ;<3B> <> 祬<EFBFBD> <20> <> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 塞 1-<2D> <> <20> <20> <> <20> <> <EFBFBD> <EFBFBD> , <20> <> <20> <20> <> <EFBFBD> ࠡ<> ⠥<EFBFBD> <20> <> <20> ࠢ<EFBFBD> <E0A0A2> 쭮
@ @ :
2010-10-04 13:51:03 +02:00
add edx , eax
2012-02-20 13:10:29 +01:00
dec edx
2010-10-04 13:51:03 +02:00
mov ecx ,[ h ]
2012-02-20 13:10:29 +01:00
cmp ecx , 0
je .coord_end ;<3B> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 0 <20> <> <EFBFBD> ᥫ<EFBFBD> <E1A5AB>
jg @ f ;<3B> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ⥫쭠<E2A5AB>
add ebx , ecx ;ᤢ<> <E1A4A2> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> न<EFBFBD> <E0A4A8> <EFBFBD> <EFBFBD> <20> <> אַ㣮<EFACAE> 쭨<EFBFBD> <ECADA8>
inc ebx
neg ecx ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ⥫쭮<E2A5AB>
;inc ecx ;<3B> <> 祬<EFBFBD> <20> <> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 塞 1-<2D> <> <20> <20> <> <20> <> <EFBFBD> <EFBFBD> , <20> <> <20> <20> <> <EFBFBD> ࠡ<> ⠥<EFBFBD> <20> <> <20> ࠢ<EFBFBD> <E0A0A2> 쭮
@ @ :
2010-10-04 13:51:03 +02:00
mov esi , dword [ color ]
cld
@ @ :
stdcall buf_line_h , edi , eax , ebx , edx , esi ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> -
inc ebx
loop @ b
.coord_end:
popad
ret
endp
2010-07-29 23:20:45 +02:00
align 4
proc buf_circle , buf_struc : dword , coord_x : dword , coord_y : dword , r : dword , color : dword
locals
po_x dd ?
po_y dd ?
endl
pushad
mov edi , dword [ buf_struc ]
2012-02-20 13:10:29 +01:00
cmp buf2d_bits , 8
je @ f
2010-07-29 23:20:45 +02:00
cmp buf2d_bits , 24
2012-02-20 13:10:29 +01:00
je @ f
jmp .error
@ @ :
2010-07-29 23:20:45 +02:00
mov edx , dword [ color ]
finit
fild dword [ coord_x ]
fild dword [ coord_y ]
fild dword [ r ]
fldz ;px=0
fld st1 ;py=r
fldpi
fmul st0 , st3
fistp dword [ po_x ]
mov esi , dword [ po_x ] ;esi=pi*r
shl esi , 1 ;esi=2*pi*r
;st0 = py
;st1 = px
;st2 = r
;st3 = y
;st4 = x
@ @ :
;Point(px + x, y - py)
fld st1 ;st0=px
fadd st0 , st5 ;st0=px+x
fistp dword [ po_x ]
mov ebx , dword [ po_x ]
fld st3 ;st0=y
fsub st0 , st1 ;st0=y-py
fistp dword [ po_y ]
mov ecx , dword [ po_y ]
call draw_pixel
;px += py/r
fld st0 ;st0=py
fdiv st0 , st3 ;st0=py/r
faddp st2 , st0 ;st3+=st0
;py -= px/r
fld st1 ;st0=px
fdiv st0 , st3 ;st0=px/r
fsubp st1 , st0 ;st2-=st0
dec esi
cmp esi , 0
jge @ b
jmp .exit_fun
.error:
2012-02-20 13:10:29 +01:00
stdcall print_err , sz_buf2d_circle , txt_err_n8_24b
2010-07-29 23:20:45 +02:00
.exit_fun:
popad
ret
endp
2010-11-02 20:34:57 +01:00
;<3B> 㭪<EFBFBD> <E3ADAA> <EFBFBD> <20> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> ࠭<EFBFBD> <E0A0AD> <EFBFBD> 梥⮬
align 4
proc buf_flood_fill , buf_struc : dword , coord_x : dword , coord_y : dword , mode : dword , color_f : dword , color_b : dword
pushad
mov edi ,[ buf_struc ]
cmp buf2d_bits , 24
jne .end24
mov ebx , dword [ coord_x ]
mov ecx , dword [ coord_y ]
mov edx , dword [ color_f ]
mov esi , dword [ color_b ]
cmp dword [ mode ], 1 ;<3B> <20> <> <EFBFBD> <EFBFBD> ᨬ<EFBFBD> <E1A8AC> <EFBFBD> <EFBFBD> <20> <> 'mode' <20> <> ।<EFBFBD> <E0A5A4> 塞 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ⬮<EFBFBD> <20> 㤥<EFBFBD> <20> <> <EFBFBD> 짮<EFBFBD> <ECA7AE> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
je @ f
call buf_flood_fill_recurs_0 ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> ᥫ<EFBFBD> <E1A5AB> 梥<> <E6A2A5> esi
jmp .end24
@ @ :
call buf_flood_fill_recurs_1 ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> ᥫ<EFBFBD> <20> <> <EFBFBD> <EFBFBD> 騥 梥<> esi
.end24:
popad
ret
endp
;input:
; ebx = coord_x
; ecx = coord_y
; edx = 梥<> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
; esi = 梥<> <20> ࠭<EFBFBD> <E0A0AD> <EFBFBD> , <20> <> <20> <> <EFBFBD> <EFBFBD> ன <20> 㤥<EFBFBD> <20> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
; edi = buf_struc
;output:
; eax = <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
align 4
buf_flood_fill_recurs_0:
call get_pixel_24
cmp eax , 0xffffffff ;if error coords
je .end_fun
cmp eax , edx ;<3B> 梥<> <20> <> <EFBFBD> ᥫ<EFBFBD> ᮢ<> <E1AEA2> <EFBFBD> <20> 梥⮬ <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> , <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <20> ⮩ <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 㦥 <20> 뫠 ᤥ<> <E1A4A5> <EFBFBD> <EFBFBD>
je .end_fun
call draw_pixel
dec ebx
call get_pixel_24
cmp eax , esi
je @ f
call buf_flood_fill_recurs_0
@ @ :
inc ebx
inc ebx
call get_pixel_24
cmp eax , esi
je @ f
call buf_flood_fill_recurs_0
@ @ :
dec ebx
dec ecx
call get_pixel_24
cmp eax , esi
je @ f
call buf_flood_fill_recurs_0
@ @ :
inc ecx
inc ecx
call get_pixel_24
cmp eax , esi
je @ f
call buf_flood_fill_recurs_0
@ @ :
dec ecx
.end_fun:
ret
;input:
; ebx = coord_x
; ecx = coord_y
; edx = 梥<> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
; esi = 梥<> <20> <> <EFBFBD> ᥫ<EFBFBD> <E1A5AB> , <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> 㤥<EFBFBD> <20> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
; edi = buf_struc
;output:
; eax = <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
align 4
buf_flood_fill_recurs_1:
call get_pixel_24
cmp eax , 0xffffffff ;if error coords
je .end_fun
cmp eax , edx ;<3B> 梥<> <20> <> <EFBFBD> ᥫ<EFBFBD> ᮢ<> <E1AEA2> <EFBFBD> <20> 梥⮬ <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> , <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <20> ⮩ <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 㦥 <20> 뫠 ᤥ<> <E1A4A5> <EFBFBD> <EFBFBD>
je .end_fun
cmp eax , esi ;<3B> 梥<> <20> <> <EFBFBD> ᥫ<EFBFBD> <20> <> ᮢ<> <E1AEA2> <EFBFBD> <20> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 梥⮬ <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> , <20> <> <20> ४<EFBFBD> <E0A5AA> 頥<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
jne .end_fun
call draw_pixel
dec ebx
call get_pixel_24
cmp eax , esi
jne @ f
call buf_flood_fill_recurs_1
@ @ :
inc ebx
inc ebx
call get_pixel_24
cmp eax , esi
jne @ f
call buf_flood_fill_recurs_1
@ @ :
dec ebx
dec ecx
call get_pixel_24
cmp eax , esi
jne @ f
call buf_flood_fill_recurs_1
@ @ :
inc ecx
inc ecx
call get_pixel_24
cmp eax , esi
jne @ f
call buf_flood_fill_recurs_1
@ @ :
dec ecx
.end_fun:
ret
2011-03-25 16:57:37 +01:00
;<3B> 㭪<EFBFBD> <E3ADAA> <EFBFBD> <20> <> <EFBFBD> <20> <> ᮢ<EFBFBD> <E1AEA2> <EFBFBD> <EFBFBD> <20> <> 窨
align 4
2012-05-11 12:11:27 +02:00
proc buf_set_pixel uses ebx ecx edx edi , buf_struc : dword , coord_x : dword , coord_y : dword , color : dword
mov edi , dword [ buf_struc ]
mov ebx , dword [ coord_x ]
mov ecx , dword [ coord_y ]
mov edx , dword [ color ]
call draw_pixel
ret
endp
;output:
; eax = 梥<> <20> <> 窨
; <20> <20> <> <EFBFBD> 砥 <20> 訡<EFBFBD> <E8A8A1> eax = 0xffffffff
align 4
proc buf_get_pixel uses ebx ecx edi , buf_struc : dword , coord_x : dword , coord_y : dword
mov edi , dword [ buf_struc ]
mov ebx ,[ coord_x ]
mov ecx ,[ coord_y ]
cmp buf2d_bits , 8
jne @ f
call get_pixel_8
jmp .end_fun
@ @ :
cmp buf2d_bits , 24
jne @ f
call get_pixel_24
jmp .end_fun
@ @ :
cmp buf2d_bits , 32
jne @ f
call get_pixel_32
;jmp .end_fun
@ @ :
.end_fun:
2011-03-25 16:57:37 +01:00
ret
endp
2015-01-30 17:21:33 +01:00
align 4
proc buf_flip_h , buf_struc : dword
pushad
mov edi ,[ buf_struc ]
cmp buf2d_bits , 24
jne .end_24
mov esi , buf2d_data
mov eax , buf2d_w
mov ecx , eax
shr ecx , 1
dec eax
lea eax ,[ eax + eax * 2 ]
mov ebx , buf2d_h
mov edi , esi
add esi , eax
add eax , 3
cld
.cycle_24:
push ecx edi esi
align 4
@ @ :
;swap word[edi] <-> word[esi]
mov dx ,[ edi ]
movsw
mov [ esi - 2 ], dx
;swap byte[edi] <-> byte[esi]
mov dl ,[ edi ]
movsb
mov [ esi - 1 ], dl
sub esi , 6
loop @ b
pop esi edi ecx
add edi , eax
add esi , eax
dec ebx
or ebx , ebx
jnz .cycle_24
jmp .end_32
.end_24:
cmp buf2d_bits , 32
jne .end_32
mov esi , buf2d_data
mov eax , buf2d_w
dec eax
shl eax , 2
mov ebx , buf2d_h
mov edi , esi
add esi , eax
add eax , 4
cld
.cycle_32:
mov ecx , eax
shr ecx , 3
push edi esi
align 4
@ @ :
;swap dword[edi] <-> dword[esi]
mov edx ,[ edi ]
movsd
mov [ esi - 4 ], edx
sub esi , 8
loop @ b
pop esi edi
add edi , eax
add esi , eax
dec ebx
or ebx , ebx
jnz .cycle_32
.end_32:
popad
ret
endp
2012-11-15 21:56:45 +01:00
;<3B> <> ࠧ<EFBFBD> <E0A0A7> <EFBFBD> <20> <> <20> <> <EFBFBD> ⨪<EFBFBD> <E2A8AA> <EFBFBD> (<28> <> <EFBFBD> <EFBFBD> <20> <20> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> ⠬<EFBFBD> )
align 4
proc buf_flip_v , buf_struc : dword
locals
2015-01-30 17:21:33 +01:00
line_pix dd ? ;<3B> <> <EFBFBD> . <20> <> <EFBFBD> ᥫ<EFBFBD> <E1A5AB> <20> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
line_2byte dd ? ;<3B> <> <EFBFBD> . <20> <> <EFBFBD> <EFBFBD> <20> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> * 2
2012-11-15 21:56:45 +01:00
endl
pushad
mov edi ,[ buf_struc ]
2015-01-30 17:21:33 +01:00
cmp buf2d_bits , 24
jne .end_24
mov edx , buf2d_w
mov [ line_pix ], edx
mov ebx , buf2d_h
lea edx ,[ edx + edx * 2 ]
mov esi , edx
imul esi , ebx
sub esi , edx
add esi , buf2d_data ;㪠<> <E3AAA0> ⥫<EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD>
shr ebx , 1 ;<3B> <> <EFBFBD> . <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 横<> <E6A8AA> <EFBFBD>
shl edx , 1
mov [ line_2byte ], edx
mov edi , buf2d_data
xchg edi , esi
cld
.flip_24:
cmp ebx , 0
jle .end_32 ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> 室 <20> <> <20> 㭪樨 (<28> <> ⮬<EFBFBD> .end_24 <20> <> <20> <> <EFBFBD> 室<EFBFBD> <E5AEA4> )
mov ecx ,[ line_pix ]
align 4
@ @ :
lodsw
mov dx , word [ edi ]
mov word [ esi - 2 ], dx
stosw
lodsb
mov ah , byte [ edi ]
mov byte [ esi - 1 ], ah
stosb
loop @ b
sub edi ,[ line_2byte ]
dec ebx
jmp .flip_24
.end_24:
cmp buf2d_bits , 32
jne .end_32
mov edx , buf2d_w
mov [ line_pix ], edx
mov ebx , buf2d_h
shl edx , 2
mov esi , edx
imul esi , ebx
sub esi , edx
add esi , buf2d_data ;㪠<> <E3AAA0> ⥫<EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD>
shr ebx , 1 ;<3B> <> <EFBFBD> . <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 横<> <E6A8AA> <EFBFBD>
shl edx , 1
mov [ line_2byte ], edx
mov edi , buf2d_data
xchg edi , esi
cld
.flip_32:
cmp ebx , 0
jle .end_32
mov ecx ,[ line_pix ]
align 4
@ @ :
lodsd
mov edx , dword [ edi ]
mov dword [ esi - 4 ], edx
stosd
loop @ b
sub edi ,[ line_2byte ]
dec ebx
jmp .flip_32
.end_32:
popad
ret
2012-11-15 21:56:45 +01:00
endp
2010-07-29 23:20:45 +02:00
align 4
proc buf_img_wdiv2 , buf_struc : dword
pushad
mov edi , dword [ buf_struc ]
2012-08-17 19:54:03 +02:00
cmp buf2d_bits , 8
jne @ f
mov eax , buf2d_w
mov ecx , buf2d_h
imul ecx , eax
stdcall img_8b_wdiv2 , buf2d_data , ecx
@ @ :
2010-07-29 23:20:45 +02:00
cmp buf2d_bits , 24
2012-08-17 19:54:03 +02:00
jne @ f
2010-07-29 23:20:45 +02:00
mov eax , buf2d_w
mov ecx , buf2d_h
imul ecx , eax
stdcall img_rgb24_wdiv2 , buf2d_data , ecx
2012-08-17 19:54:03 +02:00
@ @ :
2012-08-11 20:05:17 +02:00
cmp buf2d_bits , 32
2012-08-17 19:54:03 +02:00
jne @ f
2012-08-11 20:05:17 +02:00
mov eax , buf2d_w
mov ecx , buf2d_h
imul ecx , eax
2012-08-17 19:54:03 +02:00
stdcall img_rgba32_wdiv2 , buf2d_data , ecx
@ @ :
2010-07-29 23:20:45 +02:00
popad
ret
endp
2012-08-17 19:54:03 +02:00
;input:
;data_8b - pointer to rgb data
;size - count img pixels (size img data / 3(rgb) )
align 4
proc img_8b_wdiv2 data_8b : dword , si ze : dword
mov eax , dword [ data_8b ]
mov ecx , dword [ si ze ] ;ecx = size
cld
@ @ : ;<3B> <> ⥬<EFBFBD> <E2A5AC> <EFBFBD> <EFBFBD> <EFBFBD> 梥<> <E6A2A5> <20> <> <EFBFBD> ᥫ<EFBFBD> <E1A5AB>
shr byte [ eax ], 1
inc eax
loop @ b
mov eax , dword [ data_8b ]
mov ecx , dword [ si ze ] ;ecx = size
shr ecx , 1
@ @ : ;<> <E1ABAE> <EFBFBD> <EFBFBD> <EFBFBD> 梥⮢ <20> <> <EFBFBD> ᥫ<EFBFBD> <E1A5AB>
mov bl , byte [ eax + 1 ] ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> 㥬 梥<> <20> <> ᥤ<EFBFBD> <E1A5A4> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> ᥫ<EFBFBD>
add byte [ eax ], bl
add eax , 2
loop @ b
mov eax , dword [ data_8b ]
inc eax
mov ebx , eax
inc ebx
mov ecx , dword [ si ze ] ;ecx = size
shr ecx , 1
dec ecx ;<3B> <> 譨<EFBFBD> <20> <> <EFBFBD> ᥫ<EFBFBD>
@ @ : ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> ⨥ <20> <> <EFBFBD> ᥫ<EFBFBD> <E1A5AB>
mov dl , byte [ ebx ]
mov byte [ eax ], dl
inc eax
add ebx , 2
loop @ b
ret
endp
2010-07-29 23:20:45 +02:00
;input:
;data_rgb - pointer to rgb data
;size - count img pixels (size img data / 3(rgb) )
align 4
proc img_rgb24_wdiv2 data_rgb : dword , si ze : dword
mov eax , dword [ data_rgb ]
mov ecx , dword [ si ze ] ;ecx = size
lea ecx ,[ ecx + ecx * 2 ]
cld
@ @ : ;<3B> <> ⥬<EFBFBD> <E2A5AC> <EFBFBD> <EFBFBD> <EFBFBD> 梥<> <E6A2A5> <20> <> <EFBFBD> ᥫ<EFBFBD> <E1A5AB>
2010-07-30 19:42:39 +02:00
shr byte [ eax ], 1
inc eax
loop @ b
2010-07-29 23:20:45 +02:00
mov eax , dword [ data_rgb ]
mov ecx , dword [ si ze ] ;ecx = size
shr ecx , 1
@ @ : ;<> <E1ABAE> <EFBFBD> <EFBFBD> <EFBFBD> 梥⮢ <20> <> <EFBFBD> ᥫ<EFBFBD> <E1A5AB>
2010-07-30 19:42:39 +02:00
mov bx , word [ eax + 3 ] ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> 㥬 梥<> <20> <> ᥤ<EFBFBD> <E1A5A4> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> ᥫ<EFBFBD>
add word [ eax ], bx
mov bl , byte [ eax + 5 ] ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> 㥬 梥<> <20> <> ᥤ<EFBFBD> <E1A5A4> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> ᥫ<EFBFBD>
add byte [ eax + 2 ], bl
add eax , 6 ;=2*3
loop @ b
2010-07-29 23:20:45 +02:00
mov eax , dword [ data_rgb ]
add eax , 3
mov ebx , eax
add ebx , 3
mov ecx , dword [ si ze ] ;ecx = size
shr ecx , 1
dec ecx ;<3B> <> 譨<EFBFBD> <20> <> <EFBFBD> ᥫ<EFBFBD>
@ @ : ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> ⨥ <20> <> <EFBFBD> ᥫ<EFBFBD> <E1A5AB>
2010-07-30 19:42:39 +02:00
mov edx , dword [ ebx ]
mov word [ eax ], dx
shr edx , 16
mov byte [ eax + 2 ], dl
add eax , 3
add ebx , 6
loop @ b
2010-07-29 23:20:45 +02:00
ret
endp
2012-08-11 20:05:17 +02:00
;input:
2012-08-17 19:54:03 +02:00
;data_rgba - pointer to rgba data
;size - count img pixels (size img data / 4(rgba) )
2012-08-11 20:05:17 +02:00
align 4
2012-08-17 19:54:03 +02:00
proc img_rgba32_wdiv2 data_rgba : dword , si ze : dword
mov eax , dword [ data_rgba ]
2012-08-11 20:05:17 +02:00
2012-08-17 19:54:03 +02:00
mov eax , dword [ data_rgba ]
2012-08-11 20:05:17 +02:00
mov ebx , eax
add ebx , 4
mov ecx , dword [ si ze ] ;ecx = size
shr ecx , 1
@ @ : ;ᬥ訢<E1ACA5> <E8A8A2> <EFBFBD> <EFBFBD> 梥⮢ <20> <> <EFBFBD> ᥫ<EFBFBD> <E1A5AB>
call combine_colors_1
mov [ eax ], edx
add eax , 8 ;=2*4
add ebx , 8
loop @ b
2012-08-17 19:54:03 +02:00
mov eax , dword [ data_rgba ]
2012-08-11 20:05:17 +02:00
add eax , 4
mov ebx , eax
add ebx , 4
mov ecx , dword [ si ze ] ;ecx = size
shr ecx , 1
dec ecx ;<3B> <> 譨<EFBFBD> <20> <> <EFBFBD> ᥫ<EFBFBD>
@ @ : ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> ⨥ <20> <> <EFBFBD> ᥫ<EFBFBD> <E1A5AB>
mov edx , dword [ ebx ]
mov dword [ eax ], edx
add eax , 4
add ebx , 8
loop @ b
ret
endp
2012-11-15 21:56:45 +01:00
;description:
; ᦠ⨥ <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> (<28> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> )
2010-07-29 23:20:45 +02:00
align 4
proc buf_img_hdiv2 , buf_struc : dword
pushad
mov edi , dword [ buf_struc ]
2012-08-17 19:54:03 +02:00
cmp buf2d_bits , 8
jne @ f
mov eax , buf2d_w
mov ecx , buf2d_h
imul ecx , eax
stdcall img_8b_hdiv2 , buf2d_data , ecx , eax
2012-11-15 21:56:45 +01:00
jmp .end_f ;edi <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <20> 㭪樨, <20> <> ⮬<EFBFBD> <20> ᯮ<EFBFBD> 짮<EFBFBD> <ECA7AE> <EFBFBD> <EFBFBD> <EFBFBD> buf2d_bits <20> <> <EFBFBD> ᭮
2012-08-17 19:54:03 +02:00
@ @ :
2010-07-29 23:20:45 +02:00
cmp buf2d_bits , 24
2012-08-17 19:54:03 +02:00
jne @ f
2010-07-29 23:20:45 +02:00
mov eax , buf2d_w
mov ecx , buf2d_h
imul ecx , eax
stdcall img_rgb24_hdiv2 , buf2d_data , ecx , eax
2012-11-15 21:56:45 +01:00
jmp .end_f
2012-08-17 19:54:03 +02:00
@ @ :
2012-08-11 20:05:17 +02:00
cmp buf2d_bits , 32
2012-08-17 19:54:03 +02:00
jne @ f
2012-08-11 20:05:17 +02:00
mov eax , buf2d_w
mov ecx , buf2d_h
imul ecx , eax
shl eax , 2
2012-08-17 19:54:03 +02:00
stdcall img_rgba32_hdiv2 , buf2d_data , ecx , eax
2012-11-15 21:56:45 +01:00
;jmp .end_f
2012-08-17 19:54:03 +02:00
@ @ :
2012-11-15 21:56:45 +01:00
.end_f:
2010-07-29 23:20:45 +02:00
popad
ret
endp
2012-08-17 19:54:03 +02:00
;input:
;data_8b - pointer to 8 bit data
;size - count img pixels (size img data)
;size_w - width img in pixels
align 4
proc img_8b_hdiv2 , data_8b : dword , si ze : dword , si ze_w : dword
mov eax , dword [ data_8b ] ;eax =
mov ecx , dword [ si ze ]
cld
@ @ : ;<3B> <> ⥬<EFBFBD> <E2A5AC> <EFBFBD> <EFBFBD> <EFBFBD> 梥<> <E6A2A5> <20> <> <EFBFBD> ᥫ<EFBFBD> <E1A5AB>
shr byte [ eax ], 1
inc eax
loop @ b
mov eax , dword [ data_8b ] ;eax =
mov esi , dword [ si ze_w ]
mov ebx , esi
add ebx , eax
mov ecx , dword [ si ze ] ;ecx = size
shr ecx , 1
xor edi , edi
@ @ : ;<> <E1ABAE> <EFBFBD> <EFBFBD> <EFBFBD> 梥⮢ <20> <> <EFBFBD> ᥫ<EFBFBD> <E1A5AB>
mov dl , byte [ ebx ] ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> 㥬 梥<> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> ᥫ<EFBFBD>
add byte [ eax ], dl
inc eax
inc ebx
inc edi
cmp edi , dword [ si ze_w ]
jl .old_line
add eax , esi
add ebx , esi
xor edi , edi
.old_line:
loop @ b
mov eax , dword [ data_8b ] ;eax =
add eax , esi ;esi = width*3(rgb)
mov ebx , eax
add ebx , esi
mov ecx , dword [ si ze ] ;ecx = size
shr ecx , 1
sub ecx , dword [ si ze_w ] ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> ப<EFBFBD> <20> <> <EFBFBD> ᥫ<EFBFBD> <E1A5AB>
xor edi , edi
@ @ : ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> ⨥ <20> <> <EFBFBD> ᥫ<EFBFBD> <E1A5AB>
mov dl , byte [ ebx ] ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> 㥬 梥<> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> ᥫ<EFBFBD>
mov byte [ eax ], dl
inc eax
inc ebx
inc edi
cmp edi , dword [ si ze_w ]
jl .old_line_2
add ebx , esi
xor edi , edi
.old_line_2:
loop @ b
ret
endp
2010-07-29 23:20:45 +02:00
;input:
;data_rgb - pointer to rgb data
;size - count img pixels (size img data / 3(rgb) )
;size_w - width img in pixels
align 4
proc img_rgb24_hdiv2 , data_rgb : dword , si ze : dword , si ze_w : dword
mov eax , dword [ data_rgb ] ;eax =
mov ecx , dword [ si ze ] ;ecx = size
lea ecx ,[ ecx + ecx * 2 ]
cld
@ @ : ;<3B> <> ⥬<EFBFBD> <E2A5AC> <EFBFBD> <EFBFBD> <EFBFBD> 梥<> <E6A2A5> <20> <> <EFBFBD> ᥫ<EFBFBD> <E1A5AB>
shr byte [ eax ], 1
inc eax
loop @ b
mov eax , dword [ data_rgb ] ;eax =
2012-08-11 20:05:17 +02:00
mov esi , dword [ si ze_w ]
lea esi ,[ esi + esi * 2 ] ;esi = width*3(rgb)
2010-07-29 23:20:45 +02:00
mov ebx , esi
add ebx , eax
mov ecx , dword [ si ze ] ;ecx = size
shr ecx , 1
xor edi , edi
@ @ : ;<> <E1ABAE> <EFBFBD> <EFBFBD> <EFBFBD> 梥⮢ <20> <> <EFBFBD> ᥫ<EFBFBD> <E1A5AB>
mov dx , word [ ebx ] ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> 㥬 梥<> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> ᥫ<EFBFBD>
add word [ eax ], dx
mov dl , byte [ ebx + 2 ] ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> 㥬 梥<> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> ᥫ<EFBFBD>
add byte [ eax + 2 ], dl
add eax , 3
add ebx , 3
inc edi
cmp edi , dword [ si ze_w ]
jl .old_line
add eax , esi
add ebx , esi
xor edi , edi
.old_line:
loop @ b
mov eax , dword [ data_rgb ] ;eax =
add eax , esi ;esi = width*3(rgb)
2012-08-11 20:05:17 +02:00
mov ebx , eax
add ebx , esi
2010-07-29 23:20:45 +02:00
mov ecx , dword [ si ze ] ;ecx = size
shr ecx , 1
sub ecx , dword [ si ze_w ] ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> ப<EFBFBD> <20> <> <EFBFBD> ᥫ<EFBFBD> <E1A5AB>
xor edi , edi
@ @ : ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> ⨥ <20> <> <EFBFBD> ᥫ<EFBFBD> <E1A5AB>
mov edx , dword [ ebx ] ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> 㥬 梥<> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> ᥫ<EFBFBD>
mov word [ eax ], dx
shr edx , 16
mov byte [ eax + 2 ], dl
add eax , 3
add ebx , 3
inc edi
cmp edi , dword [ si ze_w ]
jl .old_line_2
add ebx , esi
xor edi , edi
.old_line_2:
loop @ b
ret
endp
2012-08-11 20:05:17 +02:00
;input:
2012-08-17 19:54:03 +02:00
;data_rgba - pointer to rgba data
;size - count img pixels (size img data / 4(rgba) )
2012-08-11 20:05:17 +02:00
;size_w_b - width img in bytes
align 4
2012-08-17 19:54:03 +02:00
proc img_rgba32_hdiv2 , data_rgba : dword , si ze : dword , si ze_w_b : dword
2012-08-11 20:05:17 +02:00
2012-08-17 19:54:03 +02:00
mov eax , dword [ data_rgba ] ;eax =
2012-08-11 20:05:17 +02:00
mov ebx , dword [ si ze_w_b ]
add ebx , eax
mov ecx , dword [ si ze ] ;ecx = size
shr ecx , 1
xor edi , edi
@ @ : ;ᬥ訢<E1ACA5> <E8A8A2> <EFBFBD> <EFBFBD> 梥⮢ <20> <> <EFBFBD> ᥫ<EFBFBD> <E1A5AB>
call combine_colors_1
mov dword [ eax ], edx
add eax , 4
add ebx , 4
add edi , 4
cmp edi , dword [ si ze_w_b ]
jl .old_line
add eax , dword [ si ze_w_b ]
add ebx , dword [ si ze_w_b ]
xor edi , edi
.old_line:
loop @ b
2012-08-17 19:54:03 +02:00
mov eax , dword [ data_rgba ] ;eax =
2012-08-11 20:05:17 +02:00
mov ebx , dword [ si ze_w_b ]
add eax , ebx
add ebx , eax
mov ecx , dword [ si ze ] ;ecx = size
shl ecx , 1
sub ecx , dword [ si ze_w_b ] ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> ப<EFBFBD> <20> <> <EFBFBD> ᥫ<EFBFBD> <E1A5AB>
shr ecx , 2
xor edi , edi
@ @ : ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> ⨥ <20> <> <EFBFBD> ᥫ<EFBFBD> <E1A5AB>
mov edx , dword [ ebx ] ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> 㥬 梥<> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> ᥫ<EFBFBD>
mov dword [ eax ], edx
add eax , 4
add ebx , 4
add edi , 4
cmp edi , dword [ si ze_w_b ]
jl .old_line_2
add ebx , dword [ si ze_w_b ]
xor edi , edi
.old_line_2:
loop @ b
ret
endp
;input:
; eax - 㪠<> <E3AAA0> ⥫<EFBFBD> <20> <> 32-<2D> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 梥<>
; ebx - 㪠<> <E3AAA0> ⥫<EFBFBD> <20> <> 32-<2D> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 梥<>
;output:
; edx - 32-<2D> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 梥<> ᬥ蠭<E1ACA5> <E8A0AD> <EFBFBD> <20> <20> <> <EFBFBD> ⮬ <20> <EFBFBD> <E0AEA7> 筮<EFBFBD> <E7ADAE> <EFBFBD>
;destroy:
; esi
align 4
proc combine_colors_1 uses ecx edi
locals
c_blye dd ?
c_green dd ?
c_red dd ?
endl
movzx edi , byte [ eax + 3 ]
cmp edi , 255
je .c0z
movzx esi , byte [ ebx + 3 ]
cmp esi , 255
je .c1z
2012-08-17 19:54:03 +02:00
cmp edi , esi
je .c0_c1
2012-08-11 20:05:17 +02:00
;<3B> <> ॢ<EFBFBD> <E0A5A2> <EFBFBD> 稢<EFBFBD> <E7A8A2> <EFBFBD> <20> <> <EFBFBD> 祭<EFBFBD> <E7A5AD> <20> <EFBFBD> <E0AEA7> 筮<EFBFBD> ⥩
neg edi
inc edi
add edi , 255
neg esi
inc esi
add esi , 255
movzx ecx , byte [ eax ]
imul ecx , edi
mov [ c_blye ], ecx
movzx ecx , byte [ ebx ]
imul ecx , esi
add [ c_blye ], ecx
movzx ecx , byte [ eax + 1 ]
imul ecx , edi
mov [ c_green ], ecx
movzx ecx , byte [ ebx + 1 ]
imul ecx , esi
add [ c_green ], ecx
movzx ecx , byte [ eax + 2 ]
imul ecx , edi
mov [ c_red ], ecx
movzx ecx , byte [ ebx + 2 ]
imul ecx , esi
add [ c_red ], ecx
push eax ebx
xor ebx , ebx
mov eax ,[ c_red ]
xor edx , edx
mov ecx , edi
add ecx , esi
div ecx
mov bl , al
shl ebx , 16
mov eax ,[ c_green ]
xor edx , edx
div ecx
mov bh , al
mov eax ,[ c_blye ]
xor edx , edx
div ecx
mov bl , al
shr ecx , 1
;<3B> <> ॢ<EFBFBD> <E0A5A2> <EFBFBD> 稢<EFBFBD> <E7A8A2> <EFBFBD> <20> <> <EFBFBD> 祭<EFBFBD> <E7A5AD> <20> <EFBFBD> <E0AEA7> 筮<EFBFBD> <E7ADAE> <EFBFBD>
neg ecx
inc ecx
add ecx , 255
shl ecx , 24
add ebx , ecx
mov edx , ebx
pop ebx eax
jmp .end_f
2012-08-17 19:54:03 +02:00
.c0_c1: ;<3B> <20> <EFBFBD> <E0AEA7> 筮<EFBFBD> <E7ADAE> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 梥⮢ ᮢ<> <E1AEA2> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
mov edx , dword [ eax ]
shr edx , 1
and edx , 011111110111111101111111b
mov esi , dword [ ebx ]
shr esi , 1
and esi , 011111110111111101111111b
add edx , esi
ror edi , 8 ;<3B> <> ६<EFBFBD> 頥<EFBFBD> <20> <> <EFBFBD> 祭<EFBFBD> <E7A5AD> <20> <EFBFBD> <E0AEA7> 筮<EFBFBD> <E7ADAE> <EFBFBD> <20> <20> <> <EFBFBD> <EFBFBD> 訩 <20> <> <EFBFBD> <EFBFBD> edi
or edx , edi
jmp .end_f
2012-08-11 20:05:17 +02:00
.c0z: ;<3B> 梥<> <20> eax <20> <EFBFBD> <E0AEA7> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
mov edx , dword [ ebx ]
movzx edi , byte [ ebx + 3 ]
jmp @ f
.c1z: ;<3B> 梥<> <20> ebx <20> <EFBFBD> <E0AEA7> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
mov edx , dword [ eax ]
@ @ :
add edi , 255 ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 梥<> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <EFBFBD> <E0AEA7> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
shr edi , 1
cmp edi , 255
jl @ f
mov edi , 255 ;<3B> <> <EFBFBD> ᨬ<EFBFBD> <E1A8AC> 쭠<EFBFBD> <20> <EFBFBD> <E0AEA7> 筮<EFBFBD> <E7ADAE> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 255
@ @ :
shl edi , 24
and edx , 0xffffff ;᭨<> <E1ADA8> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <EFBFBD> <E0AEA7> 筮<EFBFBD> <E7ADAE> <EFBFBD>
add edx , edi
.end_f:
ret
endp
2010-07-29 23:20:45 +02:00
;<3B> ८<EFBFBD> ࠧ<EFBFBD> <E0A0A7> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> 24-<2D> <> ⭮<EFBFBD> <E2ADAE> <20> 8-<2D> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
; spectr - <20> <> ।<EFBFBD> <E0A5A4> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> ᯥ<> <E1AFA5> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <20> ८<EFBFBD> ࠧ<EFBFBD> <E0A0A7> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 0-ᨭ<> <E1A8AD> , 1-<2D> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> , 2-<2D> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
align 4
proc buf_conv_24_to_8 , buf_struc : dword , sp ectr : dword
pushad
mov edi , dword [ buf_struc ]
cmp buf2d_bits , 24
jne .error
mov eax , buf2d_w
mov ecx , buf2d_h
imul ecx , eax
mov esi , ecx
;ebx - <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> ன <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
;edx - <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> 㤠 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
mov edx , buf2d_data
mov ebx , edx
cmp [ sp ectr ], 3
jge @ f
add ebx ,[ sp ectr ]
@ @ :
mov al , byte [ ebx ]
mov byte [ edx ], al
add ebx , 3
inc edx
loop @ b
mov buf2d_bits , 8
invoke mem.realloc , buf2d_data , esi ;㬥<> <E3ACA5> 蠥<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD>
jmp .end_conv
.error:
stdcall print_err , sz_buf2d_conv_24_to_8 , txt_err_n24b
.end_conv:
popad
ret
endp
;<3B> ८<EFBFBD> ࠧ<EFBFBD> <E0A0A7> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> 24-<2D> <> ⭮<EFBFBD> <E2ADAE> <20> 32-<2D> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
align 4
proc buf_conv_24_to_32 , buf_struc : dword , buf_str8 : dword
pushad
mov edi , dword [ buf_struc ]
cmp buf2d_bits , 24
jne .error1
mov ecx , buf2d_w
mov ebx , buf2d_h
imul ebx , ecx
mov ecx , ebx ;ecx = size 8 b
shl ebx , 2 ;ebx = size 32 b
invoke mem.realloc , buf2d_data , ebx ;㢥<> <E3A2A5> 稢<EFBFBD> <E7A8A2> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD>
mov buf2d_data , eax ;<3B> <> <20> <> <EFBFBD> 砩 <20> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 㪠<> <E3AAA0> ⥫<EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
mov buf2d_bits , 32
mov edx , ebx ;edx = size 32 b
sub ebx , ecx ;ebx = size 24 b
mov eax , ecx
;eax - ࠧ<> <E0A0A7> <EFBFBD> 8 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
;ebx - ࠧ<> <E0A0A7> <EFBFBD> 24 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
;edx - ࠧ<> <E0A0A7> <EFBFBD> 32 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
add ebx , buf2d_data
add edx , buf2d_data
mov edi , dword [ buf_str8 ]
cmp buf2d_bits , 8
jne .error2
add eax , buf2d_data
mov edi , edx
;eax - 㪠<> <E3AAA0> ⥫<EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 8 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
;ebx - 㪠<> <E3AAA0> ⥫<EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 24 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
;edi - 㪠<> <E3AAA0> ⥫<EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 32 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
@ @ :
sub edi , 4 ;<3B> ⭨<EFBFBD> <E2ADA8> <EFBFBD> <EFBFBD> <20> <20> <> 砫<EFBFBD> 横<> <E6A8AA> ,
sub ebx , 3 ; <20> <> ⮬<EFBFBD> , <20> <> <EFBFBD> 㪠<> <E3AAA0> ⥫<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD>
dec eax ; <20> <> <20> ।<EFBFBD> <E0A5A4> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD>
mov edx , dword [ ebx ]
mov dword [ edi ], edx
mov dl , byte [ eax ]
mov byte [ edi + 3 ], dl
loop @ b
jmp .end_conv
.error1:
stdcall print_err , sz_buf2d_conv_24_to_32 , txt_err_n24b
jmp .end_conv
.error2:
stdcall print_err , sz_buf2d_conv_24_to_32 , txt_err_n8b
.end_conv:
popad
ret
endp
;<3B> 㭪<EFBFBD> <E3ADAA> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> buf_source (24b|32b) <20> buf_destination (24b)
; 㪠<> 뢠<EFBFBD> <EBA2A0> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> न<EFBFBD> <E0A4A8> <EFBFBD> <EFBFBD> <20> <> ⠢<EFBFBD> <E2A0A2> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> buf_source <20> ⭮<EFBFBD> <E2ADAE> ⥫쭮 buf_destination
; <20> <EFBFBD> <E0AEA7> 筮<EFBFBD> <E7ADAE> <EFBFBD> <20> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <E0AEA2> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> 뢠<EFBFBD> <EBA2A0> <EFBFBD> <EFBFBD>
align 4
proc buf_bit_blt , buf_destination : dword , coord_x : dword , coord_y : dword , buf_source : dword
locals
right_bytes dd ?
endl
pushad
mov edi ,[ buf_source ]
cmp buf2d_bits , 24
je .sou24
cmp buf2d_bits , 32
je .sou32
jmp .copy_end ;<3B> <> ଠ <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> ন<EFBFBD> <E0A6A8> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
2010-10-07 19:00:40 +02:00
.sou24: ;<3B> <20> <> <EFBFBD> <EFBFBD> 筨<EFBFBD> <E7ADA8> 24 <20> <> ⭠<EFBFBD> <20> <> <EFBFBD> ⨭<EFBFBD> <E2A8AD>
2010-07-29 23:20:45 +02:00
mov eax , buf2d_w
mov edx , buf2d_h ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 㥬<EFBFBD> <E3A5AC> <20> <> <EFBFBD> ⨭<EFBFBD> <E2A8AD>
mov esi , buf2d_data ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 㥬<EFBFBD> <E3A5AC> <20> <> <EFBFBD> ⨭<EFBFBD> <E2A8AD>
mov edi ,[ buf_destination ]
cmp buf2d_bits , 24
jne .copy_end ;<3B> <> ଠ <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> ন<EFBFBD> <E0A6A8> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
2010-10-07 19:00:40 +02:00
mov ebx ,[ coord_x ] ;<3B> ebx <20> ६<EFBFBD> <E0A5AC> <EFBFBD> <EFBFBD> <20> ⠢<EFBFBD> <E2A0A2> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD> (<28> <> <EFBFBD> <20> <EFBFBD> ન)
cmp ebx , buf2d_w ;<3B> <EFBFBD> <E0AEA2> 塞 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD> <20> <> <20> <> ਭ<EFBFBD>
2012-02-29 23:04:49 +01:00
jge .copy_end ;<3B> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> 뫠<EFBFBD> <EBABA0> <EFBFBD> <20> <> <20> ࠢ<EFBFBD> <E0A0A2> <20> <> <EFBFBD> <EFBFBD>
2010-07-29 23:20:45 +02:00
mov ebx , buf2d_h ;ebx - <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> ᭮<EFBFBD> <E1ADAE> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
mov ecx ,[ coord_y ]
2012-02-29 23:04:49 +01:00
cmp ecx , 0
jge @ f
;<3B> <20> <> <EFBFBD> न<EFBFBD> <E0A4A8> <EFBFBD> <EFBFBD> coord_y<0 (1-<2D> <20> <> <EFBFBD> <EFBFBD> ன<EFBFBD> <E0AEA9> )
add edx , ecx ;㬥<> <E3ACA5> 蠥<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 㥬<EFBFBD> <E3A5AC> <20> <> <EFBFBD> ⨭<EFBFBD> <E2A8AD>
cmp edx , 0
jle .copy_end ;<3B> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 㥬<EFBFBD> <E3A5AC> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD> <20> <> 室<EFBFBD> <E5AEA4> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <20> <> <EFBFBD> 孥<EFBFBD> <20> ࠭<EFBFBD> 楩 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> (coord_y<0 <20> |coord_y|>buf_source.h)
neg ecx
;inc ecx
imul ecx , eax
lea ecx ,[ ecx + ecx * 2 ] ;<3B> <> 3 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> ᥫ<EFBFBD>
add esi , ecx ;ᤢ<> <E1A4A2> <EFBFBD> <EFBFBD> <EFBFBD> 㪠<> <E3AAA0> ⥫<EFBFBD> <20> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 㥬묨 <20> <> <EFBFBD> <EFBFBD> 묨, <20> <20> <> <EFBFBD> ⮬ <20> ய<EFBFBD> 襭<EFBFBD> <E8A5AD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD>
xor ecx , ecx ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> 塞 <20> <> <EFBFBD> न<EFBFBD> <E0A4A8> <EFBFBD> <EFBFBD> coord_y
@ @ :
2010-07-29 23:20:45 +02:00
cmp ecx , ebx
jge .copy_end ;<3B> <20> <> <EFBFBD> न<EFBFBD> <E0A4A8> <EFBFBD> <EFBFBD> 'y' <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
add ecx , edx ;ecx - <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> न<EFBFBD> <E0A4A8> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 㥬<EFBFBD> <E3A5AC> <20> <> <EFBFBD> ⨭<EFBFBD> <E2A8AD>
cmp ecx , ebx
jle @ f
sub ecx , ebx
sub edx , ecx ;㬥<> <E3ACA5> 蠥<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 㥬<EFBFBD> <E3A5AC> <20> <> <EFBFBD> ⨭<EFBFBD> <E2A8AD> , <20> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <20> 뫠<EFBFBD> <EBABA0> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> ࠭<EFBFBD> <E0A0AD> <EFBFBD>
@ @ :
mov ebx , buf2d_w
2012-02-29 23:04:49 +01:00
mov ecx ,[ coord_y ] ;ecx <20> ᯮ<EFBFBD> <E1AFAE> <EFBFBD> 㥬 <20> <> <EFBFBD> <20> ६<EFBFBD> <E0A5AC> <EFBFBD> <EFBFBD> <EFBFBD> 楫<> <E6A5AB>
cmp ecx , 0
jg .end_otr_c_y_24
;<3B> <20> <> <EFBFBD> न<EFBFBD> <E0A4A8> <EFBFBD> <EFBFBD> coord_y<=0 (2-<2D> <20> <> <EFBFBD> <EFBFBD> ன<EFBFBD> <E0AEA9> )
mov ecx ,[ coord_x ]
jmp @ f
.end_otr_c_y_24:
imul ecx , ebx
2010-07-29 23:20:45 +02:00
add ecx ,[ coord_x ]
2012-02-29 23:04:49 +01:00
@ @ :
2010-07-29 23:20:45 +02:00
lea ecx ,[ ecx + ecx * 2 ]
add ecx , buf2d_data
sub ebx , eax
mov edi , ecx ;edi 㪠<> <E3AAA0> ⥫<EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> , <20> 㤠 <20> 㤥<EFBFBD> <20> ந<EFBFBD> <E0AEA8> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <E0AEA2> <EFBFBD> <EFBFBD>
mov [ right_bytes ], 0
mov ecx ,[ coord_x ]
cmp ecx , ebx
jl @ f
sub ecx , ebx
sub eax , ecx ;㪮<> <E3AAAE> 稢<EFBFBD> <E7A8A2> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 㥬<EFBFBD> <E3A5AC> <20> <> ப<EFBFBD>
add ebx , ecx ;㤫<> <E3A4AB> <EFBFBD> 塞 <20> <> ப<EFBFBD> <20> <> <EFBFBD> ᤢ<> <E1A4A2> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> ⨭<EFBFBD> <E2A8AD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
lea ecx ,[ ecx + ecx * 2 ] ;ecx - <20> <> <20> <> <EFBFBD> <EFBFBD> <20> 1-<2D> <20> <> ப<EFBFBD> <20> <> <EFBFBD> ⨭<EFBFBD> <E2A8AD> , <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> 뫠<EFBFBD> <EBABA0> <EFBFBD> <20> <> <20> ࠢ<EFBFBD> <E0A0A2> <20> <> <EFBFBD> <EFBFBD>
mov [ right_bytes ], ecx
@ @ :
lea eax ,[ eax + eax * 2 ] ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ⢮ <20> <> <EFBFBD> <EFBFBD> <20> 1-<2D> <20> <> ப<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 㥬<EFBFBD> <E3A5AC> <20> <> <EFBFBD> ⨭<EFBFBD> <E2A8AD>
lea ebx ,[ ebx + ebx * 2 ] ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ⢮ <20> <> <EFBFBD> <EFBFBD> <20> 1-<2D> <20> <> ப<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <20> 1-<2D> <20> <> ப<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 㥬<EFBFBD> <E3A5AC> <20> <> <EFBFBD> ⨭<EFBFBD> <E2A8AD>
cld
cmp [ right_bytes ], 0
jg .copy_1
.copy_0: ;<3B> <> <EFBFBD> <EFBFBD> ⮥ <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <E0AEA2> <EFBFBD> <EFBFBD>
mov ecx , eax
rep movsb
add edi , ebx
dec edx
cmp edx , 0
jg .copy_0
jmp .copy_end
.copy_1: ;<3B> <> <20> <> <EFBFBD> <EFBFBD> ⮥ <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <E0AEA2> <EFBFBD> <EFBFBD> (<28> <> <EFBFBD> ⨭<EFBFBD> <E2A8AD> <20> 뫠<EFBFBD> <EBABA0> <EFBFBD> <20> <> <20> ࠢ<EFBFBD> <E0A0A2> <20> <> <EFBFBD> <EFBFBD> )
mov ecx , eax
rep movsb
add edi , ebx
add esi ,[ right_bytes ] ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 塞 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> , <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> 뫠<EFBFBD> <EBABA0> <EFBFBD> <20> <> <20> ࠢ<EFBFBD> <E0A0A2> <20> ࠭<EFBFBD> <E0A0AD> <EFBFBD>
dec edx
cmp edx , 0
jg .copy_1
jmp .copy_end
.sou32: ;<3B> <20> <> <EFBFBD> <EFBFBD> 筨<EFBFBD> <E7ADA8> 32 <20> <> ⭠<EFBFBD> <20> <> <EFBFBD> ⨭<EFBFBD> <E2A8AD>
mov eax , buf2d_w
mov edx , buf2d_h ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 㥬<EFBFBD> <E3A5AC> <20> <> <EFBFBD> ⨭<EFBFBD> <E2A8AD>
mov esi , buf2d_data ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 㥬<EFBFBD> <E3A5AC> <20> <> <EFBFBD> ⨭<EFBFBD> <E2A8AD>
mov edi ,[ buf_destination ]
cmp buf2d_bits , 24
jne .copy_end ;<3B> <> ଠ <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> ন<EFBFBD> <E0A6A8> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
2010-10-07 19:00:40 +02:00
mov ebx ,[ coord_x ] ;<3B> ebx <20> ६<EFBFBD> <E0A5AC> <EFBFBD> <EFBFBD> <20> ⠢<EFBFBD> <E2A0A2> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD> (<28> <> <EFBFBD> <20> <EFBFBD> ન)
cmp ebx , buf2d_w ;<3B> <EFBFBD> <E0AEA2> 塞 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD> <20> <> <20> <> ਭ<EFBFBD>
2012-02-29 23:04:49 +01:00
jge .copy_end ;<3B> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> 뫠<EFBFBD> <EBABA0> <EFBFBD> <20> <> <20> ࠢ<EFBFBD> <E0A0A2> <20> <> <EFBFBD> <EFBFBD>
2010-07-29 23:20:45 +02:00
mov ebx , buf2d_h ;ebx - <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> ᭮<EFBFBD> <E1ADAE> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
mov ecx ,[ coord_y ]
2012-02-29 23:04:49 +01:00
cmp ecx , 0
jge @ f
;<3B> <20> <> <EFBFBD> न<EFBFBD> <E0A4A8> <EFBFBD> <EFBFBD> coord_y<0 (1-<2D> <20> <> <EFBFBD> <EFBFBD> ன<EFBFBD> <E0AEA9> )
add edx , ecx ;㬥<> <E3ACA5> 蠥<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 㥬<EFBFBD> <E3A5AC> <20> <> <EFBFBD> ⨭<EFBFBD> <E2A8AD>
cmp edx , 0
jle .copy_end ;<3B> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 㥬<EFBFBD> <E3A5AC> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD> <20> <> 室<EFBFBD> <E5AEA4> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <20> <> <EFBFBD> 孥<EFBFBD> <20> ࠭<EFBFBD> 楩 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> (coord_y<0 <20> |coord_y|>buf_source.h)
neg ecx
;inc ecx
imul ecx , eax
shl ecx , 2 ;<3B> <> 4 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> ᥫ<EFBFBD>
add esi , ecx ;ᤢ<> <E1A4A2> <EFBFBD> <EFBFBD> <EFBFBD> 㪠<> <E3AAA0> ⥫<EFBFBD> <20> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 㥬묨 <20> <> <EFBFBD> <EFBFBD> 묨, <20> <20> <> <EFBFBD> ⮬ <20> ய<EFBFBD> 襭<EFBFBD> <E8A5AD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD>
xor ecx , ecx ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> 塞 <20> <> <EFBFBD> न<EFBFBD> <E0A4A8> <EFBFBD> <EFBFBD> coord_y
@ @ :
2010-07-29 23:20:45 +02:00
cmp ecx , ebx
jge .copy_end ;<3B> <20> <> <EFBFBD> न<EFBFBD> <E0A4A8> <EFBFBD> <EFBFBD> 'y' <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
add ecx , edx ;ecx - <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> न<EFBFBD> <E0A4A8> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 㥬<EFBFBD> <E3A5AC> <20> <> <EFBFBD> ⨭<EFBFBD> <E2A8AD>
cmp ecx , ebx
jle @ f
sub ecx , ebx
sub edx , ecx ;㬥<> <E3ACA5> 蠥<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 㥬<EFBFBD> <E3A5AC> <20> <> <EFBFBD> ⨭<EFBFBD> <E2A8AD> , <20> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <20> 뫠<EFBFBD> <EBABA0> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> ࠭<EFBFBD> <E0A0AD> <EFBFBD>
@ @ :
mov ebx , buf2d_w
2012-02-29 23:04:49 +01:00
;mov ecx,ebx ;ecx <20> ᯮ<EFBFBD> <E1AFAE> <EFBFBD> 㥬 <20> <> <EFBFBD> <20> ६<EFBFBD> <E0A5AC> <EFBFBD> <EFBFBD> <EFBFBD> 楫<> <E6A5AB>
;imul ecx,[coord_y]
;add ecx,[coord_x]
mov ecx ,[ coord_y ] ;ecx <20> ᯮ<EFBFBD> <E1AFAE> <EFBFBD> 㥬 <20> <> <EFBFBD> <20> ६<EFBFBD> <E0A5AC> <EFBFBD> <EFBFBD> <EFBFBD> 楫<> <E6A5AB>
cmp ecx , 0
jg .end_otr_c_y_32
;<3B> <20> <> <EFBFBD> न<EFBFBD> <E0A4A8> <EFBFBD> <EFBFBD> coord_y<=0 (2-<2D> <20> <> <EFBFBD> <EFBFBD> ன<EFBFBD> <E0AEA9> )
mov ecx ,[ coord_x ]
jmp @ f
.end_otr_c_y_32:
imul ecx , ebx
2010-07-29 23:20:45 +02:00
add ecx ,[ coord_x ]
2012-02-29 23:04:49 +01:00
@ @ :
2010-07-29 23:20:45 +02:00
lea ecx ,[ ecx + ecx * 2 ]
add ecx , buf2d_data
sub ebx , eax
mov edi , ecx ;edi 㪠<> <E3AAA0> ⥫<EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> , <20> 㤠 <20> 㤥<EFBFBD> <20> ந<EFBFBD> <E0AEA8> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <E0AEA2> <EFBFBD> <EFBFBD>
mov [ right_bytes ], 0
mov ecx ,[ coord_x ]
cmp ecx , ebx
jl @ f
sub ecx , ebx
sub eax , ecx ;㪮<> <E3AAAE> 稢<EFBFBD> <E7A8A2> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 㥬<EFBFBD> <E3A5AC> <20> <> ப<EFBFBD>
add ebx , ecx ;㤫<> <E3A4AB> <EFBFBD> 塞 <20> <> ப<EFBFBD> <20> <> <EFBFBD> ᤢ<> <E1A4A2> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> ⨭<EFBFBD> <E2A8AD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
shl ecx , 2 ;ecx - <20> <> <20> <> <EFBFBD> <EFBFBD> <20> 1-<2D> <20> <> ப<EFBFBD> <20> <> <EFBFBD> ⨭<EFBFBD> <E2A8AD> , <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> 뫠<EFBFBD> <EBABA0> <EFBFBD> <20> <> <20> ࠢ<EFBFBD> <E0A0A2> <20> <> <EFBFBD> <EFBFBD>
mov [ right_bytes ], ecx
@ @ :
;eax - <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ⢮ <20> <> <EFBFBD> ᥫ<EFBFBD> <E1A5AB> <20> 1-<2D> <20> <> ப<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 㥬<EFBFBD> <E3A5AC> <20> <> <EFBFBD> ⨭<EFBFBD> <E2A8AD>
lea ebx ,[ ebx + ebx * 2 ] ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ⢮ <20> <> <EFBFBD> <EFBFBD> <20> 1-<2D> <20> <> ப<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <20> 1-<2D> <20> <> ப<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 㥬<EFBFBD> <E3A5AC> <20> <> <EFBFBD> ⨭<EFBFBD> <E2A8AD>
cld
cmp [ right_bytes ], 0
jg .copy_3
.copy_2: ;<3B> <> <EFBFBD> <EFBFBD> ⮥ <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <E0AEA2> <EFBFBD> <EFBFBD>
mov ecx , eax
@ @ :
movsw
movsb
inc esi
loop @ b
add edi , ebx
dec edx
cmp edx , 0
jg .copy_2
jmp .copy_end
.copy_3: ;<3B> <> <20> <> <EFBFBD> <EFBFBD> ⮥ <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <E0AEA2> <EFBFBD> <EFBFBD> (<28> <> <EFBFBD> ⨭<EFBFBD> <E2A8AD> <20> 뫠<EFBFBD> <EBABA0> <EFBFBD> <20> <> <20> ࠢ<EFBFBD> <E0A0A2> <20> <> <EFBFBD> <EFBFBD> )
mov ecx , eax
@ @ :
movsw
movsb
inc esi
loop @ b
add edi , ebx
add esi ,[ right_bytes ] ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 塞 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> , <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> 뫠<EFBFBD> <EBABA0> <EFBFBD> <20> <> <20> ࠢ<EFBFBD> <E0A0A2> <20> ࠭<EFBFBD> <E0A0AD> <EFBFBD>
dec edx
cmp edx , 0
jg .copy_3
.copy_end:
popad
ret
endp
;input:
; esi = pointer to color1 + transparent
; edi = pointer to background color2
;output:
; [edi] = combine color
align 4
2012-08-11 20:05:17 +02:00
combine_colors_0:
2010-07-29 23:20:45 +02:00
push ax bx cx dx
mov bx , 0x00ff ;---get transparent---
2012-06-05 17:33:54 +02:00
movzx cx , byte [ esi + 3 ] ;pro
2010-07-29 23:20:45 +02:00
sub bx , cx ;256-pro
2010-10-11 14:07:55 +02:00
;---blye---
2012-06-05 17:33:54 +02:00
movzx ax , byte [ esi ]
2010-07-29 23:20:45 +02:00
imul ax , bx
2012-06-05 17:33:54 +02:00
movzx dx , byte [ edi ]
2010-07-29 23:20:45 +02:00
imul dx , cx
add ax , dx
2010-10-11 14:07:55 +02:00
mov byte [ edi ], ah
2010-07-29 23:20:45 +02:00
;---green---
2012-06-05 17:33:54 +02:00
movzx ax , byte [ esi + 1 ]
2010-07-29 23:20:45 +02:00
imul ax , bx
2012-06-05 17:33:54 +02:00
movzx dx , byte [ edi + 1 ]
2010-07-29 23:20:45 +02:00
imul dx , cx
add ax , dx
mov byte [ edi + 1 ], ah
2010-10-11 14:07:55 +02:00
;---red---
2012-06-05 17:33:54 +02:00
movzx ax , byte [ esi + 2 ]
2010-07-29 23:20:45 +02:00
imul ax , bx
2012-06-05 17:33:54 +02:00
movzx dx , byte [ edi + 2 ]
2010-07-29 23:20:45 +02:00
imul dx , cx
add ax , dx
2010-10-11 14:07:55 +02:00
mov byte [ edi + 2 ], ah
2010-07-29 23:20:45 +02:00
pop dx cx bx ax
ret
;<3B> 㭪<EFBFBD> <E3ADAA> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> buf_source (32b) <20> buf_destination (24b)
; 㪠<> 뢠<EFBFBD> <EBA2A0> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> न<EFBFBD> <E0A4A8> <EFBFBD> <EFBFBD> <20> <> ⠢<EFBFBD> <E2A0A2> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> buf_source <20> ⭮<EFBFBD> <E2ADAE> ⥫쭮 buf_destination
; <20> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <E0AEA2> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> 뢠<EFBFBD> <EBA2A0> <EFBFBD> <EFBFBD> <20> <EFBFBD> <E0AEA7> 筮<EFBFBD> <E7ADAE> <EFBFBD>
align 4
proc buf_bit_blt_transp , buf_destination : dword , coord_x : dword , coord_y : dword , buf_source : dword
locals
2012-08-17 19:54:03 +02:00
lost_bytes dd ?
2010-07-29 23:20:45 +02:00
endl
pushad
mov edi ,[ buf_source ]
cmp buf2d_bits , 32
jne .copy_end ;<3B> <> ଠ <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> ন<EFBFBD> <E0A6A8> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
mov eax , buf2d_w
mov edx , buf2d_h ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 㥬<EFBFBD> <E3A5AC> <20> <> <EFBFBD> ⨭<EFBFBD> <E2A8AD>
mov esi , buf2d_data ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 㥬<EFBFBD> <E3A5AC> <20> <> <EFBFBD> ⨭<EFBFBD> <E2A8AD>
mov edi ,[ buf_destination ]
cmp buf2d_bits , 24
jne .copy_end ;<3B> <> ଠ <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> ন<EFBFBD> <E0A6A8> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
mov ebx , buf2d_h ;ebx - <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> ᭮<EFBFBD> <E1ADAE> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
mov ecx ,[ coord_y ]
2012-02-23 15:01:56 +01:00
cmp ecx , 0
jge @ f
;<3B> <20> <> <EFBFBD> न<EFBFBD> <E0A4A8> <EFBFBD> <EFBFBD> coord_y<0 (1-<2D> <20> <> <EFBFBD> <EFBFBD> ன<EFBFBD> <E0AEA9> )
add edx , ecx ;㬥<> <E3ACA5> 蠥<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 㥬<EFBFBD> <E3A5AC> <20> <> <EFBFBD> ⨭<EFBFBD> <E2A8AD>
cmp edx , 0
jle .copy_end ;<3B> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 㥬<EFBFBD> <E3A5AC> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD> <20> <> 室<EFBFBD> <E5AEA4> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <20> <> <EFBFBD> 孥<EFBFBD> <20> ࠭<EFBFBD> 楩 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> (coord_y<0 <20> |coord_y|>buf_source.h)
neg ecx
;inc ecx
imul ecx , eax
2012-02-29 23:04:49 +01:00
shl ecx , 2 ;<3B> <> 4 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> ᥫ<EFBFBD>
2012-02-23 15:01:56 +01:00
add esi , ecx ;ᤢ<> <E1A4A2> <EFBFBD> <EFBFBD> <EFBFBD> 㪠<> <E3AAA0> ⥫<EFBFBD> <20> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 㥬묨 <20> <> <EFBFBD> <EFBFBD> 묨, <20> <20> <> <EFBFBD> ⮬ <20> ய<EFBFBD> 襭<EFBFBD> <E8A5AD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD>
xor ecx , ecx ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> 塞 <20> <> <EFBFBD> न<EFBFBD> <E0A4A8> <EFBFBD> <EFBFBD> coord_y
@ @ :
2010-07-29 23:20:45 +02:00
cmp ecx , ebx
jge .copy_end ;<3B> <20> <> <EFBFBD> न<EFBFBD> <E0A4A8> <EFBFBD> <EFBFBD> 'y' <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
add ecx , edx ;ecx - <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> न<EFBFBD> <E0A4A8> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 㥬<EFBFBD> <E3A5AC> <20> <> <EFBFBD> ⨭<EFBFBD> <E2A8AD>
cmp ecx , ebx
jle @ f
sub ecx , ebx
sub edx , ecx ;㬥<> <E3ACA5> 蠥<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 㥬<EFBFBD> <E3A5AC> <20> <> <EFBFBD> ⨭<EFBFBD> <E2A8AD> , <20> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <20> 뫠<EFBFBD> <EBABA0> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> ࠭<EFBFBD> <E0A0AD> <EFBFBD>
@ @ :
mov ebx , buf2d_w
mov ecx , ebx ;ecx <20> ᯮ<EFBFBD> <E1AFAE> <EFBFBD> 㥬 <20> <> <EFBFBD> <20> ६<EFBFBD> <E0A5AC> <EFBFBD> <EFBFBD> <EFBFBD> 楫<> <E6A5AB>
2012-02-23 15:01:56 +01:00
cmp [ coord_y ], 0
jg .end_otr_c_y
;<3B> <20> <> <EFBFBD> न<EFBFBD> <E0A4A8> <EFBFBD> <EFBFBD> coord_y<=0 (2-<2D> <20> <> <EFBFBD> <EFBFBD> ன<EFBFBD> <E0AEA9> )
mov ecx ,[ coord_x ]
jmp @ f
.end_otr_c_y:
2010-07-29 23:20:45 +02:00
imul ecx ,[ coord_y ]
add ecx ,[ coord_x ]
2012-02-23 15:01:56 +01:00
@ @ :
2010-07-29 23:20:45 +02:00
lea ecx ,[ ecx + ecx * 2 ]
add ecx , buf2d_data
sub ebx , eax
mov edi , ecx ;edi 㪠<> <E3AAA0> ⥫<EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> , <20> 㤠 <20> 㤥<EFBFBD> <20> ந<EFBFBD> <E0AEA8> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <E0AEA2> <EFBFBD> <EFBFBD>
2012-08-17 19:54:03 +02:00
mov dword [ lost_bytes ], 0
2010-07-29 23:20:45 +02:00
mov ecx ,[ coord_x ]
2012-08-17 19:54:03 +02:00
cmp ecx , 0
jge @ f
neg ecx
;inc ecx
cmp eax , ecx ;eax - <20> <> ਭ<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 㥬<EFBFBD> <E3A5AC> <20> <> <EFBFBD> ⨭<EFBFBD> <E2A8AD>
jle .copy_end ;<3B> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 㥬<EFBFBD> <E3A5AC> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD> <20> <> 室<EFBFBD> <E5AEA4> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> ࠭<EFBFBD> 楩 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> (coord_x<0 <20> |coord_x|>buf_source.w)
shl ecx , 2
mov [ lost_bytes ], ecx
add esi , ecx
shr ecx , 2
sub eax , ecx ;㪮<> <E3AAAE> 稢<EFBFBD> <E7A8A2> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 㥬<EFBFBD> <E3A5AC> <20> <> ப<EFBFBD>
add ebx , ecx ;㤫<> <E3A4AB> <EFBFBD> 塞 <20> <> ப<EFBFBD> <20> <> <EFBFBD> ᤢ<> <E1A4A2> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> ⨭<EFBFBD> <E2A8AD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
lea ecx ,[ ecx + ecx * 2 ]
add edi , ecx ;edi 㪠<> <E3AAA0> ⥫<EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> , <20> 㤠 <20> 㤥<EFBFBD> <20> ந<EFBFBD> <E0AEA8> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <E0AEA2> <EFBFBD> <EFBFBD>
xor ecx , ecx
@ @ :
2010-07-29 23:20:45 +02:00
cmp ecx , ebx
2012-08-17 19:54:03 +02:00
jle @ f
2010-07-29 23:20:45 +02:00
sub ecx , ebx
sub eax , ecx ;㪮<> <E3AAAE> 稢<EFBFBD> <E7A8A2> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 㥬<EFBFBD> <E3A5AC> <20> <> ப<EFBFBD>
add ebx , ecx ;㤫<> <E3A4AB> <EFBFBD> 塞 <20> <> ப<EFBFBD> <20> <> <EFBFBD> ᤢ<> <E1A4A2> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> ⨭<EFBFBD> <E2A8AD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
2012-08-17 19:54:03 +02:00
shl ecx , 2 ;ecx - <20> <> <20> <> <EFBFBD> ᥫ<EFBFBD> <E1A5AB> <20> 1-<2D> <20> <> ப<EFBFBD> <20> <> <EFBFBD> ⨭<EFBFBD> <E2A8AD> , <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> 뫠<EFBFBD> <EBABA0> <EFBFBD> <20> <> <20> ࠢ<EFBFBD> <E0A0A2> <20> <> <EFBFBD> <EFBFBD>
add [ lost_bytes ], ecx
2010-07-29 23:20:45 +02:00
@ @ :
2012-08-17 19:54:03 +02:00
; mov [right_bytes],0
; mov ecx,[coord_x]
; cmp ecx,ebx
; jl @f
; sub ecx,ebx
; sub eax,ecx ;㪮<> <E3AAAE> 稢<EFBFBD> <E7A8A2> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 㥬<EFBFBD> <E3A5AC> <20> <> ப<EFBFBD>
; add ebx,ecx ;㤫<> <E3A4AB> <EFBFBD> 塞 <20> <> ப<EFBFBD> <20> <> <EFBFBD> ᤢ<> <E1A4A2> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> ⨭<EFBFBD> <E2A8AD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
; shl ecx,2 ;ecx - <20> <> <20> <> <EFBFBD> <EFBFBD> <20> 1-<2D> <20> <> ப<EFBFBD> <20> <> <EFBFBD> ⨭<EFBFBD> <E2A8AD> , <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> 뫠<EFBFBD> <EBABA0> <EFBFBD> <20> <> <20> ࠢ<EFBFBD> <E0A0A2> <20> <> <EFBFBD> <EFBFBD>
; mov [right_bytes],ecx
; @@:
2010-07-29 23:20:45 +02:00
lea ebx ,[ ebx + ebx * 2 ] ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ⢮ <20> <> <EFBFBD> <EFBFBD> <20> 1-<2D> <20> <> ப<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <20> 1-<2D> <20> <> ப<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 㥬<EFBFBD> <E3A5AC> <20> <> <EFBFBD> ⨭<EFBFBD> <E2A8AD>
2012-05-11 12:11:27 +02:00
2010-07-29 23:20:45 +02:00
cld
2012-08-17 19:54:03 +02:00
cmp [ lost_bytes ], 0
2010-07-29 23:20:45 +02:00
jg .copy_1
.copy_0: ;<3B> <> <EFBFBD> <EFBFBD> ⮥ <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <E0AEA2> <EFBFBD> <EFBFBD>
mov ecx , eax
@ @ :
2012-08-11 20:05:17 +02:00
call combine_colors_0
2010-07-29 23:20:45 +02:00
add edi , 3
add esi , 4
loop @ b
add edi , ebx
dec edx
cmp edx , 0
jg .copy_0
jmp .copy_end
.copy_1: ;<3B> <> <20> <> <EFBFBD> <EFBFBD> ⮥ <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <E0AEA2> <EFBFBD> <EFBFBD> (<28> <> <EFBFBD> ⨭<EFBFBD> <E2A8AD> <20> 뫠<EFBFBD> <EBABA0> <EFBFBD> <20> <> <20> ࠢ<EFBFBD> <E0A0A2> <20> <> <EFBFBD> <EFBFBD> )
mov ecx , eax
@ @ :
2012-08-11 20:05:17 +02:00
call combine_colors_0
2010-07-29 23:20:45 +02:00
add edi , 3
add esi , 4
loop @ b
add edi , ebx
2012-08-17 19:54:03 +02:00
add esi ,[ lost_bytes ] ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 塞 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> , <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> 뫠<EFBFBD> <EBABA0> <EFBFBD> <20> <> <20> ࠢ<EFBFBD> <E0A0A2> <20> ࠭<EFBFBD> <E0A0AD> <EFBFBD>
2010-07-29 23:20:45 +02:00
dec edx
cmp edx , 0
jg .copy_1
.copy_end:
popad
ret
endp
;input:
; ebx - color1
; esi = pointer to transparent
; edi = pointer to background color2
;output:
; [edi] = combine color
align 4
combine_colors_2:
push ax ebx cx dx si
mov cl , byte [ esi ] ;pro
xor ch , ch
mov si , 0x00ff ;---get transparent---
sub si , cx ;256-pro
2010-10-11 14:07:55 +02:00
;---blye---
2012-06-05 17:33:54 +02:00
movzx ax , bl
2010-07-29 23:20:45 +02:00
shr ebx , 8
imul ax , si
2012-06-05 17:33:54 +02:00
movzx dx , byte [ edi ]
2010-07-29 23:20:45 +02:00
imul dx , cx
add ax , dx
2010-10-11 14:07:55 +02:00
mov byte [ edi ], ah
2010-07-29 23:20:45 +02:00
;---green---
2012-06-05 17:33:54 +02:00
movzx ax , bl
2010-07-29 23:20:45 +02:00
shr ebx , 8
imul ax , si
2012-06-05 17:33:54 +02:00
movzx dx , byte [ edi + 1 ]
2010-07-29 23:20:45 +02:00
imul dx , cx
add ax , dx
mov byte [ edi + 1 ], ah
;---red---
2012-06-05 17:33:54 +02:00
movzx ax , bl
2010-07-29 23:20:45 +02:00
imul ax , si
2012-06-05 17:33:54 +02:00
movzx dx , byte [ edi + 2 ]
2010-07-29 23:20:45 +02:00
imul dx , cx
add ax , dx
2010-10-11 14:07:55 +02:00
mov byte [ edi + 2 ], ah
2010-07-29 23:20:45 +02:00
pop si dx cx ebx ax
ret
;<3B> 㭪<EFBFBD> <E3ADAA> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> buf_source (8b) <20> buf_destination (24b)
; 㪠<> 뢠<EFBFBD> <EBA2A0> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> न<EFBFBD> <E0A4A8> <EFBFBD> <EFBFBD> <20> <> ⠢<EFBFBD> <E2A0A2> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> buf_source <20> ⭮<EFBFBD> <E2ADAE> ⥫쭮 buf_destination
align 4
proc buf_bit_blt_alpha , buf_destination : dword , coord_x : dword , coord_y : dword , buf_source : dword , color : dword
locals
2012-02-23 15:01:56 +01:00
lost_bytes dd ? ;<3B> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> ﭭ<EFBFBD> <EFADAD> <20> <> <EFBFBD> ⮢ <20> <20> <> ப<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 㥬<EFBFBD> <E3A5AC> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> (<28> <> <EFBFBD> <20> <> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> )
2010-07-29 23:20:45 +02:00
dest_w_bytes dd ? ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ⢮ <20> <> <EFBFBD> <EFBFBD> <20> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> ਥ<EFBFBD> <E0A8A5> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> ਭ<EFBFBD> - <20> <> ਭ<EFBFBD> <20> <> ⠢<EFBFBD> 塞<EFBFBD> <EFA5AC> <20> <> <EFBFBD> ⨭<EFBFBD> <E2A8AD>
endl
pushad
mov edi ,[ buf_source ]
cmp buf2d_bits , 8
jne .error1 ;<3B> <> ଠ <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> ন<EFBFBD> <E0A6A8> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
2012-02-23 15:01:56 +01:00
mov eax , buf2d_w ;<3B> <> ਭ<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 㥬<EFBFBD> <E3A5AC> <20> <> <EFBFBD> ⨭<EFBFBD> <E2A8AD>
2010-07-29 23:20:45 +02:00
mov edx , buf2d_h ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 㥬<EFBFBD> <E3A5AC> <20> <> <EFBFBD> ⨭<EFBFBD> <E2A8AD>
mov esi , buf2d_data ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 㥬<EFBFBD> <E3A5AC> <20> <> <EFBFBD> ⨭<EFBFBD> <E2A8AD>
mov edi ,[ buf_destination ]
cmp buf2d_bits , 24
jne .error2 ;<3B> <> ଠ <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> ন<EFBFBD> <E0A6A8> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
2010-10-04 13:51:03 +02:00
mov ebx ,[ coord_x ] ;<3B> ebx <20> ६<EFBFBD> <E0A5AC> <EFBFBD> <EFBFBD> <20> ⠢<EFBFBD> <E2A0A2> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD> (<28> <> <EFBFBD> <20> <EFBFBD> ન)
cmp ebx , buf2d_w ;<3B> <EFBFBD> <E0AEA2> 塞 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD> <20> <> <20> <> ਭ<EFBFBD>
2012-02-29 23:04:49 +01:00
jge .copy_end ;<3B> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> 뫠<EFBFBD> <EBABA0> <EFBFBD> <20> <> <20> ࠢ<EFBFBD> <E0A0A2> <20> <> <EFBFBD> <EFBFBD>
2010-07-29 23:20:45 +02:00
mov ebx , buf2d_h ;ebx - <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> ᭮<EFBFBD> <E1ADAE> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
mov ecx ,[ coord_y ]
2012-02-21 19:38:38 +01:00
cmp ecx , 0
jge @ f
;<3B> <20> <> <EFBFBD> न<EFBFBD> <E0A4A8> <EFBFBD> <EFBFBD> coord_y<0 (1-<2D> <20> <> <EFBFBD> <EFBFBD> ன<EFBFBD> <E0AEA9> )
add edx , ecx ;㬥<> <E3ACA5> 蠥<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 㥬<EFBFBD> <E3A5AC> <20> <> <EFBFBD> ⨭<EFBFBD> <E2A8AD>
2012-02-23 15:01:56 +01:00
cmp edx , 0
jle .copy_end ;<3B> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 㥬<EFBFBD> <E3A5AC> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD> <20> <> 室<EFBFBD> <E5AEA4> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <20> <> <EFBFBD> 孥<EFBFBD> <20> ࠭<EFBFBD> 楩 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> (coord_y<0 <20> |coord_y|>buf_source.h)
2012-02-21 19:38:38 +01:00
neg ecx
;inc ecx
imul ecx , eax
add esi , ecx ;ᤢ<> <E1A4A2> <EFBFBD> <EFBFBD> <EFBFBD> 㪠<> <E3AAA0> ⥫<EFBFBD> <20> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 㥬묨 <20> <> <EFBFBD> <EFBFBD> 묨, <20> <20> <> <EFBFBD> ⮬ <20> ய<EFBFBD> 襭<EFBFBD> <E8A5AD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD>
xor ecx , ecx ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> 塞 <20> <> <EFBFBD> न<EFBFBD> <E0A4A8> <EFBFBD> <EFBFBD> coord_y
@ @ :
2010-07-29 23:20:45 +02:00
cmp ecx , ebx
jge .copy_end ;<3B> <20> <> <EFBFBD> न<EFBFBD> <E0A4A8> <EFBFBD> <EFBFBD> 'y' <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
add ecx , edx ;ecx - <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> न<EFBFBD> <E0A4A8> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 㥬<EFBFBD> <E3A5AC> <20> <> <EFBFBD> ⨭<EFBFBD> <E2A8AD>
cmp ecx , ebx
jle @ f
sub ecx , ebx
sub edx , ecx ;㬥<> <E3ACA5> 蠥<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 㥬<EFBFBD> <E3A5AC> <20> <> <EFBFBD> ⨭<EFBFBD> <E2A8AD> , <20> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <20> 뫠<EFBFBD> <EBABA0> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> ࠭<EFBFBD> <E0A0AD> <EFBFBD>
@ @ :
mov ebx , buf2d_w
2012-02-21 19:38:38 +01:00
mov ecx ,[ coord_y ] ;ecx <20> ᯮ<EFBFBD> <E1AFAE> <EFBFBD> 㥬 <20> <> <EFBFBD> <20> ६<EFBFBD> <E0A5AC> <EFBFBD> <EFBFBD> <EFBFBD> 楫<> <E6A5AB>
cmp ecx , 0
2012-02-23 15:01:56 +01:00
jg .end_otr_c_y
;<3B> <20> <> <EFBFBD> न<EFBFBD> <E0A4A8> <EFBFBD> <EFBFBD> coord_y<=0 (2-<2D> <20> <> <EFBFBD> <EFBFBD> ன<EFBFBD> <E0AEA9> )
2012-02-21 19:38:38 +01:00
mov ecx ,[ coord_x ]
jmp @ f
.end_otr_c_y:
imul ecx , ebx
2010-07-29 23:20:45 +02:00
add ecx ,[ coord_x ]
2012-02-21 19:38:38 +01:00
@ @ :
2010-07-29 23:20:45 +02:00
lea ecx ,[ ecx + ecx * 2 ]
2012-02-23 15:01:56 +01:00
add ecx , buf2d_data ;buf2d_data <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> ᭮<EFBFBD> <E1ADAE> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
sub ebx , eax ;ebx - <20> <> ਭ<EFBFBD> <20> ᭮<EFBFBD> <E1ADAE> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> ਭ<EFBFBD> <20> <> <EFBFBD> 㥬<EFBFBD> <E3A5AC> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
2010-07-29 23:20:45 +02:00
mov edi , ecx ;edi 㪠<> <E3AAA0> ⥫<EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> , <20> 㤠 <20> 㤥<EFBFBD> <20> ந<EFBFBD> <E0AEA8> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <E0AEA2> <EFBFBD> <EFBFBD>
2012-02-23 15:01:56 +01:00
mov dword [ lost_bytes ], 0
2010-07-29 23:20:45 +02:00
mov ecx ,[ coord_x ]
2012-02-23 15:01:56 +01:00
cmp ecx , 0
jge @ f
neg ecx
;inc ecx
cmp eax , ecx ;eax - <20> <> ਭ<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 㥬<EFBFBD> <E3A5AC> <20> <> <EFBFBD> ⨭<EFBFBD> <E2A8AD>
jle .copy_end ;<3B> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 㥬<EFBFBD> <E3A5AC> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD> <20> <> 室<EFBFBD> <E5AEA4> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> ࠭<EFBFBD> 楩 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> (coord_x<0 <20> |coord_x|>buf_source.w)
2012-08-17 19:54:03 +02:00
mov [ lost_bytes ], ecx
2012-02-23 15:01:56 +01:00
sub eax , ecx ;㪮<> <E3AAAE> 稢<EFBFBD> <E7A8A2> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 㥬<EFBFBD> <E3A5AC> <20> <> ப<EFBFBD>
add ebx , ecx ;㤫<> <E3A4AB> <EFBFBD> 塞 <20> <> ப<EFBFBD> <20> <> <EFBFBD> ᤢ<> <E1A4A2> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> ⨭<EFBFBD> <E2A8AD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
add esi , ecx
lea ecx ,[ ecx + ecx * 2 ]
add edi , ecx ;edi 㪠<> <E3AAA0> ⥫<EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> , <20> 㤠 <20> 㤥<EFBFBD> <20> ந<EFBFBD> <E0AEA8> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <E0AEA2> <EFBFBD> <EFBFBD>
xor ecx , ecx
@ @ :
2010-07-29 23:20:45 +02:00
cmp ecx , ebx
2012-02-23 15:01:56 +01:00
jle @ f
2010-07-29 23:20:45 +02:00
sub ecx , ebx
sub eax , ecx ;㪮<> <E3AAAE> 稢<EFBFBD> <E7A8A2> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 㥬<EFBFBD> <E3A5AC> <20> <> ப<EFBFBD>
add ebx , ecx ;㤫<> <E3A4AB> <EFBFBD> 塞 <20> <> ப<EFBFBD> <20> <> <EFBFBD> ᤢ<> <E1A4A2> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> ⨭<EFBFBD> <E2A8AD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
;ecx - <20> <> <20> <> <EFBFBD> ᥫ<EFBFBD> <E1A5AB> <20> 1-<2D> <20> <> ப<EFBFBD> <20> <> <EFBFBD> ⨭<EFBFBD> <E2A8AD> , <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> 뫠<EFBFBD> <EBABA0> <EFBFBD> <20> <> <20> ࠢ<EFBFBD> <E0A0A2> <20> <> <EFBFBD> <EFBFBD>
2012-02-23 15:01:56 +01:00
add [ lost_bytes ], ecx
2010-07-29 23:20:45 +02:00
@ @ :
lea ebx ,[ ebx + ebx * 2 ] ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ⢮ <20> <> <EFBFBD> <EFBFBD> <20> 1-<2D> <20> <> ப<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <20> 1-<2D> <20> <> ப<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 㥬<EFBFBD> <E3A5AC> <20> <> <EFBFBD> ⨭<EFBFBD> <E2A8AD>
mov [ dest_w_bytes ], ebx
mov ebx ,[ color ]
cld
2012-02-23 15:01:56 +01:00
cmp dword [ lost_bytes ], 0
2010-07-29 23:20:45 +02:00
jg .copy_1
.copy_0: ;<3B> <> <EFBFBD> <EFBFBD> ⮥ <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <E0AEA2> <EFBFBD> <EFBFBD>
mov ecx , eax
@ @ :
call combine_colors_2
add edi , 3
inc esi
loop @ b
add edi ,[ dest_w_bytes ]
dec edx
cmp edx , 0
jg .copy_0
jmp .copy_end
2012-02-23 15:01:56 +01:00
.copy_1: ;<3B> <> <20> <> <EFBFBD> <EFBFBD> ⮥ <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <E0AEA2> <EFBFBD> <EFBFBD> (<28> <> <EFBFBD> ⨭<EFBFBD> <E2A8AD> <20> 뫠<EFBFBD> <EBABA0> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> /<2F> <> <EFBFBD> <20> ࠢ<EFBFBD> <E0A0A2> <20> <> <EFBFBD> <EFBFBD> )
2010-07-29 23:20:45 +02:00
mov ecx , eax
@ @ :
call combine_colors_2
add edi , 3
inc esi
loop @ b
add edi ,[ dest_w_bytes ]
2012-02-23 15:01:56 +01:00
add esi ,[ lost_bytes ] ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 塞 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> , <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> 뫠<EFBFBD> <EBABA0> <EFBFBD> <20> <> <20> ࠢ<EFBFBD> <E0A0A2> <20> ࠭<EFBFBD> <E0A0AD> <EFBFBD>
2010-07-29 23:20:45 +02:00
dec edx
cmp edx , 0
jg .copy_1
jmp .copy_end
.error1:
stdcall print_err , sz_buf2d_bit_blt_alpha , txt_err_n8b
jmp .copy_end
.error2:
stdcall print_err , sz_buf2d_bit_blt_alpha , txt_err_n24b
.copy_end:
popad
ret
endp
;<3B> ८<EFBFBD> ࠧ<EFBFBD> <E0A0A7> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 8-<2D> <> ⭮<EFBFBD> <E2ADAE> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ࠧ<> <E0A0A7> 16*16 <20> ࠧ<> <E0A0A7> <EFBFBD> 1*256 ᨬ<> <E1A8AC> <EFBFBD> <EFBFBD> <EFBFBD>
align 4
proc buf_convert_text_matrix , buf_struc : dword
locals
tmp_mem dd ?
c1 dw ?
c2 dd ?
c3 dw ?
endl
pushad
mov edi , dword [ buf_struc ]
cmp buf2d_bits , 8
jne .error
mov ecx , buf2d_h
mov ebx , ecx
shr ebx , 4 ;<3B> ।<EFBFBD> <E0A5A4> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <20> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 16 <20> <> ப <20> ᨬ<> <E1A8AC> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> , <20> <> ⮬<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> 2^4
mov edx , buf2d_w
imul ecx , edx ;ecx = size 8 b
invoke mem.alloc , ecx ;<3B> 뤥<EFBFBD> 塞 <20> ६<EFBFBD> <E0A5AC> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
mov [ tmp_mem ], eax ;eax - new memory
shr edx , 4 ;<3B> ।<EFBFBD> <E0A5A4> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <20> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 16 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> ᨬ<> <E1A8AC> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> , <20> <> ⮬<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> 2^4
mov eax , ebx
imul ebx , edx ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 塞 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ⢮ <20> <> <EFBFBD> ᥫ<EFBFBD> <E1A5AB> <20> <> 1 ᨬ<> <E1A8AC> <EFBFBD>
;eax = bhe - <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> 㪢<EFBFBD>
;ebx = bwi*bhe - <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ⢮ <20> <> <EFBFBD> ᥫ<EFBFBD> <E1A5AB> <20> 1-<2D> <20> 㪢<EFBFBD>
;edx = bwi - <20> <> ਭ<EFBFBD> <20> 㪢<EFBFBD>
;ecx,esi,edi - <20> ᯮ<EFBFBD> <E1AFAE> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> 横<> <E6A8AA> .c_0
shr buf2d_w , 4
shl buf2d_h , 4 ;<3B> ८<EFBFBD> ࠧ<EFBFBD> <E0A0A7> 뢠<EFBFBD> <EBA2A0> ࠧ<> <E0A0A7> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
cld
mov esi , buf2d_data
mov edi ,[ tmp_mem ]
mov word [ c3 ], 16
.c_3:
mov dword [ c2 ], eax
.c_2:
mov word [ c1 ], 16
.c_1:
mov ecx , edx ;.c_0:
rep movsb
add edi , ebx
sub edi , edx ;edi+=(bwi*bhe-bwi)
dec word [ c1 ]
cmp word [ c1 ], 0
jg .c_1
add edi , edx
shl ebx , 4
sub edi , ebx ;edi-=(16*bwi*bhe-bwi)
shr ebx , 4
dec dword [ c2 ]
cmp dword [ c2 ], 0
jg .c_2
sub edi , ebx
shl ebx , 4
add edi , ebx ;edi+=(15*bwi*bhe)
shr ebx , 4
dec word [ c3 ]
cmp word [ c3 ], 0
jg .c_3
mov edi , dword [ buf_struc ] ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <E0AEA2> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <20> ᭮<EFBFBD> <E1ADAE> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD>
mov edi , buf2d_data
mov esi ,[ tmp_mem ]
mov ecx , ebx
shl ecx , 8
rep movsb
invoke mem.free ,[ tmp_mem ] ;<3B> <> <EFBFBD> ⨬ <20> ६<EFBFBD> <E0A5AC> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
jmp .end_conv
.error:
stdcall print_err , sz_buf2d_convert_text_matrix , txt_err_n8b
.end_conv:
popad
ret
endp
align 4
buf_s_matr buf_2d_header ? ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> 쭠<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ᨬ<> <E1A8AC> <EFBFBD> <EFBFBD>
align 4
proc buf_draw_text , buf_struc : dword , buf_t_matr : dword , text : dword , coord_x : dword , coord_y : dword , color : dword
locals
buf_t_matr_offs dd ?
endl
pushad
mov edi , dword [ buf_struc ]
cmp buf2d_bits , 24
jne .error2
mov edi , dword [ buf_t_matr ]
cmp buf2d_bits , 8
jne .error1
mov edx , buf2d_data
mov [ buf_t_matr_offs ], edx
mov ecx , BUF_STRUCT_SIZE ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> 㥬 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ⥪<> ⮢<EFBFBD> <E2AEA2> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
mov esi , edi
lea edi ,[ buf_s_matr ]
cld
rep movsb
lea edi ,[ buf_s_matr ]
shr buf2d_h , 8 ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ᨬ<> <E1A8AC> <EFBFBD> 쭮<EFBFBD> <ECADAE> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> 256, <20> <> <EFBFBD> <20> <> 宦<EFBFBD> <E5AEA6> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 1-<2D> <> ᨬ<> <E1A8AC> <EFBFBD> <EFBFBD>
mov ebx , buf2d_h ;<3B> <> ६ <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ᨬ<> <E1A8AC> <EFBFBD> <EFBFBD>
mov ecx , buf2d_w ;<3B> <> ६ <20> <> ਭ<EFBFBD> ᨬ<> <E1A8AC> <EFBFBD> <EFBFBD>
mov eax ,[ coord_x ]
mov esi ,[ text ]
cmp byte [ esi ], 0
je .end_draw ;<3B> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> ப<EFBFBD>
@ @ :
xor edx , edx
mov dl , byte [ esi ] ;<3B> <> ६ <20> <> <EFBFBD> ᨬ<> <E1A8AC> <EFBFBD> <EFBFBD>
imul edx , ebx ;㬭<> <E3ACAD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ᨬ<> <E1A8AC> <EFBFBD> <EFBFBD>
imul edx , ecx ;㬭<> <E3ACAD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> ਭ<EFBFBD> ᨬ<> <E1A8AC> <EFBFBD> <EFBFBD>
add edx ,[ buf_t_matr_offs ] ;<3B> ਡ<EFBFBD> <E0A8A1> <EFBFBD> 塞 ᬥ饭<E1ACA5> <E9A5AD> 0-<2D> <> ᨬ<> <E1A8AC> <EFBFBD> <EFBFBD> , <20> . <20> . <20> <> <EFBFBD> <EFBFBD> 砥<EFBFBD> <E7A0A5> <EFBFBD> ᬥ饭<E1ACA5> <E9A5AD> <20> 뢮<EFBFBD> <EBA2AE> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ᨬ<> <E1A8AC> <EFBFBD> <EFBFBD>
mov buf2d_data , edx ;<3B> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> ᨬ<> <E1A8AC> <EFBFBD> <EFBFBD> , <20> ⠢<EFBFBD> <E2A0A2> 㪠<> <E3AAA0> ⥫<EFBFBD> <20> <> <20> 㦭<EFBFBD> <E3A6AD> ᨬ<> <E1A8AC> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> buf_t_matr
stdcall buf_bit_blt_alpha , [ buf_struc ], eax ,[ coord_y ], edi ,[ color ]
add eax , ecx
.new_s:
inc esi
cmp byte [ esi ], 13
jne .no_13
mov eax ,[ coord_x ]
add [ coord_y ], ebx
jmp .new_s
.no_13:
cmp byte [ esi ], 0
jne @ b
jmp .end_draw
.error1:
stdcall print_err , sz_buf2d_draw_text , txt_err_n8b
jmp .end_draw
.error2:
stdcall print_err , sz_buf2d_draw_text , txt_err_n24b
.end_draw:
popad
ret
endp
align 4
proc print_err , fun : dword , mes : dword ;<3B> 뢮<EFBFBD> <EBA2AE> <EFBFBD> ᮮ<> 饭<EFBFBD> <E9A5AD> <20> <> 訡<> <E8A8A1> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> ⫠<EFBFBD> <E2ABA0> <EFBFBD>
pushad
mov eax , 63
mov ebx , 1
mov esi ,[ fun ]
@ @ :
mov cl , byte [ esi ]
int 0x40
inc esi
cmp byte [ esi ], 0
jne @ b
mov cl , ':'
int 0x40
mov cl , ' '
int 0x40
mov esi ,[ mes ]
@ @ :
mov cl , byte [ esi ]
int 0x40
inc esi
cmp byte [ esi ], 0
jne @ b
popad
ret
endp
;input:
; ebp+8 = p0
; ebp+12 = p1
align 4
line_len4i:
push ebp
mov ebp , esp
fild word [ ebp + 8 ]
fisub word [ ebp + 12 ]
fmul st0 , st0 ;st0=x^2
fild word [ ebp + 10 ]
fisub word [ ebp + 14 ]
fmul st0 , st0 ;st0=y^2
2015-01-30 17:21:33 +01:00
faddp
2010-07-29 23:20:45 +02:00
fsqrt
fstp dword [ ebp + 12 ]
pop ebp
ret 4 ;8
align 4
2010-12-22 18:03:22 +01:00
proc buf_curve_bezier , buffer : dword , coord_p0 : dword , coord_p1 : dword , coord_p2 : dword , color : dword
2010-07-29 23:20:45 +02:00
locals
delt_t dd ?
opr_param dd ?
v_poi_0 dd ?
endl
pushad
;float t, xt,yt;
;for(t=.0;t<1.;t+=.005){
; xt=pow(1.-t,2)*x0+2*t*(1.-t)*x1+pow(t,2)*x2;
; yt=pow(1.-t,2)*y0+2*t*(1.-t)*y1+pow(t,2)*y2;
; dc.SetPixel(xt,yt,255L);
;}
2010-12-22 18:03:22 +01:00
mov edx ,[ color ] ;set curve color
2010-07-29 23:20:45 +02:00
mov edi ,[ buffer ]
xor ebx , ebx
xor ecx , ecx
finit
2015-01-30 17:21:33 +01:00
fldz
2010-07-29 23:20:45 +02:00
; calculate delta t
stdcall line_len4i , dword [ coord_p1 ], dword [ coord_p0 ]
fadd dword [ esp ]
add esp , 4 ;pop ...
stdcall line_len4i , dword [ coord_p2 ], dword [ coord_p1 ]
fadd dword [ esp ]
add esp , 4 ;pop ...
fadd st0 , st0 ; len*=2
ftst
fstsw ax
fld1
sahf
jle @ f ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> 0
fdiv st0 , st1
@ @ :
fstp dword [ delt_t ]
2015-01-30 17:21:33 +01:00
ffree st0 ;1.0
fincstp
2010-07-29 23:20:45 +02:00
;fild word[coord_p2+2] ;y2
fild word [ coord_p1 + 2 ] ;y1
fild word [ coord_p0 + 2 ] ;y0
fild word [ coord_p2 ] ;x2
fild word [ coord_p1 ] ;x1
fild word [ coord_p0 ] ;x0
fld dword [ delt_t ]
fldz ;t=.0
@ @ :
fld1
fsub st0 , st1 ;1.-t
fmul st0 , st0 ;pow(1.-t,2)
fmul st0 , st3 ;...*x0
fstp dword [ opr_param ]
fld1
fsub st0 , st1 ;1.-t
fmul st0 , st1 ;(1.-t)*t
fadd st0 , st0
fmul st0 , st4 ;...*x1
mov esi , dword [ opr_param ]
fstp dword [ opr_param ]
2015-01-30 17:21:33 +01:00
fld st0 ;st0=t
fmul st0 , st0 ;t^2
fmul st0 , st5 ;(t^2)*x2
2010-07-29 23:20:45 +02:00
fadd dword [ opr_param ]
mov dword [ opr_param ], esi
fadd dword [ opr_param ]
fistp word [ v_poi_0 ] ;x
fld1
fsub st0 , st1 ;1.-t
fmul st0 , st0 ;pow(1.-t,2)
fmul st0 , st6 ;...*y0
fstp dword [ opr_param ]
fld1
fsub st0 , st1 ;1.-t
fmul st0 , st1 ;(1.-t)*t
fadd st0 , st0
fmul st0 , st7 ;...*y1
mov esi , dword [ opr_param ]
fstp dword [ opr_param ]
2015-01-30 17:21:33 +01:00
fld st0 ;st0=t
fmul st0 , st0 ;t^2
fimul word [ coord_p2 + 2 ] ;(t^2)*y2
2010-07-29 23:20:45 +02:00
fadd dword [ opr_param ]
mov dword [ opr_param ], esi
fadd dword [ opr_param ]
fistp word [ v_poi_0 + 2 ] ;y
mov eax , 1
mov bx , word [ v_poi_0 + 2 ]
mov cx , word [ v_poi_0 ]
call draw_pixel
fadd st0 , st1 ;t+dt
fld1
fcomp
fstsw ax
sahf
jae @ b
popad
ret
endp
2012-12-24 21:16:12 +01:00
;䨫<> <E4A8AB> <EFBFBD>
2012-12-14 19:09:51 +01:00
align 4
proc buf_filter_dither , buffer : dword , al gor : dword
pushad
mov edi ,[ buffer ]
cmp buf2d_bits , 24
jne .error
mov edx , buf2d_w
mov esi , buf2d_h
mov edi , buf2d_data
;edi - pointer to 24bit bitmap
;edx - x size
;esi - y size
2012-12-24 21:16:12 +01:00
lea edx ,[ edx + edx * 2 ]
2012-12-14 19:09:51 +01:00
imul esi , edx
;<3B> <> ।<EFBFBD> <E0A5A4> 塞 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> ᯮ<EFBFBD> 짮<EFBFBD> <ECA7AE> <EFBFBD> <EFBFBD>
cmp dword [ al gor ], 0
jne @ f
call di ther_0
jmp .dither_end
@ @ :
cmp dword [ al gor ], 1
jne @ f
call di ther_1
jmp .dither_end
@ @ :
2012-12-24 21:16:12 +01:00
cmp dword [ al gor ], 2
jne @ f
call di ther_2
jmp .dither_end
@ @ :
cmp dword [ al gor ], 3
jne @ f
call di ther_3
jmp .dither_end
@ @ :
call di ther_4
2012-12-14 19:09:51 +01:00
jmp .dither_end
.error:
stdcall print_err , sz_buf2d_filter_dither , txt_err_n24b
.dither_end:
popad
ret
endp
align 16
2012-12-24 21:16:12 +01:00
dither_0: ; Sierra Filter Lite algorithm
2012-12-14 19:09:51 +01:00
newp_0: ; Dithering cycle
xor ebx , ebx ; At first threshold
movzx ecx , byte [ edi ]
cmp cl , 255
je newp_0.next
test cl , cl
jz newp_0.next
jns @ f
dec ebx
sub ecx , 255
@ @ :
mov [ edi ], bl ; putpixel
sar ecx , 1 ; error/2
;adc ecx,0 ; round to integer
movzx eax , byte [ edi + 3 ] ; pixel (x+1;y)
add eax , ecx ; add error/2 to (x+1;y)
jge @ f ; check_overflow
xor eax , eax
jmp .ok
@ @ :
cmp eax , 255
jle .ok
or al , 255
.ok:
mov [ edi + 3 ], al ; putpixel
sar ecx , 1 ; error/4
adc ecx , 0 ; round to integer
movzx eax , byte [ edi + edx - 3 ] ; pixel (x-1;y+1)
add eax , ecx ; add error/4 to (x-1;y+1)
jge @ f ; check_overflow
xor eax , eax
jmp .ok1
@ @ :
cmp eax , 255
jle .ok1
or al , 255
.ok1:
mov [ edi + edx - 3 ], al ; putpixel
movzx eax , byte [ edi + edx ] ; pixel (x;y+1)
add eax , ecx ; add error/4 to (x;y+1)
jge @ f ; check_overflow
xor eax , eax
jmp .ok2
@ @ :
cmp eax , 255
jle .ok2
or al , 255
.ok2:
mov [ edi + edx ], al ; putpixel
.next:
inc edi
dec esi
jnz newp_0
ret
align 16
2012-12-24 21:16:12 +01:00
dither_1: ; Floyd-Steinberg algorithm
2012-12-14 19:09:51 +01:00
newp_1: ; Dithering cycle
xor ebx , ebx ; At first threshold
movzx ecx , byte [ edi ]
cmp cl , 255
je newp_1.next
test cl , cl
jz newp_1.next
jns @ f
dec ebx
sub ecx , 255
@ @ :
mov [ edi ], bl ; putpixel
sar ecx , 4 ; error/16
adc ecx , 0 ; round to integer
mov ebx , ecx
movzx eax , byte [ edi + edx + 3 ] ; pixel (x+1;y+1)
add eax , ecx ; add error/16 to (x+1;y+1)
jge @ f ; check_overflow
xor eax , eax
jmp .ok
@ @ :
cmp eax , 255
jle .ok
or al , 255
.ok:
mov [ edi + edx + 3 ], al ;putpixel
imul ecx , 3
movzx eax , byte [ edi + edx - 3 ] ; pixel (x-1;y+1)
add eax , ecx ; add 3*error/16 to (x-1;y+1)
jge @ f ; check_overflow
xor eax , eax
jmp .ok1
@ @ :
cmp eax , 255
jle .ok1
or al , 255
.ok1:
mov [ edi + edx - 3 ], al ;putpixel
mov ecx , ebx
imul ecx , 5
movzx eax , byte [ edi + edx ] ; pixel (x;y+1)
add eax , ecx ; add 5*error/16 to (x;y+1)
jge @ f ; check_overflow
xor eax , eax
jmp .ok2
@ @ :
cmp eax , 255
jle .ok2
or al , 255
.ok2:
mov [ edi + edx ], al ;putpixel
mov ecx , ebx
imul ecx , 7
movzx eax , byte [ edi + 3 ] ; pixel (x+1;y)
add eax , ecx ; add 7*error/16 to (x+1;y)
jge @ f ; check_overflow
xor eax , eax
jmp .ok3
@ @ :
cmp eax , 255
jle .ok3
or al , 255
.ok3:
mov [ edi + 3 ], al ;putpixel
.next:
inc edi
dec esi
jnz newp_1
ret
align 16
2012-12-24 21:16:12 +01:00
dither_2: ; Burkes algorithm
2012-12-14 19:09:51 +01:00
newp_2: ; Dithering cycle
xor ebx , ebx ; At first threshold
movsx ecx , byte [ edi ]
cmp cl , 255
je newp_2.next
test cl , cl
jz newp_2.next
jns @ f
dec ebx
@ @ :
mov [ edi ], bl ; putpixel
sar ecx , 2 ; error/4
adc ecx , 0 ; round to integer
movzx eax , byte [ edi + 3 ] ; pixel (x+1;y)
add eax , ecx ; add error/4 to (x+1;y)
jge @ f ; check_overflow
xor eax , eax
jmp .ok
@ @ :
cmp eax , 255
jle .ok
or al , 255
.ok:
mov [ edi + 3 ], al ; putpixel
movzx eax , byte [ edi + edx ] ; pixel (x;y+1)
add eax , ecx ; add error/4 to (x;y+1)
jge @ f ; check_overflow
xor eax , eax
jmp .ok1
@ @ :
cmp eax , 255
jle .ok1
or al , 255
.ok1:
mov [ edi + edx ], al ; putpixel
sar ecx , 1 ; error/8
adc ecx , 0 ; round to integer
movzx eax , byte [ edi + 6 ] ; pixel (x+2;y)
add eax , ecx ; add error/8 to (x+2;y)
jge @ f ; check_overflow
xor eax , eax
jmp .ok2
@ @ :
cmp eax , 255
jle .ok2
or al , 255
.ok2:
mov [ edi + 6 ], al ; putpixel
movzx eax , byte [ edi + edx - 3 ] ; pixel (x-1;y+1)
add eax , ecx ; add error/8 to (x-1;y+1)
jge @ f ; check_overflow
xor eax , eax
jmp .ok3
@ @ :
cmp eax , 255
jle .ok3
or al , 255
.ok3:
mov [ edi + edx - 3 ], al ; putpixel
movzx eax , byte [ edi + edx + 3 ] ; pixel (x+1;y+1)
add eax , ecx ; add error/8 to (x+1;y+1)
jge @ f ; check_overflow
xor eax , eax
jmp .ok4
@ @ :
cmp eax , 255
jle .ok4
or al , 255
.ok4:
mov [ edi + edx + 3 ], al ; putpixel
sar ecx , 1 ; error/16
;adc ecx,0 ; round to integer
movzx eax , byte [ edi + edx - 6 ] ; pixel (x-2;y+1)
add eax , ecx ; add error/16 to (x-2;y+1)
jge @ f ; check_overflow
xor eax , eax
jmp .ok5
@ @ :
cmp eax , 255
jle .ok5
or al , 255
.ok5:
mov [ edi + edx - 6 ], al ; putpixel
movzx eax , byte [ edi + edx + 6 ] ; pixel (x+2;y+1)
add eax , ecx ; add error/16 to (x+2;y+1)
jge @ f ; check_overflow
xor eax , eax
jmp .ok6
@ @ :
cmp eax , 255
jle .ok6
or al , 255
.ok6:
mov [ edi + edx + 6 ], al ; putpixel
.next:
inc edi
dec esi
jnz newp_2
ret
2012-06-05 17:33:54 +02:00
2012-12-24 21:16:12 +01:00
align 16
dither_3: ; Heavyiron_mod algorithm
newp_3: ; Dithering cycle
xor ebx , ebx ; At first threshold
movzx ecx , byte [ edi ]
cmp cl , 255
je .next
test cl , cl
jz .next
jns @ f
dec ebx
sub ecx , 255
@ @ :
mov [ edi ], bl ; putpixel
sar ecx , 2 ; error/4
movzx eax , byte [ edi + 3 ] ; pixel (x+1;y)
add eax , ecx ; add error/4 to (x+1;y)
jge @ f ; check_overflow
xor eax , eax
jmp .ok
@ @ :
cmp eax , 255
jle .ok
or al , 255
.ok:
mov [ edi + 3 ], al ; putpixel
movzx eax , byte [ edi + edx - 3 ] ; pixel (x-1;y+1)
add eax , ecx ; add error/4 to (x-1;y+1)
jge @ f ; check_overflow
xor eax , eax
jmp .ok1
@ @ :
cmp eax , 255
jle .ok1
or al , 255
.ok1:
mov [ edi + edx - 3 ], al ; putpixel
movzx eax , byte [ edi + edx ] ; pixel (x;y+1)
add eax , ecx ; add error/4 to (x;y+1)
jge @ f ; check_overflow
xor eax , eax
jmp .ok2
@ @ :
cmp eax , 255
jle .ok2
or al , 255
.ok2:
mov [ edi + edx ], al ; putpixel
.next:
inc edi
dec esi
jnz newp_3
ret
align 16
dither_4: ; Atkinson algorithm
newp_4: ; Dithering cycle
xor ebx , ebx ; At first threshold
movsx ecx , byte [ edi ]
cmp cl , 255
je .next
test cl , cl
jz .next
jns @ f
dec ebx
@ @ :
mov [ edi ], bl ; putpixel
sar ecx , 3 ; error/8
movzx eax , byte [ edi + 3 ] ; pixel (x+1;y)
add eax , ecx ; add error/8 to (x+1;y)
jge @ f ; check_overflow
xor eax , eax
jmp .ok
@ @ :
cmp eax , 255
jle .ok
or al , 255
.ok:
mov [ edi + 3 ], al ; putpixel
movzx eax , byte [ edi + edx ] ; pixel (x;y+1)
add eax , ecx ; add error/8 to (x;y+1)
jge @ f ; check_overflow
xor eax , eax
jmp .ok1
@ @ :
cmp eax , 255
jle .ok1
or al , 255
.ok1:
mov [ edi + edx ], al ; putpixel
movzx eax , byte [ edi + 6 ] ; pixel (x+2;y)
add eax , ecx ; add error/8 to (x+2;y)
jge @ f ; check_overflow
xor eax , eax
jmp .ok2
@ @ :
cmp eax , 255
jle .ok2
or al , 255
.ok2:
mov [ edi + 6 ], al ; putpixel
movzx eax , byte [ edi + edx - 3 ] ; pixel (x-1;y+1)
add eax , ecx ; add error/8 to (x-1;y+1)
jge @ f ; check_overflow
xor eax , eax
jmp .ok3
@ @ :
cmp eax , 255
jle .ok3
or al , 255
.ok3:
mov [ edi + edx - 3 ], al ; putpixel
movzx eax , byte [ edi + edx + 3 ] ; pixel (x+1;y+1)
add eax , ecx ; add error/8 to (x+1;y+1)
jge @ f ; check_overflow
xor eax , eax
jmp .ok4
@ @ :
cmp eax , 255
jle .ok4
or al , 255
.ok4:
mov [ edi + edx + 3 ], al ; putpixel
movzx eax , byte [ edi + edx + edx ] ; pixel (x;y+2)
add eax , ecx ; add error/8 to (x;y+2)
jge @ f ; check_overflow
xor eax , eax
jmp .ok5
@ @ :
cmp eax , 255
jle .ok5
or al , 255
.ok5:
mov [ edi + edx + edx ], al ; putpixel
.next:
inc edi
dec esi
jnz newp_4
ret
2012-06-05 17:33:54 +02:00
;*** <20> 㭪樨 <20> <> <EFBFBD> ࠡ<> <E0A0A1> <EFBFBD> <20> <20> <> <EFBFBD> ᥫ쭮<E1A5AB> <20> <> <EFBFBD> 䨪<EFBFBD> <E4A8AA> ***
;ᮧ<> <E1AEA7> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> ᥫ<EFBFBD> <E1A5AB> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> ⥩
align 4
proc vox_brush_create uses eax ebx ecx edi , h_br : dword , buf_z : dword
mov edi ,[ h_br ]
movzx ecx , byte [ edi + 3 ]
add edi , 4
; *** ᮧ<> <E1AEA7> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 筮<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> ***
mov eax ,[ buf_z ]
mov buf2d_data , eax
movzx eax , byte [ edi - 4 ] ;<3B> <> ਭ<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 筮<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD>
mov buf2d_w , eax ;<3B> <> ਭ<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
movzx eax , byte [ edi - 4 + 1 ] ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 筮<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD>
mov buf2d_h , eax ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
mov buf2d_size_lt , 0 ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <> <E1ABA5> <20> <20> <> ࠢ<EFBFBD> <20> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
mov buf2d_color , 0 ;梥<> 䮭<> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
mov buf2d_bits , 32 ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ⢮ <20> <> <EFBFBD> <20> 1-<2D> <20> <> 窥 <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD>
; *** ᮧ<> <E1AEA7> <EFBFBD> <EFBFBD> <EFBFBD> <> <E1ABA5> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> ⥩ ***
cmp ecx , 1
jl .end_creat
movzx ebx , byte [ edi - 4 + 2 ] ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> ᭮<EFBFBD> <E1ADAE> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 筮<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD>
shr ebx , 1
cld
@ @ :
mov eax , edi
add edi , BUF_STRUCT_SIZE
stdcall vox_create_next_brush , eax , edi , ebx
shl ebx , 1
loop @ b
.end_creat:
ret
endp
;㤠<> <E3A4A0> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> ᥫ<EFBFBD> <E1A5AB> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> ⥩
align 4
proc vox_brush_delete uses ecx edi , h_br : dword
mov edi ,[ h_br ]
movzx ecx , byte [ edi + 3 ]
add edi , 4
; *** 㤠<> <E3A4A0> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> ⥩ ***
cmp ecx , 1
jl .end_delete
cld
@ @ :
add edi , BUF_STRUCT_SIZE
stdcall buf_delete , edi
loop @ b
.end_delete:
ret
endp
;<3B> 㭪<EFBFBD> <E3ADAA> <EFBFBD> <20> <> <EFBFBD> ᮧ<> <E1AEA7> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> ᥫ<EFBFBD> <> <E1ABA5> <EFBFBD> 饣<EFBFBD> <20> <> <EFBFBD> 浪<EFBFBD>
; buf_v1 - <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <20> <> 室<EFBFBD> <E5AEA4> <EFBFBD> <20> <> <EFBFBD> ᥫ<EFBFBD> <E1A5AB>
; buf_v2 - <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> 㢥<> <E3A2A5> 祭<EFBFBD> <E7A5AD> <20> <> <EFBFBD> ᥫ<EFBFBD> <E1A5AB>
; h - <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> ᭮<EFBFBD> <E1ADAE> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> 室<EFBFBD> <E5AEA4> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> ᥫ<EFBFBD> : 2
align 4
proc vox_create_next_brush uses eax ebx ecx edx edi , buf_v1 : dword , buf_v2 : dword , h : dword
mov edi ,[ buf_v1 ]
mov ebx , buf2d_h
mov ecx , buf2d_w
mov edi ,[ buf_v2 ]
mov buf2d_h , ebx
shl buf2d_h , 1
mov buf2d_w , ecx
shl buf2d_w , 1
mov buf2d_color , 0
mov buf2d_bits , 32
stdcall buf_create , [ buf_v2 ] ;ᮧ<> <E1AEA7> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> 㡨<EFBFBD> <E3A1A8>
shr ecx , 1
mov edx ,[ h ]
shl edx , 1
sub ebx , edx
;ecx - <20> <> ਭ<EFBFBD> <20> <> 室<EFBFBD> <E5AEA4> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> ᥫ<EFBFBD> : 2
;ebx - <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> 室<EFBFBD> <E5AEA4> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> ᥫ<EFBFBD> (<28> <> <EFBFBD> <20> ᭮<EFBFBD> <E1ADAE> <EFBFBD> <EFBFBD> <EFBFBD> )
;edx - <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> ᭮<EFBFBD> <E1ADAE> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> 室<EFBFBD> <E5AEA4> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> ᥫ<EFBFBD>
mov eax ,[ h ]
2012-10-01 12:45:57 +02:00
cmp eax , 0
je @ f
stdcall vox_add , [ buf_v2 ], [ buf_v1 ], ecx , 0 , 0
stdcall vox_add , [ buf_v2 ], [ buf_v1 ], ecx , ebx , 0
2012-06-05 17:33:54 +02:00
2012-10-01 12:45:57 +02:00
stdcall vox_add , [ buf_v2 ], [ buf_v1 ], 0 , eax , eax
push eax ;stdcall ...
add eax , ebx
stdcall vox_add , [ buf_v2 ], [ buf_v1 ], 0 , eax ;,...
sub eax , ebx
shl ecx , 1
;ecx - <20> <> ਭ<EFBFBD> <20> <> 室<EFBFBD> <E5AEA4> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> ᥫ<EFBFBD>
stdcall vox_add , [ buf_v2 ], [ buf_v1 ], ecx , eax , eax
push eax ;stdcall ...,[h]
add eax , ebx
stdcall vox_add , [ buf_v2 ], [ buf_v1 ], ecx , eax ;,[h]
;sub eax,ebx
shr ecx , 1
;ecx - <20> <> ਭ<EFBFBD> <20> <> 室<EFBFBD> <E5AEA4> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> ᥫ<EFBFBD> : 2
stdcall vox_add , [ buf_v2 ], [ buf_v1 ], ecx , edx , edx
add ebx , edx
stdcall vox_add , [ buf_v2 ], [ buf_v1 ], ecx , ebx , edx
jmp .end_0
@ @ :
;<3B> h = 0, ⮣<> <E2AEA3> <20> <> <EFBFBD> <EFBFBD> 砥<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> 2 <20> ࠭<EFBFBD>
;<3B> ⠪<> <E2A0AA> <20> <> <EFBFBD> 砥 <20> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> 祭<EFBFBD> <E7A5AD> <20> <> 㡨<EFBFBD> <E3A1A8> <20> <> ६ <20> <> ਭ<EFBFBD> / 2
mov eax , ecx
;2 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> ᥫ<EFBFBD>
stdcall vox_add , [ buf_v2 ], [ buf_v1 ], 0 , 0 , eax
stdcall vox_add , [ buf_v2 ], [ buf_v1 ], 0 , ebx , eax
shl eax , 1
;2 業<> ࠫ<EFBFBD> <E0A0AB> <EFBFBD> <EFBFBD> <20> <> ।<EFBFBD> <E0A5A4> <EFBFBD> <20> <> <EFBFBD> ᥫ<EFBFBD> (<28> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 業<> ࠫ<EFBFBD> <E0A0AB> <EFBFBD> <EFBFBD> <20> <> <20> 뢮<EFBFBD> <EBA2AE> <EFBFBD> )
stdcall vox_add , [ buf_v2 ], [ buf_v1 ], ecx , 0 , eax
stdcall vox_add , [ buf_v2 ], [ buf_v1 ], ecx , ebx , eax
shr eax , 1
shl ecx , 1
;2 <20> ࠢ<EFBFBD> <E0A0A2> <20> <> <EFBFBD> ᥫ<EFBFBD>
stdcall vox_add , [ buf_v2 ], [ buf_v1 ], ecx , 0 , eax
stdcall vox_add , [ buf_v2 ], [ buf_v1 ], ecx , ebx , eax
.end_0:
2012-06-05 17:33:54 +02:00
ret
endp
;
align 4
2012-06-11 00:19:58 +02:00
proc vox_add , buf_v1 : dword , buf_v2 : dword , coord_x : dword , coord_y : dword , coord_z : dword
2012-06-05 17:33:54 +02:00
pushad
2012-06-12 11:56:51 +02:00
mov ebx ,[ coord_x ]
mov eax ,[ coord_y ]
2012-06-05 17:33:54 +02:00
mov edi ,[ buf_v2 ]
mov ecx , buf2d_h
mov esi , buf2d_w
imul ecx , esi
2012-06-12 11:56:51 +02:00
add esi , ebx
2012-06-05 17:33:54 +02:00
mov edx , buf2d_data
cld
;ecx - count pixels in voxel
;edx - 㪠<> <E3AAA0> ⥫<EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <20> <> <EFBFBD> ᥫ쭮<E1A5AB> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
;edi - 㪠<> <E3AAA0> ⥫<EFBFBD> <20> <> <20> <> <EFBFBD> ᥫ<EFBFBD> <E1A5AB> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD>
;esi - width voxel buffer add coord x
.cycle:
cmp dword [ edx ], 0
je @ f
;<3B> <EFBFBD> <E0AEA2> 塞 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> 㡨<EFBFBD> <E3A1A8>
2012-06-12 11:56:51 +02:00
push eax ecx edi esi
2012-06-05 17:33:54 +02:00
mov ecx , eax
2012-06-12 11:56:51 +02:00
mov edi ,[ buf_v1 ]
call get_pixel_32 ;stdcall buf_get_pixel, [buf_v1],ebx,ecx
2012-06-05 17:33:54 +02:00
mov esi ,[ edx ]
add esi ,[ coord_z ]
cmp eax , esi
jge .end_draw
2012-06-12 11:56:51 +02:00
stdcall buf_set_pixel , [ buf_v1 ], ebx , ecx , esi ;esi = new coord z
2012-06-05 17:33:54 +02:00
.end_draw:
2012-06-12 11:56:51 +02:00
pop esi edi ecx eax
2012-06-05 17:33:54 +02:00
@ @ :
add edx , 4
2012-06-12 11:56:51 +02:00
inc ebx
cmp ebx , esi
2012-06-05 17:33:54 +02:00
jl @ f
2012-06-12 11:56:51 +02:00
inc eax
sub ebx , buf2d_w
2012-06-05 17:33:54 +02:00
@ @ :
loop .cycle
popad
ret
endp
2012-06-11 00:19:58 +02:00
;description:
; <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 蠥<EFBFBD> <20> <> ਭ<EFBFBD> <20> <> <EFBFBD> ᥫ쭮<E1A5AB> <ECADAE> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD> <20> 3-<2D> <> <20> ࠭ﬨ
; <20> ਭ<EFBFBD> <E0A8AD> <EFBFBD> <EFBFBD> <EFBFBD> 㪠<> <E3AAA0> ⥫<EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <20> <> <EFBFBD> <EFBFBD> ⠡
align 4
proc buf_vox_obj_get_img_w_3g uses ecx , h_br : dword , k_scale : dword
mov ecx ,[ h_br ]
movzx eax , byte [ ecx ]
cmp dword [ k_scale ], 1
jl .end_c0
mov ecx ,[ k_scale ]
shl eax , cl
.end_c0:
ret
endp
;description:
; <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 蠥<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> ᥫ쭮<E1A5AB> <ECADAE> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD> <20> 3-<2D> <> <20> ࠭ﬨ
; <20> ਭ<EFBFBD> <E0A8AD> <EFBFBD> <EFBFBD> <EFBFBD> 㪠<> <E3AAA0> ⥫<EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <20> <> <EFBFBD> <EFBFBD> ⠡
align 4
proc buf_vox_obj_get_img_h_3g uses ecx , h_br : dword , k_scale : dword
mov ecx ,[ h_br ]
movzx eax , byte [ ecx + 1 ]
cmp dword [ k_scale ], 1
jl .end_c0
mov ecx ,[ k_scale ]
shl eax , cl
.end_c0:
ret
endp
;description:
2012-06-21 13:32:18 +02:00
; <20> 㭪<EFBFBD> <E3ADAA> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> ᥫ<EFBFBD> <E1A5AB> <EFBFBD> <EFBFBD> <20> <> ꥪ<EFBFBD> (<28> <> <EFBFBD> <EFBFBD> <EFBFBD> 1 <20> ࠭<EFBFBD> )
;input:
; buf_i - <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <20> <> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> (24 <20> <> <EFBFBD> <EFBFBD> )
; buf_z - <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> 㡨<EFBFBD> <E3A1A8> (32 <20> <> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> ᥫ<EFBFBD> <E1A5AB> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ᮢ<> <E1AEA2> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> buf_i)
align 4
proc buf_vox_obj_draw_1g , buf_i : dword , buf_z : dword , v_obj : dword , coord_x : dword , \
coord_y: dw ord , k_scale : dword
cmp [ k_scale ], 0
jl .end_f
pushad
mov edi ,[ buf_i ]
cmp buf2d_bits , 24
jne .error1
mov edi ,[ buf_z ]
cmp buf2d_bits , 32
jne .error2
mov ecx ,[ k_scale ]
mov ebx ,[ coord_x ]
mov edx ,[ coord_y ]
mov edi ,[ v_obj ]
add edi , vox_offs_data
xor esi , esi
stdcall draw_sub_vox_obj_1g , [ buf_i ],[ buf_z ],[ v_obj ]
jmp .end_0
.error1:
stdcall print_err , sz_buf2d_vox_obj_draw_1g , txt_err_n24b
jmp .end_0
.error2:
stdcall print_err , sz_buf2d_vox_obj_draw_1g , txt_err_n32b
.end_0:
popad
.end_f:
ret
endp
;input:
; ebx - coord_x
; edx - coord_y
; esi - coord_z
; ecx - <20> <EFBFBD> <E0AEA2> <EFBFBD> ⥪<> 襣<EFBFBD> 㧫<>
; edi - 㪠<> <E3AAA0> ⥫<EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> ᥫ쭮<E1A5AB> <ECADAE> <20> <> ꥪ<EFBFBD> <EAA5AA>
align 4
proc draw_sub_vox_obj_1g , buf_i : dword , buf_z : dword , v_obj : dword
cmp byte [ edi + 3 ], 0 ;ᬮ<> ਬ <20> <> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> ॢ<EFBFBD> <E0A5A2>
je .sub_trees
;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> ᮢ<EFBFBD> <E1AEA2> ࠬ<> <E0A0AC> <20> ࠧ<> <E0A0A7> <EFBFBD> 㧫<> = 1
cmp ecx , 0
jne @ f
;<3B> <EFBFBD> ઠ <20> <> 㡨<EFBFBD> <E3A1A8> esi
stdcall buf_get_pixel , [ buf_z ], ebx , edx , esi
cmp eax , esi
jge @ f
push ecx
mov ecx , dword [ edi ]
and ecx , 0xffffff
stdcall buf_set_pixel , [ buf_i ], ebx , edx , ecx
stdcall buf_set_pixel , [ buf_z ], ebx , edx , esi
pop ecx
@ @ :
;४<> <E0A5AA> ᨢ<EFBFBD> <E1A8A2> <EFBFBD> <20> <> ॡ<EFBFBD> <E0A5A1> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> ॢ쥢
push edx
;<3B> 室 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 㧫<>
dec ecx
mov eax , 1
cmp ecx , 1
jl @ f
shl eax , cl
@ @ :
add edx , eax ;<3B> <> ४<EFBFBD> <E0A5AA> <EFBFBD> <E0AEA2> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <20> <> <EFBFBD> ᥫ<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <EFBFBD> <E0AEA2>
mov ah , byte [ edi + 3 ]
add edi , 4
mov al , 8
.cycle:
bt ax , 8 ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 㥬 ⮫쪮 ah
jnc .c_next
push eax ebx edx esi
stdcall vox_corect_coords_pl , [ v_obj ], 1
stdcall draw_sub_vox_obj_1g , [ buf_i ],[ buf_z ],[ v_obj ]
pop esi edx ebx eax
.c_next:
shr ah , 1
dec al
jnz .cycle
;<3B> <> 室 <20> <> 㧫<>
inc ecx
pop edx
jmp .end_f
.sub_trees:
cmp ecx , 0
jl .end_0 ;<3B> <> <20> <> <EFBFBD> 㥬 <20> 祭<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 쪨<EFBFBD> <20> <> <EFBFBD> ᥫ<EFBFBD>
;<3B> <> <EFBFBD> 㥬 㧥<>
mov eax ,[ edi ]
and eax , 0xffffff
cmp ecx , 1
jl @ f
;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ⥪<> 饣<EFBFBD> <20> <> <EFBFBD> <EFBFBD> ⠡<EFBFBD>
stdcall vox_draw_square_1g , [ buf_i ],[ buf_z ], eax
jmp .end_0
@ @ :
;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ⥪<> 饣<EFBFBD> <20> <> <EFBFBD> <EFBFBD> ⠡<EFBFBD>
push ecx
mov ecx , eax
stdcall buf_get_pixel , [ buf_z ], ebx , edx
cmp eax , esi
jge .end_1
stdcall buf_set_pixel , [ buf_i ], ebx , edx , ecx
stdcall buf_set_pixel , [ buf_z ], ebx , edx , esi
.end_1:
pop ecx
.end_0:
add edi , 4
.end_f:
ret
endp
;output:
; eax - ࠧ<> <E0A0A7> 蠥<EFBFBD> <E8A0A5> <EFBFBD>
align 4
proc vox_draw_square_1g uses ecx edx edi , buf_i : dword , buf_z : dword , color : dword
locals
img_size dd ?
coord_y dd ?
endl
mov edi ,[ buf_z ]
xor eax , eax
inc eax
shl eax , cl
mov [ img_size ], eax
mov [ coord_y ], eax
.cycle_0:
push ebx
mov ecx ,[ img_size ]
cld
.cycle_1:
push ecx
mov ecx , edx
call get_pixel_32
pop ecx
cmp eax , esi
jge @ f
stdcall buf_set_pixel , [ buf_i ], ebx , edx , [ color ]
stdcall buf_set_pixel , edi , ebx , edx , esi
@ @ :
inc ebx
loop .cycle_1
pop ebx
inc edx
dec dword [ coord_y ]
jnz .cycle_0
ret
endp
;description:
; <20> 㭪<EFBFBD> <E3ADAA> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> ᥫ<EFBFBD> <E1A5AB> <EFBFBD> <EFBFBD> <20> <> ꥪ<EFBFBD> (<28> <> <EFBFBD> <EFBFBD> <EFBFBD> 3 <20> ࠭<EFBFBD> )
2012-06-11 00:19:58 +02:00
;input:
; buf_i - <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <20> <> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> (24 <20> <> <EFBFBD> <EFBFBD> )
; buf_z - <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> 㡨<EFBFBD> <E3A1A8> (32 <20> <> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> ᥫ<EFBFBD> <E1A5AB> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ᮢ<> <E1AEA2> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> buf_i)
; h_br - <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> ﬨ <20> <> <EFBFBD> ᥫ<EFBFBD> <E1A5AB> (32 <20> <> <EFBFBD> <EFBFBD> )
; v_obj - <20> <> <EFBFBD> ᥫ<EFBFBD> <E1A5AB> <EFBFBD> <EFBFBD> <20> <> ꥪ<EFBFBD>
; k_scale - <20> <> <EFBFBD> <EFBFBD> . <20> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> ⠡<EFBFBD> <EFBFBD> <E0AEA2> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD>
align 4
proc buf_vox_obj_draw_3g , buf_i : dword , buf_z : dword , h_br : dword , v_obj : dword , \
coord_x: dw ord , coord_y : dword , coord_z : dword , k_scale : dword
pushad
mov edi ,[ v_obj ]
mov ecx ,[ k_scale ]
mov ebx ,[ coord_x ]
mov edx ,[ coord_y ]
add edi , vox_offs_data
mov esi ,[ coord_z ]
stdcall vox_go_in_node , [ buf_i ], [ buf_z ], [ h_br ], [ v_obj ]
popad
ret
endp
;description:
; <20> 㭪<EFBFBD> <E3ADAA> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> ᥫ쭮<E1A5AB> <ECADAE> <20> <> ꥪ<EFBFBD> <EAA5AA>
;input:
; buf_i - <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <20> <> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> (24 <20> <> <EFBFBD> <EFBFBD> )
; buf_z - <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> 㡨<EFBFBD> <E3A1A8> (32 <20> <> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> ᥫ<EFBFBD> <E1A5AB> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ᮢ<> <E1AEA2> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> buf_i)
; h_br - <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> ﬨ <20> <> <EFBFBD> ᥫ<EFBFBD> <E1A5AB> (32 <20> <> <EFBFBD> <EFBFBD> )
; v_obj - <20> <> <EFBFBD> ᥫ<EFBFBD> <E1A5AB> <EFBFBD> <EFBFBD> <20> <> ꥪ<EFBFBD>
; k_scale - <20> <> <EFBFBD> <EFBFBD> . <20> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> ⠡<EFBFBD> <EFBFBD> <E0AEA2> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD>
align 4
proc buf_vox_obj_draw_3g_scaled , buf_i : dword , buf_z : dword , h_br : dword , v_obj : dword , \
coord_x: dw ord , coord_y : dword , coord_z : dword , k_scale : dword , \
s_c_x: dw ord , s_c_y : dword , s_c_z : dword , s_k_scale : dword , b_color : dword
pushad
locals
p_node dd 0 ;த<> ⥫<EFBFBD> ᪨<EFBFBD> 㧥<>
endl
mov edi ,[ v_obj ]
add edi , vox_offs_data
mov ecx ,[ k_scale ]
mov ebx ,[ coord_x ]
;<3B> <> <EFBFBD> ⮢<EFBFBD> <E2AEA2> ࠬ<> <E0A0AC>
mov eax ,[ h_br ]
movzx edx , byte [ eax ]
movzx esi , byte [ eax + 1 ]
cmp ecx , 1
jl .end_c0
shl edx , cl
shl esi , cl
.end_c0:
;stdcall buf_rect_by_size, [buf_i], ebx,[coord_y],edx,esi, [b_color]
;<3B> <> <EFBFBD> ⨪<EFBFBD> <E2A8AA> 쭠<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
add ebx , edx
shr edx , cl
stdcall buf_rect_by_size , [ buf_i ], ebx ,[ coord_y ], edx , esi , [ b_color ]
mov ecx ,[ s_k_scale ]
shr esi , cl
xor eax , eax
inc eax
shl eax , cl
dec eax
sub eax ,[ s_c_z ] ;<3B> <> <EFBFBD> 祭<EFBFBD> <E7A5AD> <20> <> <20> <> <EFBFBD> z <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <20> <> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD>
imul eax , esi
add eax ,[ coord_y ]
stdcall buf_filled_rect_by_size , [ buf_i ], ebx , eax , edx , esi , [ b_color ]
mov ebx ,[ coord_y ]
shl esi , cl
add ebx , esi
stdcall buf_vox_obj_get_img_w_3g , [ h_br ],[ k_scale ]
shr eax , 1
mov esi ,[ h_br ]
movzx esi , byte [ esi + 1 ]
;<3B> <> <EFBFBD> <EFBFBD> 㭮<EFBFBD>
stdcall draw_polz_hor , [ buf_i ], [ coord_x ], ebx , eax , esi , [ s_c_x ], [ s_k_scale ], [ b_color ]
mov edx ,[ coord_x ]
add edx , eax
;<3B> <> <EFBFBD> <EFBFBD> 㭮<EFBFBD>
stdcall draw_polz_hor , [ buf_i ], edx , ebx , eax , esi , [ s_c_y ], [ s_k_scale ], [ b_color ]
;---
mov esi ,[ s_k_scale ]
cmp esi , 1
jl .end_2
; *** (1) ***
.found:
stdcall vox_obj_get_node_position , [ v_obj ],[ s_c_x ],[ s_c_y ],[ s_c_z ], esi
movzx bx , byte [ edi + 3 ]
mov [ p_node ], edi
add edi , 4
cmp eax , 0
je .end_1
mov ecx , eax
cld
@ @ : ;横<> <20> <> <EFBFBD> <20> ய<EFBFBD> ᪠ <20> ।<EFBFBD> <E0A5A4> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> ॢ쥢 <20> 㧫<>
bt bx , 0 ;<3B> <EFBFBD> <E0AEA2> 塞 <20> <> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> ୨ <EFBFBD> 㧫<>
jnc .end_0
xor eax , eax
stdcall vox_obj_rec0 ;<3B> eax <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> ୨ <EFBFBD> 㧫<> <E3A7AB> , <20> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> ⢨
.end_0:
shr bx , 1
loop @ b
.end_1:
bt bx , 0
jnc .end_2 ;<3B> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> ॢ<EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
dec esi
cmp esi , 0
jg .found
; *** (2) ***
;<3B> <> ᮢ<EFBFBD> <E1AEA2> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> ꥪ<EFBFBD> <EAA5AA>
mov ecx ,[ k_scale ]
mov ebx ,[ coord_x ]
mov edx ,[ coord_y ]
mov esi ,[ coord_z ]
stdcall vox_go_in_node , [ buf_i ], [ buf_z ], [ h_br ], [ v_obj ]
.end_2:
popad
ret
endp
;input:
; h_br - <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> ﬨ <20> <> <EFBFBD> ᥫ<EFBFBD> <E1A5AB> (32 <20> <> <EFBFBD> <EFBFBD> )
; ebx - coord_x
; edx - coord_y
; esi - coord_z
; ecx - <20> <EFBFBD> <E0AEA2> <EFBFBD> ⥪<> 襣<EFBFBD> 㧫<>
; edi - 㪠<> <E3AAA0> ⥫<EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> ᥫ쭮<E1A5AB> <ECADAE> <20> <> ꥪ<EFBFBD> <EAA5AA>
align 4
proc vox_go_in_node , buf_i : dword , buf_z : dword , h_br : dword , v_obj : dword
cmp byte [ edi + 3 ], 0 ;ᬮ<> ਬ <20> <> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> ॢ<EFBFBD> <E0A5A2>
je .sub_trees
;४<> <E0A5AA> ᨢ<EFBFBD> <E1A8A2> <EFBFBD> <20> <> ॡ<EFBFBD> <E0A5A1> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> ॢ쥢
push eax edx
;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> ᮢ<EFBFBD> <E1AEA2> ࠬ<> <E0A0AC> <20> ࠧ<> <E0A0A7> <EFBFBD> 㧫<> = 1
cmp ecx , 0
jne .end_2
push eax
stdcall vox_get_sub_brush ,[ h_br ], 0 ;<3B> <> ।<EFBFBD> <E0A5A4> 塞 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <20> <> ᮢ<EFBFBD> <E1AEA2> <EFBFBD> <EFBFBD>
cmp eax , 0 ;<3B> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
je @ f
stdcall draw_vox , [ buf_i ], [ buf_z ], eax , ebx , edx , esi , [ edi ]
@ @ :
pop eax
.end_2:
;<3B> 室 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 㧫<>
dec ecx
;---
push ebx
;mov eax,(h-h_osn/2)
mov ebx ,[ h_br ]
movzx eax , byte [ ebx + 1 ]
2012-10-01 12:45:57 +02:00
cmp byte [ ebx + 2 ], 0
je @ f
;<3B> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> 3-<2D> <> <20> ࠭ﬨ
movzx ebx , byte [ ebx + 2 ]
shr ebx , 1
sub eax , ebx
jmp .end_0
@ @ :
;<3B> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> 2-<2D> <> <20> ࠭ﬨ
movzx ebx , byte [ ebx ]
shr ebx , 1
.end_0:
2012-06-11 00:19:58 +02:00
cmp ecx , 1
2012-10-01 12:45:57 +02:00
jl @ f
2012-06-11 00:19:58 +02:00
shl eax , cl
shl ebx , cl
2012-10-01 12:45:57 +02:00
@ @ :
2012-06-11 00:19:58 +02:00
add esi , ebx
pop ebx
add edx , eax ;<3B> <> ४<EFBFBD> <E0A5AA> <EFBFBD> <E0AEA2> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <20> <> <EFBFBD> ᥫ<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <EFBFBD> <E0AEA2>
;---
mov ah , byte [ edi + 3 ]
add edi , 4
mov al , 8
.cycle:
bt ax , 8 ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 㥬 ⮫쪮 ah
jnc .c_next
push ebx edx esi
stdcall vox_corect_coords , [ h_br ], [ v_obj ]
stdcall vox_go_in_node , [ buf_i ], [ buf_z ], [ h_br ], [ v_obj ]
pop esi edx ebx
.c_next:
shr ah , 1
dec al
jnz .cycle
;<3B> <> 室 <20> <> 㧫<>
inc ecx
pop edx eax
jmp .end_f
.sub_trees:
;<3B> <> <EFBFBD> 㥬 㧥<>
push eax
stdcall vox_get_sub_brush ,[ h_br ], ecx ;<3B> <> ।<EFBFBD> <E0A5A4> 塞 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <20> <> ᮢ<EFBFBD> <E1AEA2> <EFBFBD> <EFBFBD>
cmp eax , 0 ;<3B> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
je @ f
stdcall draw_vox , [ buf_i ], [ buf_z ], eax , ebx , edx , esi , [ edi ]
@ @ :
pop eax
add edi , 4
.end_f:
ret
endp
;description:
; <20> 㭪<EFBFBD> <E3ADAA> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> ᥫ
;input:
; buf_i - <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <20> <> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> (24 <20> <> <EFBFBD> <EFBFBD> )
; buf_z - <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> 㡨<EFBFBD> <E3A1A8> (32 <20> <> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> ᥫ<EFBFBD> <E1A5AB> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ᮢ<> <E1AEA2> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> buf_i)
; buf_v - <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> ᥫ<EFBFBD> (32 <20> <> <EFBFBD> <EFBFBD> )
; v_color - 梥<>
align 4
proc draw_vox , buf_i : dword , buf_z : dword , buf_v : dword , \
coord_x: dw ord , coord_y : dword , coord_z : dword , v_color : dword
pushad
mov eax ,[ coord_x ]
mov ebx ,[ coord_y ]
mov edi ,[ buf_v ]
mov ecx , buf2d_h
mov esi , buf2d_w
imul ecx , esi
add esi , eax
mov edx , buf2d_data
cld
;ecx - count pixels in voxel
;edx - 㪠<> <E3AAA0> ⥫<EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <20> <> <EFBFBD> ᥫ쭮<E1A5AB> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
;edi - 㪠<> <E3AAA0> ⥫<EFBFBD> <20> <> <20> <> <EFBFBD> ᥫ<EFBFBD> <E1A5AB> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD>
;esi - width voxel buffer add coord x
.cycle:
cmp dword [ edx ], 0
je @ f
;<3B> <EFBFBD> <E0AEA2> 塞 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> 㡨<EFBFBD> <E3A1A8>
push eax
stdcall buf_get_pixel , [ buf_z ], eax , ebx
sub eax ,[ coord_z ]
cmp eax ,[ edx ]
jl .dr_pixel
pop eax
jmp @ f
.dr_pixel:
;<3B> <> <EFBFBD> 㥬 <20> <> <EFBFBD> <EFBFBD> <EFBFBD>
pop eax
stdcall buf_set_pixel , [ buf_i ], eax , ebx ,[ v_color ]
push ecx
mov ecx ,[ coord_z ]
add ecx ,[ edx ]
stdcall buf_set_pixel , [ buf_z ], eax , ebx , ecx
pop ecx
@ @ :
add edx , 4
inc eax
cmp eax , esi
jl @ f
inc ebx
sub eax , buf2d_w
@ @ :
loop .cycle
popad
ret
endp
;description:
;<3B> 㭪<EFBFBD> <E3ADAA> <EFBFBD> <20> <> <EFBFBD> <20> <> ४<EFBFBD> <E0A5AA> <EFBFBD> <E0AEA2> <20> <> <EFBFBD> न<EFBFBD> <E0A4A8> <EFBFBD>
;<3B> <> <EFBFBD> ࠢ<EFBFBD> <E0A0A2> <EFBFBD> <EFBFBD> <EFBFBD> <20> ᥩ <20> <> <EFBFBD> न<EFBFBD> <E0A4A8> <EFBFBD> <20> <20> <> <EFBFBD> ᥫ<EFBFBD> :
;*z
;|
;+
; * y
; /
;+
; \
; * x
;input:
; al - <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 㧫<> <20> <20> <> ॢ<EFBFBD> (<28> <> 1 <20> <> 8)
; ebx - <20> <> <EFBFBD> न<EFBFBD> <E0A4A8> <EFBFBD> <EFBFBD> x
; edx - <20> <> <EFBFBD> न<EFBFBD> <E0A4A8> <EFBFBD> <EFBFBD> y
; esi - <20> <> <EFBFBD> न<EFBFBD> <E0A4A8> <EFBFBD> <EFBFBD> z
; ecx - <20> <EFBFBD> <E0AEA2> <EFBFBD> ⥪<> 襣<EFBFBD> 㧫<>
;output:
; ebx - <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> न<EFBFBD> <E0A4A8> <EFBFBD> <EFBFBD> x
; edx - <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> न<EFBFBD> <E0A4A8> <EFBFBD> <EFBFBD> y
; esi - <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> न<EFBFBD> <E0A4A8> <EFBFBD> <EFBFBD> z
align 4
proc vox_corect_coords , h_br : dword , v_obj : dword
locals
osn_w_2 dd ? ;<3B> <> ਭ<EFBFBD> <20> ᭮<EFBFBD> <E1ADAE> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 筮<EFBFBD> <E7ADAE> <20> <> <EFBFBD> ᥫ<EFBFBD> : 2
vox_h dd ? ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 筮<EFBFBD> <E7ADAE> <20> <> <EFBFBD> ᥫ<EFBFBD>
endl
cmp ecx , 0
jl .end_f ;<3B> <> <EFBFBD> <20> ७<E1AAAE> <E0A5AD> <20> <> <EFBFBD> <EFBFBD> ᮢ<EFBFBD> <E1AEA2>
push eax edi
and eax , 15 ;<3B> 뤥<EFBFBD> 塞 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 㧫<> <20> <20> <> ॢ<EFBFBD>
mov edi ,[ v_obj ]
add edi , vox_offs_tree_table
add edi , 8
sub edi , eax
push ebx ecx
mov ebx ,[ h_br ]
movzx ecx , byte [ ebx ]
shr ecx , 1
mov dword [ osn_w_2 ], ecx
movzx ecx , byte [ ebx + 2 ]
movzx ebx , byte [ ebx + 1 ]
sub ebx , ecx
mov dword [ vox_h ], ebx
shr ecx , 1
mov eax , ecx ;eax - <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> ᭮<EFBFBD> <E1ADAE> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 筮<EFBFBD> <E7ADAE> <20> <> <EFBFBD> ᥫ<EFBFBD> : 2
pop ecx ebx
cmp ecx , 1
2012-10-01 12:45:57 +02:00
jl @ f ;<3B> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> 横<EFBFBD> <E6A8AA> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
2012-06-11 00:19:58 +02:00
shl eax , cl
shl dword [ osn_w_2 ], cl
shl dword [ vox_h ], cl
2012-10-01 12:45:57 +02:00
@ @ :
2012-06-11 00:19:58 +02:00
; add esi,eax ;<3B> <> <EFBFBD> 塞 <20> <> 㡨<EFBFBD> <E3A1A8> <20> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> z (<28> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <20> <> <EFBFBD> न<EFBFBD> <E0A4A8> <EFBFBD> <EFBFBD> y)
bt word [ edi ], 0 ;test voxel coord x
jnc @ f
add ebx ,[ osn_w_2 ]
2012-10-01 12:45:57 +02:00
cmp eax , 0
jne .end_0
add esi ,[ osn_w_2 ] ;<3B> <> <EFBFBD> 塞 <20> <> 㡨<EFBFBD> <E3A1A8> <20> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> z
jmp @ f
.end_0:
2012-06-11 00:19:58 +02:00
add edx , eax
add esi , eax ;<3B> <> <EFBFBD> 塞 <20> <> 㡨<EFBFBD> <E3A1A8> <20> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> z
@ @ :
bt word [ edi ], 1 ;test voxel coord y
jnc @ f
add ebx ,[ osn_w_2 ]
2012-10-01 12:45:57 +02:00
cmp eax , 0
jne .end_1
sub esi ,[ osn_w_2 ] ;<3B> <> <EFBFBD> 塞 <20> <> 㡨<EFBFBD> <E3A1A8> <20> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> z
jmp @ f
.end_1:
2012-06-11 00:19:58 +02:00
sub edx , eax
sub esi , eax ;<3B> <> <EFBFBD> 塞 <20> <> 㡨<EFBFBD> <E3A1A8> <20> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> z
@ @ :
bt word [ edi ], 2 ;test voxel coord z
jnc @ f
sub edx ,[ vox_h ]
@ @ :
pop edi eax
.end_f:
ret
endp
;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> h_br 㪠<> <E3AAA0> ⥫<EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> ᥫ<EFBFBD> , 㪠<> <E3AAA0> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> 浪<EFBFBD> n
align 4
proc vox_get_sub_brush uses ebx ecx , h_br : dword , n : dword
xor eax , eax
mov ebx ,[ n ]
cmp ebx , 0
jl @ f
mov ecx ,[ h_br ]
cmp bl , byte [ ecx + 3 ]
jg @ f
add ecx , 4
imul ebx , BUF_STRUCT_SIZE
mov eax , ebx
add eax , ecx
@ @ :
ret
endp
;description:
; <20> 㭪<EFBFBD> <E3ADAA> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> १ <20> <> <EFBFBD> ᥫ쭮<E1A5AB> <ECADAE> <20> <> 쥪<EFBFBD> <ECA5AA>
;input:
; v_size - ࠧ<> <E0A0A7> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <20> <> <EFBFBD> ᥫ<EFBFBD> <E1A5AB>
; k_scale - <20> ⥯<EFBFBD> <E2A5AF> <EFBFBD> <20> <> ⠫<EFBFBD> <E2A0AB> <EFBFBD> 樨 <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD>
; n_plane - <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <E1AAAE> <EFBFBD> <20> <> 筨<EFBFBD> (<28> <20> ।<EFBFBD> <E0A5A4> <EFBFBD> <EFBFBD> <20> <> 0 <20> <> 2^k_scale - 1)
; b_color - 梥<> <20> ࠭<EFBFBD> <E0A0AD> <EFBFBD>
align 4
proc buf_vox_obj_draw_pl , buf_i : dword , v_obj : dword , coord_x : dword , \
coord_y: dw ord , v_size : dword , k_scale : dword , n_plane : dword , b_color : dword
cmp [ k_scale ], 0
jl .end_f
pushad
mov eax ,[ v_size ]
mov ecx ,[ k_scale ]
mov ebx , eax
cmp ecx , 1
jl @ f
shl ebx , cl
@ @ :
;ebx - <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ࠧ<> <E0A0A7> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD>
stdcall buf_rect_by_size , [ buf_i ], [ coord_x ],[ coord_y ], ebx , ebx , [ b_color ] ;ࠬ<> <E0A0AC> <20> <> <20> <> <EFBFBD> 㭮<EFBFBD>
mov edx , ebx
add ebx ,[ coord_y ]
stdcall draw_polz_hor , [ buf_i ], [ coord_x ], ebx , edx , eax , [ n_plane ], [ k_scale ], [ b_color ] ;<3B> <> <EFBFBD> <EFBFBD> 㭮<EFBFBD> , <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 뢠<EFBFBD> 騩 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> 祭<EFBFBD> <E7A5AD>
;<3B> <> ᮢ<EFBFBD> <E1AEA2> <EFBFBD> <EFBFBD> <20> <> 祪 <20> <> <EFBFBD> <20> <> ⪨
push ecx
mov edi , 1
cmp ecx , 1
jl @ f
shl edi , cl
@ @ :
dec edi
cmp edi , 1
jl .end_0
mov ecx , edi
imul ecx , edi
mov ebx ,[ coord_x ]
mov edx ,[ coord_y ]
add edx , eax
xor esi , esi
cld
@ @ :
add ebx , eax
inc esi
stdcall buf_set_pixel , [ buf_i ], ebx , edx , [ b_color ]
cmp esi , edi
jl .end_1
;<3B> <> <EFBFBD> <EFBFBD> 室 <20> <> 祪 <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> ப<EFBFBD>
xor esi , esi
mov ebx ,[ coord_x ]
add edx , eax
.end_1:
loop @ b
.end_0:
pop ecx
;eax - ࠧ<> <E0A0A7> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
2012-06-21 13:32:18 +02:00
;edi - 㪠<> <E3AAA0> ⥫<EFBFBD> <20> <> <20> <> <EFBFBD> 㥬<EFBFBD> <E3A5AC> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> ꥪ<EFBFBD> <EAA5AA>
2012-06-11 00:19:58 +02:00
mov ebx ,[ coord_x ]
mov edx ,[ coord_y ]
mov edi ,[ v_obj ]
add edi , vox_offs_data
xor esi , esi
push eax
2012-06-21 13:32:18 +02:00
mov eax , 1
shl eax , cl
dec eax
sub eax ,[ n_plane ]
stdcall draw_sub_vox_obj_pl , [ buf_i ],[ v_obj ], eax
2012-06-11 00:19:58 +02:00
popad
.end_f:
ret
endp
;description:
; <20> 㭪<EFBFBD> <E3ADAA> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> १ <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> ᥫ쭮<E1A5AB> <ECADAE> <20> <> 쥪<EFBFBD> <ECA5AA>
;input:
; s_c_x, s_c_y, s_c_z, s_k_scale - <20> <> ࠬ<EFBFBD> <E0A0AC> <EFBFBD> <EFBFBD> <20> <> ।<EFBFBD> <E0A5A4> <EFBFBD> <EFBFBD> 騥 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> ᥫ쭮<E1A5AB> <ECADAE> <20> <> ꥪ<EFBFBD> <EAA5AA> , <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> 㤥<EFBFBD> <20> <> ᮢ<EFBFBD> <E1AEA2> <EFBFBD> <EFBFBD> <EFBFBD>
align 4
proc buf_vox_obj_draw_pl_scaled , buf_i : dword , v_obj : dword , coord_x : dword , \
coord_y: dw ord , v_size : dword , k_scale : dword , n_plane : dword , b_color : dword , \
s_c_x: dw ord , s_c_y : dword , s_c_z : dword , s_k_scale : dword
cmp [ k_scale ], 0
jl .end_f
pushad
locals
p_node dd 0 ;த<> ⥫<EFBFBD> ᪨<EFBFBD> 㧥<>
endl
mov eax ,[ v_size ]
mov ecx ,[ k_scale ]
mov ebx , eax
cmp ecx , 1
jl @ f
shl ebx , cl
@ @ :
;ebx - <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ࠧ<> <E0A0A7> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD>
stdcall buf_rect_by_size , [ buf_i ], [ coord_x ],[ coord_y ], ebx , ebx , [ b_color ] ;ࠬ<> <E0A0AC> <20> <> <20> <> <EFBFBD> 㭮<EFBFBD>
mov edx , ebx
add ebx ,[ coord_y ]
stdcall draw_polz_hor , [ buf_i ], [ coord_x ], ebx , edx , eax , [ n_plane ], [ k_scale ], [ b_color ] ;<3B> <> <EFBFBD> <EFBFBD> 㭮<EFBFBD> , <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 뢠<EFBFBD> 騩 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> 祭<EFBFBD> <E7A5AD>
;<3B> <> ᮢ<EFBFBD> <E1AEA2> <EFBFBD> <EFBFBD> <20> <> 祪 <20> <> <EFBFBD> <20> <> ⪨
push ecx
mov edi , 1
cmp ecx , 1
jl @ f
shl edi , cl
@ @ :
dec edi
cmp edi , 1
jl .end_3
mov ecx , edi
imul ecx , edi
mov ebx ,[ coord_x ]
mov edx ,[ coord_y ]
add edx , eax
xor esi , esi
cld
@ @ :
add ebx , eax
inc esi
stdcall buf_set_pixel , [ buf_i ], ebx , edx , [ b_color ]
cmp esi , edi
jl .end_4
;<3B> <> <EFBFBD> <EFBFBD> 室 <20> <> 祪 <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> ப<EFBFBD>
xor esi , esi
mov ebx ,[ coord_x ]
add edx , eax
.end_4:
loop @ b
.end_3:
pop ecx
mov esi ,[ s_k_scale ]
cmp esi , 1
jl .end_2
mov edi ,[ v_obj ]
add edi , vox_offs_data
; *** (1) ***
.found:
stdcall vox_obj_get_node_position , [ v_obj ],[ s_c_x ],[ s_c_y ],[ s_c_z ], esi
movzx bx , byte [ edi + 3 ]
mov [ p_node ], edi
add edi , 4
cmp eax , 0
je .end_1
mov ecx , eax
cld
@ @ : ;横<> <20> <> <EFBFBD> <20> ய<EFBFBD> ᪠ <20> ।<EFBFBD> <E0A5A4> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> ॢ쥢 <20> 㧫<>
bt bx , 0 ;<3B> <EFBFBD> <E0AEA2> 塞 <20> <> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> ୨ <EFBFBD> 㧫<>
jnc .end_0
xor eax , eax
stdcall vox_obj_rec0 ;<3B> eax <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> ୨ <EFBFBD> 㧫<> <E3A7AB> , <20> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> ⢨
.end_0:
shr bx , 1
loop @ b
.end_1:
bt bx , 0
jnc .end_2 ;<3B> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> ॢ<EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
dec esi
cmp esi , 0
jg .found
mov eax ,[ v_size ]
;eax - ࠧ<> <E0A0A7> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
2012-06-21 13:32:18 +02:00
;edi - 㪠<> <E3AAA0> ⥫<EFBFBD> <20> <> <20> <> <EFBFBD> 㥬<EFBFBD> <E3A5AC> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> ꥪ<EFBFBD> <EAA5AA>
2012-06-11 00:19:58 +02:00
mov ecx ,[ k_scale ]
mov ebx ,[ coord_x ]
mov edx ,[ coord_y ]
xor esi , esi
push eax
2012-06-21 13:32:18 +02:00
mov eax , 1
shl eax , cl
dec eax
sub eax ,[ n_plane ]
2012-06-11 00:19:58 +02:00
stdcall draw_sub_vox_obj_pl , [ buf_i ],[ v_obj ], eax
.end_2:
popad
.end_f:
ret
endp
;description:
; <20> <> ।<EFBFBD> <E0A5A4> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> 樨 㧫<> <20> <20> <> ॢ<EFBFBD> (<28> <> 0 <20> <> 7)
align 4
proc vox_obj_get_node_position uses ebx ecx edi , v_obj : dword , \
coord_x: dw ord , coord_y : dword , coord_z : dword , k_scale : dword
mov ecx ,[ k_scale ]
dec ecx
mov eax ,[ coord_x ]
mov ebx ,[ coord_y ]
mov edi ,[ coord_z ]
cmp ecx , 1
jl .end_0
shr eax , cl
shr ebx , cl
shr edi , cl
.end_0:
and eax , 1
bt ebx , 0
jnc @ f
bts eax , 1
@ @ :
bt edi , 0
jnc @ f
bts eax , 2
@ @ :
mov edi ,[ v_obj ]
add edi , vox_offs_tree_table
@ @ :
cmp al , byte [ edi ]
je @ f
inc edi
jmp @ b
@ @ :
sub edi ,[ v_obj ]
sub edi , vox_offs_tree_table
mov eax , edi
ret
endp
;input:
; edi - 㪠<> <E3AAA0> ⥫<EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> ᥫ쭮<E1A5AB> <ECADAE> <20> <> ꥪ<EFBFBD> <EAA5AA>
;output:
; eax - eax + <20> <> 㧫<> <E3A7AB> <20> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> . <20> <> ꥪ<EFBFBD> <EAA5AA>
; edi - 㪠<> <E3AAA0> ⥫<EFBFBD> <20> <> ᬥ饭<E1ACA5> <E9A5AD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> . <20> <> ꥪ<EFBFBD> <EAA5AA>
align 4
proc vox_obj_rec0
inc eax
cmp byte [ edi + 3 ], 0 ;ᬮ<> ਬ <20> <> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> ॢ<EFBFBD> <E0A5A2>
je .sub_trees
;४<> <E0A5AA> ᨢ<EFBFBD> <E1A8A2> <EFBFBD> <20> <> ॡ<EFBFBD> <E0A5A1> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> ॢ쥢
push ebx ecx
mov bh , byte [ edi + 3 ]
add edi , 4
mov bl , 8
.cycle:
bt bx , 8 ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 㥬 ⮫쪮 bh
jnc .c_next
stdcall vox_obj_rec0
.c_next:
shr bh , 1
dec bl
jnz .cycle
pop ecx ebx
jmp .end_f
.sub_trees:
add edi , 4
.end_f:
ret
endp
;description:
; <20> 㭪<EFBFBD> <E3ADAA> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> ਧ<EFBFBD> <E0A8A7> ⠫<EFBFBD> <E2A0AB> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <20> <> <EFBFBD> <EFBFBD> 㭪<EFBFBD> <E3ADAA>
align 4
proc draw_polz_hor uses eax ebx ecx , buf : dword , coord_x : dword , coord_y : dword , \
size_x: dw ord , si ze_y : dword , pos : dword , k_scale : dword , color : dword
mov ebx ,[ si ze_x ]
stdcall buf_rect_by_size , [ buf ], [ coord_x ],[ coord_y ], ebx ,[ si ze_y ], [ color ]
mov ecx ,[ k_scale ]
shr ebx , cl
mov eax ,[ pos ]
imul eax , ebx
add eax ,[ coord_x ]
stdcall buf_filled_rect_by_size , [ buf ], eax ,[ coord_y ], ebx ,[ si ze_y ], [ color ]
ret
endp
;input:
; ebx - coord_x
; edx - coord_y
; esi - coord_z
; ecx - <20> <EFBFBD> <E0AEA2> <EFBFBD> ⥪<> 襣<EFBFBD> 㧫<>
; edi - 㪠<> <E3AAA0> ⥫<EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> ᥫ쭮<E1A5AB> <ECADAE> <20> <> ꥪ<EFBFBD> <EAA5AA>
align 4
proc draw_sub_vox_obj_pl , buf_i : dword , v_obj : dword , cl ip_z : dword , \
v_size: dw ord
cmp byte [ edi + 3 ], 0 ;ᬮ<> ਬ <20> <> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> ॢ<EFBFBD> <E0A5A2>
je .sub_trees
;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> ᮢ<EFBFBD> <E1AEA2> ࠬ<> <E0A0AC> <20> ࠧ<> <E0A0A7> <EFBFBD> 㧫<> = 1
cmp ecx , 0
jne @ f
2012-06-21 13:32:18 +02:00
;<3B> <EFBFBD> ઠ <20> <> 㡨<EFBFBD> <E3A1A8> esi
;clip_z=n_plane
stdcall vox_is_clip , [ cl ip_z ] ;,[v_size]
cmp eax , 0
je @ f
push ecx
mov ecx , dword [ edi ]
and ecx , 0xffffff
stdcall buf_rect_by_size , [ buf_i ], ebx , edx , [ v_size ],[ v_size ], ecx
pop ecx
2012-06-11 00:19:58 +02:00
@ @ :
;४<> <E0A5AA> ᨢ<EFBFBD> <E1A8A2> <EFBFBD> <20> <> ॡ<EFBFBD> <E0A5A1> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> ॢ쥢
push edx
;<3B> 室 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 㧫<>
dec ecx
mov eax ,[ v_size ]
cmp ecx , 1
jl @ f
shl eax , cl
@ @ :
2012-06-21 13:32:18 +02:00
2012-06-11 00:19:58 +02:00
add edx , eax ;<3B> <> ४<EFBFBD> <E0A5AA> <EFBFBD> <E0AEA2> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <20> <> <EFBFBD> ᥫ<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <EFBFBD> <E0AEA2>
mov ah , byte [ edi + 3 ]
add edi , 4
mov al , 8
.cycle:
bt ax , 8 ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 㥬 ⮫쪮 ah
jnc .c_next
push eax ebx edx esi
stdcall vox_corect_coords_pl , [ v_obj ],[ v_size ]
stdcall draw_sub_vox_obj_pl , [ buf_i ],[ v_obj ],[ cl ip_z ],[ v_size ]
pop esi edx ebx eax
.c_next:
shr ah , 1
dec al
jnz .cycle
;<3B> <> 室 <20> <> 㧫<>
inc ecx
pop edx
jmp .end_f
.sub_trees:
cmp ecx , 0
jl .end_0 ;<3B> <> <20> <> <EFBFBD> 㥬 <20> 祭<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 쪨<EFBFBD> <20> <> <EFBFBD> ᥫ<EFBFBD>
2012-06-21 13:32:18 +02:00
;<3B> <EFBFBD> ઠ <20> <> 㡨<EFBFBD> <E3A1A8> esi
;clip_z=n_plane
stdcall vox_is_clip , [ cl ip_z ]
cmp eax , 0
je .end_0
2012-06-11 00:19:58 +02:00
2012-06-21 13:32:18 +02:00
;<3B> <> <EFBFBD> 㥬 㧥<>
mov eax ,[ edi ]
and eax , 0xffffff
push eax ;梥<> 㧫<>
2012-06-11 00:19:58 +02:00
2012-06-21 13:32:18 +02:00
mov eax ,[ v_size ]
cmp ecx , 1
jl @ f
;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ⥪<> 饣<EFBFBD> <20> <> <EFBFBD> <EFBFBD> ⠡<EFBFBD>
shl eax , cl ;ࠧ<> <E0A0A7> <EFBFBD> 㧫<>
stdcall buf_filled_rect_by_size , [ buf_i ], ebx , edx , eax , eax
push ebx edx esi
mov esi , eax
inc ebx
inc edx
sub esi , 2
mov eax ,[ buf_i ]
push dword 128
push dword [ eax + 16 ] ;+16 - b_color
stdcall combine_colors_3 ,[ edi ]
stdcall buf_rect_by_size , [ buf_i ], ebx , edx , esi , esi , eax
pop esi edx ebx
jmp .end_0
@ @ :
;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ⥪<> 饣<EFBFBD> <20> <> <EFBFBD> <EFBFBD> ⠡<EFBFBD>
stdcall buf_filled_rect_by_size , [ buf_i ], ebx , edx , eax , eax
2012-06-11 00:19:58 +02:00
.end_0:
add edi , 4
.end_f:
ret
endp
;description:
; <20> ᯮ<EFBFBD> <E1AFAE> <EFBFBD> <EFBFBD> ⥫쭠<E2A5AB> <20> 㭪<EFBFBD> <E3ADAA> <EFBFBD> <20> <> <EFBFBD> <20> <EFBFBD> ન <20> <> 㡨<EFBFBD> <E3A1A8> esi
;input:
; ecx - <20> <EFBFBD> <E0AEA2> <EFBFBD> ⥪<> 襣<EFBFBD> 㧫<>
; esi - coord z
2012-06-21 13:32:18 +02:00
; clip_z - n_plane
2012-06-11 00:19:58 +02:00
;output:
; eax - 0 if no draw, 1 if draw
align 4
2012-06-21 13:32:18 +02:00
proc vox_is_clip uses ebx edi , cl ip_z : dword
2012-06-11 00:19:58 +02:00
xor eax , eax
mov ebx ,[ cl ip_z ]
2012-06-21 13:32:18 +02:00
mov edi , 1
2012-06-11 00:19:58 +02:00
cmp ecx , 1
jl @ f
shl edi , cl
@ @ :
;edi = 2^ecx
add edi , esi
2012-06-21 13:32:18 +02:00
cmp edi , ebx ;if (esi+2^ecx <= n_plane) no draw
2012-06-11 00:19:58 +02:00
jle @ f
2012-06-21 13:32:18 +02:00
inc ebx
cmp esi , ebx ;if (esi >= (n_plane+1)) no draw
2012-06-11 00:19:58 +02:00
jge @ f
inc eax
@ @ :
ret
endp
;<3B> 㭪<EFBFBD> <E3ADAA> <EFBFBD> <20> <> <EFBFBD> <20> <> ४<EFBFBD> <E0A5AA> <EFBFBD> <E0AEA2> <20> <> <EFBFBD> न<EFBFBD> <E0A4A8> <EFBFBD>
;<3B> <> <EFBFBD> ࠢ<EFBFBD> <E0A0A2> <EFBFBD> <EFBFBD> <EFBFBD> <20> ᥩ <20> <> <EFBFBD> न<EFBFBD> <E0A4A8> <EFBFBD> <20> <20> <> <EFBFBD> ᥫ<EFBFBD> :
;*z
;|
;+-* x
;input:
; al - <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 㧫<> <20> <20> <> ॢ<EFBFBD> (<28> <> 1 <20> <> 8)
; ebx - <20> <> <EFBFBD> न<EFBFBD> <E0A4A8> <EFBFBD> <EFBFBD> x
; edx - <20> <> <EFBFBD> न<EFBFBD> <E0A4A8> <EFBFBD> <EFBFBD> y
; esi - <20> <> <EFBFBD> न<EFBFBD> <E0A4A8> <EFBFBD> <EFBFBD> z
; ecx - <20> <EFBFBD> <E0AEA2> <EFBFBD> ⥪<> 襣<EFBFBD> 㧫<>
;output:
; ebx - <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> न<EFBFBD> <E0A4A8> <EFBFBD> <EFBFBD> x
; edx - <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> न<EFBFBD> <E0A4A8> <EFBFBD> <EFBFBD> y
; esi - <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> न<EFBFBD> <E0A4A8> <EFBFBD> <EFBFBD> z
align 4
proc vox_corect_coords_pl , v_obj : dword , v_size : dword
cmp ecx , 0
jl .end_f ;<3B> <> <EFBFBD> <20> ७<E1AAAE> <E0A5AD> <20> <> <EFBFBD> <EFBFBD> ᮢ<EFBFBD> <E1AEA2>
push eax edi
and eax , 15 ;<3B> 뤥<EFBFBD> 塞 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 㧫<> <20> <20> <> ॢ<EFBFBD>
mov edi ,[ v_obj ]
add edi , vox_offs_tree_table
add edi , 8
sub edi , eax
2012-06-21 13:32:18 +02:00
mov eax ,[ v_size ]
2012-06-11 00:19:58 +02:00
cmp ecx , 1
2012-06-21 13:32:18 +02:00
jl @ f
2012-06-11 00:19:58 +02:00
shl eax , cl
@ @ :
bt word [ edi ], 0 ;test voxel coord x
jnc @ f
add ebx , eax
@ @ :
bt word [ edi ], 2 ;test voxel coord z
jnc @ f
sub edx , eax
@ @ :
2012-06-21 13:32:18 +02:00
bt word [ edi ], 1 ;test voxel coord y
jc @ f
mov eax , 1
cmp ecx , 1
jl .end_0
shl eax , cl
.end_0:
add esi , eax ;<3B> <> <EFBFBD> 塞 <20> <> 㡨<EFBFBD> <E3A1A8> <20> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> z
@ @ :
2012-06-11 00:19:58 +02:00
pop edi eax
.end_f:
ret
endp
;description:
; <20> 㭪<EFBFBD> <E3ADAA> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ⥭<>
;input:
; buf_i - <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <20> <> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> (24 <20> <> <EFBFBD> <EFBFBD> )
; buf_z - <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> 㡨<EFBFBD> <E3A1A8> (32 <20> <> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> ᥫ<EFBFBD> <E1A5AB> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ᮢ<> <E1AEA2> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> buf_i)
; h_br - <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> ﬨ <20> <> <EFBFBD> ᥫ<EFBFBD> <E1A5AB> (32 <20> <> <EFBFBD> <EFBFBD> )
; k_scale - <20> <> <EFBFBD> <EFBFBD> . <20> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> ⠡<EFBFBD> <EFBFBD> <E0AEA2> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD>
align 4
proc buf_vox_obj_draw_3g_shadows , buf_i : dword , buf_z : dword , h_br : dword , \
coord_x: dw ord , coord_y : dword , color : dword , k_scale : dword , prop : dword
locals
correct_z dd 0 ;<3B> <> ४<EFBFBD> <E0A5AA> <EFBFBD> <E0AEA2> <20> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> 㡨<EFBFBD> <E3A1A8>
endl
pushad
mov eax ,[ k_scale ]
add eax ,[ prop ]
mov dword [ correct_z ], 8
sub [ correct_z ], eax
mov ebx ,[ coord_x ]
;correct_z = 8-k_scale-prop
stdcall buf_vox_obj_get_img_w_3g , [ h_br ],[ k_scale ]
mov edx , eax ;edx - <20> <> ਭ<EFBFBD> <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD>
stdcall buf_vox_obj_get_img_h_3g , [ h_br ],[ k_scale ]
mov esi , eax
mov edi ,[ coord_y ]
mov ecx , edx
add edx , ebx ;<3B> <> ਭ<EFBFBD> + <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <> <E1ABA5>
imul ecx , esi
cld
.cycle_0:
stdcall buf_get_pixel , [ buf_z ], ebx , edi
cmp eax , 0
je @ f
stdcall vox_correct_z , [ correct_z ]
push eax
stdcall buf_get_pixel , [ buf_i ], ebx , edi
stdcall combine_colors_3 , eax ,[ color ] ;,eax
stdcall buf_set_pixel , [ buf_i ], ebx , edi , eax
@ @ :
inc ebx
cmp ebx , edx
jl @ f
mov ebx ,[ coord_x ]
inc edi
@ @ :
loop .cycle_0
popad
ret
endp
;output:
; eax - scaled coord z
align 4
proc vox_correct_z uses ecx , correct_z : dword
mov ecx ,[ correct_z ]
cmp ecx , 0
je .end_f
jl .end_0
shl eax , cl
jmp .end_f
.end_0:
neg ecx
inc ecx
shr eax , cl
.end_f:
ret
endp
;output:
; eax - color
align 4
proc combine_colors_3 uses ebx ecx edx edi esi , col_0 : dword , col_1 : dword , al pha : dword
mov ebx ,[ col_0 ]
mov ecx ,[ col_1 ]
movzx di , byte [ al pha ] ;pro
mov si , 0x00ff ;---get transparent---
sub si , di ;256-pro
;---blye---
movzx ax , bl
imul ax , si
movzx dx , cl
imul dx , di
add ax , dx
mov cl , ah
;---green---
movzx ax , bh
imul ax , si
movzx dx , ch
imul dx , di
add ax , dx
mov ch , ah
shr ebx , 16
ror ecx , 16
;---red---
movzx ax , bl
imul ax , si
movzx dx , cl
imul dx , di
add ax , dx
shl eax , 8
ror ecx , 16
mov ax , cx
and eax , 0xffffff
ret
endp
2010-07-29 23:20:45 +02:00
txt_err_n8b db 'need buffer 8 bit' , 13 , 10 , 0
txt_err_n24b db 'need buffer 24 bit' , 13 , 10 , 0
2012-06-21 13:32:18 +02:00
txt_err_n32b db 'need buffer 32 bit' , 13 , 10 , 0
2012-02-20 13:10:29 +01:00
txt_err_n8_24b db 'need buffer 8 or 24 bit' , 13 , 10 , 0
2010-07-29 23:20:45 +02:00
align 16
EXPORTS:
dd sz_lib_init , lib_init
dd sz_buf2d_create , buf_create
dd sz_buf2d_create_f_img , buf_create_f_img
dd sz_buf2d_clear , buf_clear
dd sz_buf2d_draw , buf_draw_buf
dd sz_buf2d_delete , buf_delete
2011-08-30 13:10:56 +02:00
dd sz_buf2d_resize , buf_resize
2012-10-01 12:45:57 +02:00
dd sz_buf2d_rotate , buf_rotate
2010-07-29 23:20:45 +02:00
dd sz_buf2d_line , buf_line_brs
2011-09-22 17:38:57 +02:00
dd sz_buf2d_line_sm , buf_line_brs_sm
2010-09-30 23:07:09 +02:00
dd sz_buf2d_rect_by_size , buf_rect_by_size
2010-10-04 13:51:03 +02:00
dd sz_buf2d_filled_rect_by_size , buf_filled_rect_by_size
2010-07-29 23:20:45 +02:00
dd sz_buf2d_circle , buf_circle
dd sz_buf2d_img_hdiv2 , buf_img_hdiv2
dd sz_buf2d_img_wdiv2 , buf_img_wdiv2
dd sz_buf2d_conv_24_to_8 , buf_conv_24_to_8
dd sz_buf2d_conv_24_to_32 , buf_conv_24_to_32
dd sz_buf2d_bit_blt , buf_bit_blt
dd sz_buf2d_bit_blt_transp , buf_bit_blt_transp
dd sz_buf2d_bit_blt_alpha , buf_bit_blt_alpha
2010-12-22 18:03:22 +01:00
dd sz_buf2d_curve_bezier , buf_curve_bezier
2010-07-29 23:20:45 +02:00
dd sz_buf2d_convert_text_matrix , buf_convert_text_matrix
dd sz_buf2d_draw_text , buf_draw_text
dd sz_buf2d_crop_color , buf_crop_color
dd sz_buf2d_offset_h , buf_offset_h
2010-11-02 20:34:57 +01:00
dd sz_buf2d_flood_fill , buf_flood_fill
2011-03-25 16:57:37 +01:00
dd sz_buf2d_set_pixel , buf_set_pixel
2012-05-11 12:11:27 +02:00
dd sz_buf2d_get_pixel , buf_get_pixel
2015-01-30 17:21:33 +01:00
dd sz_buf2d_flip_h , buf_flip_h
2012-11-15 21:56:45 +01:00
dd sz_buf2d_flip_v , buf_flip_v
2012-12-14 19:09:51 +01:00
dd sz_buf2d_filter_dither , buf_filter_dither
2012-06-05 17:33:54 +02:00
dd sz_buf2d_vox_brush_create , vox_brush_create
dd sz_buf2d_vox_brush_delete , vox_brush_delete
2012-06-11 00:19:58 +02:00
dd sz_buf2d_vox_obj_get_img_w_3g , buf_vox_obj_get_img_w_3g
dd sz_buf2d_vox_obj_get_img_h_3g , buf_vox_obj_get_img_h_3g
2012-06-21 13:32:18 +02:00
dd sz_buf2d_vox_obj_draw_1g , buf_vox_obj_draw_1g
2012-06-11 00:19:58 +02:00
dd sz_buf2d_vox_obj_draw_3g , buf_vox_obj_draw_3g
dd sz_buf2d_vox_obj_draw_3g_scaled , buf_vox_obj_draw_3g_scaled
dd sz_buf2d_vox_obj_draw_pl , buf_vox_obj_draw_pl
dd sz_buf2d_vox_obj_draw_pl_scaled , buf_vox_obj_draw_pl_scaled
dd sz_buf2d_vox_obj_draw_3g_shadows , buf_vox_obj_draw_3g_shadows
2010-07-29 23:20:45 +02:00
dd 0 , 0
sz_lib_init db 'lib_init' , 0
sz_buf2d_create db 'buf2d_create' , 0
sz_buf2d_create_f_img db 'buf2d_create_f_img' , 0
sz_buf2d_clear db 'buf2d_clear' , 0 ;<3B> <> <EFBFBD> <EFBFBD> ⪠ <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 㪠<> <E3AAA0> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 梥⮬
sz_buf2d_draw db 'buf2d_draw' , 0
sz_buf2d_delete db 'buf2d_delete' , 0
2011-08-30 13:10:56 +02:00
sz_buf2d_resize db 'buf2d_resize' , 0
2012-10-01 12:45:57 +02:00
sz_buf2d_rotate db 'buf2d_rotate' , 0
2010-07-29 23:20:45 +02:00
sz_buf2d_line db 'buf2d_line' , 0 ;<3B> <> ᮢ<EFBFBD> <E1AEA2> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD>
2011-09-22 17:38:57 +02:00
sz_buf2d_line_sm db 'buf2d_line_sm' , 0 ;<3B> <> ᮢ<EFBFBD> <E1AEA2> <EFBFBD> <EFBFBD> ᣫ<> <E1A3AB> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD>
2010-10-04 13:51:03 +02:00
sz_buf2d_rect_by_size db 'buf2d_rect_by_size' , 0 ;<3B> <> ᮢ<EFBFBD> <E1AEA2> <EFBFBD> <EFBFBD> ࠬ<> <E0A0AC> <20> <> אַ㣮<EFACAE> 쭨<EFBFBD> <ECADA8> , 2-<2D> <20> <> <EFBFBD> न<EFBFBD> <E0A4A8> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> ࠧ<> <E0A0A7> <EFBFBD> <EFBFBD>
sz_buf2d_filled_rect_by_size db 'buf2d_filled_rect_by_size' , 0 ;<3B> <> ᮢ<EFBFBD> <E1AEA2> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> ⮣<EFBFBD> <20> <> אַ㣮<EFACAE> 쭨<EFBFBD> <ECADA8> , 2-<2D> <20> <> <EFBFBD> न<EFBFBD> <E0A4A8> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> ࠧ<> <E0A0A7> <EFBFBD> <EFBFBD>
2010-07-29 23:20:45 +02:00
sz_buf2d_circle db 'buf2d_circle' , 0 ;<3B> <> ᮢ<EFBFBD> <E1AEA2> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> 㦭<EFBFBD> <E3A6AD> <EFBFBD> <EFBFBD>
sz_buf2d_img_hdiv2 db 'buf2d_img_hdiv2' , 0 ;ᦠ⨥ <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> 2 ࠧ<> (ࠧ<> <E0A0A7> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> )
sz_buf2d_img_wdiv2 db 'buf2d_img_wdiv2' , 0 ;ᦠ⨥ <20> <> <EFBFBD> <EFBFBD> ࠦ<EFBFBD> <E0A0A6> <EFBFBD> <EFBFBD> <20> <> <20> <> ਭ<EFBFBD> <20> 2 ࠧ<> (ࠧ<> <E0A0A7> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> )
sz_buf2d_conv_24_to_8 db 'buf2d_conv_24_to_8' , 0
sz_buf2d_conv_24_to_32 db 'buf2d_conv_24_to_32' , 0
sz_buf2d_bit_blt db 'buf2d_bit_blt' , 0
sz_buf2d_bit_blt_transp db 'buf2d_bit_blt_transp' , 0
sz_buf2d_bit_blt_alpha db 'buf2d_bit_blt_alpha' , 0
2010-12-22 18:03:22 +01:00
sz_buf2d_curve_bezier db 'buf2d_curve_bezier' , 0
2010-07-29 23:20:45 +02:00
sz_buf2d_convert_text_matrix db 'buf2d_convert_text_matrix' , 0
sz_buf2d_draw_text db 'buf2d_draw_text' , 0
sz_buf2d_crop_color db 'buf2d_crop_color' , 0
sz_buf2d_offset_h db 'buf2d_offset_h' , 0
2010-11-02 20:34:57 +01:00
sz_buf2d_flood_fill db 'buf2d_flood_fill' , 0
2011-03-25 16:57:37 +01:00
sz_buf2d_set_pixel db 'buf2d_set_pixel' , 0
2012-05-11 12:11:27 +02:00
sz_buf2d_get_pixel db 'buf2d_get_pixel' , 0
2015-01-30 17:21:33 +01:00
sz_buf2d_flip_h db 'buf2d_flip_h' , 0
2012-11-15 21:56:45 +01:00
sz_buf2d_flip_v db 'buf2d_flip_v' , 0
2012-12-14 19:09:51 +01:00
sz_buf2d_filter_dither db 'buf2d_filter_dither' , 0
2012-06-05 17:33:54 +02:00
sz_buf2d_vox_brush_create db 'buf2d_vox_brush_create' , 0
sz_buf2d_vox_brush_delete db 'buf2d_vox_brush_delete' , 0
2012-06-11 00:19:58 +02:00
sz_buf2d_vox_obj_get_img_w_3g db 'buf2d_vox_obj_get_img_w_3g' , 0
sz_buf2d_vox_obj_get_img_h_3g db 'buf2d_vox_obj_get_img_h_3g' , 0
2012-06-21 13:32:18 +02:00
sz_buf2d_vox_obj_draw_1g db 'buf2d_vox_obj_draw_1g' , 0
2012-06-11 00:19:58 +02:00
sz_buf2d_vox_obj_draw_3g db 'buf2d_vox_obj_draw_3g' , 0
sz_buf2d_vox_obj_draw_3g_scaled db 'buf2d_vox_obj_draw_3g_scaled' , 0
sz_buf2d_vox_obj_draw_pl db 'buf2d_vox_obj_draw_pl' , 0
sz_buf2d_vox_obj_draw_pl_scaled db 'buf2d_vox_obj_draw_pl_scaled' , 0
sz_buf2d_vox_obj_draw_3g_shadows db 'buf2d_vox_obj_draw_3g_shadows' , 0