forked from KolibriOS/kolibrios
fix rev 6208, fix 'buf2d.obj'
git-svn-id: svn://kolibrios.org@6210 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
ba3c0ea500
commit
c28f9414e8
@ -305,11 +305,6 @@ tup.append_table(img_files, {
|
|||||||
{"3D/CROWNSCR", PROGS .. "/demos/crownscr/trunk/crownscr"},
|
{"3D/CROWNSCR", PROGS .. "/demos/crownscr/trunk/crownscr"},
|
||||||
{"3D/FREE3D04", PROGS .. "/demos/free3d04/trunk/free3d04"},
|
{"3D/FREE3D04", PROGS .. "/demos/free3d04/trunk/free3d04"},
|
||||||
{"3D/VIEW3DS", PROGS .. "/demos/3DS/VIEW3DS"},
|
{"3D/VIEW3DS", PROGS .. "/demos/3DS/VIEW3DS"},
|
||||||
{"3D/INFO3DS_U", PROGS .. "/develop/info3ds/info3ds_u"},
|
|
||||||
{"3D/OBJECTS.PNG", PROGS .. "/develop/info3ds/objects.png"},
|
|
||||||
{"3D/TL_SYS_16.PNG", PROGS .. "/develop/info3ds/tl_sys_16.png"},
|
|
||||||
{"3D/TOOLBAR.PNG", PROGS .. "/develop/info3ds/toolbar.png"},
|
|
||||||
{"3D/INFO3DS.INI", PROGS .. "/develop/info3ds/info3ds.ini"},
|
|
||||||
{"DEMOS/BCDCLK", PROGS .. "/demos/bcdclk/trunk/bcdclk"},
|
{"DEMOS/BCDCLK", PROGS .. "/demos/bcdclk/trunk/bcdclk"},
|
||||||
{"DEMOS/CIRCLE", PROGS .. "/develop/examples/circle/trunk/circle"},
|
{"DEMOS/CIRCLE", PROGS .. "/develop/examples/circle/trunk/circle"},
|
||||||
{"DEMOS/COLORREF", PROGS .. "/demos/colorref/trunk/colorref"},
|
{"DEMOS/COLORREF", PROGS .. "/demos/colorref/trunk/colorref"},
|
||||||
@ -365,7 +360,6 @@ tup.append_table(img_files, {
|
|||||||
{"LIB/ARCHIVER.OBJ", PROGS .. "/fs/kfar/trunk/kfar_arc/kfar_arc.obj"},
|
{"LIB/ARCHIVER.OBJ", PROGS .. "/fs/kfar/trunk/kfar_arc/kfar_arc.obj"},
|
||||||
{"LIB/BOX_LIB.OBJ", PROGS .. "/develop/libraries/box_lib/trunk/box_lib.obj"},
|
{"LIB/BOX_LIB.OBJ", PROGS .. "/develop/libraries/box_lib/trunk/box_lib.obj"},
|
||||||
{"LIB/BUF2D.OBJ", PROGS .. "/develop/libraries/buf2d/trunk/buf2d.obj"},
|
{"LIB/BUF2D.OBJ", PROGS .. "/develop/libraries/buf2d/trunk/buf2d.obj"},
|
||||||
{"LIB/TINYGL.OBJ", PROGS .. "/develop/libraries/TinyGL/asm_fork/tinygl.obj"},
|
|
||||||
{"LIB/CONSOLE.OBJ", PROGS .. "/develop/libraries/console/console.obj"},
|
{"LIB/CONSOLE.OBJ", PROGS .. "/develop/libraries/console/console.obj"},
|
||||||
{"LIB/LIBGFX.OBJ", PROGS .. "/develop/libraries/libs-dev/libgfx/libgfx.obj"},
|
{"LIB/LIBGFX.OBJ", PROGS .. "/develop/libraries/libs-dev/libgfx/libgfx.obj"},
|
||||||
{"LIB/LIBIMG.OBJ", PROGS .. "/develop/libraries/libs-dev/libimg/libimg.obj"},
|
{"LIB/LIBIMG.OBJ", PROGS .. "/develop/libraries/libs-dev/libimg/libimg.obj"},
|
||||||
|
@ -94,12 +94,15 @@ proc buf_create_f_img, buf_struc:dword, rgb_data:dword
|
|||||||
pushad
|
pushad
|
||||||
mov edi,dword[buf_struc]
|
mov edi,dword[buf_struc]
|
||||||
mov ecx,buf2d_w
|
mov ecx,buf2d_w
|
||||||
|
cmp ecx,1
|
||||||
|
jl .end_create
|
||||||
mov ebx,buf2d_h
|
mov ebx,buf2d_h
|
||||||
|
cmp ebx,1
|
||||||
|
jl .end_create
|
||||||
imul ecx,ebx
|
imul ecx,ebx
|
||||||
cmp buf2d_bits,24
|
cmp buf2d_bits,24
|
||||||
jne @f
|
jne @f
|
||||||
lea ecx,[ecx+ecx*2] ; 24 bit = 3
|
lea ecx,[ecx+ecx*2] ; 24 bit = 3
|
||||||
;;;inc ecx ;§ ¯ ᮩ ¡ ©â ¢ ª®æ¥ ¡ãä¥à , çâ®-¡ë ¥ £«î稫¨ ¥ª®â®àë¥ äãªæ¨¨ ¨§®¡à ¦¥¨ïå ªà âëå 4Š
|
|
||||||
@@:
|
@@:
|
||||||
cmp buf2d_bits,32
|
cmp buf2d_bits,32
|
||||||
jne @f
|
jne @f
|
||||||
@ -117,6 +120,9 @@ proc buf_create_f_img, buf_struc:dword, rgb_data:dword
|
|||||||
jmp .end_create
|
jmp .end_create
|
||||||
@@:
|
@@:
|
||||||
stdcall buf_clear,edi,buf2d_color ;®ç¨á⪠¡ãä¥à ä®®¢ë¬ 梥⮬
|
stdcall buf_clear,edi,buf2d_color ;®ç¨á⪠¡ãä¥à ä®®¢ë¬ 梥⮬
|
||||||
|
jmp .end_create
|
||||||
|
.error:
|
||||||
|
stdcall print_err,sz_buf2d_create_f_img,txt_err_size_0
|
||||||
.end_create:
|
.end_create:
|
||||||
popad
|
popad
|
||||||
ret
|
ret
|
||||||
@ -1949,9 +1955,13 @@ proc buf_conv_24_to_8, buf_struc:dword, spectr:dword
|
|||||||
pushad
|
pushad
|
||||||
mov edi,dword[buf_struc]
|
mov edi,dword[buf_struc]
|
||||||
cmp buf2d_bits,24
|
cmp buf2d_bits,24
|
||||||
jne .error
|
jne .error0
|
||||||
mov eax,buf2d_w
|
mov eax,buf2d_w
|
||||||
|
cmp eax,1
|
||||||
|
jl .error1
|
||||||
mov ecx,buf2d_h
|
mov ecx,buf2d_h
|
||||||
|
cmp ecx,1
|
||||||
|
jl .error1
|
||||||
imul ecx,eax
|
imul ecx,eax
|
||||||
mov esi,ecx
|
mov esi,ecx
|
||||||
;ebx - ¯ ¬ïâì ¨§ ª®â®à®© ª®¯¨àã¥âáï
|
;ebx - ¯ ¬ïâì ¨§ ª®â®à®© ª®¯¨àã¥âáï
|
||||||
@ -1970,8 +1980,11 @@ proc buf_conv_24_to_8, buf_struc:dword, spectr:dword
|
|||||||
mov buf2d_bits,8
|
mov buf2d_bits,8
|
||||||
invoke mem.realloc,buf2d_data,esi ;㬥ìè ¥¬ ¯ ¬ïâì § ¨¬ ¥¬ãî ¡ãä¥à®¬
|
invoke mem.realloc,buf2d_data,esi ;㬥ìè ¥¬ ¯ ¬ïâì § ¨¬ ¥¬ãî ¡ãä¥à®¬
|
||||||
jmp .end_conv
|
jmp .end_conv
|
||||||
.error:
|
.error0:
|
||||||
stdcall print_err,sz_buf2d_conv_24_to_8,txt_err_n24b
|
stdcall print_err,sz_buf2d_conv_24_to_8,txt_err_n24b
|
||||||
|
jmp .end_conv
|
||||||
|
.error1:
|
||||||
|
stdcall print_err,sz_buf2d_conv_24_to_8,txt_err_size_0
|
||||||
.end_conv:
|
.end_conv:
|
||||||
popad
|
popad
|
||||||
ret
|
ret
|
||||||
@ -3057,6 +3070,7 @@ dither_4: ; Atkinson algorithm
|
|||||||
|
|
||||||
include 'fun_voxel.inc' ;äãªæ¨¨ ¤«ï à ¡®âë á ¢®ªá¥«ì®© £à 䨪®©
|
include 'fun_voxel.inc' ;äãªæ¨¨ ¤«ï à ¡®âë á ¢®ªá¥«ì®© £à 䨪®©
|
||||||
|
|
||||||
|
txt_err_size_0 db 'image size < 1 pixel',13,10,0
|
||||||
txt_err_n8b db 'need buffer 8 bit',13,10,0
|
txt_err_n8b db 'need buffer 8 bit',13,10,0
|
||||||
txt_err_n24b db 'need buffer 24 bit',13,10,0
|
txt_err_n24b db 'need buffer 24 bit',13,10,0
|
||||||
txt_err_n32b db 'need buffer 32 bit',13,10,0
|
txt_err_n32b db 'need buffer 32 bit',13,10,0
|
||||||
|
@ -27,6 +27,9 @@ proc buf_draw_buf, buf_struc:dword
|
|||||||
ret
|
ret
|
||||||
endp
|
endp
|
||||||
|
|
||||||
|
align 4
|
||||||
|
txt_err_size_w16 db 'image width < 16 pixels',13,10,0
|
||||||
|
|
||||||
;input:
|
;input:
|
||||||
; ebx = coord x
|
; ebx = coord x
|
||||||
; ecx = coord y
|
; ecx = coord y
|
||||||
@ -948,10 +951,12 @@ proc buf_convert_text_matrix, buf_struc:dword
|
|||||||
pushad
|
pushad
|
||||||
mov edi,dword[buf_struc]
|
mov edi,dword[buf_struc]
|
||||||
cmp buf2d_bits,8
|
cmp buf2d_bits,8
|
||||||
jne .error
|
jne .error0
|
||||||
mov ecx,buf2d_h
|
mov ecx,buf2d_h
|
||||||
mov ebx,ecx
|
mov ebx,ecx
|
||||||
shr ebx,4 ;¯à¥¤¯®« £ ¥¬ çâ® ¢ ¡ãä¥à¥ 16 áâப á ᨬ¢®« ¬¨, ¯®â®¬ã ¤¥«¨¬ 2^4
|
shr ebx,4 ;¯à¥¤¯®« £ ¥¬ çâ® ¢ ¡ãä¥à¥ 16 áâப á ᨬ¢®« ¬¨, ¯®â®¬ã ¤¥«¨¬ 2^4
|
||||||
|
or ebx,ebx
|
||||||
|
jz .error1
|
||||||
mov edx,buf2d_w
|
mov edx,buf2d_w
|
||||||
imul ecx,edx ;ecx = size 8 b
|
imul ecx,edx ;ecx = size 8 b
|
||||||
invoke mem.alloc,ecx ;¢ë¤¥«ï¥¬ ¢à¥¬¥ãî ¯ ¬ïâì
|
invoke mem.alloc,ecx ;¢ë¤¥«ï¥¬ ¢à¥¬¥ãî ¯ ¬ïâì
|
||||||
@ -1006,8 +1011,11 @@ proc buf_convert_text_matrix, buf_struc:dword
|
|||||||
rep movsb
|
rep movsb
|
||||||
invoke mem.free,[tmp_mem] ;ç¨á⨬ ¢à¥¬¥ãî ¯ ¬ïâì
|
invoke mem.free,[tmp_mem] ;ç¨á⨬ ¢à¥¬¥ãî ¯ ¬ïâì
|
||||||
jmp .end_conv
|
jmp .end_conv
|
||||||
.error:
|
.error0:
|
||||||
stdcall print_err,sz_buf2d_convert_text_matrix,txt_err_n8b
|
stdcall print_err,sz_buf2d_convert_text_matrix,txt_err_n8b
|
||||||
|
jmp .end_conv
|
||||||
|
.error1:
|
||||||
|
stdcall print_err,sz_buf2d_convert_text_matrix,txt_err_size_w16
|
||||||
.end_conv:
|
.end_conv:
|
||||||
popad
|
popad
|
||||||
ret
|
ret
|
||||||
|
Loading…
Reference in New Issue
Block a user