MCPcopy Create free account
hub / github.com/EasyRPG/Player / AddToCache

Function AddToCache

src/cache.cpp:132–141  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

130 }
131
132 BitmapRef AddToCache(const std::string& key, BitmapRef bmp) {
133 if (bmp) {
134 cache_size += bmp->GetSize();
135#ifdef CACHE_DEBUG
136 Output::Debug("Bitmap cache size (Add): {}", cache_size / 1024.0 / 1024.0);
137#endif
138 }
139
140 return (cache[key] = {bmp, Game_Clock::GetFrameTime()}).bitmap;
141 }
142
143 struct Material {
144 enum Type {

Callers 2

LoadBitmapFunction · 0.85
ExfontMethod · 0.85

Calls 1

GetSizeMethod · 0.45

Tested by

no test coverage detected