- 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>
162 lines
3.3 KiB
C++
162 lines
3.3 KiB
C++
/*------------------------------------------------------------------------*/
|
|
/* */
|
|
/* LDATE.H */
|
|
/* */
|
|
/* Copyright Borland International 1991, 1993 */
|
|
/* All Rights Reserved */
|
|
/* */
|
|
/*------------------------------------------------------------------------*/
|
|
|
|
#if !defined( __LDATE_H )
|
|
#define __LDATE_H
|
|
|
|
#define BI_OLDNAMES
|
|
|
|
#if !defined( __DOS_H )
|
|
#include <Dos.h>
|
|
#endif // __DOS_H
|
|
|
|
#if !defined( __CHECKS_H )
|
|
#include <checks.h>
|
|
#endif // __CHECKS_H
|
|
|
|
#if !defined( __SORTABLE_H )
|
|
#include "classlib\obsolete\Sortable.h"
|
|
#endif // __SORTABLE_H
|
|
|
|
#pragma option -Vo-
|
|
#if defined( __BCOPT__ ) && !defined( __FLAT__ ) && !defined( _ALLOW_po )
|
|
#pragma option -po-
|
|
#endif
|
|
|
|
_CLASSDEF(ostream)
|
|
_CLASSDEF(BaseDate)
|
|
_CLASSDEF(Date)
|
|
|
|
class _CLASSTYPE BaseDate : public Sortable
|
|
{
|
|
|
|
public:
|
|
|
|
unsigned Month() const;
|
|
unsigned Day() const;
|
|
unsigned Year() const;
|
|
void SetMonth( unsigned char );
|
|
void SetDay( unsigned char );
|
|
void SetYear( unsigned );
|
|
|
|
virtual hashValueType hashValue() const;
|
|
virtual int isEqual( const Object _FAR & ) const;
|
|
virtual int isLessThan( const Object _FAR & ) const;
|
|
virtual void printOn( ostream _FAR & ) const = 0;
|
|
|
|
protected:
|
|
|
|
BaseDate();
|
|
BaseDate( unsigned char, unsigned char, unsigned );
|
|
BaseDate( const BaseDate _FAR & );
|
|
|
|
private:
|
|
|
|
unsigned char MM;
|
|
unsigned char DD;
|
|
unsigned int YY;
|
|
|
|
};
|
|
|
|
inline BaseDate::BaseDate()
|
|
{
|
|
struct date d;
|
|
getdate( &d );
|
|
MM = d.da_mon;
|
|
DD = d.da_day;
|
|
YY = d.da_year;
|
|
}
|
|
|
|
inline BaseDate::BaseDate( unsigned char M, unsigned char D, unsigned Y )
|
|
{
|
|
SetMonth( M );
|
|
SetDay( D );
|
|
SetYear( Y );
|
|
}
|
|
|
|
inline BaseDate::BaseDate( const BaseDate _FAR & B ) :
|
|
MM(B.MM), DD(B.DD), YY(B.YY)
|
|
{
|
|
}
|
|
|
|
inline unsigned BaseDate::Month() const
|
|
{
|
|
return MM;
|
|
}
|
|
|
|
inline unsigned BaseDate::Day() const
|
|
{
|
|
return DD;
|
|
}
|
|
|
|
inline unsigned BaseDate::Year() const
|
|
{
|
|
return YY;
|
|
}
|
|
|
|
inline void BaseDate::SetMonth( unsigned char M )
|
|
{
|
|
PRECONDITION( M > 0 && M < 13 );
|
|
MM = M;
|
|
}
|
|
|
|
inline void BaseDate::SetDay( unsigned char D )
|
|
{
|
|
PRECONDITION( D < 32 );
|
|
DD = D;
|
|
}
|
|
|
|
inline void BaseDate::SetYear( unsigned Y )
|
|
{
|
|
YY = Y;
|
|
}
|
|
|
|
class _CLASSTYPE Date : public BaseDate
|
|
{
|
|
|
|
public:
|
|
|
|
Date();
|
|
Date( unsigned char, unsigned char, unsigned );
|
|
Date( const Date _FAR & );
|
|
|
|
virtual classType isA() const
|
|
{
|
|
return dateClass;
|
|
}
|
|
|
|
virtual char _FAR *nameOf() const
|
|
{
|
|
return "Date";
|
|
}
|
|
|
|
virtual void printOn( ostream _FAR & ) const;
|
|
|
|
};
|
|
|
|
inline Date::Date()
|
|
{
|
|
}
|
|
|
|
inline Date::Date( unsigned char M, unsigned char D, unsigned Y ) :
|
|
BaseDate( M, D, Y )
|
|
{
|
|
}
|
|
|
|
inline Date::Date( const Date& D ) : BaseDate( D )
|
|
{
|
|
}
|
|
|
|
#if defined( __BCOPT__ ) && !defined( __FLAT__ ) && !defined( _ALLOW_po )
|
|
#pragma option -po.
|
|
#endif
|
|
#pragma option -Vo.
|
|
|
|
#endif // __LDATE_H
|