MCPcopy Create free account
hub / github.com/OpenFodder/openfodder / fileGet

Method fileGet

Source/Amiga/Resource_Amiga_File.cpp:35–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33}
34
35tSharedBuffer cResource_Amiga_File::fileGet( std::string pFilename ) {
36
37 auto File = cResources::fileGet( pFilename );
38 if (!File->size()) {
39 //std::cout << "File " << pFilename << " Not Found!\n";
40 //exit( 1 );
41 return File;
42 }
43 uint32 Header = readBEDWord( File->data() );
44
45 if (Header != 'RNC\01')
46 return File;
47
48 uint32 Size = readBEDWord( File->data() + 4 );
49
50 auto Unpacked = std::make_shared<std::vector<uint8>>();
51 Unpacked->resize( Size );
52
53 rnc_unpack (File->data(), Unpacked->data());
54
55 return Unpacked;
56}

Callers 10

GetPaletteMethod · 0.45
GetImageMethod · 0.45
Track_LoadMethod · 0.45
Load_Sprite_FontMethod · 0.45
Load_And_Draw_ImageMethod · 0.45
Tile_Prepare_GfxMethod · 0.45
DecodeIFFMethod · 0.45
Recruit_Draw_HillMethod · 0.45

Calls 4

readBEDWordFunction · 0.85
rnc_unpackFunction · 0.85
resizeMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected