mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-18 11:19:10 +00:00
Avatar Clothing data => plString
This commit is contained in:
@ -4527,12 +4527,12 @@ plClothingItem *hsMaterialConverter::GenerateClothingItem(plClothingMtl *mtl, co
|
||||
{
|
||||
plString clothKeyName;
|
||||
plClothingItem *cloth = new plClothingItem();
|
||||
cloth->SetName(mtl->GetName());
|
||||
cloth->SetName((const char *)mtl->GetName());
|
||||
cloth->fSortOrder = (mtl->GetDefault() ? 0 : 1);
|
||||
|
||||
const char *accName = mtl->GetForcedAccessoryName();
|
||||
if (accName && strcmp(accName, ""))
|
||||
cloth->fAccessoryName = hsStrcpy(accName);
|
||||
cloth->fAccessoryName = accName;
|
||||
|
||||
Color tint1 = mtl->GetDefaultTint1();
|
||||
Color tint2 = mtl->GetDefaultTint2();
|
||||
@ -4543,7 +4543,7 @@ plClothingItem *hsMaterialConverter::GenerateClothingItem(plClothingMtl *mtl, co
|
||||
cloth->fDefaultTint2[1] = (uint8_t)(tint2.g * 255.f);
|
||||
cloth->fDefaultTint2[2] = (uint8_t)(tint2.b * 255.f);
|
||||
|
||||
clothKeyName = plString::Format("CItm_%s", cloth->fName);
|
||||
clothKeyName = plString::Format("CItm_%s", cloth->fName.c_str());
|
||||
hsgResMgr::ResMgr()->NewKey(clothKeyName, cloth, loc);
|
||||
|
||||
plNodeRefMsg* nodeRefMsg = new plNodeRefMsg(plKeyFinder::Instance().FindSceneNodeKey(loc),
|
||||
@ -4560,7 +4560,7 @@ plClothingItem *hsMaterialConverter::GenerateClothingItem(plClothingMtl *mtl, co
|
||||
{
|
||||
uint32_t clipLevels;
|
||||
uint32_t startWidth;
|
||||
char *elementName = tileset->fElements.Get(i)->fName;
|
||||
plString elementName = tileset->fElements.Get(i)->fName;
|
||||
plPlasmaMAXLayer *layer = (plPlasmaMAXLayer *)mtl->GetTexmap(i, j);
|
||||
if (layer == nil || layer->GetPBBitmap() == nil)
|
||||
continue;
|
||||
|
@ -565,12 +565,12 @@ Interval plClothingMtl::DisplacementValidity(TimeValue t)
|
||||
return iv;
|
||||
}
|
||||
|
||||
plClothingElement *plClothingMtl::FindElementByName(char *name)
|
||||
plClothingElement *plClothingMtl::FindElementByName(const plString &name) const
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < fElements.GetCount(); i++)
|
||||
{
|
||||
if (!strcmp(fElements.Get(i)->fName, name))
|
||||
if (fElements.Get(i)->fName == name)
|
||||
return fElements.Get(i);
|
||||
}
|
||||
return nil;
|
||||
|
@ -48,6 +48,7 @@ class Bitmap;
|
||||
class plClothingItem;
|
||||
class plMaxNode;
|
||||
class plClothingElement;
|
||||
class plString;
|
||||
class Texmap;
|
||||
|
||||
#define CLOTHING_MTL_CLASS_ID Class_ID(0x792c6de4, 0x1f952b65)
|
||||
@ -130,7 +131,7 @@ public:
|
||||
hsTArray<plClothingElement *> fElements;
|
||||
virtual void InitTilesets();
|
||||
virtual void ReleaseTilesets();
|
||||
plClothingElement *FindElementByName(char *name);
|
||||
plClothingElement *FindElementByName(const plString &name) const;
|
||||
|
||||
int GetTilesetIndex() { return fBasicPB->GetInt(ParamID(kTileset)); }
|
||||
Texmap *GetTexmap(int index, int layer);
|
||||
|
@ -195,7 +195,7 @@ public:
|
||||
{
|
||||
plClothingElement *element = tileset->fElements.Get(i);
|
||||
SendMessage(GetDlgItem(hWnd, plClothingMtl::TextConstants[2 * i]),
|
||||
WM_SETTEXT, NULL, (LPARAM)element->fName);
|
||||
WM_SETTEXT, NULL, (LPARAM)element->fName.c_str());
|
||||
sprintf(buff, "(%d, %d)", element->fWidth, element->fHeight);
|
||||
SendMessage(GetDlgItem(hWnd, plClothingMtl::TextConstants[2 * i + 1]),
|
||||
WM_SETTEXT, NULL, (LPARAM)buff);
|
||||
|
Reference in New Issue
Block a user