Files
TeslaRel410/BORLAND/BC45/EXPERT/OWL/TWINDOW.OWL
T
CydandClaude Fable 5 63312e07f9 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>
2026-07-19 07:33:26 -05:00

160 lines
4.6 KiB
Plaintext

<<[H]TWindow [[TWindow]]
##{hheader.snp}
#include <owl\owlpch.h>
#pragma hdrstop
##<<TApplication QUERY_FILENAME_CPP [[Filename]]
#include "[[Filename]].rh" // Definition of all resources.
//{{TWindow = [[TWindow]]}}
class [[TWindow]] : public TWindow {
public:
[[TWindow]] (TWindow* parent, const char far* title = 0, TModule* module = 0);
virtual ~[[TWindow]] ();
##--BEGIN-- @OPT_APPL_PRINTING
//{{[[TWindow]]VIRTUAL_BEGIN}}
public:
virtual void Paint (TDC& dc, bool erase, TRect& rect);
##:DBVirtual(\\"[[TWindow]]", "Paint")
//{{[[TWindow]]VIRTUAL_END}}
//{{[[TWindow]]RSP_TBL_BEGIN}}
protected:
void EvGetMinMaxInfo (MINMAXINFO far& minmaxinfo);
//{{[[TWindow]]RSP_TBL_END}}
DECLARE_RESPONSE_TABLE([[TWindow]]);
##--END-- @OPT_APPL_PRINTING
}; //{{[[TWindow]]}}
##{hfooter.snp}
>>[H]TWindow [[TWindow]]
<<[CPP]TWindow [[TWindow]]
##{cheader.snp}
#include <owl\owlpch.h>
#pragma hdrstop
##<<TApplication QUERY_FILE_H [[FileName]]
#include "[[FileName]]"
##--BEGIN-- !@OPT_APPL_DOCVIEW
## --BEGIN-- @QUERY_APPL_MODEL == VALUE_MDI
##: <<TMDIChild QUERY_WIND_CLIENT [[Client]]
##: <<*Client QUERY_FILE_H [[FileName]]
#include "[[FileName]]"
## --END-- @QUERY_APPL_MODEL == VALUE_MDI
## --BEGIN-- @QUERY_APPL_MODEL == VALUE_SDI
## --END-- @QUERY_APPL_MODEL == VALUE_SDI
##--END-- !@OPT_APPL_DOCVIEW
##QUERY_FILE_H [[FileName]]
#include "[[FileName]]"
#include <stdio.h>
//{{[[TWindow]] Implementation}}
##--BEGIN-- @OPT_APPL_PRINTING
##--BEGIN-- @QUERY_APPL_COMMENT == VALUE_VERBOSE
//
// Build a response table for all messages/commands handled
// by [[TWindow]] derived from TWindow.
//
##--END-- @QUERY_APPL_COMMENT == VALUE_VERBOSE
DEFINE_RESPONSE_TABLE1([[TWindow]], TWindow)
//{{[[TWindow]]RSP_TBL_BEGIN}}
##:DBResponse(\\"[[TWindow]]", "", "", "WM_GETMINMAXINFO", "")
EV_WM_GETMINMAXINFO,
//{{[[TWindow]]RSP_TBL_END}}
END_RESPONSE_TABLE;
##--END-- @OPT_APPL_PRINTING
##--BEGIN-- @QUERY_APPL_COMMENT == VALUE_VERBOSE
//////////////////////////////////////////////////////////
// [[TWindow]]
// ==========
// Construction/Destruction handling.
##--END-- @QUERY_APPL_COMMENT == VALUE_VERBOSE
[[TWindow]]::[[TWindow]] (TWindow* parent, const char far* title, TModule* module)
: TWindow(parent, title, module)
{
##QUERY_WIND_STYLE [[StyleAttributes]]
##StyleAttributes != "" 3
// Override the default window style for TWindow.
[[StyleAttributes]]
##QUERY_WIND_BACKGRND [[BackgroundColor]]
##BackgroundColor != "" 3
// Change the window's background color
SetBkgndColor([[BackgroundColor]]);
// INSERT>> Your constructor code here.
}
[[TWindow]]::~[[TWindow]] ()
{
Destroy();
// INSERT>> Your destructor code here.
}
##--BEGIN-- @OPT_APPL_PRINTING == TRUE
##--BEGIN-- @QUERY_APPL_COMMENT == VALUE_VERBOSE
//
// Paint routine for Window, Printer, and PrintPreview for an TWindow client.
//
##--END-- @QUERY_APPL_COMMENT == VALUE_VERBOSE
void [[TWindow]]::Paint (TDC&, bool, TRect& rect)
{
##<<TApplication QUERY_CLASS_NAME [[TApplication]]
[[TApplication]] *theApp = TYPESAFE_DOWNCAST(GetApplication(), [[TApplication]]);
if (theApp) {
##:@QUERY_APPL_COMMENT == VALUE_VERBOSE
// Only paint if we're printing and we have something to paint, otherwise do nothing.
if (theApp->Printing && theApp->Printer && !rect.IsEmpty()) {
##:@QUERY_APPL_COMMENT == VALUE_VERBOSE 2
// Use pageSize to get the size of the window to render into. For a Window it's the client area,
// for a printer it's the printer DC dimensions and for print preview it's the layout window.
TSize pageSize(rect.right - rect.left, rect.bottom - rect.top);
TPrintDialog::TData &printerData = theApp->Printer->GetSetup();
##:@QUERY_APPL_COMMENT == VALUE_VERBOSE
// Compute the number of pages to print.
printerData.MinPage = 1;
printerData.MaxPage = 1;
// INSERT>> Special printing code goes here.
} else {
// INSERT>> Normal painting code goes here.
}
}
}
void [[TWindow]]::EvGetMinMaxInfo (MINMAXINFO far& minmaxinfo)
{
##<<TApplication QUERY_CLASS_NAME [[TApplication]]
[[TApplication]] *theApp = TYPESAFE_DOWNCAST(GetApplication(), [[TApplication]]);
if (theApp) {
if (theApp->Printing) {
minmaxinfo.ptMaxSize = TPoint(32000, 32000);
minmaxinfo.ptMaxTrackSize = TPoint(32000, 32000);
return;
}
}
TWindow::EvGetMinMaxInfo(minmaxinfo);
}
##--END-- @OPT_APPL_PRINTING == TRUE
>>[CPP]TWindow [[TWindow]]