From: phbill@cyberden.uucp
Newsgroups: comp.sys.atari.8bit
Subject: DDIII viewer!
Date: Sun, 11 Oct 92 17:45:11 PDT
Organization: Indescribable Creations

; Here's an Action! program I peiced together from bits of my DDIII to
; TrueFont converter.  It prompts for a filename (you NEED the "D:"!) and
; proceeds to load that font onto the screen.  ONLY single file DDIII 
; fonts are allowed.. DDII fonts (like "TIMES" and "SCRIPT2") can't be
; loaded until they're saved with DDIII's font editor, which converts 
; them (I THINK).  
;
; If there's not enough space on the screen to load the font, the screen
; is scrolled.  The Procedure MyPlot isn't very efficient, so I turn off
; the screen during load/display, and turn it on for a split second 
; before it starts loading the next letter.  It works really nice, and
; once I perfect my Outliner, everyone'll be able to ROTATE and ENLARGE
; DDIII letters...  and eventually be able to use TrueFont: Print! to
; print out nifty documents!
;
; TF:Print! is not going to happen soon, but TF:Outline and TF:FontMan! 
; (the editor) should be out soon.. (possibly even before Crashman!, 
; because it's been put on the back burner.. I'm in the mood for 
; applications lately ;)  ...
; --------------------SNIP!------"DD3VIEWR.ACT":-------------------
; DDIII Font Viewer v0.0
; by Bill Kendrick
; (c) NBS 1992
 
Define EndIf="Fi", Begin="Do", End="Od"
Module
 Char Array ReadFile(255)
 Byte YLet
 Card Size,ScreenRAM,XLet
 
Proc Screen()
; Sets up draw screen
 Graphics(24)
 PokeC(709,3584)
 Poke(712,15)
 Color=1
Return ; Screen
 
 
Proc Prompt()
; Prompts user for file names
 Graphics(0)
 PokeC(709,3584)
 PokeC(82,9984)
 PrintE("   DDIII Font Viewer  v.0.0")
 PrintE("By Bill Kendrick, (c) NBS 1992")
 PutE()
 PrintE("DDIII fonts only, DDII NOT recognized!")
 PutE()
 PrintE("Enter DDIII file to load ('.NLQ')")
 InputS(ReadFile)
 PutE()
Return ; Prompt
 
 
Proc MyPlot(Byte PosDown,PosAcross,Data,
 Respect)
; Does a wide poke
Byte Total,Across
 Color=1
 Total=128
 For Across=0 To 7 Begin
  If Data>=Total Then
   Data==-Total
   Plot(PosDown+XLet,
    Across*2+PosAcross*16+Respect+1+YLet)
  Fi
  Total=Total/2
 End ; Next Across
Return ; MyPoke
 
 
Proc Read()
; Reads DDIII font and displays
Byte Width,BTemp,Height,Data,Pass,
 BTempH,PassWidth
Card SAcross,SDown,CTemp
 Width=GetD(2)
 If Width<64 Then
  Height=0
 Else
  Width=Width-64
  Height=1
 EndIf
 Poke(559,0)
 For BTempH=0 To Height Begin
  For BTemp=1 To Width Begin
   Data=GetD(2)
   MyPlot(BTemp,BTempH,Data,0)
  End ; Next BTemp
  For BTemp=1 To Width Begin
   Data=GetD(2)
   MyPlot(BTemp,BTempH,Data,1)
  End ; Next BTemp
 End ; Next BTempH
 Poke(559,34)
 XLet==+Width+1
 If XLet>288 Then
  XLet=0
  YLet==+33
  If YLet>191-33 Then
   MoveBlock(ScreenRAM,ScreenRAM+1320,6360)
   SetBlock(ScreenRAM+6360,1320,0)
   YLet==-33
  EndIf
 EndIf
 For CTemp=0 To 5000 Begin End ; Next BTemp
Return ; Read
 
 
Proc Main()
; DDIII Font Viewer v0.0
Byte BTemp,Letter
 XLet=0
 YLet=0
 Close(1)
 Close(2)
 Open(1,"K:",4,0)
 Begin ; Repeat
  Prompt()
  Print("Searching for ")
  PrintE(ReadFile)
  Close(2)
  Open(2,ReadFile,4,0)
  BTemp=InputBD(2)
 Until BTemp=3 End
 Screen()
 ScreenRAM=PeekC(88)
 For Letter=1 To 90 Begin
  Read()
 End ; Next Letter
 GetD(1)
 Graphics(0)
Return ; Main
 

PhBill: Bill Kendrick               |||  1200 Cyberden BBS (+1 415 472-5527)
Moon!Cyberden!PhBill@Well.SF.CA.US / | \ 2600 North of San Francisco California