MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / New

Method New

engine/Poseidon/Graphics/Textures/TexturePreload.cpp:122–138  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

120}
121
122Texture* PreloadedTextures::New(RStringB name)
123{
124 // make texture permanent
125 // assign new id
126 // search data for the same texture
127 for (int i = 0; i < _data.Size(); i++)
128 {
129 Texture* dataI = _data[i];
130 if (dataI && dataI->GetName() == name)
131 {
132 return dataI;
133 }
134 }
135 Ref<Texture> txt = GlobLoadTexture(name);
136 _data.Add(txt);
137 return txt;
138}
139
140Texture* PreloadedTextures::New(PreloadedTexture id)
141{

Callers 10

GlobPreloadTextureFunction · 0.45
InitMethod · 0.45
CreateTitleEffectObjFunction · 0.45
EditCursorMethod · 0.45
ObjWeaponsFromPoolFunction · 0.45
ShellCreateFunction · 0.45
ListCountTypeFunction · 0.45
ObjAddWeaponCargoFunction · 0.45
ObjAddMagazineCargoFunction · 0.45
ObjFireExFunction · 0.45

Calls 4

GlobLoadTextureFunction · 0.85
SizeMethod · 0.45
GetNameMethod · 0.45
AddMethod · 0.45

Tested by

no test coverage detected