MCPcopy Create free account
hub / github.com/DFHack/dfhack / add_texture

Function add_texture

library/modules/Textures.cpp:95–100  ·  view source on GitHub ↗

register surface in texture raws, get a texpos

Source from the content-addressed store, hash-verified

93
94// register surface in texture raws, get a texpos
95static long add_texture(SDL_Surface* surface) {
96 std::lock_guard<std::mutex> lg_add_texture(g_adding_mutex);
97 auto texpos = enabler->textures.raws.size();
98 enabler->textures.raws.push_back(surface);
99 return texpos;
100}
101
102// register surface in texture raws to specific texpos
103static void insert_texture(SDL_Surface* surface, long texpos) {

Callers 4

loadTextureMethod · 0.85
getTexposByHandleMethod · 0.85
register_delayed_handlesFunction · 0.85
reserve_static_rangeFunction · 0.85

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected