source410: literal 4.10 source reconstruction + BC++ 4.52 fleet toolchain archived
- 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>
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
#----------------------------------------------------------------------------
|
||||
# ObjectWindows - (C) Copyright 1991, 1993 by Borland International
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
MODELS = mlfd
|
||||
EXERES = progmanx
|
||||
!include $(BCEXAMPLEDIR)\owlmake.gen
|
||||
Binary file not shown.
@@ -0,0 +1,239 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// ObjectWindows - (C) Copyright 1991, 1993 by Borland International
|
||||
//----------------------------------------------------------------------------
|
||||
#include <owl\owlpch.h>
|
||||
#include <owl\dialog.h>
|
||||
#include <owl\framewin.h>
|
||||
#include <owl\applicat.h>
|
||||
#include <owl\listbox.h>
|
||||
#include <owl\inputdia.h>
|
||||
#include <string.h>
|
||||
#include <ddeml.h>
|
||||
#include "progmanx.h" // Dialog item IDs
|
||||
|
||||
|
||||
//
|
||||
// TDDEProgTalk is the main window of the application.
|
||||
// It engages in a DDE conversation with the Program Manager
|
||||
// to create program groups with a
|
||||
// user specified list of program items.
|
||||
//
|
||||
// See DDEML example
|
||||
|
||||
|
||||
class TDDEProgTalk : public TDialog{
|
||||
public:
|
||||
// Create a TListBox object to represent the
|
||||
// dialog's list box.
|
||||
//
|
||||
TDDEProgTalk(TWindow* parent, TResId resId) :
|
||||
TDialog(parent, resId),
|
||||
CallBackProc((FARPROC)CallBack) {
|
||||
ListBox = new TListBox(this, ID_LISTBOX);
|
||||
}
|
||||
~TDDEProgTalk();
|
||||
|
||||
private:
|
||||
void SetupWindow();
|
||||
void CmAddItem();
|
||||
void CmDeleteItem();
|
||||
void CmClearItems();
|
||||
void CmCreateGroup();
|
||||
void EvDDEAck(HWND hWnd, LONG lParam);
|
||||
|
||||
TListBox* ListBox;
|
||||
|
||||
//DDEML
|
||||
static HDDEDATA FAR PASCAL _export CallBack(WORD, WORD, HCONV, HSZ, HSZ,
|
||||
HDDEDATA, DWORD, DWORD);
|
||||
DWORD InstId;
|
||||
HCONV HConv;
|
||||
HSZ Service;
|
||||
HSZ Topic;
|
||||
TProcInstance CallBackProc;
|
||||
|
||||
DECLARE_RESPONSE_TABLE(TDDEProgTalk);
|
||||
};
|
||||
|
||||
static TDDEProgTalk* This = 0;
|
||||
|
||||
DEFINE_RESPONSE_TABLE1(TDDEProgTalk, TDialog)
|
||||
EV_COMMAND(CM_ADDITEM, CmAddItem),
|
||||
EV_COMMAND(CM_DELETEITEM, CmDeleteItem),
|
||||
EV_COMMAND(CM_CLEARITEMS, CmClearItems),
|
||||
EV_COMMAND(CM_CREATEGROUP, CmCreateGroup),
|
||||
END_RESPONSE_TABLE;
|
||||
|
||||
TDDEProgTalk::~TDDEProgTalk()
|
||||
{
|
||||
// This clean up is required for those resources that were allocated during
|
||||
// the DDEML conversation.
|
||||
//
|
||||
if (HConv)
|
||||
DdeDisconnect(HConv); // Let the other party know we are leaving
|
||||
|
||||
if (InstId) {
|
||||
DdeFreeStringHandle(InstId, Service);
|
||||
DdeFreeStringHandle(InstId, Topic);
|
||||
DdeUninitialize(InstId);
|
||||
}
|
||||
}
|
||||
|
||||
// SetupWindow is called right after the DDE window
|
||||
// is created. Initiate the DDE conversation.
|
||||
//
|
||||
void
|
||||
TDDEProgTalk::SetupWindow() {
|
||||
InstId = 0; // MUST be 0 the first time DdeInitialize() is called!
|
||||
HConv = 0;
|
||||
Service = Topic = 0;
|
||||
This = this;
|
||||
|
||||
TDialog::SetupWindow();
|
||||
|
||||
// The code below sets up the DDEML call back function that is used by the
|
||||
// DDE Management Library to carry out data transfers between
|
||||
// applications.
|
||||
//
|
||||
if (CallBackProc) {
|
||||
if (DdeInitialize(&InstId, (PFNCALLBACK)(FARPROC)CallBackProc, APPCMD_CLIENTONLY, 0) == DMLERR_NO_ERROR) {
|
||||
Service = DdeCreateStringHandle(InstId, "PROGMAN", CP_WINANSI);
|
||||
Topic = DdeCreateStringHandle(InstId, "PROGMAN", CP_WINANSI);
|
||||
if (!Service || !Topic) {
|
||||
MessageBox("Creation of strings failed.", Title, MB_ICONSTOP);
|
||||
PostQuitMessage(0);
|
||||
}
|
||||
} else {
|
||||
MessageBox("Initialization failed.", Title, MB_ICONSTOP);
|
||||
PostQuitMessage(0);
|
||||
}
|
||||
} else {
|
||||
MessageBox("Setup of callback failed.", Title, MB_ICONSTOP);
|
||||
PostQuitMessage(0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//
|
||||
// Add item button response method. Bring up the Add item dialog to
|
||||
// input a program item string, and add that item to the list box.
|
||||
//
|
||||
void
|
||||
TDDEProgTalk::CmAddItem()
|
||||
{
|
||||
char name[64] = "";
|
||||
|
||||
if (TInputDialog(this, "Add an Item to the Group", "Item &name:",
|
||||
name, sizeof(name)).Execute() != IDCANCEL)
|
||||
ListBox->AddString(name);
|
||||
}
|
||||
|
||||
//
|
||||
// Delete item button response method. Delete the currently selected
|
||||
// item in the list box.
|
||||
//
|
||||
void
|
||||
TDDEProgTalk::CmDeleteItem()
|
||||
{
|
||||
ListBox->DeleteString(ListBox->GetSelIndex());
|
||||
}
|
||||
|
||||
//
|
||||
// Clear items button response method. Clear the list box.
|
||||
//
|
||||
void
|
||||
TDDEProgTalk::CmClearItems()
|
||||
{
|
||||
ListBox->ClearList();
|
||||
}
|
||||
|
||||
//
|
||||
// Create group button response method. Bring up the Create Group
|
||||
// dialog to input the program group name.
|
||||
//
|
||||
void
|
||||
TDDEProgTalk::CmCreateGroup()
|
||||
{
|
||||
char* createGroup = "[CreateGroup(%s)]";
|
||||
char* addItem = "[AddItem(%s)]";
|
||||
|
||||
char name[64] = "";
|
||||
|
||||
if (TInputDialog(this,
|
||||
"Create a new group", "&Name of new group:",
|
||||
name, sizeof(name)).Execute() != IDCANCEL) {
|
||||
// Connect to the prog manager
|
||||
HConv = DdeConnect(InstId, Service, Topic, 0);
|
||||
if (!HConv) {
|
||||
MessageBox("Can't start conversation.\nMake sure PROGMAN is running.", Title, MB_ICONSTOP);
|
||||
return;
|
||||
}
|
||||
|
||||
// Subtract 2 for the '%s' in 'createGroup', plus 1 for null terminator.
|
||||
//
|
||||
int len = strlen(name) + strlen(createGroup) - 2 + 1;
|
||||
int count = ListBox->GetCount();
|
||||
for (int i = 0; i < count; i++)
|
||||
// Subtract 2 for the '%s' in 'addItem'.
|
||||
len += ListBox->GetStringLen(i) + strlen(addItem) - 2;
|
||||
|
||||
LPSTR commands = new char[len];
|
||||
LPSTR ptr=commands;
|
||||
wsprintf(ptr, createGroup, (LPSTR)name);
|
||||
for (i = 0; i < count; i++) {
|
||||
ListBox->GetString(name, i);
|
||||
ptr += strlen(ptr);
|
||||
wsprintf(ptr, addItem, (LPSTR)name);
|
||||
}
|
||||
|
||||
//Send command to progman
|
||||
if (DdeClientTransaction((LPBYTE)commands, len, HConv, 0L, CF_TEXT, XTYP_EXECUTE, 1000, 0))
|
||||
ListBox->ClearList();
|
||||
|
||||
delete commands;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// This call back function is the heart of interaction between this program
|
||||
// and DDEML. Because Windows doesn't pass C++ 'this' pointers to call
|
||||
// back functions, a static 'this' pointer was used. If you wanted to
|
||||
// create a Client that would allow for more than one conversation, using a
|
||||
// List of conversations and their associated 'this' pointers would be one
|
||||
// possible method to try. The XTYP_ constants are described in detail in
|
||||
// the online help.
|
||||
//
|
||||
HDDEDATA FAR PASCAL _export
|
||||
TDDEProgTalk::CallBack(WORD type, WORD, HCONV /*hConv*/, HSZ, HSZ, HDDEDATA /*hData*/,
|
||||
DWORD, DWORD)
|
||||
{
|
||||
switch (type) {
|
||||
case XTYP_DISCONNECT:
|
||||
This->MessageBox("Disconnected.", This->Title, MB_ICONINFORMATION);
|
||||
This->HConv = 0;
|
||||
break;
|
||||
|
||||
case XTYP_ERROR:
|
||||
This->MessageBox("A critical DDE error has occured.", This->Title, MB_ICONINFORMATION);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
// TDdeApp is the application object. It creates a main window of type
|
||||
// TDDEProgTalk.
|
||||
//
|
||||
class TDDEApp : public TApplication {
|
||||
public:
|
||||
TDDEApp() : TApplication() {}
|
||||
void InitMainWindow() {
|
||||
MainWindow = new TFrameWindow(0, "ProgTalk", new TDDEProgTalk(0, IDD_PROGTALK), TRUE);
|
||||
}
|
||||
};
|
||||
|
||||
int
|
||||
OwlMain(int /*argc*/, char* /*argv*/ [])
|
||||
{
|
||||
return TDDEApp().Run();
|
||||
}
|
||||
Binary file not shown.
@@ -0,0 +1,18 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// ObjectWindows - (C) Copyright 1991, 1993 by Borland International
|
||||
// Resource & command IDs
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
#define IDD_PROGTALK 100
|
||||
|
||||
//#define IDD_DDEDIALOG 100
|
||||
//#define IDD_ADDDIALOG 101
|
||||
//#define IDD_CREATEDIALOG 102
|
||||
|
||||
// DDE dialog item IDs
|
||||
|
||||
#define ID_LISTBOX 100
|
||||
#define CM_ADDITEM 101
|
||||
#define CM_DELETEITEM 102
|
||||
#define CM_CLEARITEMS 103
|
||||
#define CM_CREATEGROUP 104
|
||||
@@ -0,0 +1,45 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// ObjectWindows - (C) Copyright 1991, 1993 by Borland International
|
||||
//----------------------------------------------------------------------------
|
||||
#ifndef WORKSHOP_INVOKED
|
||||
#include <windows.h>
|
||||
#endif
|
||||
#include "progmanx.h"
|
||||
|
||||
#include <owl\inputdia.rh>
|
||||
#include <owl\inputdia.rc>
|
||||
|
||||
IDD_PROGTALK DIALOG 47, 35, 170, 104
|
||||
STYLE WS_CHILD | WS_VISIBLE
|
||||
FONT 8, "MS Sans Serif"
|
||||
{
|
||||
DEFPUSHBUTTON "&Add item", CM_ADDITEM, 99, 15, 57, 14
|
||||
PUSHBUTTON "&Delete item", CM_DELETEITEM, 99, 33, 57, 14
|
||||
PUSHBUTTON "C&lear items", CM_CLEARITEMS, 99, 51, 57, 14
|
||||
PUSHBUTTON "&Create group", CM_CREATEGROUP, 99, 81, 57, 14
|
||||
CONTROL "LISTBOX", ID_LISTBOX, "LISTBOX", WS_CHILD | WS_VISIBLE | WS_BORDER | WS_VSCROLL | WS_TABSTOP | LBS_NOTIFY | LBS_SORT, 8, 16, 80, 80
|
||||
LTEXT "&Program group items:", -1, 8, 6, 80, 8, NOT WS_GROUP
|
||||
}
|
||||
|
||||
#if 0
|
||||
IDD_ADDDIALOG DIALOG DISCARDABLE LOADONCALL PURE MOVEABLE 6, 16, 154, 48
|
||||
STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | 0x80L
|
||||
CAPTION "Add item"
|
||||
BEGIN
|
||||
CONTROL "Item &name" -1, "STATIC", WS_CHILD | WS_VISIBLE, 8, 8, 36, 8
|
||||
CONTROL "" ID_INPUT, "EDIT", WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP | 0x80L, 48, 6, 96, 12
|
||||
CONTROL "&Add" IDOK, "BUTTON", WS_CHILD | WS_VISIBLE | WS_TABSTOP | 0x1L, 34, 26, 42, 12
|
||||
CONTROL "Cancel" IDCANCEL, "BUTTON", WS_CHILD | WS_VISIBLE | WS_TABSTOP, 83, 26, 42, 12
|
||||
END
|
||||
|
||||
|
||||
IDD_CREATEDIALOG DIALOG DISCARDABLE LOADONCALL PURE MOVEABLE 6, 16, 154, 48
|
||||
STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | 0x80L
|
||||
CAPTION "Create group"
|
||||
BEGIN
|
||||
CONTROL "Group &name" -1, "STATIC", WS_CHILD | WS_VISIBLE, 8, 8, 40, 8
|
||||
CONTROL "" ID_INPUT, "EDIT", WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP | 0x80L, 52, 6, 92, 12
|
||||
CONTROL "&Create" IDOK, "BUTTON", WS_CHILD | WS_VISIBLE | WS_TABSTOP | 0x1L, 34, 26, 42, 12
|
||||
CONTROL "Cancel" IDCANCEL, BUTTON", WS_CHILD | WS_VISIBLE | WS_TABSTOP, 83, 26, 42, 12
|
||||
END
|
||||
#endif
|
||||
Reference in New Issue
Block a user