MCPcopy Create free account
hub / github.com/StrongPC123/Far-Cry-1-Source-Full / CreateUserData

Method CreateUserData

CryScriptSystem/ScriptSystem.cpp:1731–1753  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1729}
1730
1731USER_DATA CScriptSystem::CreateUserData(INT_PTR nVal,int nCookie) //AMD Port
1732{
1733 Validate();
1734// UserDataMapItor itor=m_mapUserData.find(nVal);
1735 int nRef=0;
1736// if(itor==m_mapUserData.end())
1737// {
1738 USER_DATA_CHUNK *pUDC=(USER_DATA_CHUNK *)lua_newuserdata(m_pLS,sizeof(USER_DATA_CHUNK));
1739 pUDC->nVal=nVal;
1740 pUDC->nCookie=nCookie;
1741
1742 lua_settag(m_pLS, m_nGCTag);
1743 pUDC->nRef=lua_ref(m_pLS,0);
1744 //m_mapUserData.insert(UserDataMapItor::value_type(nVal,nRef));
1745// }
1746// else
1747// {
1748 //::OutputDebugString("Reusing pointer\n");
1749 //nRef=itor->second;
1750// }
1751 Validate();
1752 return pUDC->nRef;
1753}
1754//////////////////////////////////////////////////////////////////////
1755
1756//////////////////////////////////////////////////////////////////////////

Callers 14

InsertPropertyMethod · 0.80
LoadSoundMethod · 0.80
Load3DSoundMethod · 0.80
LoadStreamSoundMethod · 0.80
LoadAnimatedTextureMethod · 0.80
LoadTextureMethod · 0.80
LoadObjectMethod · 0.80
LoadImageMethod · 0.80
AttachObjectToBoneMethod · 0.80
AddDynamicLight2Method · 0.80
ProcessHitTargetMethod · 0.80
GetBackgroundMethod · 0.80

Calls 3

lua_newuserdataFunction · 0.85
lua_settagFunction · 0.85
lua_refFunction · 0.85

Tested by

no test coverage detected