- BORLAND/: Borland C++ 4.52 (chosen over 4.5 by byte-match: CODE/RP/CW32.LIB
is identical to 4.52's install lib). BCC32/TLINK32/TLIB/MAKE run natively on
Win11; CODE/BT/OPT.MAK is the shipped BTL4OPT.EXE's exact flag recipe
(extender = Borland PowerPack DPMI32, not Phar Lap TNT).
- restoration/source410/: the literal 1995-form reconstruction of the missing
BT game source (never mixed into CODE/). Round 1-3 state:
* 6 of 10 surviving original TUs COMPILE CLEAN under the period toolchain
(BTMSSN, BTCNSL, BTSCNRL, BTTEAM, BTL4MODE, BTL4ARND) - first builds
since 1996.
* BT_L4/BTL4APP.CPP pilot reconstruction: 12/12 functions, Fail() lands on
its binary-recorded line 400 exactly.
* BT/BTCNSL.HPP: console wire IDs recovered from the binary's ctors
(Killed=9, Damaged=10, ScoreUpdate=13, DeathWithoutHonor=15 [T1];
TeamScore=12 flagged [T4]).
* MUNGA/: 8 engine-header backfills back-dated from the BT412 WinTesla tree
(VDATA numbering decomp-verified; AUDREND's OpenAL-era virtual removed -
the period compiler is the drift detector).
* Tooling: backdate.py (WinTesla->1995 header transform), compile410.sh
(per-TU verification sweep under authentic OPT.MAK flags).
* README: corrected roadmap - MECH.HPP is the capstone grown with the mech
TU reconstructions; BTREG.CPP green = the header-family milestone.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
73 lines
2.7 KiB
ObjectPascal
73 lines
2.7 KiB
ObjectPascal
{ initeng.pas }
|
|
program InitEng;
|
|
|
|
{$IfDef VER80}
|
|
uses SnipTool, SnipData, SysUtils, WinTypes, WinProcs,
|
|
DbiProcs, DbiTypes, DbiErrs;
|
|
{$Else}
|
|
uses WinTypes, WinCrt, Strings, DbiProcs, DbiTypes, DbiErrs,
|
|
SnipTool, SnipData;
|
|
{$EndIf}
|
|
|
|
{========================================================================
|
|
Code: InitEngSample();
|
|
|
|
Description:
|
|
This code snipet will initialize IDAPI with a nil
|
|
environment structure, connect to a Standard database (used by
|
|
Paradox and dBASE tables), then clean up before returning.
|
|
Initializing IDAPI with a nil environment structure will
|
|
force IDAPI to scan for the needed CFG file. The search
|
|
will follow this search heirchy:
|
|
1. Use the CFG specified in the DBIEnv structure (not
|
|
supplied by this example.
|
|
2. Check for a defined CFG file in the WIN.INI file located in
|
|
your Windows directory. The entry checked for is '[IDAPI]'
|
|
with an sub-entry of 'CONFIGFILE01.'
|
|
3. Check for the CFG file in the startup directory.
|
|
4. When all else fails, IDAPI will initialise with a
|
|
predefined set of configuration settings. The default
|
|
settings include no locking of Paradox or dBASE tables,
|
|
no network access to tables, and no SQL databases.
|
|
======================================================================== }
|
|
|
|
var
|
|
hDb: hDBIDb; { Handle to the database }
|
|
|
|
begin
|
|
|
|
Screen('*** Init IDAPI and Connect Example ***');
|
|
|
|
Screen(' Initializing IDAPI...');
|
|
InitOutput;
|
|
if (ChkRslt(DbiInit(nil), DBIERR_NONE, ' Error - Init.')
|
|
= DBIERR_NONE) then
|
|
begin
|
|
{ IDAPI initialized. Now open a Standard database (used to
|
|
access Paradox and dBASE tables), by using a nil database
|
|
type. }
|
|
Screen(' Opening a Standard database...');
|
|
if (ChkRslt(DbiOpenDatabase(nil, nil, dbiREADWRITE,
|
|
dbiOPENSHARED, nil, 0, nil, nil,
|
|
hDb), DBIERR_NONE,
|
|
' Error - OpenDatabase.') = DBIERR_NONE) then
|
|
begin
|
|
{ Database was opened. Go ahead and close it! }
|
|
Screen(' Closing the database...');
|
|
ChkRslt(DbiCloseDatabase(hDb), DBIERR_NONE, ' Error - DbClose');
|
|
end;
|
|
|
|
Screen(' Exiting IDAPI...');
|
|
ChkRslt(DbiExit, DBIERR_NONE, ' Error - Exit');
|
|
end
|
|
else
|
|
begin
|
|
Screen(' Error - Could not initialize IDAPI');
|
|
end;
|
|
|
|
Screen('');
|
|
CloseOutput;
|
|
Screen('*** End of Example ***');
|
|
|
|
end.
|