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

Method GetDemo

Source/Versions.cpp:144–160  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

142}
143
144const sGameVersion* cVersions::GetDemo() const {
145 auto Available = g_ResourceMan->GetAvailable();
146
147 if (!Available.size())
148 return 0;
149
150 auto Release =
151 std::find_if(Available.begin(), Available.end(),
152 [](const sGameVersion* a)->bool { return a->mRelease == eRelease::AmigaXMAS; });
153
154 if (Release == Available.end()) {
155 Release = Available.begin();
156 }
157
158
159 return *Release;
160}
161
162const sGameVersion* cVersions::GetForTileset(eTileTypes pTileType, eTileSub pSub) const {
163 // Look through all available versions for a campaign name match

Callers 2

AboutMethod · 0.80
StartMethod · 0.80

Calls 4

GetAvailableMethod · 0.80
sizeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected