Merge remote-tracking branch 'origin/master'

# Conflicts:
#	game/reconstructed/btl4gau2.cpp
This commit is contained in:
Cyd
2026-07-17 15:48:11 -05:00
17 changed files with 598 additions and 85 deletions
+33
View File
@@ -2631,6 +2631,39 @@ char*
return source;
}
//#############################################################################
// dpl material-name callback registry (FUN_0049664c / DAT_00527f24).
//-----------------------------------------------------------------------------
// The 1995 dpl board applied the installed callback to every material name as
// a model loaded (dpl_LoadObject). The port analogue: the BGF loader
// (bgfload.cpp MaterialResolver::resolve) runs every "lib:material" name
// through dpl_ApplyMaterialNameCallback before resolving it, so the per-pilot
// paint substitutions (skin: -> _<color><serno>:, skin:lgo -> emblem<serno>:)
// installed by SetupMaterialSubstitutionList take effect on the mech model
// loads that happen between the Setup/TearDown bracket.
//#############################################################################
static char *(*gMaterialNameCallback)(char *source) = NULL;
void dpl_SetMaterialNameCallback(char *(*callback)(char *source))
{
gMaterialNameCallback = callback;
}
// C++-friendly wrapper honouring the callback's legacy protocol (the callback
// may delete[] the input and return a new[] buffer). Returns the (possibly
// substituted) name.
std::string dpl_ApplyMaterialNameCallback(const std::string &name)
{
if (gMaterialNameCallback == NULL)
return name;
char *buf = new char[name.size() + 1];
strcpy(buf, name.c_str());
buf = gMaterialNameCallback(buf);
std::string result(buf);
delete [] buf;
return result;
}
vector<MONITORINFO> DPLRenderer::MonitorsCreateAll(int &monitorCount)
{
monitorCount = gD3D->GetAdapterCount();