source410: link campaign - entire engine compiles (152/152), first true link,
52-symbol unresolved ledger build410.sh: merged-engine mass compile + BT TUs + tlib + authentic tlink32. Engine closure fixes: boxtree/set/l4gauge/filestrm back-dates, lamp<->gaugrend cycle broken (1995 form), APP.HPP Shutdown default, NetNub include path, DPL vpx shim, SOS 32-bit lib arbitration (SOSDBXC/SOSMBXC; SOSMW*=16-bit), WATTCP excluded (16-bit NetNub TSR side). UNRESOLVED-LEDGER.txt = the measured gap to a linking BTL4OPT.EXE. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -143,7 +143,7 @@ public:
|
|||||||
Stop();
|
Stop();
|
||||||
|
|
||||||
virtual Logical
|
virtual Logical
|
||||||
Shutdown(int remainingApps);
|
Shutdown(int remainingApps = 0);
|
||||||
|
|
||||||
virtual void
|
virtual void
|
||||||
Terminate();
|
Terminate();
|
||||||
|
|||||||
@@ -0,0 +1,218 @@
|
|||||||
|
#if !defined(BOXTREE_HPP)
|
||||||
|
# define BOXTREE_HPP
|
||||||
|
|
||||||
|
# if !defined(BNDGBOX_HPP)
|
||||||
|
# include <bndgbox.hpp>
|
||||||
|
# endif
|
||||||
|
# if !defined(MEMBLOCK_HPP)
|
||||||
|
# include <memblock.hpp>
|
||||||
|
# endif
|
||||||
|
|
||||||
|
//##########################################################################
|
||||||
|
//####################### BoundingBoxTreeNode ########################
|
||||||
|
//##########################################################################
|
||||||
|
|
||||||
|
class BoundingBoxTree;
|
||||||
|
|
||||||
|
class BoundingBoxTreeNode SIGNATURED
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
static MemoryBlock
|
||||||
|
AllocatedMemory;
|
||||||
|
friend class BoundingBoxTree;
|
||||||
|
|
||||||
|
//##########################################################################
|
||||||
|
// Memory Allocation
|
||||||
|
//
|
||||||
|
private:
|
||||||
|
static MemoryBlock* GetAllocatedMemory();
|
||||||
|
void* operator new(size_t) { return GetAllocatedMemory()->New(); }
|
||||||
|
void operator delete(void *where) { GetAllocatedMemory()->Delete(where); }
|
||||||
|
|
||||||
|
//##########################################################################
|
||||||
|
// Construction and Destruction
|
||||||
|
//
|
||||||
|
protected:
|
||||||
|
ExtentBox
|
||||||
|
nodeExtents;
|
||||||
|
BoundingBox
|
||||||
|
*staticContents;
|
||||||
|
BoundingBoxTreeNode
|
||||||
|
*nodeBranches[6],
|
||||||
|
*innerNode;
|
||||||
|
|
||||||
|
BoundingBoxTreeNode(
|
||||||
|
BoundingBox *volume,
|
||||||
|
const ExtentBox &extents
|
||||||
|
);
|
||||||
|
~BoundingBoxTreeNode();
|
||||||
|
|
||||||
|
void
|
||||||
|
Add(
|
||||||
|
BoundingBox *BoundingBox,
|
||||||
|
const ExtentBox &extents
|
||||||
|
);
|
||||||
|
void
|
||||||
|
Remove(
|
||||||
|
BoundingBox *BoundingBox,
|
||||||
|
const ExtentBox &extents
|
||||||
|
);
|
||||||
|
|
||||||
|
//##########################################################################
|
||||||
|
// Tree Traversal Functions
|
||||||
|
//
|
||||||
|
protected:
|
||||||
|
static int
|
||||||
|
TraversalOrder[6];
|
||||||
|
|
||||||
|
static void
|
||||||
|
SetTraversalOrder(
|
||||||
|
int first,
|
||||||
|
int second,
|
||||||
|
int third
|
||||||
|
);
|
||||||
|
|
||||||
|
public:
|
||||||
|
BoundingBoxTreeNode*
|
||||||
|
FindSmallestNodeContaining(
|
||||||
|
const ExtentBox &extents,
|
||||||
|
BoundingBoxTreeNode *parent
|
||||||
|
);
|
||||||
|
|
||||||
|
BoundingBoxTreeNode*
|
||||||
|
FindSmallestNodeContainingColumn(const ExtentBox &extents);
|
||||||
|
|
||||||
|
BoundingBox*
|
||||||
|
FindBoundingBoxContaining(
|
||||||
|
const Point3D &point,
|
||||||
|
BoundingBox *parent
|
||||||
|
);
|
||||||
|
|
||||||
|
void
|
||||||
|
FindBoundingBoxesContaining(
|
||||||
|
BoundingBox *volume,
|
||||||
|
const ExtentBox &slice,
|
||||||
|
BoundingBoxCollisionList &list
|
||||||
|
);
|
||||||
|
|
||||||
|
BoundingBox*
|
||||||
|
FindBoundingBoxUnder(
|
||||||
|
const Point3D &point,
|
||||||
|
Scalar *height
|
||||||
|
);
|
||||||
|
|
||||||
|
BoundingBox*
|
||||||
|
FindBoundingBoxHitBy(Line *line);
|
||||||
|
|
||||||
|
//##########################################################################
|
||||||
|
// Test Support
|
||||||
|
//
|
||||||
|
public:
|
||||||
|
Logical
|
||||||
|
TestInstance() const;
|
||||||
|
};
|
||||||
|
|
||||||
|
//##########################################################################
|
||||||
|
//######################## BoundingBoxTree ###########################
|
||||||
|
//##########################################################################
|
||||||
|
|
||||||
|
class BoundingBoxTree SIGNATURED
|
||||||
|
{
|
||||||
|
|
||||||
|
//##########################################################################
|
||||||
|
// Construction and Destruction
|
||||||
|
//
|
||||||
|
protected:
|
||||||
|
BoundingBoxTreeNode *root;
|
||||||
|
|
||||||
|
public:
|
||||||
|
BoundingBoxTree()
|
||||||
|
{Check_Pointer(this); root = NULL;}
|
||||||
|
~BoundingBoxTree()
|
||||||
|
{Check(this); EraseTree();}
|
||||||
|
|
||||||
|
static void
|
||||||
|
SetTraversalOrder(
|
||||||
|
int first,
|
||||||
|
int second,
|
||||||
|
int third
|
||||||
|
)
|
||||||
|
{BoundingBoxTreeNode::SetTraversalOrder(first, second, third);}
|
||||||
|
|
||||||
|
void
|
||||||
|
Add(
|
||||||
|
BoundingBox* volume,
|
||||||
|
const ExtentBox &extents
|
||||||
|
);
|
||||||
|
void
|
||||||
|
Remove(BoundingBox* volume)
|
||||||
|
{
|
||||||
|
Check(this); Check(volume); Check(root);
|
||||||
|
root->Remove(volume, *volume);
|
||||||
|
}
|
||||||
|
void
|
||||||
|
EraseTree();
|
||||||
|
|
||||||
|
//##########################################################################
|
||||||
|
// Tree Traversal Functions
|
||||||
|
//
|
||||||
|
public:
|
||||||
|
BoundingBox*
|
||||||
|
FindBoundingBoxContaining(const Point3D &point)
|
||||||
|
{
|
||||||
|
Check(this); Check(&point); Check(root);
|
||||||
|
return root->FindBoundingBoxContaining(point, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
BoundingBoxTreeNode*
|
||||||
|
FindSmallestNodeContaining(const ExtentBox &extents)
|
||||||
|
{
|
||||||
|
Check(this); Check(&extents); Check(root);
|
||||||
|
return root->FindSmallestNodeContaining(extents, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
FindBoundingBoxesContaining(
|
||||||
|
BoundingBox *volume,
|
||||||
|
BoundingBoxCollisionList &list
|
||||||
|
)
|
||||||
|
{
|
||||||
|
Check(this); Check(volume); Check(&list); Check(root);
|
||||||
|
root->FindBoundingBoxesContaining(
|
||||||
|
volume,
|
||||||
|
*volume,
|
||||||
|
list
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
BoundingBoxTreeNode*
|
||||||
|
FindSmallestNodeContainingColumn(const ExtentBox &extents)
|
||||||
|
{
|
||||||
|
Check(this); Check(&extents); Check(root);
|
||||||
|
Verify((BoundingBoxTreeNode::TraversalOrder[4]>>1) == Y_Axis);
|
||||||
|
return root->FindSmallestNodeContainingColumn(extents);
|
||||||
|
}
|
||||||
|
|
||||||
|
BoundingBox*
|
||||||
|
FindBoundingBoxUnder(
|
||||||
|
const Point3D &point,
|
||||||
|
Scalar *height
|
||||||
|
)
|
||||||
|
{
|
||||||
|
Check(this); Check(&point); Check(root); Check_Pointer(height);
|
||||||
|
Verify((BoundingBoxTreeNode::TraversalOrder[4]>>1) == Y_Axis);
|
||||||
|
return root->FindBoundingBoxUnder(point, height);
|
||||||
|
}
|
||||||
|
|
||||||
|
BoundingBox*
|
||||||
|
FindBoundingBoxHitBy(Line *line);
|
||||||
|
|
||||||
|
//##########################################################################
|
||||||
|
// Test Support
|
||||||
|
//
|
||||||
|
public:
|
||||||
|
Logical
|
||||||
|
TestInstance() const;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -1,12 +1,7 @@
|
|||||||
#if !defined(LAMP_HPP)
|
#if !defined(LAMP_HPP)
|
||||||
# define LAMP_HPP
|
# define LAMP_HPP
|
||||||
|
|
||||||
# if !defined(GAUGREND_HPP)
|
class GaugeRenderer;
|
||||||
# include <gaugrend.hpp>
|
|
||||||
# endif
|
|
||||||
# if !defined(STYLE_HPP)
|
|
||||||
# include <style.hpp>
|
|
||||||
# endif
|
|
||||||
# if !defined(GRAPH2D_HPP)
|
# if !defined(GRAPH2D_HPP)
|
||||||
# include <graph2d.hpp>
|
# include <graph2d.hpp>
|
||||||
# endif
|
# endif
|
||||||
|
|||||||
@@ -0,0 +1,266 @@
|
|||||||
|
#if !defined(SET_HPP)
|
||||||
|
# define SET_HPP
|
||||||
|
|
||||||
|
# if !defined(CHAIN_HPP)
|
||||||
|
# include <chain.hpp>
|
||||||
|
# endif
|
||||||
|
|
||||||
|
// Classes Defined in this file
|
||||||
|
|
||||||
|
class Set;
|
||||||
|
class SetIterator;
|
||||||
|
|
||||||
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Set ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
class Set : public Socket
|
||||||
|
{
|
||||||
|
|
||||||
|
friend class SetIterator;
|
||||||
|
|
||||||
|
public:
|
||||||
|
Logical
|
||||||
|
TestInstance() const;
|
||||||
|
|
||||||
|
|
||||||
|
// Constructor
|
||||||
|
Set(Node *node);
|
||||||
|
|
||||||
|
~Set();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
Set& operator=(const Set &rhs);
|
||||||
|
|
||||||
|
//STUBBED: UNKNOWN RB 1/15/07
|
||||||
|
//void
|
||||||
|
// AddImplementation(Plug *plug);
|
||||||
|
|
||||||
|
// Useful Set Operations
|
||||||
|
Logical operator==(const Set &rhs);
|
||||||
|
Set operator-(const Set &rhs) const;
|
||||||
|
Set Union(const Set &rhs) const;
|
||||||
|
Set Intersection(const Set &rhs) const;
|
||||||
|
|
||||||
|
// Set membership
|
||||||
|
Logical
|
||||||
|
Exists(const Plug &element) const;
|
||||||
|
|
||||||
|
private:
|
||||||
|
Chain *contents;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ SetOf ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
template <class T> class SetOf:
|
||||||
|
public Set
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
SetOf(Node *node);
|
||||||
|
~SetOf();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
SetOf(Set set):
|
||||||
|
Set(set)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
// Public interface
|
||||||
|
|
||||||
|
void
|
||||||
|
Add(T *plug)
|
||||||
|
{AddImplementation(plug);}
|
||||||
|
|
||||||
|
// Useful Set Operations
|
||||||
|
SetOf<T>&
|
||||||
|
operator=(const SetOf<T> &rhs)
|
||||||
|
{
|
||||||
|
if (this==&rhs) return *this;
|
||||||
|
Set::operator=(rhs);
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
Logical
|
||||||
|
operator==(const SetOf<T> &rhs)
|
||||||
|
{return Set::operator==(rhs);}
|
||||||
|
|
||||||
|
|
||||||
|
SetOf<T>
|
||||||
|
operator-(const SetOf<T> rhs) const
|
||||||
|
{return (SetOf<T>) Set::operator-(rhs);}
|
||||||
|
|
||||||
|
SetOf<T>
|
||||||
|
Union(const SetOf<T> &rhs) const
|
||||||
|
{return (SetOf<T>) Set::Union(rhs);}
|
||||||
|
|
||||||
|
SetOf<T>
|
||||||
|
Intersection(const SetOf<T> &rhs) const
|
||||||
|
{return (SetOf<T>) Set::Intersection(rhs);}
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~~ SetOf templates ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
template <class T>
|
||||||
|
SetOf<T>::SetOf(Node *node):
|
||||||
|
Set(node)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
template <class T>
|
||||||
|
SetOf<T>::~SetOf()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~~ SetIterator ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
class SetIterator:
|
||||||
|
public ChainIterator
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
friend class Set;
|
||||||
|
//
|
||||||
|
//--------------------------------------------------------------------
|
||||||
|
//--------------------------------------------------------------------
|
||||||
|
// Public interface
|
||||||
|
//--------------------------------------------------------------------
|
||||||
|
//--------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
|
||||||
|
//
|
||||||
|
//--------------------------------------------------------------------
|
||||||
|
// Constructors, Destructor and testing
|
||||||
|
//--------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
SetIterator(Set *set);
|
||||||
|
SetIterator(const SetIterator &iterator);
|
||||||
|
~SetIterator();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
SetIterator(Chain *chain); // Used fot Set implementation to iterate on own contents
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~ SetIteratorOf ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
template <class T> class SetIteratorOf:
|
||||||
|
public SetIterator
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
//
|
||||||
|
//--------------------------------------------------------------------
|
||||||
|
//--------------------------------------------------------------------
|
||||||
|
// Public interface
|
||||||
|
//--------------------------------------------------------------------
|
||||||
|
//--------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
|
||||||
|
//
|
||||||
|
//--------------------------------------------------------------------
|
||||||
|
// Constructors and Destructor
|
||||||
|
//--------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
SetIteratorOf(SetOf<T> *chain);
|
||||||
|
SetIteratorOf(SetOf<T> &chain);
|
||||||
|
SetIteratorOf(const SetIteratorOf<T> &iterator);
|
||||||
|
~SetIteratorOf();
|
||||||
|
|
||||||
|
//
|
||||||
|
//--------------------------------------------------------------------
|
||||||
|
// Iterator methods (see Iterator for full listing)
|
||||||
|
//--------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
T*
|
||||||
|
ReadAndNext()
|
||||||
|
{return (T*)ReadAndNextImplementation();}
|
||||||
|
T*
|
||||||
|
ReadAndPrevious()
|
||||||
|
{return (T*)ReadAndPreviousImplementation();}
|
||||||
|
T*
|
||||||
|
GetCurrent()
|
||||||
|
{return (T*)GetCurrentImplementation();}
|
||||||
|
T*
|
||||||
|
GetNth(CollectionSize index)
|
||||||
|
{return (T*)GetNthImplementation(index);}
|
||||||
|
void
|
||||||
|
Insert(T *plug)
|
||||||
|
{InsertImplementation(plug);}
|
||||||
|
|
||||||
|
SetIteratorOf<T>&
|
||||||
|
Begin()
|
||||||
|
{return (SetIteratorOf<T>&)BeginImplementation();}
|
||||||
|
SetIteratorOf<T>&
|
||||||
|
End()
|
||||||
|
{return (SetIteratorOf<T>&)EndImplementation();}
|
||||||
|
SetIteratorOf<T>&
|
||||||
|
Forward()
|
||||||
|
{return (SetIteratorOf<T>&)ForwardImplementation();}
|
||||||
|
SetIteratorOf<T>&
|
||||||
|
Backward()
|
||||||
|
{return (SetIteratorOf<T>&)BackwardImplementation();}
|
||||||
|
|
||||||
|
//
|
||||||
|
//---------------------------------------------------
|
||||||
|
// Operators useful when it is know that the iterator
|
||||||
|
// is a SetOf<> Iterator
|
||||||
|
//---------------------------------------------------
|
||||||
|
//
|
||||||
|
#if 0
|
||||||
|
Logical
|
||||||
|
operator!()
|
||||||
|
{return currentLink == NULL;}
|
||||||
|
operator T*()
|
||||||
|
{return GetCurrent();}
|
||||||
|
T*
|
||||||
|
operator->()
|
||||||
|
{return GetCurrent();}
|
||||||
|
T&
|
||||||
|
operator*()
|
||||||
|
{return *GetCurrent();}
|
||||||
|
|
||||||
|
SetIteratorOf<T>&
|
||||||
|
operator++()
|
||||||
|
{Next(); return *this;}
|
||||||
|
SetIteratorOf<T>&
|
||||||
|
operator--()
|
||||||
|
{Previous(); return *this;}
|
||||||
|
T*
|
||||||
|
operator++(int)
|
||||||
|
{return ReadAndNext();}
|
||||||
|
T*
|
||||||
|
operator--(int)
|
||||||
|
{return ReadAndPrevious();}
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~ SetIteratorOf templates ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
template <class T>
|
||||||
|
SetIteratorOf<T>::SetIteratorOf(SetOf<T> *set):
|
||||||
|
SetIterator(chain)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
template <class T>
|
||||||
|
SetIteratorOf<T>::SetIteratorOf(SetOf<T> &set):
|
||||||
|
SetIterator(&chain)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
template <class T>
|
||||||
|
SetIteratorOf<T>::SetIteratorOf(const SetIteratorOf<T> &iterator):
|
||||||
|
SetIterator(iterator)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
template <class T>
|
||||||
|
SetIteratorOf<T>::~SetIteratorOf()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -71,3 +71,17 @@ file-by-file; the current blocker for full closure is the 1995 engine header gap
|
|||||||
first — only the drifted WinTesla `VDATA.h` survives, in BT412/engine). Include order for
|
first — only the drifted WinTesla `VDATA.h` survives, in BT412/engine). Include order for
|
||||||
builds: `CODE/BT/*` over `CODE/RP/*`, `-DNO_PRECOMPILED_HEADERS` until the mech-family headers
|
builds: `CODE/BT/*` over `CODE/RP/*`, `-DNO_PRECOMPILED_HEADERS` until the mech-family headers
|
||||||
are reconstructed. Remaining gap: TASM32 (JOYSTICK.ASM only).
|
are reconstructed. Remaining gap: TASM32 (JOYSTICK.ASM only).
|
||||||
|
|
||||||
|
## Link campaign (build410, 2026-07-19)
|
||||||
|
`source410/build410.sh` assembles BTL4OPT.EXE: merged-engine mass compile (**152/152 green**
|
||||||
|
— the ENTIRE surviving engine compiles), BT TUs (11/11), tlib libs (munga 1.25MB / mungal4
|
||||||
|
with the prebuilt-1995 objs / bt / btl4), then the authentic tlink32 link rooted by a probe
|
||||||
|
main (build scaffold). First true link run: **52 unresolved externals**
|
||||||
|
(`UNRESOLVED-LEDGER.txt`) = the measured remaining gap. Kill-lists: l4gauge.cpp back-date
|
||||||
|
(14 widget statics), the missing-engine-body back-date wave (~24: rotation, player, team,
|
||||||
|
l4app, explode, dropzone, terrain, cultural, subsystm-statics, netclient...), the prebuilt
|
||||||
|
RANDOM.obj fold, and the staged game-TU statics blocks (MECH.CPP et al. — each TU file opens
|
||||||
|
with its binary-evidenced Derivation/SharedData statics and grows into the full body).
|
||||||
|
Link-lib arbitration: SOS = SOSDBXC+SOSMBXC (the 32-bit Borland-flat variants; SOSMW*=16-bit),
|
||||||
|
WATTCP excluded (it belongs to the 16-bit NetNub TSR — the game talks to it via shared
|
||||||
|
memory), filestrm = the RP-era pair (BT-tree pair is post-4.10 drift; override layer).
|
||||||
|
|||||||
@@ -0,0 +1,52 @@
|
|||||||
|
BTCameraDirector::DefaultData
|
||||||
|
BTPlayer::DefaultData
|
||||||
|
BackgroundBitmap::methodDescription
|
||||||
|
BackgroundFilledRect::methodDescription
|
||||||
|
BackgroundLine::methodDescription
|
||||||
|
BackgroundPixelmap::methodDescription
|
||||||
|
BackgroundReconfig::methodDescription
|
||||||
|
BackgroundRect::methodDescription
|
||||||
|
BarGraphPixelMapScalar::methodDescription
|
||||||
|
BarGraphSolidScalar::methodDescription
|
||||||
|
ColorState::methodDescription
|
||||||
|
CulturalIcon::DefaultData
|
||||||
|
DigitalClock::methodDescription
|
||||||
|
DropZone::DefaultData
|
||||||
|
EulerAngles::Identity
|
||||||
|
Explosion::DefaultData
|
||||||
|
L4Application::ClassDerivations
|
||||||
|
L4Application::MessageHandlers
|
||||||
|
L4Application::missionReviewMode
|
||||||
|
L4Application::rioPlaybackFileName
|
||||||
|
L4Application::rioRecordingFileName
|
||||||
|
Landmark::DefaultData
|
||||||
|
Mech::DefaultData
|
||||||
|
MechRIOMapper::DefaultData
|
||||||
|
MechThrustmasterMapper::DefaultData
|
||||||
|
Missile::DefaultData
|
||||||
|
NetworkClient::ClassDerivations
|
||||||
|
NumericDisplayInteger::methodDescription
|
||||||
|
NumericDisplayScalar::methodDescription
|
||||||
|
NumericDisplaySpeed::methodDescription
|
||||||
|
Player::AttributeIndex
|
||||||
|
Player::ClassDerivations
|
||||||
|
Player::DefaultData
|
||||||
|
Player::MessageHandlers
|
||||||
|
Projectile::DefaultData
|
||||||
|
Quaternion::Identity
|
||||||
|
RandomGenerator::Index
|
||||||
|
RankAndScore::methodDescription
|
||||||
|
Receiver::ClassDerivations
|
||||||
|
Receiver::DefaultData
|
||||||
|
Receiver::MessageHandlers
|
||||||
|
SegmentArcNormalized::methodDescription
|
||||||
|
Subsystem::ClassDerivations
|
||||||
|
Team::AttributeIndex
|
||||||
|
Team::ClassDerivations
|
||||||
|
Team::DefaultData
|
||||||
|
Team::MessageHandlers
|
||||||
|
Terrain::DefaultData
|
||||||
|
TwoState::methodDescription
|
||||||
|
UnscalableTerrain::ClassDerivations
|
||||||
|
UnscalableTerrain::DefaultData
|
||||||
|
YawPitchRoll::Identity
|
||||||
@@ -0,0 +1,159 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# build410.sh -- assemble BTL4OPT.EXE from the reconstructed 4.10 tree.
|
||||||
|
#
|
||||||
|
# Stages:
|
||||||
|
# 1. mass-compile the merged engine source (CODE/BT over CODE/RP over
|
||||||
|
# source410 backfills) into build410/obj/{munga,mungal4}/
|
||||||
|
# 2. compile the BT game TUs (CODE originals + source410) into
|
||||||
|
# build410/obj/{bt,btl4}/
|
||||||
|
# 3. tlib the four libs; prebuilt-1995 .obj fallbacks fill source gaps
|
||||||
|
# 4. tlink32 with the authentic OPT.MAK order; unresolved externals ->
|
||||||
|
# build410/UNRESOLVED.txt (the canonical remaining-work ledger)
|
||||||
|
#
|
||||||
|
# Usage: ./build410.sh [engine|bt|libs|link|all|status]
|
||||||
|
|
||||||
|
T=/c/VWE/TeslaRel410
|
||||||
|
TW=c:/VWE/TeslaRel410
|
||||||
|
export PATH="$T/BORLAND/BC45/BIN:$PATH"
|
||||||
|
C=$TW/CODE/BT
|
||||||
|
R=$TW/CODE/RP
|
||||||
|
S=$TW/restoration/source410
|
||||||
|
B=$T/restoration/build410
|
||||||
|
Bw=$TW/restoration/build410
|
||||||
|
|
||||||
|
INC="$S/override;$C/BT_L4;$C/BT;$C/MUNGA;$C/MUNGA_L4;$C/MUNGA_L4/SOS/BC4;$S/MUNGA;$S/MUNGA_L4;$R/MUNGA;$R/MUNGA_L4;$R/MUNGA_L4/NetNub;$R/MUNGA_L4/sos/bc4;$C/MUNGA_L4/LIBDPL;$C/MUNGA_L4/NETNUB;$C/MUNGA_L4/NETNUB/INCLUDE;$S/MUNGA_L4;$R/MUNGA_L4/libDPL;$R/MUNGA_L4/libDPL/dpl;$S/shim;$S/BT;$S/BT_L4;$TW/BORLAND/BC45/INCLUDE"
|
||||||
|
FLAGS="-c -DLBE4 -DDEBUG_LEVEL=0 -DDEBUG_STREAM=cout \
|
||||||
|
-b -r -ff -AT -k- -N- -v- -5 -a4 -V -Jg -x- -RT- -O2 -w-"
|
||||||
|
|
||||||
|
mkdir -p "$B"/obj/{munga,mungal4,bt,btl4} "$B"/lib
|
||||||
|
|
||||||
|
# compile one TU into a bucket; skip if the obj is newer than the source
|
||||||
|
cc() { # cc <bucket> <src>
|
||||||
|
local out="$B/obj/$1/$(basename "${2%.*}" | tr 'A-Z' 'a-z').obj"
|
||||||
|
[ -f "$out" ] && [ "$out" -nt "$2" ] && return 0
|
||||||
|
if bcc32 $FLAGS -I"$INC" -o"$(cygpath -w "$out" 2>/dev/null || echo $out)" "$2" \
|
||||||
|
> "$B/obj/$1/$(basename "${2%.*}").log" 2>&1; then
|
||||||
|
return 0
|
||||||
|
else
|
||||||
|
rm -f "$out"; return 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# merged engine source view: BT tree wins, RP fills, source410 backfills last
|
||||||
|
merged() { # merged <BTdir> <RPdir> [S410dir]
|
||||||
|
{ ls "$1"/*.CPP "$1"/*.cpp 2>/dev/null | sed 's/.*[\\/]//'
|
||||||
|
ls "$2"/*.CPP "$2"/*.cpp 2>/dev/null | sed 's/.*[\\/]//'
|
||||||
|
[ -n "$3" ] && ls "$3"/*.CPP 2>/dev/null | sed 's/.*[\\/]//'
|
||||||
|
} | tr 'A-Z' 'a-z' | sort -u
|
||||||
|
}
|
||||||
|
srcfor() { # srcfor <name.cpp> <BTdir> <RPdir> [S410dir]
|
||||||
|
case "$1" in
|
||||||
|
filestrm.cpp) echo "$3/FILESTRM.CPP"; return;; # BT pair = post-4.10 drift
|
||||||
|
l4vidper.cpp|l4tsdpl.cpp) return;; # not in mungal4.lib
|
||||||
|
esac
|
||||||
|
for d in "$2" "$4" "$3"; do # BT first, then source410, then RP
|
||||||
|
[ -z "$d" ] && continue
|
||||||
|
for f in "$d"/*.CPP "$d"/*.cpp; do
|
||||||
|
[ -f "$f" ] || continue
|
||||||
|
[ "$(basename "$f" | tr 'A-Z' 'a-z')" = "$1" ] && { echo "$f"; return; }
|
||||||
|
done
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
stage_engine() {
|
||||||
|
local ok=0 fail=0 failed=""
|
||||||
|
for lib in munga mungal4; do
|
||||||
|
local bd rd sd
|
||||||
|
if [ $lib = munga ]; then bd=$C/MUNGA; rd=$R/MUNGA; sd=$S/MUNGA; else bd=$C/MUNGA_L4; rd=$R/MUNGA_L4; sd=$S/MUNGA_L4; fi
|
||||||
|
for n in $(merged "$bd" "$rd" "$sd"); do
|
||||||
|
src=$(srcfor "$n" "$bd" "$rd" "$sd")
|
||||||
|
[ -z "$src" ] && continue
|
||||||
|
if cc $lib "$src"; then ok=$((ok+1)); else fail=$((fail+1)); failed="$failed $lib/$n"; fi
|
||||||
|
done
|
||||||
|
done
|
||||||
|
echo "ENGINE: $ok ok, $fail fail"
|
||||||
|
for f in $failed; do echo " FAIL $f"; done | head -60
|
||||||
|
for f in $failed; do echo "$f"; done > "$B/ENGINE-FAILURES.txt"
|
||||||
|
}
|
||||||
|
|
||||||
|
stage_bt() {
|
||||||
|
local ok=0 fail=0
|
||||||
|
for n in $(merged "$C/BT" /dev/null "$S/BT"); do
|
||||||
|
src=$(srcfor "$n" "$C/BT" /dev/null "$S/BT")
|
||||||
|
[ -z "$src" ] && continue
|
||||||
|
if cc bt "$src"; then ok=$((ok+1)); else fail=$((fail+1)); echo " FAIL bt/$n"; fi
|
||||||
|
done
|
||||||
|
for n in $(merged "$C/BT_L4" /dev/null "$S/BT_L4"); do
|
||||||
|
src=$(srcfor "$n" "$C/BT_L4" /dev/null "$S/BT_L4")
|
||||||
|
[ -z "$src" ] && continue
|
||||||
|
if cc btl4 "$src"; then ok=$((ok+1)); else fail=$((fail+1)); echo " FAIL btl4/$n"; fi
|
||||||
|
done
|
||||||
|
echo "BT: $ok ok, $fail fail"
|
||||||
|
}
|
||||||
|
|
||||||
|
stage_libs() {
|
||||||
|
cd "$B/lib"
|
||||||
|
for lib in munga mungal4 bt btl4; do
|
||||||
|
rm -f $lib.lib
|
||||||
|
ls "$B/obj/$lib"/*.obj >/dev/null 2>&1 || continue
|
||||||
|
: > $lib.rsp
|
||||||
|
for o in "$B/obj/$lib"/*.obj; do
|
||||||
|
printf '+..\obj\%s\%s &
|
||||||
|
' "$lib" "$(basename "$o")" >> $lib.rsp
|
||||||
|
done
|
||||||
|
# prebuilt-1995 fallbacks for TUs with no compiled obj
|
||||||
|
if [ $lib = munga ] || [ $lib = mungal4 ]; then
|
||||||
|
for o in $(find $R/MUNGA/opt $R/MUNGA_L4 -iname "*.obj" 2>/dev/null); do
|
||||||
|
n=$(basename "${o%.*}" | tr 'A-Z' 'a-z')
|
||||||
|
if [ ! -f "$B/obj/munga/$n.obj" ] && [ ! -f "$B/obj/mungal4/$n.obj" ]; then
|
||||||
|
case "$lib/$o" in
|
||||||
|
munga/*/MUNGA/*) printf '+%s &
|
||||||
|
' "$(cygpath -w "$o" | sed 's|\|\\|g')" >> $lib.rsp;;
|
||||||
|
mungal4/*/MUNGA_L4/*) printf '+%s &
|
||||||
|
' "$(cygpath -w "$o" | sed 's|\|\\|g')" >> $lib.rsp;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
sed -i '$ s/ &$//' $lib.rsp
|
||||||
|
MSYS2_ARG_CONV_EXCL='*' tlib $lib.lib /P32 @$lib.rsp > $lib.tlib.log 2>&1
|
||||||
|
echo "$lib.lib: $(grep -c '^+' $lib.rsp) members ($(ls -la $lib.lib 2>/dev/null | awk '{print $5}') bytes)"
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
stage_link() {
|
||||||
|
cd "$B"
|
||||||
|
if [ ! -f obj/btl4/btl4.obj ] && [ -f probe_main.cpp ]; then
|
||||||
|
bcc32 $FLAGS -I"$INC" -oprobe_main.obj probe_main.cpp > probe_main.log 2>&1 || { echo "probe main FAILED (probe_main.log)"; return 1; }
|
||||||
|
MAIN=probe_main.obj
|
||||||
|
else
|
||||||
|
MAIN=obj/btl4/btl4.obj
|
||||||
|
fi
|
||||||
|
cat > link.rsp <<EOF2
|
||||||
|
$(cygpath -w $C/C0X32.OBJ)+
|
||||||
|
$MAIN,
|
||||||
|
btl4opt.exe,
|
||||||
|
btl4opt.map,
|
||||||
|
lib/munga.lib+
|
||||||
|
lib/mungal4.lib+
|
||||||
|
$(cygpath -w $R/MUNGA_L4/libDPL/LIBDPL.LIB)+
|
||||||
|
$(cygpath -w $R/MUNGA_L4/sos/SOSMWXCR.LIB)+
|
||||||
|
$(cygpath -w $R/MUNGA_L4/NetNub/lib/WATTCPLG.LIB)+
|
||||||
|
lib/bt.lib+
|
||||||
|
lib/btl4.lib+
|
||||||
|
$(cygpath -w $R/DPMI32.LIB)+
|
||||||
|
$(cygpath -w $R/CW32.LIB)
|
||||||
|
EOF2
|
||||||
|
tlink32 -Tpe -ax -m -L"$(cygpath -w $TW/BORLAND/BC45/LIB)" @link.rsp > link.log 2>&1
|
||||||
|
grep -i "undefined" link.log | sed "s/^.*Error: //" | sort -u > UNRESOLVED.txt
|
||||||
|
echo "link exit: $? ; unresolved: $(wc -l < UNRESOLVED.txt) (build410/UNRESOLVED.txt)"
|
||||||
|
}
|
||||||
|
|
||||||
|
case "${1:-all}" in
|
||||||
|
engine) stage_engine;;
|
||||||
|
bt) stage_bt;;
|
||||||
|
libs) stage_libs;;
|
||||||
|
link) stage_link;;
|
||||||
|
status) for d in munga mungal4 bt btl4; do echo "$d: $(ls "$B/obj/$d"/*.obj 2>/dev/null | wc -l) objs"; done;;
|
||||||
|
all) stage_engine; stage_bt; stage_libs; stage_link;;
|
||||||
|
esac
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
#if !defined(FILESTRM_HPP)
|
||||||
|
# define FILESTRM_HPP
|
||||||
|
|
||||||
|
# if !defined(MEMSTRM_HPP)
|
||||||
|
# include <memstrm.hpp>
|
||||||
|
# endif
|
||||||
|
|
||||||
|
class FileStream : public MemoryStream
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
FileStream(const char* file_name = NULL, Logical writable = False);
|
||||||
|
~FileStream() { Close(); }
|
||||||
|
|
||||||
|
public:
|
||||||
|
void* GetPointer() const
|
||||||
|
{
|
||||||
|
Fail("No implementation possible for FileStream::GetPointer()");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
void SetPointer(void *new_pointer) { Fail("No implementation possible for FileStream::SetPointer(void*)"); }
|
||||||
|
void SetPointer(size_t index);
|
||||||
|
|
||||||
|
MemoryStream& AdvancePointer(size_t count);
|
||||||
|
|
||||||
|
MemoryStream& RewindPointer(size_t count);
|
||||||
|
|
||||||
|
MemoryStream& ReadBytes(void *ptr, size_t number_of_bytes);
|
||||||
|
MemoryStream& WriteBytes(const void *ptr, size_t number_of_bytes);
|
||||||
|
|
||||||
|
void Open(const char* file_name = NULL, Logical writable = False);
|
||||||
|
void Close();
|
||||||
|
Logical IsFileOpened() { return fileHandle != -1; }
|
||||||
|
|
||||||
|
Logical TestInstance() const;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
int fileHandle;
|
||||||
|
Logical readOnly;
|
||||||
|
|
||||||
|
static int OpenImplementation(const char* file_name, Logical read_only);
|
||||||
|
static void FlushImplementation(int file_handle);
|
||||||
|
static void CloseImplementation(int file_handle);
|
||||||
|
static size_t SeekImplementation(int file_handle, size_t where, Logical from_end = False);
|
||||||
|
static size_t ReadImplementation(int file_handle, void *buffer, size_t length);
|
||||||
|
static size_t WriteImplementation(int file_handle, const void* buffer, size_t length);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
#include <dpl_priv.h>
|
||||||
Reference in New Issue
Block a user