- 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>
143 lines
4.1 KiB
C++
143 lines
4.1 KiB
C++
//----------------------------------------------------------------------------
|
|
// ObjectWindows - (C) Copyright 1991, 1993 by Borland International
|
|
//----------------------------------------------------------------------------
|
|
#ifndef __DIAGXPRT_H
|
|
#define __DIAGXPRT_H
|
|
|
|
#include <owl\owlpch.h>
|
|
#include <owl\applicat.h>
|
|
#include <owl\decframe.h>
|
|
#include <owl\controlb.h>
|
|
#include <owl\editfile.h>
|
|
#include <owl\buttonga.h>
|
|
#include <owl\dialog.h>
|
|
#include <owl\tinycapt.h>
|
|
#include <owl\menu.h>
|
|
#include <owl\statusba.h>
|
|
|
|
#if !defined(BI_PLAT_WIN16)
|
|
#error This sample requires TOOLHELP and must be built for the WIN16 env.
|
|
#endif
|
|
|
|
#include <toolhelp.h>
|
|
#include <iostream.h>
|
|
#include <cstring.h>
|
|
#include <stdio.h>
|
|
|
|
#define DIAG_INI "owl.ini"
|
|
#define DIAG_CLS "owldiag"
|
|
#define DIAG_RECT "rect"
|
|
#define DIAG_MODE "mode"
|
|
#define DIAG_SIZE "size"
|
|
|
|
#define CM_LOGPARAMERROR WM_USER+1000
|
|
#define CM_LOGERROR CM_LOGPARAMERROR+1
|
|
#define CM_OUTSTR CM_LOGERROR+1
|
|
#define CM_DEFAULT CM_OUTSTR+1
|
|
|
|
class TDispData {
|
|
public:
|
|
char ModuleName[80]; // Sizes?
|
|
char ProcName[256]; // Also gets used for OutputDebugString messages
|
|
UINT ErrorCode;
|
|
DWORD Data;
|
|
void far* far* Param;
|
|
};
|
|
|
|
class TDiagFrame : public TDecoratedFrame, public TTinyCaption {
|
|
public:
|
|
TDiagFrame(const char* t, TWindow* c);
|
|
|
|
protected:
|
|
LRESULT EvCommand(UINT id, HWND hWndCtl, UINT notifyCode);
|
|
void EvSysCommand(UINT cmdType, TPoint& p);
|
|
void EvSize(UINT type, TSize& size);
|
|
void SetupWindow();
|
|
void CleanupWindow();
|
|
void CmToggleSize();
|
|
|
|
private:
|
|
TRect rect;
|
|
|
|
DECLARE_RESPONSE_TABLE(TDiagFrame);
|
|
};
|
|
|
|
class TToolHelp {
|
|
public:
|
|
struct ERRMAP { UINT err; char* szErr; };
|
|
static ERRMAP errmap[];
|
|
void FormatLogParamError(char *p, int size, TDispData *d);
|
|
void FormatLogError(char *p, int size, TDispData *d);
|
|
|
|
char* GetTaskName();
|
|
char* GetProcName(FARPROC p);
|
|
|
|
private:
|
|
static char buffer[1024];
|
|
char TaskName[10];
|
|
char ProcName[80];
|
|
};
|
|
|
|
class TDiagClient : public TToolHelp, public TEditFile {
|
|
public:
|
|
enum { maxLines = 512 };
|
|
|
|
enum Mode { normalMode = 1, ripMode = 2 } mode;
|
|
enum Size { bigSize = 1, smallSize = 2 } size;
|
|
|
|
Size GetSize() {return size;}
|
|
void SetSize(Size s);
|
|
Mode GetMode() {return mode;}
|
|
void SetMode(Mode m) {mode = m;}
|
|
void SetupWindow();
|
|
|
|
void CleanupWindow();
|
|
static TDiagClient* pThis;
|
|
TFont* pFont0;
|
|
TFont* pFont1;
|
|
FARPROC pThunk;
|
|
|
|
protected:
|
|
int nActive;
|
|
|
|
void CmFileNewEnable(TCommandEnabler &c){ c.Enable(1); }
|
|
void CmFileOpenEnable(TCommandEnabler &c){ c.Enable(1); }
|
|
void CmFileSaveEnable(TCommandEnabler &c) { TEditFile::CmSaveEnable(c); }
|
|
void CmFileSaveAsEnable(TCommandEnabler &c) { c.Enable(1); }
|
|
void CmStartStopEnable(TCommandEnabler &c) { c.Enable(1); }
|
|
void CmSetupEnable(TCommandEnabler &c) { c.Enable(1); }
|
|
void CmStartEnable(TCommandEnabler &c) { c.Enable(!nActive); }
|
|
void CmStopEnable(TCommandEnabler &c) { c.Enable(nActive); }
|
|
void CmFileNew() { TEditFile::CmFileNew(); }
|
|
void CmFileOpen() { TEditFile::CmFileOpen(); }
|
|
void CmFileSave() { TEditFile::CmFileSave(); }
|
|
void CmFileSaveAs() { TEditFile::CmFileSaveAs(); }
|
|
void CmSetup();
|
|
void CmStart();
|
|
void CmStop();
|
|
void CmMem();
|
|
void CmHelp();
|
|
LRESULT CmOutStr(WPARAM wParam, LPARAM lParam);
|
|
LRESULT CmLogError(WPARAM wParam, LPARAM lParam);
|
|
LRESULT CmLogParamError(WPARAM wParam, LPARAM lParam);
|
|
LRESULT CmDefault(WPARAM wParam, LPARAM lParam);
|
|
void LoadMode();
|
|
void SaveMode();
|
|
|
|
// Override of TEditFile::CanClear()
|
|
//
|
|
BOOL CanClear();
|
|
|
|
DECLARE_RESPONSE_TABLE(TDiagClient);
|
|
};
|
|
|
|
class TOwlDiagApp : public TApplication {
|
|
public:
|
|
void InitMainWindow();
|
|
|
|
private:
|
|
static int speedbar[];
|
|
};
|
|
|
|
#endif
|