REM File: IO10.inc - import.bas

' default to integer variables
DEFINT A-Z

' load arrays at runtime
REM $DYNAMIC

Type RegTypeX
 AX As Integer
 BX As Integer
 CX As Integer
 DX As Integer
 BP As Integer
 SI As Integer
 DI As Integer
 Flags As Integer
 DS As Integer
 ES As Integer
End Type

' DOS Data Transfer Area
TYPE DTAtype
 Drive AS STRING * 1
 SearchTemplate AS STRING * 11
 SearchAttr AS STRING * 1
 EntryCount AS STRING * 2
 ClusterNumber AS STRING * 2
 Reserved AS STRING * 4
 FileAttr AS STRING * 1
 FileTime AS STRING * 2
 FileDate AS STRING * 2
 FileSize AS STRING * 4
 ASCIIZfilename AS STRING * 13
END TYPE

' spell data file structure
TYPE SpellType
 SpellName AS STRING * 30
 Chant AS STRING * 80
 Level AS INTEGER
 SpellType AS INTEGER
 Teleport AS SINGLE
 Psionic AS INTEGER
 PsionicMode AS INTEGER
 ClassType AS INTEGER
 Desc AS STRING * 80
 Ingred(1 TO 5) AS SINGLE
 SpellFlag AS INTEGER
 SpellEquate AS STRING * 40
 Equation AS INTEGER
 Prefix1 AS STRING * 8
 Buffer9 AS INTEGER
 Buffer10 AS INTEGER
 Buffer11 AS SINGLE
 Buffer12 AS SINGLE
END TYPE

' treasure data file structure
TYPE TreasureType
 TreasureName As String*30
 ShortName As String*30
 Weight As Integer
 Gold As Double
 Spell As Single
 Plus As Integer
 Coin As Integer
 Locked As Integer
 KeyNumber As Single
 Scroll As Integer
 Charges As Integer
 Potion As Integer
 Loadable As Integer
 Ammunition As Integer
 AmmoLoads As Single
 Invisible As Integer
 Permanent As Integer
 Proficiency As Integer
 WeaponNumber As Integer
 RingType As Integer
 RingSpell As Single
 Edible As Integer
 Rustable As Integer
 RustPercent As Integer
 Stealable As Integer
 StealPercent As Integer
 Launchable As Integer
 LaunchLoads As Single
 LaunchAmmo As Integer
 Movable As Integer
 Vehicle As Integer
 VehicleType As Integer
 LightType As Integer
 LightCharges As Integer
 FuelType As Integer
 FuelCharges As Integer
 Container As Integer
 ContainerMax As Integer
 ContainerPrefix As String*15
 ContainerDisappears As Single
 ContainerSize As Integer
 ContainerMaterial As Integer
 ContainerSelfImplodes As Integer
 PotionType As Single
 NewPotion As Single
 MixPotion As Integer
 TwoHanded As Integer
 RequireStr As Integer
 RequireDex As Integer
 RequireInt As Integer
 RestrictItem(1 To 3) As Single
 TrapType As Integer
 TrapHits As Integer
 TrapItem As Single
 MasterKey As Integer
 Liquid As Integer
 LiquidType As Integer
 LiquidFlags As Integer
 Prefix1 As String*8
 StaysInRoom As Integer
 Occupants As Integer
 BindType As Integer
 TimesCursed As Integer
 TimesBlessed As Integer
 Persistent AS INTEGER
 MaxPersistCharges AS INTEGER
 PersistTime AS SINGLE
 DischargePersist AS SINGLE
 ProperName As String*20
END TYPE

' declare interrupt structures
COMMON SHARED InregsX As RegTypeX
COMMON SHARED OutRegsX As RegTypeX

' declare program dta
COMMON SHARED BASIC.DTA.SEG AS INTEGER, BASIC.DTA.OFF AS INTEGER

' declare dta
COMMON SHARED DTAfile AS DTAtype

' declare file date, time, and size work variables
COMMON SHARED File.Work.Date AS SINGLE, File.Work.Time AS SINGLE
COMMON SHARED WorkHour AS SINGLE, WorkMinute AS SINGLE, WorkSeconds AS SINGLE
COMMON SHARED WorkDay AS SINGLE, WorkMonth AS SINGLE, WorkYear AS SINGLE
COMMON SHARED File.Date AS STRING * 10, File.Time AS STRING * 8, File.Size AS DOUBLE

' declare constants
CONST False=0
CONST True=-1
CONST Untrue=1
CONST SFalse=0!
CONST STrue=-1!
CONST DFalse=0#
CONST DTrue=-1#
CONST Nul=""

' declare config constants
CONST MaxConfigArray1=40
CONST MaxConfigArray2=150
CONST MaxConfigArray3=100

' declare interrupt subroutine
DECLARE SUB InterruptX(N As Integer,I As RegTypeX,O As RegTypeX)

' declare formatting function
Declare Function Form$(X#)
Declare Function Timeit!()

rem -end-
