2016-02-12 21:31:07 +01:00
|
|
|
|
;
|
2017-05-26 12:20:10 +02:00
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ࠦ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>१ <EFBFBD>㭪樨 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⥪<EFBFBD> libimg.
|
|
|
|
|
;
|
|
|
|
|
; (1) <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> load_image_file:
|
2016-02-12 21:31:07 +01:00
|
|
|
|
;
|
2017-03-27 17:19:10 +02:00
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ࠧ<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>祭<EFBFBD><EFBFBD><EFBFBD><EFBFBD> 䠩<EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ࠦ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
|
|
|
|
; <EFBFBD>뤥<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>㦠<EFBFBD><EFBFBD> <EFBFBD>㤠 䠩<EFBFBD>.
|
|
|
|
|
; <EFBFBD><EFBFBD>।<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ࠧ<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>室<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ᯠ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ࠦ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
|
|
|
|
; <EFBFBD><EFBFBD>ॢ뤥<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD> <EFBFBD><EFBFBD>ᯠ<EFBFBD><EFBFBD><EFBFBD>뢠<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ࠦ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ଠ⮢ jpg, png, ...
|
|
|
|
|
; <EFBFBD> <EFBFBD><EFBFBD>ଠ<EFBFBD> rgb <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>뢮<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD>࠭ <EFBFBD><EFBFBD>१ <EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <EFBFBD>㭪<EFBFBD><EFBFBD><EFBFBD>.
|
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>室<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ⠪<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ࠧ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>뢠<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ࠦ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
; <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>쭥<EFBFBD>襣<EFBFBD> <EFBFBD>ᯮ<EFBFBD>짮<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD>ணࠬ<EFBFBD><EFBFBD>.
|
2016-02-12 21:31:07 +01:00
|
|
|
|
;
|
2017-03-27 17:19:10 +02:00
|
|
|
|
; <EFBFBD> <EFBFBD>ᯮ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>饩 <EFBFBD>ணࠬ<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>祭<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⥪<EFBFBD> libimg,
|
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>६<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> file_name ࠧ<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 4096 <EFBFBD><EFBFBD><EFBFBD><EFBFBD>,
|
|
|
|
|
; <EFBFBD> ⠪<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> run_file_70 ⨯<EFBFBD> FileInfoBlock.
|
2017-05-26 12:20:10 +02:00
|
|
|
|
;
|
|
|
|
|
; (2) <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> include_image_file:
|
|
|
|
|
;
|
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ࠦ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> 䠩<EFBFBD> <EFBFBD>ணࠬ<EFBFBD><EFBFBD>.
|
|
|
|
|
; <EFBFBD><EFBFBD>।<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ࠧ<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>室<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ᯠ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ࠦ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
|
|
|
|
; <EFBFBD>뤥<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD> <EFBFBD><EFBFBD>ᯠ<EFBFBD><EFBFBD><EFBFBD>뢠<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ࠦ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ଠ⮢ jpg, png, ...
|
|
|
|
|
; <EFBFBD> <EFBFBD><EFBFBD>ଠ<EFBFBD> rgb <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>뢮<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD>࠭ <EFBFBD><EFBFBD>१ <EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <EFBFBD>㭪<EFBFBD><EFBFBD><EFBFBD>.
|
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>室<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ⠪<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ࠧ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>७<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ࠦ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
; <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>쭥<EFBFBD>襣<EFBFBD> <EFBFBD>ᯮ<EFBFBD>짮<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD>ணࠬ<EFBFBD><EFBFBD>.
|
2016-02-12 21:31:07 +01:00
|
|
|
|
|
2017-03-27 17:19:10 +02:00
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>祭<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>室<EFBFBD><EFBFBD><EFBFBD><EFBFBD> 䠩<EFBFBD><EFBFBD><EFBFBD>:
|
2016-02-12 21:31:07 +01:00
|
|
|
|
include 'dll.inc'
|
|
|
|
|
include 'develop/libraries/box_lib/load_lib.mac'
|
2017-01-19 18:54:31 +01:00
|
|
|
|
include 'develop/libraries/libs-dev/libio/libio.inc'
|
2016-02-12 21:31:07 +01:00
|
|
|
|
|
|
|
|
|
align 4
|
|
|
|
|
open_b rb 560
|
|
|
|
|
|
2017-03-27 17:19:10 +02:00
|
|
|
|
txt_err_img_file:
|
|
|
|
|
if lang eq ru
|
|
|
|
|
db '<27>訡<EFBFBD><E8A8A1> N'
|
|
|
|
|
.n: db '* <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>⨨ 䠩<><E4A0A9> '
|
|
|
|
|
else
|
|
|
|
|
db 'Error N'
|
|
|
|
|
.n: db '*. Can',39,'t open file '
|
|
|
|
|
end if
|
|
|
|
|
.f: dd 0,0
|
|
|
|
|
|
|
|
|
|
; path - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>६<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ப<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ࠬ<EFBFBD><EFBFBD>
|
|
|
|
|
; buf - <EFBFBD><EFBFBD>६<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>㤠 <EFBFBD>㤥<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ᠭ 㪠<EFBFBD><EFBFBD>⥫<EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ࠦ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD>ଠ<EFBFBD><EFBFBD> rgb,
|
|
|
|
|
; <EFBFBD> <EFBFBD><EFBFBD><EFBFBD>砥 <EFBFBD> 䠩<EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD>㤥<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ᠭ 0
|
|
|
|
|
; img_w, img_h - <EFBFBD><EFBFBD>६<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>㤠 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ᠭ<EFBFBD> ࠧ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>뢠<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ࠦ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD> <EFBFBD><EFBFBD>易⥫<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ࠬ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
; bytes_p_p - <EFBFBD>쪮 <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>ᥫ<EFBFBD>, <EFBFBD><EFBFBD> <EFBFBD><EFBFBD>易⥫<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ࠬ<EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
; <EFBFBD> <EFBFBD><EFBFBD> 㪠<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 3. <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>쭮<EFBFBD> <EFBFBD><EFBFBD><EFBFBD>祭<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 3.
|
2016-02-12 21:31:07 +01:00
|
|
|
|
macro load_image_file path, buf, img_w, img_h, bytes_p_p
|
|
|
|
|
{
|
2017-03-27 17:19:10 +02:00
|
|
|
|
local .err_open
|
2016-02-12 21:31:07 +01:00
|
|
|
|
local .end_open
|
2017-03-27 17:19:10 +02:00
|
|
|
|
|
|
|
|
|
if path eqtype '' ;<EFBFBD><EFBFBD><EFBFBD>塞 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ப<EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ࠬ<EFBFBD><EFBFBD><EFBFBD> path
|
2017-05-26 12:20:10 +02:00
|
|
|
|
local .path_str
|
|
|
|
|
jmp @f
|
|
|
|
|
.path_str db path ;<EFBFBD><EFBFBD>ନ<EFBFBD>㥬 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>६<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
db 0
|
|
|
|
|
@@:
|
|
|
|
|
;32 - <EFBFBD>⠭<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD>⥬<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>⥬
|
|
|
|
|
copy_path .path_str,[32],file_name,0
|
2016-02-12 21:31:07 +01:00
|
|
|
|
else
|
2017-05-26 12:20:10 +02:00
|
|
|
|
copy_path path,[32],file_name,0 ;<EFBFBD><EFBFBD>ନ<EFBFBD>㥬 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> 䠩<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ࠦ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD>ࠧ㬥<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD>ணࠬ<EFBFBD><EFBFBD><EFBFBD>
|
2016-02-12 21:31:07 +01:00
|
|
|
|
end if
|
2017-05-26 12:20:10 +02:00
|
|
|
|
mov dword[buf],0
|
2016-02-13 01:08:46 +01:00
|
|
|
|
|
2017-05-26 12:20:10 +02:00
|
|
|
|
mov [run_file_70.Function], SSF_GET_INFO
|
|
|
|
|
mov [run_file_70.Position], 0
|
|
|
|
|
mov [run_file_70.Flags], 0
|
|
|
|
|
mov dword[run_file_70.Count], 0
|
|
|
|
|
mov dword[run_file_70.Buffer], open_b
|
|
|
|
|
mov byte[run_file_70+20], 0
|
|
|
|
|
mov dword[run_file_70.FileName], file_name
|
|
|
|
|
mcall SF_FILE,run_file_70
|
|
|
|
|
or eax,eax
|
|
|
|
|
jnz .err_open
|
2016-02-12 21:31:07 +01:00
|
|
|
|
|
2017-05-26 12:20:10 +02:00
|
|
|
|
mov ecx,dword[open_b+32] ;+32 qword: ࠧ<EFBFBD><EFBFBD><EFBFBD> 䠩<EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
stdcall mem.Alloc,ecx ;<EFBFBD>뤥<EFBFBD>塞 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ࠦ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
mov [buf],eax
|
|
|
|
|
mov [run_file_70.Function], SSF_READ_FILE
|
|
|
|
|
mov [run_file_70.Position], 0
|
|
|
|
|
mov [run_file_70.Flags], 0
|
|
|
|
|
mov [run_file_70.Count], ecx
|
|
|
|
|
mov [run_file_70.Buffer], eax
|
|
|
|
|
mov byte[run_file_70+20], 0
|
|
|
|
|
mov [run_file_70.FileName], file_name
|
|
|
|
|
mcall SF_FILE,run_file_70 ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD>㦠<EFBFBD><EFBFBD> 䠩<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ࠦ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2017-03-27 17:19:10 +02:00
|
|
|
|
test eax,eax
|
|
|
|
|
jnz .err_open
|
2017-05-26 12:20:10 +02:00
|
|
|
|
cmp ebx,0xffffffff
|
|
|
|
|
je .end_open
|
|
|
|
|
;<EFBFBD><EFBFBD>।<EFBFBD><EFBFBD>塞 <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ࠦ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD>襬 <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ࠬ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
stdcall [img_decode], [buf],ebx,0
|
|
|
|
|
mov ebx,eax
|
|
|
|
|
;<EFBFBD><EFBFBD>।<EFBFBD><EFBFBD>塞 ࠧ<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ࠦ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
mov ecx,[eax+4] ;+4 = image width
|
2016-02-12 21:31:07 +01:00
|
|
|
|
if img_w eq
|
|
|
|
|
else
|
2017-05-26 12:20:10 +02:00
|
|
|
|
mov dword[img_w],ecx
|
2016-02-12 21:31:07 +01:00
|
|
|
|
end if
|
|
|
|
|
if img_h eq
|
2017-05-26 12:20:10 +02:00
|
|
|
|
imul ecx,[eax+8] ;+8 = image height
|
2016-02-12 21:31:07 +01:00
|
|
|
|
else
|
2017-05-26 12:20:10 +02:00
|
|
|
|
mov eax,[eax+8] ;+8 = image height
|
|
|
|
|
mov dword[img_h],eax
|
|
|
|
|
imul ecx,eax
|
2016-02-12 21:31:07 +01:00
|
|
|
|
end if
|
|
|
|
|
if bytes_p_p eq
|
2017-05-26 12:20:10 +02:00
|
|
|
|
imul ecx,3 ;need for r,g,b
|
2016-02-12 21:31:07 +01:00
|
|
|
|
else
|
2017-05-26 12:20:10 +02:00
|
|
|
|
imul ecx,bytes_p_p
|
2016-02-12 21:31:07 +01:00
|
|
|
|
end if
|
2017-05-26 12:20:10 +02:00
|
|
|
|
stdcall mem.ReAlloc,[buf],ecx ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>塞 ࠧ<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
mov [buf],eax
|
|
|
|
|
stdcall [img_to_rgb2], ebx,[buf] ;<EFBFBD>८<EFBFBD>ࠧ㥬 <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ࠦ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD>ଠ<EFBFBD><EFBFBD> rgb
|
|
|
|
|
stdcall [img_destroy], ebx ;㤠<EFBFBD>塞 <EFBFBD>६<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD>ࠬ<EFBFBD><EFBFBD>ࠬ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ࠦ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2017-03-27 17:19:10 +02:00
|
|
|
|
jmp .end_open
|
2017-05-26 12:20:10 +02:00
|
|
|
|
.err_open:
|
|
|
|
|
add al,'0'
|
|
|
|
|
mov byte[txt_err_img_file.n],al
|
2017-03-27 17:19:10 +02:00
|
|
|
|
if path eqtype ''
|
2017-05-26 12:20:10 +02:00
|
|
|
|
mov eax,dword[.path_str]
|
|
|
|
|
mov dword[txt_err_img_file.f],eax
|
|
|
|
|
mov eax,dword[.path_str+4]
|
2017-03-27 17:19:10 +02:00
|
|
|
|
else
|
2017-05-26 12:20:10 +02:00
|
|
|
|
mov eax,dword[path]
|
|
|
|
|
mov dword[txt_err_img_file.f],eax
|
|
|
|
|
mov eax,dword[path+4]
|
2017-03-27 17:19:10 +02:00
|
|
|
|
end if
|
2017-05-26 12:20:10 +02:00
|
|
|
|
mov dword[txt_err_img_file.f+4],eax
|
|
|
|
|
mov byte[txt_err_img_file.f+7],0
|
|
|
|
|
notify_window_run txt_err_img_file
|
|
|
|
|
.end_open:
|
2016-02-12 21:31:07 +01:00
|
|
|
|
}
|
2017-05-26 12:20:10 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
; path - <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>砥<EFBFBD><EFBFBD><EFBFBD><EFBFBD> 䠩<EFBFBD><EFBFBD>
|
|
|
|
|
; buf - <EFBFBD><EFBFBD>६<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>㤠 <EFBFBD>㤥<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ᠭ 㪠<EFBFBD><EFBFBD>⥫<EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ࠦ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD>ଠ<EFBFBD><EFBFBD> rgb
|
|
|
|
|
; img_w, img_h - <EFBFBD><EFBFBD>६<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>㤠 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ᠭ<EFBFBD> ࠧ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ࠦ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>,
|
|
|
|
|
; <EFBFBD><EFBFBD> <EFBFBD><EFBFBD>易⥫<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ࠬ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
; bytes_p_p - <EFBFBD>쪮 <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>ᥫ<EFBFBD>, <EFBFBD><EFBFBD> <EFBFBD><EFBFBD>易⥫<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ࠬ<EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
; <EFBFBD> <EFBFBD><EFBFBD> 㪠<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 3. <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>쭮<EFBFBD> <EFBFBD><EFBFBD><EFBFBD>祭<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 3.
|
|
|
|
|
macro include_image_file path, buf, img_w, img_h, bytes_p_p
|
|
|
|
|
{
|
|
|
|
|
local .beg_file
|
|
|
|
|
local .end_file
|
|
|
|
|
|
|
|
|
|
jmp .end_file
|
|
|
|
|
align 4
|
|
|
|
|
.beg_file:
|
|
|
|
|
file path
|
|
|
|
|
.end_file:
|
|
|
|
|
|
|
|
|
|
;<EFBFBD><EFBFBD>।<EFBFBD><EFBFBD>塞 <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ࠦ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD>襬 <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ࠬ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
stdcall [img_decode], .beg_file,.end_file-.beg_file,0
|
|
|
|
|
mov ebx,eax
|
|
|
|
|
;<EFBFBD><EFBFBD>।<EFBFBD><EFBFBD>塞 ࠧ<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ࠦ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
mov ecx,[eax+4] ;+4 = image width
|
|
|
|
|
if img_w eq
|
|
|
|
|
else
|
|
|
|
|
mov dword[img_w],ecx
|
|
|
|
|
end if
|
|
|
|
|
if img_h eq
|
|
|
|
|
imul ecx,[eax+8] ;+8 = image height
|
|
|
|
|
else
|
|
|
|
|
mov eax,[eax+8] ;+8 = image height
|
|
|
|
|
mov dword[img_h],eax
|
|
|
|
|
imul ecx,eax
|
|
|
|
|
end if
|
|
|
|
|
if bytes_p_p eq
|
|
|
|
|
imul ecx,3 ;need for r,g,b
|
|
|
|
|
else
|
|
|
|
|
imul ecx,bytes_p_p
|
|
|
|
|
end if
|
|
|
|
|
stdcall mem.Alloc,ecx ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>塞 ࠧ<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
mov [buf],eax
|
|
|
|
|
stdcall [img_to_rgb2], ebx,[buf] ;<EFBFBD>८<EFBFBD>ࠧ㥬 <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ࠦ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD>ଠ<EFBFBD><EFBFBD> rgb
|
|
|
|
|
stdcall [img_destroy], ebx ;㤠<EFBFBD>塞 <EFBFBD>६<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD>ࠬ<EFBFBD><EFBFBD>ࠬ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ࠦ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
}
|