home *** CD-ROM | disk | FTP | other *** search
/ Collection of Hack-Phreak Scene Programs / cleanhpvac.zip / cleanhpvac / FNTPAK32.ZIP / BASIC.EXE / DEMO_SYM.BAS < prev    next >
BASIC Source File  |  1995-08-16  |  3KB  |  87 lines

  1. DEFINT A-Z
  2.  
  3. '$INCLUDE: 'Font_Pak.Inc'           '... For QB/PDS/VB-DOS
  4.  
  5. '======================================================== PowerBasic Users
  6. ''$INCLUDE "Font_Pak.Inc"             '... PB users, UN-REM these lines
  7.  
  8. ''$Link    "FontPakP.OBJ"             '... SHAREWARE users
  9.  
  10. ''$Link    "Video.OBJ"                '... REGISTERED users
  11. ''$Link    "Fonts.OBJ"
  12. ''$Link    "LDSymbol.OBJ"
  13.  
  14. '======================================================== PowerBasic Users
  15.  
  16. '============================================================ Demo_Sym.Bas
  17. '
  18. ' A Font Pak Demonstration         Copyright 1991-1994 Rob W. Smetana
  19. '
  20. ' Demonstrate using Font Pak's symbols/icons (and determine how many there are).
  21. '
  22. ' Requires:    Font_Pak.Lib (QB/PDS/VB-DOS) -or- Font_Pak.Pbl (PowerBasic)
  23. '              An EGA, VGA or compatible monitor.
  24. '
  25. '============================================================ Demo_Sym.Bas
  26.  
  27. '***********************************************************************
  28. ' Determine display type -- Must be EGA or VGA for demo.
  29. '***********************************************************************
  30. '
  31. ' GetMonitor Returns:
  32. '       0 => None             (no monitor?)   1 => Monochrome Display
  33. '       3 => Color Display    (CGA)           4 => EGA (or Multi-scan)
  34. '       7 => VGA Monochrome   (VGA mono)      8 => VGA Color (or Multi-scan)
  35. '***********************************************************************
  36.  
  37.     COLOR 7, 1: CLS
  38.  
  39.     CALL fpInitialize: CLS        '=== SHAREWARE versions ONLY
  40.  
  41.     IF GetMonitor < 4 THEN        '=== can't proceed unless EGA/VGA
  42.        PRINT "Sorry, this demo requires an EGA or VGA monitor.": END
  43.     END IF
  44.  
  45. ' We'll demonstrate these.  They're declared in Font_Pak.Inc.
  46. '     rsLoadSymbol (Block%, WhichSymbol%, AsciiCode%)
  47. '     Num16Symbols%()
  48.  
  49.     NumSymbols = Num16Symbols%
  50.  
  51.     PRINT "           Demonstrate how to select one of"; NumSymbols; "symbols (or icons)."
  52.     PRINT
  53.     PRINT "NOTE:  We'll show these 2 at a time - so you can see which require 2 characters."
  54.     PRINT "       Please read Font Pak's manual BEFORE trying to use symbols!"
  55.     PRINT
  56.     PRINT "                    Press <Enter> to move to the next shape."
  57.  
  58.     ' Loop until you press a key. Then change symbols
  59.  
  60.     AsciiCode = 192              '... re-map the shape of ASCII 192 & 193
  61.     WhichSymbol = 1              '... start with #1
  62.  
  63.     DO
  64.  
  65.          '... load the next one
  66.          CALL rsLoadSymbol(0, WhichSymbol, AsciiCode)
  67.          CALL rsLoadSymbol(0, WhichSymbol + 1, AsciiCode + 1)
  68.  
  69.          LOCATE 12, 25
  70.          PRINT "Here are symbols"; WhichSymbol; "and"; WhichSymbol + 1; " -->  └┴";
  71.  
  72.          '... wait for keypress
  73.          DO: LOOP WHILE LEN(INKEY$) '... flush kb buffer
  74.          DO: LOOP UNTIL LEN(INKEY$) '... get a key
  75.  
  76.          WhichSymbol = WhichSymbol + 2   '... displaying 2, so step by 2
  77.  
  78.     LOOP UNTIL WhichSymbol > NumSymbols
  79.  
  80.     SCREEN 0, 0, 0
  81.  
  82.     CLS
  83.  
  84.     PRINT "That's all . . ."
  85.  
  86.  
  87.