Mercurial > minori
comparison dep/animia/src/animia.cc @ 146:d8a61e7e2a36
dep/animia: move fd stuff to a new fd.cc, don't force the user
to include windows.h
author | Paper <mrpapersonic@gmail.com> |
---|---|
date | Mon, 13 Nov 2023 13:52:58 -0500 |
parents | 1e696863b54c |
children | aa4df5a84338 |
comparison
equal
deleted
inserted
replaced
145:8e9b71970bda | 146:d8a61e7e2a36 |
---|---|
1 #include <string> | 1 #include <string> |
2 #include <vector> | 2 #include <vector> |
3 #include <set> | |
3 | 4 |
4 #include "animia.h" | 5 #include "animia.h" |
5 #include "animia/strategies.h" | 6 #include "animia/strategies.h" |
6 #include "animia/types.h" | 7 #include "animia/types.h" |
7 | 8 #include "animia/fd.h" |
8 #ifdef ANIMIA_ON_WIN32 | |
9 # include "animia/fd/win32.h" | |
10 #elif defined(ANIMIA_ON_LINUX) | |
11 # include "animia/fd/linux.h" | |
12 #elif defined(ANIMIA_ON_UNIX) | |
13 # include "animia/fd/bsd.h" | |
14 #endif | |
15 | |
16 namespace animia::internal { | |
17 | |
18 /* really stupid hack to get fd to point to the right | |
19 thing */ | |
20 #ifdef ANIMIA_ON_WIN32 | |
21 win32::Win32FdTools os_fd; | |
22 #elif defined(ANIMIA_ON_LINUX) | |
23 linux::LinuxFdTools os_fd; | |
24 #elif defined(ANIMIA_ON_UNIX) | |
25 unix::UnixFdTools os_fd; | |
26 #else | |
27 BaseFdTools os_fd; | |
28 #endif | |
29 | |
30 BaseFdTools& fd = os_fd; | |
31 | |
32 } | |
33 | 9 |
34 namespace animia { | 10 namespace animia { |
35 | 11 |
36 static bool ProcessInPlayers(const std::vector<Player>& players, const std::string& name, Player& player_) { | 12 static bool ProcessInPlayers(const std::vector<Player>& players, const std::string& name, Player& player_) { |
37 for (const auto& player : players) { | 13 for (const auto& player : players) { |