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

Function addFrame

TheForceEngine/TFE_Asset/spriteAsset.cpp:183–194  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

181 }
182
183 s32 addFrame(s32 offset)
184 {
185 const size_t count = s_tempFrames.size();
186 const s32* data = s_tempFrames.data();
187 for (size_t i = 0; i < count; i++)
188 {
189 if (offset == data[i]) { return s32(i); }
190 }
191 s32 index = (s32)s_tempFrames.size();
192 s_tempFrames.push_back(offset);
193 return index;
194 }
195
196 Sprite* getSprite(const char* name)
197 {

Callers 1

getSpriteFunction · 0.70

Calls 3

dataMethod · 0.80
push_backMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected