2 Cafu Engine, http://www.cafu.de/
3 Copyright (c) Carsten Fuchs and other contributors.
4 This project is licensed under the terms of the MIT license.
7 #include "GameInfo.hpp"
8 #include "PlatformAux.hpp"
13 GameInfoT::GameInfoT(const std::string
& GameName
)
14 : m_GameName(GameName
)
19 const std::string
& GameInfoT::GetName() const
25 GameInfosT::GameInfosT()
27 const std::vector
<std::string
> GameNames
= PlatformAux::GetDirectory("Games", 'd');
29 for (size_t i
= 0; i
< GameNames
.size(); i
++)
30 m_AllGameInfos
.push_back(GameInfoT(GameNames
[i
]));
32 if (m_AllGameInfos
.size() == 0)
33 throw std::runtime_error("Could not find any game in the Games subdirectory.");
35 m_GameInfo
= m_AllGameInfos
[0];