MCPcopy Create free account
hub / github.com/TheForceEngine/TheForceEngine / addCell

Function addCell

TheForceEngine/TFE_Asset/spriteAsset.cpp:170–181  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

168 std::vector<s32> s_tempCells;
169
170 s32 addCell(s32 offset)
171 {
172 const size_t count = s_tempCells.size();
173 const s32* data = s_tempCells.data();
174 for (size_t i = 0; i < count; i++)
175 {
176 if (offset == data[i]) { return s32(i); }
177 }
178 s32 index = (s32)s_tempCells.size();
179 s_tempCells.push_back(offset);
180 return index;
181 }
182
183 s32 addFrame(s32 offset)
184 {

Callers 1

getSpriteFunction · 0.85

Calls 3

dataMethod · 0.80
push_backMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected