Per-pilot mech paint: wire the color/badge/patch substitution end-to-end
- Mech::resourceNameA/B/C -> real CString members (the binary's 16-byte CStringRepresentation; deep-copy bind from the MakeMessage = FUN_00402a98, implicit member dtors) + paint-name accessors - SetupMaterialSubstitutionList reads the real egg names ([paint] log); TearDown clears the callback first (FUN_004d11e8) - dpl_SetMaterialNameCallback is real now (L4VIDEO registry); bgfload MaterialResolver::resolve() applies it to every material name -- the port analogue of the dpl board rewriting names at load - MP_BHMC.EGG: color=Red -> Crimson (vehicletable has no Red; binary Fail()ed) Verified live 2-node MP: crimson MadCat with hip hazard stripes + yellow VGL leg emblems; white Blackhawk + emblems; replicants painted on both nodes. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
dda517b65c
commit
e0474ff92a
@@ -11,6 +11,11 @@
|
||||
#include <set>
|
||||
#include <array>
|
||||
|
||||
// L4VIDEO.cpp: the dpl material-name callback registry. While a mech loads
|
||||
// (the SetupMaterialSubstitutionList / TearDown bracket) this rewrites
|
||||
// "blhskin:..." -> "blh_wht0:..." / "emblem0:..." -- the per-pilot paint.
|
||||
std::string dpl_ApplyMaterialNameCallback(const std::string &name);
|
||||
|
||||
namespace {
|
||||
|
||||
// ---- DIV-BIZ2 tag ids (PFBIZTAG.H), masked form (tagword & 0x2fff) ----
|
||||
@@ -503,7 +508,11 @@ struct MaterialResolver {
|
||||
return libs.emplace(lib, std::move(table)).first->second;
|
||||
}
|
||||
|
||||
MatInfo resolve(const std::string& full) {
|
||||
MatInfo resolve(const std::string& fullIn) {
|
||||
// Per-pilot paint: run the name through the installed dpl material-name
|
||||
// callback first (identity when none) -- the board rewrote names at
|
||||
// load time, before any material lookup.
|
||||
std::string full = dpl_ApplyMaterialNameCallback(fullIn);
|
||||
auto cached = resolvedCache.find(full);
|
||||
if (cached != resolvedCache.end()) return cached->second;
|
||||
MatInfo info;
|
||||
|
||||
Reference in New Issue
Block a user