Mercurial > libanimone
comparison include/animone/player.h @ 25:60ded877339b
dep/animone: fix tons of issues
for example, the window ID stuff was just... completely wrong. since we're
supporting multiple different window systems, it *has* to be a union rather
than just a single integer type. HWND is also not a DWORD, it's a pointer(!),
so now it's stored as a std::uintptr_t.
(this probably breaks things)
| author | Paper <paper@paper.us.eu.org> |
|---|---|
| date | Thu, 20 Jun 2024 03:03:05 -0400 |
| parents | 973734ebd2be |
| children | 93224b26a0ee |
comparison
equal
deleted
inserted
replaced
| 24:f1b9adaa41b3 | 25:60ded877339b |
|---|---|
| 1 #ifndef ANIMONE_ANIMONE_PLAYER_H_ | 1 #ifndef ANIMONE_ANIMONE_PLAYER_H_ |
| 2 #define ANIMONE_ANIMONE_PLAYER_H_ | 2 #define ANIMONE_ANIMONE_PLAYER_H_ |
| 3 | |
| 4 #include "animone/types.h" | |
| 3 | 5 |
| 4 #include <string> | 6 #include <string> |
| 5 #include <vector> | 7 #include <vector> |
| 6 #include <map> | 8 #include <map> |
| 7 | 9 |
| 30 enum class PlayerType { | 32 enum class PlayerType { |
| 31 Default, | 33 Default, |
| 32 WebBrowser // unused | 34 WebBrowser // unused |
| 33 }; | 35 }; |
| 34 | 36 |
| 35 struct Player { | 37 struct ANIMONE_API Player { |
| 36 PlayerType type = PlayerType::Default; | 38 PlayerType type = PlayerType::Default; |
| 37 std::string name; | 39 std::string name; |
| 38 std::string window_title_format; | 40 std::string window_title_format; |
| 39 std::map<WindowPlatform, std::vector<std::string>> windows; | 41 std::map<WindowPlatform, std::vector<std::string>> windows; |
| 40 std::map<ExecutablePlatform, std::vector<std::string>> executables; | 42 std::map<ExecutablePlatform, std::vector<std::string>> executables; |
| 41 std::vector<Strategy> strategies; | 43 std::vector<Strategy> strategies; |
| 42 }; | 44 }; |
| 43 | 45 |
| 44 bool ParsePlayersData(const std::string& data, std::vector<Player>& players); | 46 ANIMONE_API bool ParsePlayersData(const std::string& data, std::vector<Player>& players); |
| 45 bool ParsePlayersFile(const std::string& path, std::vector<Player>& players); | 47 ANIMONE_API bool ParsePlayersFile(const std::string& path, std::vector<Player>& players); |
| 46 | 48 |
| 47 } // namespace animone | 49 } // namespace animone |
| 48 | 50 |
| 49 #endif // ANIMONE_ANIMONE_PLAYER_H_ | 51 #endif // ANIMONE_ANIMONE_PLAYER_H_ |
