@@ -60,7 +60,7 @@ unsigned int s_theObjectIDToDebug;
6060
6161HAnimClass *W3DAnimationInfo::Get_Anim_Handle () const
6262{
63- HAnimClass *anim = W3DDisplay::s_assetManager->Get_HAnim (m_name);
63+ HAnimClass *anim = W3DDisplay::s_assetManager->Get_HAnim (m_name. Str () );
6464
6565 if (anim != nullptr ) {
6666 if (m_framesPerSecond < 0 .0f ) {
@@ -155,7 +155,7 @@ bool Find_Single_Bone(RenderObjClass *r, Utf8String const &bone, Matrix3D &trans
155155 return false ;
156156 }
157157
158- index = r->Get_Bone_Index (bone);
158+ index = r->Get_Bone_Index (bone. Str () );
159159
160160 if (index == 0 ) {
161161 return false ;
@@ -171,7 +171,7 @@ bool Find_Single_Sub_Obj(RenderObjClass *r, Utf8String const &sub_obj_name, Matr
171171 return false ;
172172 }
173173
174- RenderObjClass *subobj = r->Get_Sub_Object_By_Name (sub_obj_name, nullptr );
174+ RenderObjClass *subobj = r->Get_Sub_Object_By_Name (sub_obj_name. Str () , nullptr );
175175
176176 if (subobj == nullptr ) {
177177 return false ;
@@ -209,7 +209,7 @@ bool Do_Single_Bone_Name(RenderObjClass *robj, Utf8String const &bone, std::map<
209209 Set_FP_Mode ();
210210
211211 if (Find_Single_Bone (robj, bone_lower, info.transform , info.index )) {
212- map[g_theNameKeyGenerator->Name_To_Key (bone_lower)] = info;
212+ map[g_theNameKeyGenerator->Name_To_Key (bone_lower. Str () )] = info;
213213 bone_found = true ;
214214 }
215215
@@ -220,13 +220,13 @@ bool Do_Single_Bone_Name(RenderObjClass *robj, Utf8String const &bone, std::map<
220220 break ;
221221 }
222222
223- map[g_theNameKeyGenerator->Name_To_Key (bone_id)] = info;
223+ map[g_theNameKeyGenerator->Name_To_Key (bone_id. Str () )] = info;
224224 bone_found = true ;
225225 }
226226
227227 if (!bone_found) {
228228 if (Find_Single_Sub_Obj (robj, bone_lower, info.transform , info.index )) {
229- map[g_theNameKeyGenerator->Name_To_Key (bone_lower)] = info;
229+ map[g_theNameKeyGenerator->Name_To_Key (bone_lower. Str () )] = info;
230230 sub_obj_found = true ;
231231 }
232232
@@ -237,7 +237,7 @@ bool Do_Single_Bone_Name(RenderObjClass *robj, Utf8String const &bone, std::map<
237237 break ;
238238 }
239239
240- map[g_theNameKeyGenerator->Name_To_Key (bone_id)] = info;
240+ map[g_theNameKeyGenerator->Name_To_Key (bone_id. Str () )] = info;
241241 sub_obj_found = true ;
242242 }
243243 }
@@ -263,7 +263,7 @@ void ModelConditionInfo::Validate_Cached_Bones(RenderObjClass *robj, float scale
263263 bool ref = false ;
264264
265265 if (robj == nullptr && !m_modelName.Is_Empty ()) {
266- robj = W3DDisplay::s_assetManager->Create_Render_Obj (m_modelName, scale, 0 , nullptr , nullptr );
266+ robj = W3DDisplay::s_assetManager->Create_Render_Obj (m_modelName. Str () , scale, 0 , nullptr , nullptr );
267267
268268 if (robj != nullptr ) {
269269 ref = true ;
@@ -426,12 +426,12 @@ void ModelConditionInfo::Validate_Weapon_Barrel_Info() const
426426
427427 if (!weaponrecoilbonename.Is_Empty ()) {
428428 Find_Pristine_Bone (
429- g_theNameKeyGenerator->Name_To_Key (weaponrecoilbonename), &info.m_weaponRecoilBone );
429+ g_theNameKeyGenerator->Name_To_Key (weaponrecoilbonename. Str () ), &info.m_weaponRecoilBone );
430430 }
431431
432432 if (!weaponmuzzleflashbonename.Is_Empty ()) {
433- Find_Pristine_Bone (
434- g_theNameKeyGenerator-> Name_To_Key (weaponmuzzleflashbonename), &info.m_weaponMuzzleFlashBone );
433+ Find_Pristine_Bone (g_theNameKeyGenerator-> Name_To_Key (weaponmuzzleflashbonename. Str ()),
434+ &info.m_weaponMuzzleFlashBone );
435435 }
436436
437437#ifdef GAME_DEBUG_STRUCTS
@@ -445,7 +445,7 @@ void ModelConditionInfo::Validate_Weapon_Barrel_Info() const
445445 if (weaponlaunchbonename.Is_Empty ()) {
446446 m = nullptr ;
447447 } else {
448- m = Find_Pristine_Bone (g_theNameKeyGenerator->Name_To_Key (weaponlaunchbonename), nullptr );
448+ m = Find_Pristine_Bone (g_theNameKeyGenerator->Name_To_Key (weaponlaunchbonename. Str () ), nullptr );
449449 }
450450
451451 if (m != nullptr ) {
@@ -456,7 +456,7 @@ void ModelConditionInfo::Validate_Weapon_Barrel_Info() const
456456
457457 if (!weaponfirefxbonename.Is_Empty ()) {
458458 Find_Pristine_Bone (
459- g_theNameKeyGenerator->Name_To_Key (weaponfirefxbonename), &info.m_weaponFireFXBone );
459+ g_theNameKeyGenerator->Name_To_Key (weaponfirefxbonename. Str () ), &info.m_weaponFireFXBone );
460460 }
461461
462462 if (info.m_weaponFireFXBone || info.m_weaponRecoilBone || info.m_weaponMuzzleFlashBone || m != nullptr ) {
@@ -703,7 +703,7 @@ Vector3 *W3DModelDrawModuleData::Get_Attach_To_Drawable_Bone_Offset(Drawable con
703703 if (!m_attachToDrawableBoneOffsetSet) {
704704 Matrix3D m;
705705
706- if (drawable->Get_Pristine_Bone_Positions (m_attachToBoneInAnotherModule, 0 , nullptr , &m, 1 ) == 1 ) {
706+ if (drawable->Get_Pristine_Bone_Positions (m_attachToBoneInAnotherModule. Str () , 0 , nullptr , &m, 1 ) == 1 ) {
707707 m_attachToDrawableBoneOffset = m.Get_Translation ();
708708 } else {
709709 m_attachToDrawableBoneOffset.X = 0 .0f ;
@@ -825,7 +825,7 @@ void Parse_Bone_Name_Key(INI *ini, void *instance, void *store, void const *user
825825 if (str.Is_Empty () || str.Is_None ()) {
826826 *static_cast <NameKeyType *>(store) = NAMEKEY_INVALID;
827827 } else {
828- *static_cast <NameKeyType *>(store) = g_theNameKeyGenerator->Name_To_Key (str);
828+ *static_cast <NameKeyType *>(store) = g_theNameKeyGenerator->Name_To_Key (str. Str () );
829829 }
830830}
831831
@@ -842,7 +842,7 @@ void Parse_Show_Hide_Sub_Object(INI *ini, void *instance, void *store, void cons
842842 bool found = false ;
843843
844844 for (auto &i : *v) {
845- if (!strcasecmp (i.sub_obj_name , str)) {
845+ if (!strcasecmp (i.sub_obj_name . Str () , str. Str () )) {
846846 i.hide = (uintptr_t )user_data != 0 ;
847847 found = true ;
848848 }
@@ -920,7 +920,7 @@ void Parse_Lowercase_Name_Key(INI *ini, void *formal, void *store, void const *u
920920{
921921 Utf8String str (ini->Get_Next_Token ());
922922 str.To_Lower ();
923- *static_cast <NameKeyType *>(store) = g_theNameKeyGenerator->Name_To_Key (str);
923+ *static_cast <NameKeyType *>(store) = g_theNameKeyGenerator->Name_To_Key (str. Str () );
924924}
925925
926926void Parse_Particle_Sys_Bone (INI *ini, void *instance, void *store, void const *user_data)
@@ -1043,8 +1043,8 @@ void W3DModelDrawModuleData::Parse_Condition_State(INI *ini, void *instance, voi
10431043 str.To_Lower ();
10441044 Utf8String str2 (ini->Get_Next_Token ());
10451045 str2.To_Lower ();
1046- NameKeyType key = g_theNameKeyGenerator->Name_To_Key (str);
1047- NameKeyType key2 = g_theNameKeyGenerator->Name_To_Key (str2);
1046+ NameKeyType key = g_theNameKeyGenerator->Name_To_Key (str. Str () );
1047+ NameKeyType key2 = g_theNameKeyGenerator->Name_To_Key (str2. Str () );
10481048 captainslog_relassert (
10491049 key != key2, CODE_06, " *** ASSET ERROR: You may not declare a transition between two identical states" );
10501050
@@ -1307,7 +1307,7 @@ void W3DModelDraw::Allocate_Shadows()
13071307 if (m_shadow == nullptr && m_renderObject != nullptr && g_theW3DShadowManager != nullptr
13081308 && info.m_thing ->Get_Shadow_Type () != SHADOW_NONE) {
13091309
1310- strcpy (info.m_shadowName , info.m_thing ->Get_Shadow_Texture_Name ());
1310+ strcpy (info.m_shadowName , info.m_thing ->Get_Shadow_Texture_Name (). Str () );
13111311 captainslog_dbgassert (info.m_shadowName [0 ], " this should be validated in ThingTemplate now" );
13121312
13131313 info.m_allowUpdates = false ;
@@ -1641,7 +1641,7 @@ void W3DModelDraw::Do_Hide_Show_Sub_Objs(std::vector<ModelConditionInfo::HideSho
16411641 if (!vec->empty ()) {
16421642 for (auto &info : *vec) {
16431643 int index;
1644- RenderObjClass *robj = m_renderObject->Get_Sub_Object_By_Name (info.sub_obj_name , &index);
1644+ RenderObjClass *robj = m_renderObject->Get_Sub_Object_By_Name (info.sub_obj_name . Str () , &index);
16451645
16461646 if (robj != nullptr ) {
16471647 robj->Set_Hidden (info.hide );
@@ -1818,7 +1818,7 @@ void W3DModelDraw::Recalc_Bones_For_Client_Particle_Systems()
18181818 int index;
18191819
18201820 if (m_renderObject != nullptr ) {
1821- index = m_renderObject->Get_Bone_Index (bone.bone_name );
1821+ index = m_renderObject->Get_Bone_Index (bone.bone_name . Str () );
18221822 } else {
18231823 index = 0 ;
18241824 }
@@ -1911,7 +1911,7 @@ void W3DModelDraw::Set_Terrain_Decal(TerrainDecalType decal)
19111911 info.m_type = SHADOW_ALPHA_DECAL;
19121912
19131913 if (decal == TERRAIN_DECAL_9) {
1914- strcpy (info.m_shadowName , tmplate->Get_Shadow_Texture_Name ());
1914+ strcpy (info.m_shadowName , tmplate->Get_Shadow_Texture_Name (). Str () );
19151915 } else {
19161916 strcpy (info.m_shadowName , s_terrainDecalTextureName[decal]);
19171917 }
@@ -2146,7 +2146,7 @@ void W3DModelDraw::Set_Model_State(ModelConditionInfo const *new_state)
21462146 m_renderObject = nullptr ;
21472147 } else {
21482148 m_renderObject = W3DDisplay::s_assetManager->Create_Render_Obj (
2149- new_state->m_modelName , drawable->Get_Scale (), m_hexColor, nullptr , nullptr );
2149+ new_state->m_modelName . Str () , drawable->Get_Scale (), m_hexColor, nullptr , nullptr );
21502150
21512151 // Thyme specific: Original assert has been demoted to log message because it is a data issue.
21522152 if (m_renderObject == nullptr ) {
@@ -2173,7 +2173,7 @@ void W3DModelDraw::Set_Model_State(ModelConditionInfo const *new_state)
21732173 if (g_theTerrainTracksRenderObjClassSystem != nullptr ) {
21742174 if (!Get_W3D_Model_Draw_Module_Data ()->m_trackFile .Is_Empty ()) {
21752175 m_trackRenderObject = g_theTerrainTracksRenderObjClassSystem->Bind_Track (
2176- m_renderObject, 10 .0f , Get_W3D_Model_Draw_Module_Data ()->m_trackFile );
2176+ m_renderObject, 10 .0f , Get_W3D_Model_Draw_Module_Data ()->m_trackFile . Str () );
21772177
21782178 if (drawable != nullptr ) {
21792179 if (m_trackRenderObject != nullptr ) {
@@ -2186,7 +2186,7 @@ void W3DModelDraw::Set_Model_State(ModelConditionInfo const *new_state)
21862186 }
21872187
21882188 if (m_renderObject != nullptr && g_theW3DShadowManager != nullptr && info.m_thing ->Get_Shadow_Type ()) {
2189- strcpy (info.m_shadowName , info.m_thing ->Get_Shadow_Texture_Name ());
2189+ strcpy (info.m_shadowName , info.m_thing ->Get_Shadow_Texture_Name (). Str () );
21902190 captainslog_dbgassert (info.m_shadowName [0 ], " this should be validated in ThingTemplate now" );
21912191 info.m_allowUpdates = false ;
21922192 info.m_allowWorldAlign = true ;
@@ -2513,7 +2513,7 @@ bool W3DModelDraw::Client_Only_Get_Render_Obj_Bone_Transform(Utf8String const &b
25132513 return false ;
25142514 }
25152515
2516- int index = m_renderObject->Get_Bone_Index (bone);
2516+ int index = m_renderObject->Get_Bone_Index (bone. Str () );
25172517
25182518 if (index == 0 ) {
25192519 transform->Make_Identity ();
@@ -2857,7 +2857,7 @@ void W3DModelDraw::Update_Sub_Objects()
28572857 if (m_renderObject != nullptr && !m_subObjects.empty ()) {
28582858 for (auto &info : m_subObjects) {
28592859 int index;
2860- RenderObjClass *robj = m_renderObject->Get_Sub_Object_By_Name (info.sub_obj_name , &index);
2860+ RenderObjClass *robj = m_renderObject->Get_Sub_Object_By_Name (info.sub_obj_name . Str () , &index);
28612861
28622862 if (robj) {
28632863 robj->Set_Hidden (info.hide );
@@ -3011,7 +3011,7 @@ void W3DModelDraw::Show_Sub_Object(Utf8String const &sub_obj_name, bool visible)
30113011 bool found = false ;
30123012
30133013 for (auto &info : m_subObjects) {
3014- if (!strcasecmp (sub_obj_name, info.sub_obj_name )) {
3014+ if (!strcasecmp (sub_obj_name. Str () , info.sub_obj_name . Str () )) {
30153015 info.hide = visible == 0 ;
30163016 found = true ;
30173017 }
0 commit comments