MCPcopy Create free account
hub / github.com/axmolengine/axmol / loadTGAfile

Method loadTGAfile

core/2d/TileMapAtlas.cpp:105–121  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

103}
104
105void TileMapAtlas::loadTGAfile(std::string_view file)
106{
107 std::string fullPath = FileUtils::getInstance()->fullPathForFilename(file);
108
109 // //Find the path of the file
110 // NSBundle *mainBndl = [Director sharedDirector].loadingBundle;
111 // String *resourcePath = [mainBndl resourcePath];
112 // String * path = [resourcePath stringByAppendingPathComponent:file];
113
114 _TGAInfo = tgaLoad(fullPath.c_str());
115#if 1
116 if (_TGAInfo->status != TGA_OK)
117 {
118 AXASSERT(0, "TileMapAtlasLoadTGA : TileMapAtlas cannot load TGA file");
119 }
120#endif
121}
122
123// TileMapAtlas - Atlas generation / updates
124void TileMapAtlas::setTile(const Color3B& tile, const Vec2& position)

Callers 1

initWithTileFileMethod · 0.95

Calls 4

getInstanceFunction · 0.85
tgaLoadFunction · 0.85
fullPathForFilenameMethod · 0.80
c_strMethod · 0.45

Tested by

no test coverage detected