Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 2322 → Rev 2321

/kernel/branches/Kolibri-A/trunk/gui/font.inc
1,4 → 1,4
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
.;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;; Copyright (C) KolibriOS team 2004-2008. All rights reserved. ;;
;; Distributed under terms of the GNU General Public License ;;
131,8 → 131,6
pop eax ; << // Alver 22.06.2008 // <<
ret
 
diff10 "old font code size",dtext,$
 
;=====================================================
; NEW FONTS
;_____________________________________________________
141,7 → 139,7
align 8
sdsh_data:
 
include 'fonts/sd_data.asm'
include 'sdsh.inc'
 
sdsh_code:
 
154,15 → 152,6
; then dl = single char to write
; else edx= pointer to asciiz-string
 
draw_char:
; font test
; bl=y; bh=x
; dl=ascii
movzx eax, bh
movzx ebx, bl
movzx ecx, dl
xor edi, edi
mov ebp, edi
sdsh_draw_char:
; eax = left side X
170,9 → 159,7
; edi = color 0x0RRGGBB
; ebp = font@
; ecx = ascii, zero-extended to 32bits
push ecx
push edx
push ebp
push ecx, edx, ebp
shl ebp, 4
add ebp, sdsh_data.info
call ch_checkscreen
194,9 → 181,7
jnz .next_tick
.blank:
.exit:
pop ebp
pop edx
pop ecx
pop ebp, edx, ecx
ret
 
 
256,8 → 241,7
cmp dl, (sdsh_data.v13-sdsh_data.v9)
jae .gptick.4
mov esi, sdsh_data.v9
lea esi,[esi+edx*2]
add esi, edx ; 3-byte tickgroups .v9-12: 4 ticks each
lea esi,[esi+edx*2+edx] ; 3-byte tickgroups .v9-12: 4 ticks each
mov dh, 9
shr dl, 2
add dl, dh
373,18 → 357,18
mov ch, dl
and ch, 3
jz .moved
btc ecx, 8
btc ch, 0
jz .2
.1:
dec cl ; right turns (1 and 3)
and cl, 7
@@: btc ecx, 9 ; straight angle (3) ?
@@: btc ch, 1 ; straight angle (3) ?
jc .1
jmp .moved
.2:
inc cl ; left turn (2)
and cl, 7
btc ecx, 9 ; just to zero ah
btc ch, 1 ; just to zero ah
.moved:
call [.moves + ecx*4] ; go new way
call ch_putpixel
443,8 → 427,7
; ebx = y coordinate
; ebp -> font info
;!destroys ch, edx!
push eax
push ebx
push eax, ebx
mov ch, byte[CURRENT_TASK]
mov al, byte [ebp] ; char X-width
mov edx, [_display.width] ; screen X-size
453,10 → 436,10
add edx, eax
cmp ch, byte [edx]
jne .fail
movzx eax, byte [ebp]
moxzx eax, byte [ebp]
cmp ch, byte [edx+eax]
jne .fail
movzx ebx, byte [ebp+1]
moxzx ebx, byte [ebp+1]
imul ebx, [_display.width]
cmp ch, byte [edx+ebx]
jne .fail
467,8 → 450,7
.fail:
stc ; CF means the charbox is invisible
.done:
pop ebx
pop eax
pop ebx, eax
ret
 
align 4
485,5 → 467,5
ret
;)
 
 
diff10 "new font code size",sdsh_code,$
;diff16 "font code end ",0,$
diff10 "font code size",dtext,$
/kernel/branches/Kolibri-A/trunk/gui/fonts/sd_data.asm
10,19 → 10,17
{ dw (origin mod 32) shl 11 + (r mod 8) shl 8 + (tick mod 256) }
 
macro ritick x, y, tick
{ dw (x mod 16) shl 12 + (y mod 16) shl 8 + (tick mod 2) }
{ dw (x mod 16) shl 12 + (y mod 32) shl 8 + (tick mod 2) }
 
macro cstick x, y, r, tick
{ dw (x mod 16) shl 12 + (y mod 16) shl 8 + 0xC0 + (r mod 2) shl 2 + (tick mod 4) }
{ dw (x mod 16) shl 12 + (y mod 32) shl 8 + 0xC0 + (r mod 2) shl 2 + (tick mod 4) }
 
macro lntick x, y, r, len
{
if len in <2, 3, 4, 5, 6, 7>
dw ((x mod 16) shl 12 + (y mod 16) shl 8 + (r mod 4) shl 3 + len)
{ if len < 8
dw (x mod 16) shl 12 + (y mod 32) shl 8 + (rmod 4) shl 3 + len
else
dw ((x mod 16) shl 12 + (y mod 16) shl 8 + (r mod 4) shl 3 + ((len-8) mod 8) + 0xE0)
end if
}
dw (x mod 16) shl 12 + (y mod 32) shl 8 + (rmod 4) shl 3 + ((len-8) mod 8) + 0xE0
end if}
 
;align 8
;sdsh_data:
30,13 → 28,13
.numfonts db 2 ; number of system fonts
.numsptks db 32 ; number of special ticks
.numticks dw ? ; total number of ticks
;.sp_ticks dd .special_ticks ; special table
.sp_ticks dd .special_ticks ; special table
.ticktble dd .tick_table ; general table
;.pix4 db 34
;.pix5 db 42
;.pix6 db 50
;.pix7 db 58
;.pix8 db 66
.pix4 db 34
.pix5 db 42
.pix6 db 50
.pix7 db 58
.pix8 db 66
 
align 4
; ---- special tickfields ----
56,18 → 54,18
.fnt0.tab dd .table0 ; + 4
.fnt0.org dd .origs0 ; + 8
 
;align 16
;; System font #1: 7x10
;.fnt1.x db 7 ; X-width
;.fnt1.y db 9 ; Y-heigth
;.fnt1.rs dw 0 ; reserved
;.fnt1.tab dd .table1
;.fnt1.org dd .origs1
align 16
; System font #1: 7x10
.fnt1.x db 7 ; X-width
.fnt1.y db 9 ; Y-heigth
.fnt1.rs dw 0 ; reserved
.fnt1.tab dd .table1
.fnt1.org dd .origs1
 
align 4
.origs0:
db 0x00 ; zero
db 0x02 ; 1 s/7XæëÿW
db 0x02 ; 1 s/7Xæëÿ
db 0x05 ; 2 6W~ç
db 0x06 ; 3 ^*Sâú
db 0x08 ; 4 \ÆÚ
79,7 → 77,7
db 0x44 ; 10 *8B
db 0x03 ; 11 $
db 0x46 ; 12 vJVgæ
db 0x35 ; 13 5}ßìM
db 0x35 ; 13 5}ßì
db 0x15 ; 14 4
db 0x45 ; 15 9e
db 0x16 ; 16 abphinÛ
169,7 → 167,7
db 0, 0 ;83:
db 0, 0 ;84:
db 0, 0 ;85:
db 0, 0, 0, 0, 0, 0, 0, 0 ;86..89
times 4 (db 0, 0) ;86..89
.v9:
db 0, 0, 0 ;90:
db 0, 0, 0 ;91:
255,7 → 253,6
dw (.ch0_74 -.chars)*16 + 2 ; #74 J
dw (.ch0_75 -.chars)*16 + 3 ; #75 K
dw (.ch0_76 -.chars)*16 + 2 ; #76 L
dw (.ch0_77 -.chars)*16 + 3 ; #77 M
dw (.ch0_78 -.chars)*16 + 3 ; #78 N
dw (.ch0_79 -.chars)*16 + 2 ; #79 O
dw (.ch0_80 -.chars)*16 + 2 ; #80 P
418,13 → 415,12
dw (.ch0_240-.chars)*16 + 5 ; #240 ¨
dw (.ch0_241-.chars)*16 + 4 ; #241 ¸
times 14 dw 0 ; #242-255
diff10 "check font0 table size: ", .table0, $
 
; ----------------------------------------------------
align 4
.chars:
dw 0
.ch0_33: ; !
.ch0_33: !
ritick 2, 2, 0
lntick 2, 4, 2, 5
.ch0_34: ; "
433,7 → 429,7
lntick 3, 8, 2, 2
.ch0_36: ; $
lntick 2, 2, 2, 5
gptick 11, 0, 98
gptick 11, 0, v11_1
.ch0_37: ; %
cstick 0, 9, 0, 0
lntick 0, 3, 1, 5
475,7 → 471,7
.ch0_79: ; O
.ch0_142: ; Î
.ch0_81: ; Q
gptick 5, 4, 94
gptick 5, 4, v10_1
lntick 4, 4, 2, 4
lntick 3, 1, 0, 2
.ch0_49: ; 1
498,12 → 494,12
lntick 0, 4, 0, 5
lntick 3, 2, 2, 7
.ch0_54: ; 6
gptick 14, 0, 95
gptick 14, 0, v10_2
gptick 2, 0, 44
.ch0_56: ; 8
gptick 10, 6, 60
.ch0_57: ; 9
gptick 9, 0, 95
gptick 9, 0, v10_2
gptick 15, 0, 44
.ch0_60: ; <
gptick 7, 4, 74
528,7 → 524,7
.ch0_145: ; Ñ
ritick 5, 3, 0
.ch0_71: ; G
gptick 5, 4, 94
gptick 5, 4, v10_1
gptick 4, 5, 43
.ch0_68: ; D
gptick 9, 0, 74
560,7 → 556,7
lntick 0, 8, 0, 5
.ch0_77: ; M
.ch0_140: ; M
gptick 13, 2, 32
gptick 3, 5, 2, 32
ritick 1, 7, 0
.ch0_78: ; N
lntick 0, 2, 2, 7
571,7 → 567,7
.ch0_87: ; W
lntick 0, 3, 2, 6
lntick 4, 3, 2, 6
gptick 1, 1, 48
gptick 0, 2, 1, 48
.ch0_86: ; V
lntick 0, 7, 0, 2
lntick 4, 7, 0, 2
670,7 → 666,7
lntick 1, 2, 2, 5
gptick 21, 1, 32
.ch0_115: ; s
gptick 1, 0, 98
gptick 1, 0, v11_1
.ch0_116: ; t
gptick 16, 0, 43
gptick 20, 3, 32
974,7 → 970,6
lntick 2, 4, 0, 3
lntick 2, 0, 2, 4
 
diff10 "font0 size ", .chars, $
 
 
/kernel/branches/Kolibri-A/trunk/core/syscall.inc
133,7 → 133,7
dd stack_driver_stat ; 52-Stack driver status
dd cross_order ; 53-Socket interface
dd undefined_syscall ; 54-reserved
dd undefined_syscall ; sound_interface ; 55-Sound interface
dd sound_interface ; 55-Sound interface
dd undefined_syscall ; 56-reserved
dd sys_pcibios ; 57-PCI BIOS32
dd cross_order ; 58-Common file system interface
159,7 → 159,7
 
dd sys_rdmsr ; 0 = read MSR
dd sys_map1 ; 1 = get sys data (test only)
dd draw_char ; 2 = hew char (test)
dd paleholder ; 2
dd paleholder ; 3
dd paleholder ; 4
dd paleholder ; 5