changes in rtfread from Sorcerer

git-svn-id: svn://kolibrios.org@1195 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Evgeny Grechnikov (Diamond) 2009-10-04 12:45:50 +00:00
parent 373d7e9391
commit 00978e27e3

View File

@ -21,7 +21,7 @@ RENDER equ FREE
BGIFONT_PATH equ '/sys/fonts/' BGIFONT_PATH equ '/sys/fonts/'
FONT_NAME equ 'LITT' FONT_NAME equ 'LITT'
TOP =35 TOP =55
MODE equ RTF MODE equ RTF
INVALHEX equ 0 INVALHEX equ 0
RTF_COLORLESS equ 1 RTF_COLORLESS equ 1
@ -309,13 +309,6 @@ draw_window:
; 1 - ­ ç¨­ ¥¬ à¨á®¢ âì ; 1 - ­ ç¨­ ¥¬ à¨á®¢ âì
mcall 0, <10,WINW>, <100,WINH>, WIN_COLOR,0x805080D0, 0x005080D0 mcall 0, <10,WINW>, <100,WINH>, WIN_COLOR,0x805080D0, 0x005080D0
mcall 9,procinfo,-1
mov eax,[procinfo.box.left]
cmp eax,1
ja .temp12345
ret
.temp12345:
mcall 4, <8,8>, 0x10DDEEFF, title, titlesize-title mcall 4, <8,8>, 0x10DDEEFF, title, titlesize-title
mov esi,ecx mov esi,ecx
mcall 47,0x30000,isymImplemented,<114,8> mcall 47,0x30000,isymImplemented,<114,8>
@ -341,41 +334,63 @@ draw_window:
and [line_count],0 and [line_count],0
mov [HClick],-100 mov [HClick],-100
.nochg: .nochg:
sub ebx,60
shl ebx,16
mov bx,12 mcall 13,<5,dword[prcinfo+42]>,<21,21>,0x8000459a
mov ecx,5 shl 16+12
mov esi,0xb810e7 mcall 8,7*65536+39,23*65536+16,5,0x459a ;load
mov edx,2 mcall 8,46*65536+57,23*65536+16,4,0x459a ;align
BTN_SPACE equ 14 shl 16 mcall 8,103*65536+44,23*65536+16,3,0x459a ;color
mcall 8 ;2 mcall 8,147*65536+37,23*65536+16,2,0x459a ;help
sub ebx,BTN_SPACE
inc edx mcall 8,184*65536+44,23*65536+16,7,0x459a ;prev
mcall 8,,,,0x459a ;3 mcall 8,229*65536+46,23*65536+16,6,0x459a ;next
sub ebx,BTN_SPACE
inc edx if RENDER eq FREE
mcall ,,,,0x107a30 ;4 mcall 8,276*65536+44,23*65536+16,9,0x459a ;zoom+
sub ebx,BTN_SPACE mcall 8,320*65536+44,23*65536+16,8,0x459a ;zoom-
inc edx end if
mcall ,,,,0xcc0000 ;5
sub ebx,BTN_SPACE
inc edx
mcall ,,,,0x575f8c ;6
sub ebx,BTN_SPACE ; sub ebx,60
inc edx ; shl ebx,16
mcall ,,,,0x575f8c ;7 ; mov bx,12
if RENDER eq FREE ; mov ecx,5 shl 16+12
sub ebx,BTN_SPACE ; mov esi,0xb810e7
inc edx ; mov edx,2
mcall ,,,,0x6a73d0 ;8 ; BTN_SPACE equ 14 shl 16
sub ebx,BTN_SPACE ; mcall 8 ;2
inc edx ; sub ebx,BTN_SPACE
mcall ,,,,0xd048c8 ;9 ; inc edx
end if ; mcall 8,,,,0x459a ;3
shr ecx,16 ; sub ebx,BTN_SPACE
mov bx,cx ; inc edx
add ebx,3 shl 16+3 ; mcall ,,,,0x107a30 ;4
mcall 4,,0x10ddeeff,btn_text,btn_end-btn_text ; sub ebx,BTN_SPACE
; inc edx
; mcall ,,,,0xcc0000 ;5
; sub ebx,BTN_SPACE
; inc edx
; mcall ,,,,0x575f8c ;6
; sub ebx,BTN_SPACE
; inc edx
; mcall ,,,,0x575f8c ;7
; if RENDER eq FREE
; sub ebx,BTN_SPACE
; inc edx
; mcall ,,,,0x6a73d0 ;8
; sub ebx,BTN_SPACE
; inc edx
; mcall ,,,,0xd048c8 ;9
; end if
;text
; shr ecx,16
; mov bx,cx
; add ebx,3 shl 16+3
mcall 4,10*65536+27,0x10ddeeff,btn_text,btn_end-btn_text
sub dword[prcinfo+42],LMARGIN sub dword[prcinfo+42],LMARGIN
sub dword[prcinfo+46],CHARH sub dword[prcinfo+46],CHARH
if GUTTER eq 1 if GUTTER eq 1
@ -393,14 +408,14 @@ draw_window:
end if end if
mov ebx,dword[prcinfo+42] mov ebx,dword[prcinfo+42]
shl ebx,16 shl ebx,16
add ebx,7 shl 16+7 add ebx,2 shl 16+13
mov ecx,dword[prcinfo+46] mov ecx,dword[prcinfo+46]
add ecx,25 shl 16-25 add ecx,40 shl 16-35
mov edx,20+1 shl 29 mov edx,20+1 shl 29
mcall 8 mcall 8
mov ecx,[HClick] mov ecx,[HClick]
shl ecx,16 shl ecx,16
add ecx,6-3 shl 16 add ecx,6-3 shl 16 + 7
mcall 13,,,0xe26830 mcall 13,,,0xe26830
if MODE eq RTF if MODE eq RTF
test [mode],RTF_OPENING test [mode],RTF_OPENING
@ -480,13 +495,13 @@ end if
; ‚ë ¬®¦¥â¥ § ¤ âì ï§ëª ¢ MACROS.INC (lang fix ï§ëª) ; ‚ë ¬®¦¥â¥ § ¤ âì ï§ëª ¢ MACROS.INC (lang fix ï§ëª)
title: title:
db 'RTF READER v1. ( ):' db 'RTF Reader v1. ( ):'
titlesize: titlesize:
btn_text: btn_text:
if RENDER eq FREE db 'Load Aligment Color Help < >'
db '+ - ' if RENDER eq FREE
end if db ' Zoom+ Zoom- '
db '< > L A C H' end if
btn_end: btn_end:
attrinfo: attrinfo:
@ -522,7 +537,7 @@ fileinfo:
; db '/HD/1/RTF/texts/RELATION.RTF',0 ; db '/HD/1/RTF/texts/RELATION.RTF',0
; db '/HD/1/RTF/texts/PLANETS.RTF',0 ; db '/HD/1/RTF/texts/PLANETS.RTF',0
; db '/HD/1/RTF/texts/LOTRRUS.RTF',0 ; db '/HD/1/RTF/texts/LOTRRUS.RTF',0
db '/HD/1/RTF/texts/RULEBOOK.RTF',0 ; db '/HD/1/RTF/texts/RULEBOOK.RTF',0
; db '/HD/1/RTF/texts/RULEBK2.RTF',0 ; db '/HD/1/RTF/texts/RULEBK2.RTF',0
; db '/HD/1/RTF/texts/GLEB.RTF',0 ; db '/HD/1/RTF/texts/GLEB.RTF',0
; db '/HD/1/RTF/texts/DWG13_14.RTF',0 ; db '/HD/1/RTF/texts/DWG13_14.RTF',0