kolibrios-gitea/programs/demos/bgitest/trunk/read_rus.txt
heavyiron 630234432f Changed structure of svn repository
git-svn-id: svn://kolibrios.org@109 a494cfbc-eb01-0410-851d-a64ba20cac60
2006-07-28 13:39:16 +00:00

150 lines
7.1 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

BGIFONT.INC v1.0 beta for MenuetOS
Œ®¤ã«ì ¤«ï à ¡®âë á ¢¥ªâ®à­ë¬¨ èà¨äâ ¬¨ ä®à¬ â  BGI
<20> ¯¨á ­ ­  ç¨á⮬  áᥬ¡«¥à¥ ˆ¢ã誨­ë¬ €­¤à¥¥¬ aka Willow
­ áâ®ï饥 ¢à¥¬ï ®¯¥à æ¨®­­ ï á¨á⥬  Menuet ®¡« ¤ ¥â áªã¤­ë¬¨ á।á⢠¬¨
®â®¡à ¦¥­¨ï ᨬ¢®«®¢. ¤¨áâਡã⨢¥ ¨¬¥îâáï 2 à áâ஢ëå èà¨äâ  (ä ©«ë CHAR.MT ¨
CHAR2.MT). <20> ¡®â  á ­¨¬¨ ¦¥á⪮ § è¨â  ¢ ï¤à¥. Ž¯à¥¤¥«¥­­ë¥ ãᨫ¨ï ¯® ¢­¥¤à¥­¨î
¬ áèâ ¡¨à㥬ëå èà¨ä⮢ TTF-¯®¤®¡­®£® ä®à¬ â  ¯à¥¤¯à¨­¨¬ ¥â Jarek Pelczar, ®¤­ ª®
£à®¬®§¤ª ï MenuetOS C Library ­¥ ¯®«ã稫  ¤® á¨å ¯®à ¡®«ì让 ¯®¯ã«ïà­®á⨠¢
 áᥬ¡«¥à­®© Ž‘. <20>®«£ à᪮© ª®¬ ­¤®© Menuet ¤¥« «¨áì ¯®¯ë⪨ ¢áâநâì ¢ ï¤à®
âà¥â¨© ¬ áèâ ¡¨àã¥¬ë© èà¨äâ, ­®, ­ áª®«ìª® ¬­¥ ¨§¢¥áâ­®, ¥£® ᨬ¢®«ë ­ å®¤ïâáï ¢
áâ ¤¨¨ ¤¨§ ©­ . ’ ª¨¬ ®¡à §®¬, ࠧࠡ®âª  ¡®«£ à ¯®ª  ­¥ ¯à¥¤áâ ¢«ï¥â 業­®áâ¨
¤«ï à冷¢ëå ¯®«ì§®¢ â¥«¥©. Žç¥¢¨¤­®, çâ® ¬ áèâ ¡¨àã¥¬ë¥ èà¨äâë ¯®¬®£ãâ
ࠧࠡ®âª¥ â ª¨å ¢ ¦­ëå ª â¥£®à¨© ¯à®£à ¬¬­ëå ¯à®¤ãªâ®¢, ª ª ¡à ã§¥àë ¨
⥪áâ®¢ë¥ ¯à®æ¥áá®àë, £¤¥ ¡®«ìèãî à®«ì ¨£à ¥â ä®à¬ â¨à®¢ ­¨¥ ᨬ¢®«®¢.
<20>।áâ ¢«ïî ¢ ®¡é¥á⢥­­®¥ ¯®«ì§®¢ ­¨¥ ¢ª«îç ¥¬ë© ä ©« BGIFONT.INC ¤«ï à ¡®âë á
¢¥ªâ®à­ë¬¨ èà¨äâ ¬¨ *.CHR, ࠧࠡ®â ­­ë¥ §­ ¬¥­¨â®© ä¨à¬®© Borland ¤«ï
¨á¯®«ì§®¢ ­¨ï ¢ ª®¬¯¨«ïâ®à å Turbo Pascal, Turbo C ¨ Borland C++ ¥é¥ ¢ á।¥ MS-
DOS. Š ᮦ «¥­¨î, ¯®ª  çâ® ¬­¥ ­¥ 㤠¥âáï ®¡¥á¯¥ç¨âì ¯®¤¤¥à¦ªã BGI-èà¨ä⮢ ­ 
ã஢­¥ ï¤à  - ­ã¦­® £«ã¡¦¥ ¨§ãç âì ­î ­áë à á¯à¥¤¥«¥­¨ï ¯ ¬ï⨠¨ ¢ë§®¢ 
á¨á⥬­ëå ä㭪権. Ÿ ­ ¤¥îáì, çâ® á¨á⥬騪¨ Menuet á £®â®¢­®áâìî ¬­¥ ¯®¬®£ãâ.
Š®¬¯¨«ïæ¨ï ¬®¤ã«ï ¢ á®áâ ¢¥ ï¤à  ¯à¥¤¯®« £ ¥âáï á ¨á¯®«ì§®¢ ­¨¥¬ ª®­áâ ­âë
BGI_LEVEL equ KERNEL. <20>« £®¤ àï ãá«®¢­®© ª®¬¯¨«ï樨 ¬®¤ã«ì ¬®¦­® ¡ã¤¥â
¨á¯®«ì§®¢ âì á ­¥§­ ç¨â¥«ì­ë¬¨ ¨§¬¥­¥­¨ï¬¨ ­  ã஢­¥ ª ª ï¤à , â ª ¨ ¯à¨«®¦¥­¨ï.
<EFBFBD>¨¦¥¨§«®¦¥­­®¥ ª á ¥âáï à ¡®âë ¬®¤ã«ï ­  ã஢­¥ ¯à¨«®¦¥­¨ï.
BGI-èà¨äâë ¬®£ãâ à á¯®« £ âìáï ¢ «î¡®¬ ª â «®£¥ HD ¨«¨ RD. ˆå ¯®¨áª
®áãé¥á⢫ï¥âáï ¯® §­ ç¥­¨î ª®­áâ ­âë BGI_PATH. …᫨ ª®­áâ ­â  BGI_WINDOW_CLIP
ãáâ ­®¢«¥­  ¢ 1, ¯à®æ¥¤ãà ¬¨ ¬®¤ã«ï ¢ ¯à®æ¥áᥠ¢ë¢®¤  ¢¥ªâ®à®¢ èà¨äâ 
®áãé¥á⢫ï¥âáï ¯à®¢¥àª  ¢ë室  §  £à ­¨æë ®ª­ , çâ®¡ë ¨§¡¥¦ âì  àâ¥ä ªâ®¢.
ˆá¯®«ì§ã©â¥ íâ®, ¥á«¨ ¢ë ­¥ 㢥७ë, çâ® ­ ¤¯¨á¨ ¡ã¤ãâ ¯®¬¥é âìáï ¢ ®ª­¥.
í⮬ á«ãç ¥ ­¥®¡å®¤¨¬® ¤®¯®«­¨â¥«ì­® ®¯à¥¤¥«¨âì ª®­áâ ­âã BGI_PRC_INFO -  ¤à¥á
¢ ¯ ¬ï⨠(1024 ¡ ©â ), ªã¤  ¯à¨«®¦¥­¨¥ ¬®¦¥â ¯®«ãç âì ¨­ä®à¬ æ¨î ® ᢮¥¬ ®ª­¥
ç¥à¥§ 9-î á¨á⥬­ãî äã­ªæ¨î. ‚ᥠ¯à®æ¥¤ãàë ¬®¤ã«ï BGIFONT.INC ®¡ê¥­ë ª ª
¬ ªà®áë, â.¥. ¢ë§ë¢ îâáï ¡¥§ call. „«ï § £à㧪¨ 11 èà¨ä⮢ ¢  ¤à¥á­®¥
¯à®áâà ­á⢮ ¯à¨«®¦¥­¨ï ­¥®¡å®¤¨¬ ­¥¯à¥àë¢­ë© ãç á⮪ à §¬¥à®¬ ®ª®«® 120 ª¡.
<EFBFBD>ਠ§ £à㧪¥ ®áãé¥á⢫ï¥âáï ¯¥à¥¬¥é¥­¨¥ ¤ ­­ëå á 楫ìî íª®­®¬¨¨ ¯ ¬ïâ¨. ‘奬 
à §¬¥é¥­¨ï èà¨ä⮢:
| ‘ç¥â稪 | | ‘âàãªâãà | |„ ­­ë¥| |‘âàãªâãà | | „ ­­ë¥| |‘âàãªâãà |
| èà¨ä⮢ | | BGIrec | |èà¨äâ | | BGIrec | | èà¨äâ | | BGIrec | ...
| (1 ¡ ©â)| | | | | |
| ------------->------ -------------->----- ----------
- á ááë« ¥âáï [BGIfont_Ptr]
<20>®«ï áâàãªâãàë BGIrec ¨¬¥îâ á«¥¤ãî饥 ­ §­ ç¥­¨¥:
+00 dword .FontName ç¥âëà¥å¡ãª¢¥­­®¥ ¨¬ï èà¨äâ 
+04 byte .CharsCount ª®«¨ç¥á⢮ ᨬ¢®«®¢ ¢ èà¨äâ¥
+05 byte .FirstChar ª®¤ ¯¥à¢®£® ॠ«¨§®¢ ­­®£® ᨬ¢®« 
+06 byte .UpperMargin ¢¥àå­ïï £à ­¨æ  ᨬ¢®« 
+07 byte .LowerMargin ­¨¦­ïï £à ­¨æ  ᨬ¢®« 
+08 dword .Widths ᬥ饭¨¥ ¬ áᨢ  è¨à¨­ ᨬ¢®«®¢
+12 dword .FirstData ᬥ饭¨¥ â ¡«¨æë ¢¥ªâ®à®¢
+16 dword .EOF 㪠§ â¥«ì ­  á«¥¤ãî騩 BGIrec
+20 dword .font_data §¤¥áì ­ ç¨­ îâáï ¤ ­­ë¥ èà¨äâ 
‘®¡á⢥­­® § £à㧪㠨 ¢¥à¨ä¨ª æ¨î èà¨äâ  ®áãé¥á⢫ï¥â ¯à®æ¥¤ãà 
BGIfont_Prepare.
BGIfont_Prepare
¢å®¤: EDX - ç¥âëà¥å¡ãª¢¥­­®¥ ¨¬ï èà¨äâ , ¯®¤«¥¦ é¥£® § £à㧪¥. „®«¦­®
ᮢ¯ ¤ âì á ¨¬¥­¥¬ ä ©«  èà¨äâ  (¡¥§ à áè¨à¥­¨ï)
EDI -  ¤à¥á ãç á⪠ ¯ ¬ïâ¨, ªã¤  á«¥¤ã¥â ¯®¬¥áâ¨âì ¤ ­­ë¥ èà¨äâ .
ˆá¯®«ì§ã¥âáï ⮫쪮 ¯à¨ § £à㧪¥ ¯¥à¢®£® èà¨äâ . <20>â® §­ ç¥­¨¥
§ ­®á¨âáï ¢ [BGIfont_Ptr]
¢ë室: EAX=0, ¥á«¨ ¯à®¨§®è«  ®è¨¡ª , ¨­ ç¥ ¢ EAX - ¨¤¥­â¨ä¨ª â®à (ID)
§ £à㦥­­®£® èà¨äâ . ‚¯®á«¥¤á⢨¨ ID ¬®¦­® ¯®«ãç¨âì äã­ªæ¨ï¬¨
BGIfont_GetID ¨ BGIfont_GetName.
„«ï ¥¤¨­®¢à¥¬¥­­®© § £à㧪¨ ­¥áª®«ìª¨å èà¨ä⮢ ¬®¦­® ¨á¯®«ì§®¢ âì ¯à®æ¥¤ãàã
BGIfont_Init.
BGIfont_Init
¢å®¤: ESI - 㪠§ â¥«ì ­  ᯨ᮪ ¨¬¥­ èà¨ä⮢ (­ ¯à¨¬¥à db 'TRIPSIMPEURO')
ECX - ª®«¨ç¥á⢮ èà¨ä⮢ ¤«ï § £à㧪¨
EDI - á¬. BGIfont_Prepare
¢ë室: ­¨ç¥£®.
„«ï § £à㧪¨ 10 áâ ­¤ àâ­ëå èà¨ä⮢ ¢ ¬®¤ã«¥ ®¯à¥¤¥«¥­ ¬ áᨢ BGIfont_names
(¨á¯®«ì§®¢ ­¨¥ á¬. ¢ BGITEST).
楫ïå ᮢ¬¥á⨬®á⨠¨ ¯®á«¥¤ãî饣® ¢­¥¤à¥­¨ï ¢ ï¤à® ¬®¤ã«ì ¯à¥¤« £ ¥â 2
¯à®æ¥¤ãàë ¤«ï ¢ë¢®¤  ᨬ¢®«®¢ ¢¥ªâ®à­ë¬¨ èà¨äâ ¬¨. Ž¤­  ¨§ ­¨å ¨á¯®«ì§ã¥â
ॣ¨áâàë (¯®¤®¡­® 4-© á¨á⥬­®© ä㭪樨), ¤à㣠ï - áâàãªâãàã.
BGIfont_Outtext
¢å®¤: EAX - "â®çª  ®âáç¥â " ¯à¨ ¢ë¢®¤¥ áâப¨ [x] shl 16+[y]
ECX - 梥â ⥪áâ  ¨ à §¬¥à èà¨äâ  0xXYRRGGBB,
£¤¥ X - ID ¢¥ªâ®à­®£® èà¨äâ  (4..F),
Y - ¢¥«¨ç¨­  ᨬ¢®«®¢/4, ­ ¯à¨¬¥à 0x1 - 1/4 ®¡ëç­®£® à §¬¥à ,
0xC - âன­®© à §¬¥à.
EDX - 㪠§ â¥«ì ­  áâபã
ESI - ¤«¨­  áâப¨ + ä« £¨ ä®à¬ â¨à®¢ ­¨ï (á¬. ­¨¦¥). ”« £¨
BGI_ITALIC ¨ BGI_NODRAW ¨£­®à¨àãîâáï.
¢ë室: EAX - ª®®à¤¨­ âë ª®­æ  ­ ¤¯¨á¨ [x] shl 16+[y].
Š ª ¢¨¤¨¬, BGIfont_Outtext ¯® ᢮¨¬ ¯ à ¬¥âà ¬ á宦  á 4-© á¨á⥬­®© ä㭪樥©,
­® ¤®¯ã᪠¥â à áè¨à¥­­®¥ ã¯à ¢«¥­¨¥ ¢ë¢®¤®¬ ᨬ¢®«®¢.
<20> ¨¡®«¥¥ ¯®«­®¥ ¨á¯®«ì§®¢ ­¨¥ ¢¥ªâ®à­ëå èà¨ä⮢ ®¡¥á¯¥ç¨¢ ¥â äã­ªæ¨ï
BGIfont_Freetext. <20> à ¬¥âàë ¢ë¢®¤  áâப¨ ¯¥à¥¤ îâáï ¢ áâàãªâãॠBGIfree.
<20>®«ï áâàãªâãàë BGIfree ¨¬¥îâ á«¥¤ãî饥 ­ §­ ç¥­¨¥:
+00 dword ç¥âëà¥å¡ãª¢¥­­®¥ ¨¬ï èà¨äâ 
+04 dword "â®çª  ®âáç¥â " ¯à¨ ¢ë¢®¤¥ áâப¨ [x] shl 16+[y]
+08 dword 㣮« ¯®¢®à®â  (0 - £®à¨§®­â «ì, ®âáç¥â ¯® ç á®¢®© áâ५ª¥)
+12 dword ¬ áèâ ¡ ¯® ®á¨ X (§­ ç¥­¨¥ á ¯« ¢ î饩 â®çª®©!)
+16 dword ¬ áèâ ¡ ¯® ®á¨ Y (§­ ç¥­¨¥ á ¯« ¢ î饩 â®çª®©!)
+20 dword 㪠§ â¥«ì ­  áâபã
+24 dword ¤«¨­  áâப¨ <20>…‡ ä« £®¢ ä®à¬ â¨à®¢ ­¨ï
+28 dword 梥â ⥪áâ  0x00RRGGBB
+32 dword ä« £¨ ä®à¬ â¨à®¢ ­¨ï
Œ®¤ã«ì ®¯à¥¤¥«ï¥â á«¥¤ãî騥 ä« £¨ ä®à¬ â¨à®¢ ­¨ï:
BGI_NODRAW - ­¥ à¨á®¢ âì ᨬ¢®«ë
BGI_ITALIC - ªãàᨢ
BGI_BOLD - ¯®«ã¦¨à­ë© èà¨äâ
BGI_HALEFT - ¢ë஢­ïâì ¯® «¥¢®¬ã ªà î
BGI_HARIGHT - ¢ë஢­ïâì ¯® ¯à ¢®¬ã ªà î
BGI_HACENTER - ¢ë஢­ïâì ¯® 業âàã
BGI_VABOTTOM - ¢ë஢­ïâì ¯® ­¨¦­¥¬ã ªà î
BGI_VATOP - ¢ë஢­ïâì ¯® ¢¥àå­¥¬ã ªà î
BGI_VACENTER - ¢ë஢­ïâì ¯® á¥à¥¤¨­¥
Š®¬¡¨­ æ¨ï ä« £®¢ ®¡à §ã¥âáï ¨å á«®¦¥­¨¥¬ ¨«¨ ®¯¥à æ¨¥© OR.
BGIfont_Freetext
¢å®¤: EBX - 㪠§ â¥«ì ­  áâàãªâãàã BGIfree
¢ë室: EAX - ª®®à¤¨­ âë ª®­æ  ­ ¤¯¨á¨ [x] shl 16+[y].
”ã­ªæ¨ï BGIfont_GetID ¢®§¢à é ¥â ID èà¨äâ  ¯® § ¤ ­­®¬ã ¨¬¥­¨.
BGIfont_GetID
¢å®¤: EDX - ç¥âëà¥å¡ãª¢¥­­®¥ ¨¬ï èà¨äâ 
¢ë室: EAX - ID èà¨äâ 
EDI - 㪠§ â¥«ì ­  BGIrec èà¨äâ .
ˆá¯®«ì§®¢ ­¨¥ ä㭪権 ¬®¤ã«ï BGIFONT.INC ¤¥¬®­áâà¨àã¥â ¯à®£à ¬¬  BGITEST.
—â® ¥é¥ ­ã¦­® ᤥ« âì:
1. <20>ਠ¬­®¦¥á⢥­­®© § £à㧪¥ èà¨ä⮢ (ª ª ¢ BGITEST) ¨­®£¤  ¯à®ï¢«ï¥âáï
ª®¢ à­ë© ¡ £, ¯®àâï騩 ­¥áª®«ìª® ᨬ¢®«®¢. <20>ਠ¨§¬¥­¥­¨¨ ¯®à浪  § £à㧪¨
èà¨ä⮢ ®­ ¨á祧 ¥â... :-(
2. ˆá¯à ¢¨âì âà㤮¢®á¯à®¨§¢®¤¨¬ë© ¡ £ ¯à¨ ¤¢¨¦¥­¨¨ ¯® ᯨáªã èà¨ä⮢.
3. “ᮢ¥à襭á⢮¢ âì ¯à®à¨á®¢ªã ¯®«ã¦¨à­ëå èà¨ä⮢.
4. „®¡ ¢¨âì ä㭪樨 ¢ë¢®¤  ç¨á¥«.