Files
firestorm/Gameleap/code/mw4
6c8650fa98 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>
2026-08-09 16:08:33 -05:00
..