- 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>
169 lines
5.1 KiB
C++
169 lines
5.1 KiB
C++
//----------------------------------------------------------------------------
|
|
// ObjectWindows - (C) Copyright 1991, 1993 by Borland International
|
|
//----------------------------------------------------------------------------
|
|
#include <owl\owlpch.h>
|
|
#include <owl\applicat.h>
|
|
#include <owl\radiobut.h>
|
|
#include <owl\groupbox.h>
|
|
#include <owl\static.h>
|
|
#include <owl\framewin.h>
|
|
#include <cstring.h>
|
|
#include <stdio.h>
|
|
#include <string.h>
|
|
|
|
const int ID_BCCGROUP = 100;
|
|
const int ID_BCC1 = 101;
|
|
const int ID_BCC5 = 102;
|
|
const int ID_BCC10 = 103;
|
|
const int ID_BCCX = 104;
|
|
const int ID_CPPGROUP = 110;
|
|
const int ID_CPP1 = 111;
|
|
const int ID_CPP5 = 112;
|
|
const int ID_CPP10 = 113;
|
|
const int ID_CPPX = 114;
|
|
const int ID_PLACEBUTTON = 131;
|
|
const int ID_CANCELBUTTON = 132;
|
|
|
|
class TOrderGroupBox : public TGroupBox {
|
|
public:
|
|
TOrderGroupBox(TWindow* parent,
|
|
int id,
|
|
const char far* text,
|
|
int X, int Y, int W, int H,
|
|
TModule* module = 0) :
|
|
TGroupBox(parent, id, text, X, Y, W, H, module) {}
|
|
|
|
void SelectionChanged(int controlId);
|
|
|
|
string itemsOrderedStr; // stuff ordered.
|
|
};
|
|
|
|
//
|
|
// SelectionChanged(). Called by check boxes and radio buttons (or your own
|
|
// control) when checked/unchecked.
|
|
//
|
|
void
|
|
TOrderGroupBox::SelectionChanged(int controlId)
|
|
{
|
|
switch (controlId) {
|
|
case ID_BCC1 :
|
|
itemsOrderedStr = "1 BCC compiler";
|
|
break;
|
|
case ID_BCC5 :
|
|
itemsOrderedStr = "5 BCC compilers";
|
|
break;
|
|
case ID_BCC10 :
|
|
itemsOrderedStr = "10 BCC compilers";
|
|
break;
|
|
case ID_BCCX :
|
|
itemsOrderedStr = "X BCC compilers";
|
|
break;
|
|
case ID_CPP1 :
|
|
itemsOrderedStr = "1 Professional Pack";
|
|
break;
|
|
case ID_CPP5 :
|
|
itemsOrderedStr = "5 Professional Packs";
|
|
break;
|
|
case ID_CPP10 :
|
|
itemsOrderedStr = "10 Professional Packs";
|
|
break;
|
|
case ID_CPPX :
|
|
itemsOrderedStr = "X Professional Packs";
|
|
break;
|
|
};
|
|
}
|
|
|
|
//////////////////////////////////////////////////////////////////////
|
|
|
|
class TOrderWindow : public TFrameWindow {
|
|
public:
|
|
TOrderGroupBox* BCCGroup;
|
|
TOrderGroupBox* CPPGroup;
|
|
|
|
TOrderWindow(TWindow* parent, const char* title);
|
|
void PlaceOrder();
|
|
void CancelOrder();
|
|
|
|
DECLARE_RESPONSE_TABLE(TOrderWindow);
|
|
};
|
|
|
|
DEFINE_RESPONSE_TABLE1(TOrderWindow, TFrameWindow)
|
|
EV_COMMAND(ID_PLACEBUTTON, PlaceOrder),
|
|
EV_COMMAND(ID_CANCELBUTTON, CancelOrder),
|
|
END_RESPONSE_TABLE;
|
|
|
|
TOrderWindow::TOrderWindow(TWindow* parent, const char* title)
|
|
: TWindow(parent, title),
|
|
TFrameWindow(parent, title)
|
|
{
|
|
TRadioButton* radio;
|
|
Attr.X = 20;
|
|
Attr.Y = 5;
|
|
Attr.W = 380;
|
|
Attr.H = 260;
|
|
new TStatic(this, -1, "Borland C++ now includes an extensive Windows",
|
|
20, 10, 380, 15, 55);
|
|
new TStatic(this, -1, "class library and a complete toolkit for Windows",
|
|
20, 27, 380, 15, 45);
|
|
new TStatic(this, -1, "resource editing.", 20, 44, 380, 15, 55);
|
|
new TStatic(this, -1, " How many copies would you like?",
|
|
10, 61, 380, 15, 35);
|
|
BCCGroup = new TOrderGroupBox(this, ID_BCCGROUP, "BCC Compiler",
|
|
20, 80, 150, 105);
|
|
radio = new TRadioButton(this, ID_BCC1, "1", 30, 100, 40, 17, BCCGroup);
|
|
radio->Attr.Style |= WS_TABSTOP;
|
|
new TRadioButton(this, ID_BCC5, "5", 30, 120, 40, 17, BCCGroup);
|
|
new TRadioButton(this, ID_BCC10, "10", 30, 140, 40, 17, BCCGroup);
|
|
new TRadioButton(this, ID_BCCX, "X", 30, 160, 40, 17, BCCGroup);
|
|
CPPGroup = new TOrderGroupBox(this, ID_CPPGROUP, "Professional Packs",
|
|
189, 80, 150, 105);
|
|
radio = new TRadioButton(this, ID_CPP1, "1", 200, 100, 40, 17, CPPGroup);
|
|
radio->Attr.Style |= WS_TABSTOP;
|
|
new TRadioButton(this, ID_CPP5, "5", 200, 120, 40, 17, CPPGroup);
|
|
new TRadioButton(this, ID_CPP10, "10", 200, 140, 40, 17, CPPGroup);
|
|
new TRadioButton(this, ID_CPPX, "X", 200, 160, 40, 17, CPPGroup);
|
|
new TButton(this, ID_PLACEBUTTON, "PLACE ORDER", 20, 195, 157, 25, FALSE);
|
|
new TButton(this, ID_CANCELBUTTON, "CANCEL ORDER", 181, 195, 157, 25, FALSE);
|
|
EnableKBHandler();
|
|
}
|
|
|
|
//
|
|
// PlaceOrder(). Display order. Display header and items ordered, from group
|
|
// box.
|
|
//
|
|
void
|
|
TOrderWindow::PlaceOrder()
|
|
{
|
|
string msg;
|
|
string zero("0"); // if nothing ordered.
|
|
|
|
msg += "BCC: " + (BCCGroup->itemsOrderedStr.is_null() ? zero :
|
|
BCCGroup->itemsOrderedStr) + "\n";
|
|
msg += "Professional: " + (CPPGroup->itemsOrderedStr.is_null() ? zero :
|
|
CPPGroup->itemsOrderedStr) + "\n";
|
|
MessageBox(msg.c_str(), "Order", MB_OK);
|
|
}
|
|
|
|
void
|
|
TOrderWindow::CancelOrder()
|
|
{
|
|
MessageBox("Order Canceled", "Order", MB_OK);
|
|
}
|
|
|
|
//----------------------------------------------------------------------------
|
|
|
|
class TOrderApp : public TApplication {
|
|
public:
|
|
TOrderApp() : TApplication() {}
|
|
void InitMainWindow() {
|
|
MainWindow = new TOrderWindow(0, "BCC Order Form");
|
|
}
|
|
};
|
|
|
|
int
|
|
OwlMain(int /*argc*/, char* /*argv*/ [])
|
|
{
|
|
TOrderApp app;
|
|
return app.Run();
|
|
}
|