MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / assetData

Method assetData

source/game/scripting/StarRootLuaBindings.cpp:265–268  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

263}
264
265String LuaBindings::RootCallbacks::assetData(Root* root, String const& path) {
266 auto bytes = root->assets()->bytes(path);
267 return String(bytes->ptr(), bytes->size());
268}
269
270Image LuaBindings::RootCallbacks::assetImage(Root* root, String const& path) {
271 return *root->assets()->image(path);

Callers

nothing calls this directly

Calls 5

StringClass · 0.85
assetsMethod · 0.80
bytesMethod · 0.45
ptrMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected