forked from KolibriOS/kolibrios
Compare commits
4 Commits
ed2e074b9f
...
84c5a4400a
Author | SHA1 | Date | |
---|---|---|---|
84c5a4400a | |||
c0324e5907 | |||
415eaef8db | |||
4f08d0ad8b |
@ -315,7 +315,7 @@ end if
|
||||
int 0x10
|
||||
|
||||
if lang eq ru_RU
|
||||
; Load & set russian VGA font (RU.INC)
|
||||
; Load & set Russian VGA font 'bootfont-ru_RU'
|
||||
mov bp, RU_FNT1 ; RU_FNT1 - First part
|
||||
mov bx, 1000h ; 768 bytes
|
||||
mov cx, 30h ; 48 symbols
|
||||
@ -329,8 +329,8 @@ if lang eq ru_RU
|
||||
mov dx, 0E0h ; 224 - position of first symbol
|
||||
mov ax, 1100h
|
||||
int 10h
|
||||
; End set VGA russian font
|
||||
else if lang eq et_EE
|
||||
; Load & set Estonian VGA font 'bootfont-et_EE'
|
||||
mov bp, ET_FNT ; ET_FNT1
|
||||
mov bx, 1000h ;
|
||||
mov cx, 255 ; 256 symbols
|
||||
|
@ -24,24 +24,25 @@ org 0
|
||||
; struct kernel_header
|
||||
jmp start_of_code ; jump
|
||||
db 'KolibriOS ' ; signature
|
||||
db 'v0.7.7.0 ',13,10,13,10,0 ; version
|
||||
db 'v0.7.7.0 ',13,10,13,10,0 ; FIXME: get distribution version from git tag
|
||||
dd B32-KERNEL_BASE ; offset of the kernel's 32-bit entry point
|
||||
|
||||
include "boot/bootstr.inc" ; language-independent boot messages
|
||||
include "boot/preboot.inc"
|
||||
|
||||
; Language support for locales: de_DE, es_ES, ru_RU (CP866), et_EE, en_US.
|
||||
if lang eq de_DE
|
||||
include "boot/bootge.inc" ; german system boot messages
|
||||
include "boot/bootstr-de_DE.inc" ; German system boot messages
|
||||
else if lang eq es_ES
|
||||
include "boot/bootsp.inc" ; spanish system boot messages
|
||||
include "boot/bootstr-es_ES.inc" ; Spanish system boot messages
|
||||
else if lang eq ru_RU
|
||||
include "boot/bootru.inc" ; russian system boot messages
|
||||
include "boot/ru.inc" ; Russian font
|
||||
include "boot/bootstr-ru_RU.inc" ; Russian system boot messages
|
||||
include "boot/bootfont-ru_RU.inc" ; Russian font
|
||||
else if lang eq et_EE
|
||||
include "boot/bootet.inc" ; estonian system boot messages
|
||||
include "boot/et.inc" ; Estonian font
|
||||
include "boot/bootstr-et_EE.inc" ; Estonian system boot messages
|
||||
include "boot/bootfont-et_EE.inc" ; Estonian font
|
||||
else
|
||||
include "boot/booten.inc" ; english system boot messages
|
||||
include "boot/bootstr-en_US.inc" ; English system boot messages (default)
|
||||
end if
|
||||
|
||||
include "boot/bootcode.inc" ; 16 bit system boot code
|
||||
|
@ -45,6 +45,7 @@ keymap_alt:
|
||||
db 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
|
||||
|
||||
|
||||
; Language support for locales: ru_RU (UTF-8), es_ES (data32sp.inc), et_EE (data32et.inc), en_US.
|
||||
|
||||
if lang eq ru_RU
|
||||
boot_initirq cp866 'Инициализация IRQ',0
|
||||
@ -92,7 +93,7 @@ else if lang eq es_ES
|
||||
include 'data32sp.inc'
|
||||
else if lang eq et_EE
|
||||
include 'data32et.inc'
|
||||
else
|
||||
else ; Default to en_US
|
||||
boot_initirq db 'Initialize IRQ',0
|
||||
boot_picinit db 'Initialize PIC',0
|
||||
boot_v86machine db 'Initialize system V86 machine',0
|
||||
@ -198,27 +199,27 @@ MIN_DEFAULT_DLL_ADDR = 0x70000000
|
||||
dll_cur_addr dd MIN_DEFAULT_DLL_ADDR
|
||||
|
||||
|
||||
if lang eq en_US
|
||||
if lang eq en_US ; English (American)
|
||||
SYSLANG = 1
|
||||
else if lang eq fi_FI
|
||||
else if lang eq fi_FI ; Finnish
|
||||
SYSLANG = 2
|
||||
else if lang eq de_DE
|
||||
else if lang eq de_DE ; German
|
||||
SYSLANG = 3
|
||||
else if lang eq ru_RU
|
||||
else if lang eq ru_RU ; Russian
|
||||
SYSLANG = 4
|
||||
else if lang eq fr_FR
|
||||
else if lang eq fr_FR ; French
|
||||
SYSLANG = 5
|
||||
else if lang eq et_EE
|
||||
else if lang eq et_EE ; Estonian
|
||||
SYSLANG = 6
|
||||
else if lang eq uk_UA
|
||||
else if lang eq uk_UA ; Ukrainian
|
||||
SYSLANG = 7
|
||||
else if lang eq it_IT
|
||||
else if lang eq it_IT ; Italian
|
||||
SYSLANG = 8
|
||||
else if lang eq nl_BE
|
||||
else if lang eq nl_BE ; Flemish
|
||||
SYSLANG = 9
|
||||
else if lang eq es_ES
|
||||
else if lang eq es_ES ; Spanish
|
||||
SYSLANG = 10
|
||||
else if lang eq ca_ES
|
||||
else if lang eq ca_ES ; Catalan
|
||||
SYSLANG = 11
|
||||
else
|
||||
display 'unsupported language specified',13,10
|
||||
|
@ -2288,7 +2288,7 @@ endg
|
||||
|
||||
iglobal
|
||||
version_inf:
|
||||
db 0,7,7,0 ; version 0.7.7.0
|
||||
db 0,7,7,0 ; FIXME: Get distribution version from git tag
|
||||
db 0
|
||||
.rev dd __REV__
|
||||
.size = $ - version_inf
|
||||
|
@ -347,12 +347,16 @@ no_signum_fill_r_y_copy:
|
||||
mov edx,[PointerToEditBufer]
|
||||
mov eax,[rectangular_shade_x]
|
||||
sub eax,[crossing_old_x]
|
||||
mov [edx],eax ;image.w
|
||||
mov dword[edx+4],1 ;type image
|
||||
mov [edx+8],eax ;image.w
|
||||
mov eax,[rectangular_shade_y]
|
||||
sub eax,[crossing_old_y]
|
||||
mov [edx+4],eax ;image.h
|
||||
mov dword[edx+8],24 ;bit in pixel
|
||||
add edx,12 ;copy image parametrs
|
||||
mov [edx+12],eax ;image.h
|
||||
mov dword[edx+16],24 ;bit in pixel
|
||||
xor eax,eax
|
||||
mov dword[edx+20],eax ;palette
|
||||
mov dword[edx+24],eax ;palette size
|
||||
add edx,28 ;copy image parametrs
|
||||
mov [y],edi
|
||||
|
||||
loop_fill_rectangle_y_copy:
|
||||
@ -385,8 +389,14 @@ loop_fill_rectangle_x_copy:
|
||||
cmp eax,[rectangular_shade_y]
|
||||
jl loop_fill_rectangle_y_copy
|
||||
|
||||
;...todo use system buffer...
|
||||
;mcall SF_CLIPBOARD,SSF_WRITE_CB,,[PointerToEditBufer]
|
||||
;use system buffer
|
||||
mov edx,[PointerToEditBufer]
|
||||
mov ecx,[edx+8] ;image.w
|
||||
imul ecx,[edx+12] ;image.h
|
||||
lea ecx,[ecx+ecx*2]
|
||||
add ecx,28
|
||||
mov [edx],ecx ;buffer size
|
||||
mcall SF_CLIPBOARD,SSF_WRITE_CB
|
||||
|
||||
call MovePictureToWorkScreen
|
||||
mov [DrawSprite_flag],1
|
||||
@ -397,6 +407,10 @@ no_copy:
|
||||
cmp [number_menu],4
|
||||
jne no_paste
|
||||
|
||||
call ReadCB_Img
|
||||
or eax,eax
|
||||
jz no_paste
|
||||
|
||||
mov eax,[crossing_old_x]
|
||||
mov ebx,[crossing_old_y]
|
||||
|
||||
@ -445,15 +459,15 @@ no_signum_fill_r_x_paste:
|
||||
|
||||
no_signum_fill_r_y_paste:
|
||||
mov edx,[PointerToEditBufer]
|
||||
cmp dword[edx+8],24
|
||||
cmp dword[edx+16],24 ;bit in pixel
|
||||
jne end_menu
|
||||
mov eax,[edx]
|
||||
mov eax,[edx+8] ;image.w
|
||||
add eax,[crossing_old_x]
|
||||
mov [paste_img_w],eax
|
||||
mov eax,[edx+4]
|
||||
mov eax,[edx+12] ;image.h
|
||||
add eax,[crossing_old_y]
|
||||
mov [paste_img_h],eax
|
||||
add edx,12 ;copy image parametrs
|
||||
add edx,28 ;copy image parametrs
|
||||
mov [y],edi
|
||||
|
||||
loop_fill_rectangle_y_paste:
|
||||
@ -479,6 +493,12 @@ loop_fill_rectangle_x_paste:
|
||||
mov [x],eax
|
||||
cmp eax,[rectangular_shade_x]
|
||||
jl loop_fill_rectangle_x_paste
|
||||
|
||||
sub eax,[paste_img_w]
|
||||
jge no_paste_data_x
|
||||
neg eax
|
||||
lea eax,[eax+eax*2]
|
||||
add edx,eax ;пропуск пикселей изображения которые не влазят в rectangle
|
||||
no_paste_data_x:
|
||||
|
||||
mov eax,[y]
|
||||
@ -637,3 +657,48 @@ end_menu:
|
||||
and [number_menu],0
|
||||
jmp still
|
||||
;---------------------------------------------------------------------
|
||||
;output:
|
||||
; eax - 0 если изображение не прочитано, 1 если успешно прочитано
|
||||
align 16
|
||||
proc ReadCB_Img uses ebx ecx edi esi
|
||||
mcall SF_CLIPBOARD,SSF_GET_SLOT_COUNT
|
||||
cmp eax,1
|
||||
jl .no_buf_r
|
||||
|
||||
mov esi,eax
|
||||
.cycle: ;обратный цикл по слотам
|
||||
dec esi ;номер текущего, проверяемого слота
|
||||
mcall SF_CLIPBOARD,SSF_READ_CB,esi
|
||||
cmp eax,1
|
||||
je .no_buf_r
|
||||
cmp eax,-1
|
||||
je .no_buf_r
|
||||
mov ecx,[eax]
|
||||
cmp ecx,1 ;size
|
||||
jl .no_buf_r
|
||||
cmp dword[eax+4],1 ;image
|
||||
je @f
|
||||
cmp esi,1
|
||||
jge .cycle ;если в буфере не изображение, а слотов в буфере несколько, пробуем перейти к верхнему слоту
|
||||
jmp .no_buf_r
|
||||
@@:
|
||||
cmp dword[eax+16],24 ;bit in pixel
|
||||
je @f
|
||||
cmp esi,1
|
||||
jge .cycle ;если в буфере не 24 битное изображение
|
||||
jmp .no_buf_r
|
||||
@@:
|
||||
;копирование изображения из системного буфера во внутренний
|
||||
mov edi,[PointerToEditBufer]
|
||||
mov esi,eax
|
||||
mov ecx,[eax]
|
||||
shr ecx,2
|
||||
rep movsd
|
||||
xor eax,eax
|
||||
inc eax
|
||||
jmp .end_f
|
||||
.no_buf_r:
|
||||
xor eax,eax
|
||||
.end_f:
|
||||
ret
|
||||
endp
|
Loading…
Reference in New Issue
Block a user