The v4face2.dll is a small dll file that
does not require any runtime files. Using any programming
language that supports calls to DLL files 3rd party programmers
can read data directly from the ship and race data packs. The
picture files can also be extracted from the data packs.
This pack of files includes the facetest.exe
demo program that uses the v4face2.dll as well as the
facetest.exe's source code. The declface.bas file includes all
the declare statments and user defined data types you will need
to use the v4face2.dll file.
This should put an end to 3rd party programmers having to update their programs every time a new race pack is released or updated. This should put an end to 3rd party programmers having to type in all the data for every new ship, and allow easy access to the pictures.
This is a list of subs in the v4face2.dll.
v4face.dll only supports 500 different hull types, hull numbers 1 to 500
v4face2.dll support 2000 different hull types, hull numbers 1 to 2000
'//////////////
'// FROMFILELOADHULLKEYS
'// This sub will load the keys to any ship pack, Including old
'// packs with out dated version numbers.
'//
'// sShipFile :(INPUT) is the complete name of the target ship
file pack
'//
'// vFistLong : (OUTPUT) is the first element in an array of 2000
longs
'// You must dim the array of 2000 longs and pass the first
element
'// The array will be filled with a list of existing hull ID
values
'// If element(23) of the array comes back with a value 23 then
ship 23 exists
'// If element(23) comes back a zero the ship hull does not exist
'// If you Dim g_vList(1 to 2000) as long you MUST pass the
element g_vList(1)
'//
'// sKey : (OUTPUT) This is a key string that LOADHULLKEYS
returns to you.
'// Save this string and pass it to subs that require it as an
input
Declare Sub FROMFILELOADHULLKEYS Lib
"v4face2.dll" (sShipFile As String, vFirstLong As Long,
sKey As String)
'//////////////
'// LOADHULLKEYS
'// sPath : (INPUT) is the complete path to the directory that
has the ship packs
'// You need to supply sPath to LOADHULLKEYS
'//
'// vFistLong : (OUTPUT) is the first element in an array of 2000
longs
'// You must dim the array of 2000 longs and pass the first
element
'// The array will be filled with a list of existing hull ID
values
'// If element(23) of the array comes back with a value 23 then
ship 23 exists
'// If element(23) comes back a zero the ship hull does not exist
'// If you Dim g_vList(1 to 2000) as long you MUST pass the
element g_vList(1)
'//
'// sKey : (OUTPUT) This is a key string that LOADHULLKEYS
returns to you.
'// Save this string and pass it to subs that require it as an
input
'// This sub always loads the keys
to the latest versions of the ship hulls, old ship files are
ignored
Declare Sub LOADHULLKEYS Lib
"v4face2.dll" (sPath As String, vFirstLong As Long,
sKey As String)
'//////////////
'// LOADHULL
'// sPath : (INPUT) is the complete path to the directory that
has the ship packs
'// You need to supply sPath to LOADHULLKEYS
'//
'// vHullID : (INPUT) a long with a value of 1 to 2000
'// Only request hull id values that you know exist
'//
'// tHULL : (OUTPUT) a user defined type that is returned with
data on the
'// requested hull ID
'//
'// sKey : (INPUT) This is a key string unlocks the data files
'// You must pass the value that was returned from LOADHULLKEYS
Declare Sub LOADHULL Lib
"v4face2.dll" (sPath As String, vHullID As Long, tHULL
As HullFaceType, sKey As String)
'/////////////
'// GETSHIPTEMPBMP
'// sPath : (INPUT) is the complete path to the directory that
has the ship packs
'// You need to supply sPath to LOADHULLKEYS
'//
'// sTempPath : (INPUT) is the complete path to the temp
directory
'//
'// vHullID : (INPUT) a long with a value of 1 to 2000
'// Only request hull id values that you know exist
'//
'// sKey : (INPUT) This is a key string unlocks the data files
'// You must pass the value that was returned from LOADHULLKEYS
'//
'// This Sub writes the BMP files temp1.bmp, temp2.bmp,
temp3.bmp, temp4.bmp, and temp.ico into
'// the temp directory
Declare Sub GETSHIPTEMPBMP Lib
"v4face2.dll" (sPath As String, sTempPath As String,
vHullID As Long, sKey As String)
'/////////////
'// GETRACETEMPBMP
'// sRaceFile : (INPUT) is the complete name of the target race
file pack
'//
'// sTempPath : (INPUT) is the complete path to the temp
directory
'//
'// This Sub writes the Race BMP files temp1.bmp, temp2.bmp,
temp3.bmp, temp4.bmp,
'// temp5.bmp, temp6.bmp, temp7.bmp, temp8.bmp, temp.mid and
temp.txt
'// into the temp directory
Declare Sub GETRACETEMPBMP Lib
"v4face2.dll" (sRaceFile As String, sTempPath As
String)
'/////////////
'// LOADRACEDATA
'// sRaceFile : (INPUT) is the complete name of the target race
file pack
'//
'// tRace : (OUTPUT) a user defined type that is returned with
data on the race
'//
'// mech1 : (OUTPUT) a user defined type that is returned with
data on ground unit type 1
'//
'// mech2 : (OUTPUT) a user defined type that is returned with
data on ground unit type 2
'//
'// mech3 : (OUTPUT) a user defined type that is returned with
data on ground unit type 3
'//
'// fighter1 : (OUTPUT) a user defined type that is returned with
data on fighter type 1
'//
'// fighter2 : (OUTPUT) a user defined type that is returned with
data on fighter type 2
'//
'// fighter3 : (OUTPUT) a user defined type that is returned with
data on fighter type 3
Declare Sub LOADRACEDATA Lib
"v4face2.dll" (sRaceFile As String, tRace As
RaceFacetype, mech1 As MechFaceType, mech2 As MechFaceType, mech3
As MechFaceType, fighter1 As FighterFaceType, fighter2 As
FighterFaceType, fighter3 As FighterFaceType)
'/////////////
'// VERSIONNUMBER
'// Returns the version number of v4face2.dll
Declare Function VERSIONNUMBER Lib
"v4face2.dll" () As Long
Download facetool.exe v4face2.dll and demo program written in Visual Basic 5