for the future to support 64x64 skins

This commit is contained in:
LazyByteDev
2026-03-05 04:59:57 -05:00
parent 4a994750d8
commit e8a3d8cfde
2 changed files with 25 additions and 0 deletions

View File

@@ -125,18 +125,42 @@ void HumanoidModel::_init(float g, float yOffset, int texWidth, int texHeight)
m_uiAnimOverrideBitmask = 0L;
}
void HumanoidModel::_reinit(int newTexWidth, int newTexHeight)
{
if (newTexWidth == texWidth && newTexHeight == texHeight)
return;
app.DebugPrintf("HumanoidModel::ReinitIfDifferentSize - Reinitialising from (%d x %d) to (%d x %d)\n",
texWidth, texHeight, newTexWidth, newTexHeight);
delete cloak; cloak = nullptr;
delete ear; ear = nullptr;
delete head; head = nullptr;
delete hair; hair = nullptr;
delete body; body = nullptr;
delete arm0; arm0 = nullptr;
delete arm1; arm1 = nullptr;
delete leg0; leg0 = nullptr;
delete leg1; leg1 = nullptr;
_init(0, m_fYOffset, newTexWidth, newTexHeight);
}
HumanoidModel::HumanoidModel() : Model()
{
printf("HumanoidModel::HumanoidModel\n");
_init(0, 0, 64, 32);
}
HumanoidModel::HumanoidModel(float g) : Model()
{
printf("HumanoidModel::HumanoidModel float g\n");
_init(g, 0, 64, 32);
}
HumanoidModel::HumanoidModel(float g, float yOffset, int texWidth, int texHeight) : Model()
{
printf("HumanoidModel::HumanoidModel texWidth, texHeight\n");
_init(g,yOffset,texWidth,texHeight);
}

View File

@@ -50,6 +50,7 @@ public:
void _init(float g, float yOffset, int texWidth, int texHeight); // 4J added
void _reinit(int newTexWidth, int newTexHeight); // fixes 64x64 skins
HumanoidModel();
HumanoidModel(float g);
HumanoidModel(float g, float yOffset, int texWidth, int texHeight);