mw4print: declare the -debug globals in mw4print.cpp

Release build failed:

  mw4print.cpp(60) : error C2065: 'g_bDebugLog' : undeclared identifier
  mw4print.cpp(61) : error C2065: 'DbgLog' : undeclared identifier

3256c103 added the -debug switch and put both symbols in mw4dummy.h, but
mw4dummy.cpp is #included into ChildView.cpp rather than compiled on its own,
and mw4print.cpp is a separate translation unit including only stdafx.h,
mw4print.h and MainFrm.h. It therefore saw neither declaration. ChildView.cpp
and recscore.cpp compiled because they pull in mw4dummy.h directly.

Declared locally rather than including mw4dummy.h. That header is a game-source
shim: it #defines MString to CString, Scalar to float, Verify and gosASSERT to
nothing, and declares stub ReplicatorID / MemoryStream classes plus the Adept
damage-type enum. It exists so game sources can be compiled into the printer,
and it has no business reaching the MFC application code. mw4print.cpp already
reached AssetsDirectory1 the same way, so this follows the file's own
convention rather than introducing one.

recscore.cpp also calls DbgLog and is listed in the .dsp, but it carries
"# PROP Exclude_From_Build 1" and is only ever compiled through ChildView.cpp,
so mw4print.cpp was the single gap.

Co-authored-by: Claude Opus 5 (Anthropic) <noreply@anthropic.com>
Co-authored-by: GitHub Copilot <copilot@github.com>
This commit is contained in:
2026-08-09 16:08:33 -05:00
co-authored by Claude Opus 5 GitHub Copilot
parent 2dea177909
commit 6c8650fa98
@@ -25,7 +25,13 @@ END_MESSAGE_MAP()
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// CMW4PrintApp construction // CMW4PrintApp construction
// Defined in mw4dummy.cpp, which is compiled into ChildView.cpp rather than on its own.
// Declared here instead of including mw4dummy.h: that header is a game-source shim that
// redefines MString, Scalar and Verify, and must not reach the MFC application code.
extern char AssetsDirectory1[MAX_PATH]; extern char AssetsDirectory1[MAX_PATH];
extern bool g_bDebugLog;
void DbgLog(const char* fmt, ...);
CMW4PrintApp::CMW4PrintApp() CMW4PrintApp::CMW4PrintApp()
{ {