diff --git a/Source/diablo.cpp b/Source/diablo.cpp index 2b403b840a9..1427e4bcf7b 100644 --- a/Source/diablo.cpp +++ b/Source/diablo.cpp @@ -75,6 +75,7 @@ #include "pfile.h" #include "playerdat.hpp" #include "plrmsg.h" +#include "portal.h" #include "qol/chatlog.h" #include "qol/floatingnumbers.h" #include "qol/itemlabels.h" diff --git a/Source/interfac.cpp b/Source/interfac.cpp index b7b09811e64..862f7cb5892 100644 --- a/Source/interfac.cpp +++ b/Source/interfac.cpp @@ -27,6 +27,7 @@ #include "multi.h" #include "pfile.h" #include "plrmsg.h" +#include "portal.h" #include "utils/log.hpp" #include "utils/sdl_geometry.h" #include "utils/sdl_thread.h" diff --git a/Source/loadsave.cpp b/Source/loadsave.cpp index ce92303b269..755da85fa54 100644 --- a/Source/loadsave.cpp +++ b/Source/loadsave.cpp @@ -34,6 +34,7 @@ #include "mpq/mpq_common.hpp" #include "pfile.h" #include "playerdat.hpp" +#include "portal.h" #include "qol/stash.h" #include "stores.h" #include "utils/algorithm/container.hpp" diff --git a/Source/msg.cpp b/Source/msg.cpp index 1cb7a63f9f0..5919ad89b92 100644 --- a/Source/msg.cpp +++ b/Source/msg.cpp @@ -37,6 +37,7 @@ #include "pack.h" #include "pfile.h" #include "plrmsg.h" +#include "portal.h" #include "spells.h" #include "storm/storm_net.hpp" #include "sync.h" diff --git a/Source/msg.h b/Source/msg.h index 2287824c4fb..9343a0b5ba5 100644 --- a/Source/msg.h +++ b/Source/msg.h @@ -11,7 +11,6 @@ #include "items.h" #include "monster.h" #include "objects.h" -#include "portal.h" #include "quests.h" namespace devilution { diff --git a/Source/multi.cpp b/Source/multi.cpp index 758ecce3787..aee2af0299d 100644 --- a/Source/multi.cpp +++ b/Source/multi.cpp @@ -24,6 +24,7 @@ #include "options.h" #include "pfile.h" #include "plrmsg.h" +#include "portal.h" #include "qol/chatlog.h" #include "storm/storm_net.hpp" #include "sync.h" diff --git a/Source/player.cpp b/Source/player.cpp index 05d7c513a47..b36efd8d389 100644 --- a/Source/player.cpp +++ b/Source/player.cpp @@ -38,6 +38,7 @@ #include "objects.h" #include "options.h" #include "player.h" +#include "portal.h" #include "qol/autopickup.h" #include "qol/floatingnumbers.h" #include "qol/stash.h" diff --git a/Source/portal.cpp b/Source/portal.cpp index 1ad49acf467..cb9aa1b3030 100644 --- a/Source/portal.cpp +++ b/Source/portal.cpp @@ -12,7 +12,7 @@ namespace devilution { /** In-game state of portals. */ -Portal Portals[8]; +Portal Portals[MaxPlayers]; namespace { @@ -20,7 +20,7 @@ namespace { size_t portalindex; /** Coordinate of each player's portal in town. */ -Point PortalTownPosition[8] = { +Point PortalTownPosition[MaxPlayers] = { { 57, 40 }, { 59, 40 }, { 61, 40 }, diff --git a/Source/portal.h b/Source/portal.h index 04e72793e68..45949aa6add 100644 --- a/Source/portal.h +++ b/Source/portal.h @@ -7,6 +7,7 @@ #include "engine/point.hpp" #include "levels/gendung.h" +#include "multi.h" namespace devilution { @@ -21,7 +22,7 @@ struct Portal { bool setlvl; }; -extern Portal Portals[8]; +extern Portal Portals[MaxPlayers]; void InitPortals(); void SetPortalStats(int i, bool o, Point position, int lvl, dungeon_type lvltype, bool isSetLevel);