home *** CD-ROM | disk | FTP | other *** search
/ Collection of Hack-Phreak Scene Programs / cleanhpvac.zip / cleanhpvac / FNTPAK32.ZIP / BASIC.EXE / FONT_PAK.INC < prev    next >
Text File  |  1995-08-16  |  5KB  |  150 lines

  1.  
  2. '========================================================== Font_Pak.Inc
  3. '
  4. '  INCLUDE FILE declaring Font Pak SUBs and FUNCTIONs.
  5. '
  6. '  IMPORTANT:  Except for two cases, pass ALL parameters by VALUE.
  7. '
  8. '    One exception is rsButtonPressed.  Pass Row and Column by
  9. '    reference so we can update them and return them to you.
  10. '
  11. '    Exception #2 is function LoadFontFile in Ondisk.BAS.
  12. '    Syntax:  ErrorCode = LoadFontFile (FontFile$, Block%)
  13. '
  14. '  NOTE:  Below we declare each Font Pak routine.  We also describe
  15. '         which OBJ file contains that routine.
  16. '
  17. '         * These OBJ files are sent to REGISTERED users.
  18. '
  19. '         * SHAREWARE users receive Font_Pak.Obj (PowerBASIC: FontPakP.Obj)
  20. '           which includes trial versions of ALL routines mentioned below.
  21. '
  22. '========================================================== Font_Pak.Inc
  23.  
  24. DEFINT A-Z              '======== ALL numeric parameters must be integers.
  25.  
  26. '================================= for SHAREWARE versions only
  27.  
  28. DECLARE SUB fpInitialize ()            '...display shareware reminder
  29.  
  30.  
  31. '================================= Sample declarations for CALLable fonts
  32.  
  33. ' Edit these to declare callable OBJ fonts YOU create using Font2Asm.
  34.  
  35. DECLARE SUB Hollow9 (BYVAL Block%)       '...NOTE BYVAL !!!
  36. DECLARE SUB Script1 (BYVAL Block%)       '...NOTE BYVAL !!!
  37. DECLARE SUB Frazzle (BYVAL Block%)       '...NOTE BYVAL !!!
  38.  
  39. '================================= Video-related SUBs  (Video.Obj)
  40.  
  41. ' determine type of monitor in use.  returns : : :
  42. '   0 = None (no monitor)   1 = Monochrome
  43. '   3 = Color (CGA)         4 = EGA (or MultiSync)
  44. '   7 = VGA Monochrome      8 = VGA Color (or MultiSync)
  45.  
  46. DECLARE FUNCTION GetMonitor% ()
  47.  
  48. ' select brite backgrounds or blinking
  49. DECLARE SUB BrightBG (BYVAL OnOff%)
  50.  
  51. ' switch color palettes to achieve bright backgrounds, preserve blinking colors
  52. DECLARE SUB DefaultPalette (BYVAL Which%)
  53.  
  54. ' select dark blue background, preserve blinking -- a subset of DefaultPalette
  55. DECLARE SUB DarkBlue ()
  56.  
  57. ' set the maximum # of lines on the screen -- based on the size
  58. ' of the font you're loading.
  59.  
  60. DECLARE Function SETMAXLINES(Byval FontHeight%)
  61.  
  62. ' If you change # of lines beyond the normal 25, 43 or 50, your compiler
  63. ' may protest if you try to print or "locate" beyond 25/43/50.  The next 2
  64. ' routines can help overcome these limitations.
  65.  
  66. DECLARE SUB  WRITECHAR    (Byval Row%, Byval Col%, Byval AscCode%, Byval Colr%)
  67. DECLARE SUB  SETCURSORPOS (Byval Row%, Byval Col%)
  68.  
  69.  
  70. '================================= Text-mode Font-related SUBs (Fonts.Obj)
  71.  
  72. ' select 1 or 2 blocks to turn on font(s) you loaded into these blocks
  73. DECLARE SUB rsWhichFonts (BYVAL LoIntensity%, BYVAL HiIntensity%)
  74.  
  75. ' pre-load font blocks, or restore default font
  76. DECLARE SUB rsLoadDefault (BYVAL WhichSize&, BYVAL Block%)
  77.  
  78. ' called by ONDISK... routines, help load font from disk, or a transformed one
  79. DECLARE SUB rsLoadFont (BYVAL bufSeg%, BYVAL bufAddr%, BYVAL Block%, BYVAL NumChars%, BYVAL FontHeight%, BYVAL FirstChar%)
  80.  
  81. '================================= To load fonts from disk (Ondisk_?.Bas)
  82.  
  83. DECLARE FUNCTION LoadFontFile (FontFile$, Block)
  84.  
  85.  
  86. '================================= Mouse-related SUBs (Mouse.Obj)
  87.  
  88. ' initialze the mouse, see if there is one
  89. DECLARE FUNCTION rsThereIsAMouse% ()
  90.  
  91. ' hide or display mouse cursor
  92. DECLARE SUB rsHidecursor ()
  93. DECLARE SUB rsShowcursor ()
  94.  
  95. ' rsButtonPressed returns which mouse button was pressed, and if so, where.
  96. '
  97. '  - NOTE: Row and Column MUST be passed by reference so we can return them.
  98. '
  99. '  - GFXorText:  Pass 0 to get text mode Row/Col,
  100. '                or  -1 to get graphics mode pixel coordinates
  101. '
  102. '  - returns which button was pressed:  0 (none) 1 (left) 2(right)
  103. '                                       3 (both) 4 (middle)
  104.  
  105. DECLARE FUNCTION rsButtonPressed (MouseRow, MouseCol, BYVAL GFXorText%)
  106.  
  107.  
  108. '================================== Text-mode Symbols (LdSymbol.Obj)
  109.  
  110. ' To select the 1- or 2-byte symbols or icons.  Also see
  111. ' rsLoadMouseCursor which contains other 1-byte shapes which
  112. ' may be used as symbols/icons.
  113.  
  114. DECLARE SUB rsLoadSymbol (BYVAL Block%, BYVAL WhichShape%, BYVAL ASCIICode%)
  115.  
  116. DECLARE FUNCTION Num16Symbols% ()
  117.  
  118.  
  119. '================================== TEXT-mode mouse shapes  (LdMouse.Obj)
  120.  
  121. ' To select the ASCII char to be used as mouse cursor shape.
  122. ' Also select the colors of mouse cursor.
  123.  
  124. DECLARE SUB rsSetTextCursor (BYVAL ForeGround%, BYVAL BackGround%, BYVAL AsciiChar%)
  125. DECLARE SUB rsSetTextCursorC (BYVAL AsciiChar%)
  126.  
  127. ' To select a mouse cursor shape from our library of shapes: 8x16 or 8x8
  128. DECLARE SUB rsLoadMouseCursor (BYVAL Block%, BYVAL WhichShape%, BYVAL ASCIICode%)
  129. DECLARE SUB rsLoadMouse8 (BYVAL Block%, BYVAL WhichShape%, BYVAL ASCIICode%)
  130.  
  131. ' determine how many 16- and 8-point mouse shapes are in our library
  132. DECLARE FUNCTION Num16Shapes% ()
  133. DECLARE FUNCTION Num8Shapes% ()
  134.  
  135. '================================== GRAPHICS-mode mouse shapes (LdGFXCur.Obj)
  136.  
  137. DECLARE SUB rsLoadGFXCursor (BYVAL Which%, BYVAL XHotSpot%, BYVAL YHotSpot%)
  138. DECLARE FUNCTION NumGFXShapes% ()
  139.  
  140.  
  141. '============================== Graphics-mode Font-related SUBs (GFXFont.Obj)
  142.  
  143. ' in EGA/VGA graphics modes ONLY, select the 8-, 14- or 16-point font,
  144. ' or restore the default font
  145.  
  146. DECLARE SUB GFXFont08 ()
  147. DECLARE SUB GFXFont14 ()
  148. DECLARE SUB GFXFont16 ()
  149.  
  150.