Skip to content

Commit 39f3b88

Browse files
authored
Merge pull request #179 from cortex-command-community/rip-multiplayer
RIP Multiplayer 2019-2025
2 parents 9dd15cc + 641fc21 commit 39f3b88

33 files changed

+105
-1065
lines changed

RTEA.vcxproj

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -763,8 +763,6 @@
763763
<ClInclude Include="Source\Managers\GLResourceMan.h" />
764764
<ClInclude Include="Source\Managers\MusicMan.h" />
765765
<ClInclude Include="Source\Managers\MenuMan.h" />
766-
<ClInclude Include="Source\Managers\NetworkClient.h" />
767-
<ClInclude Include="Source\Managers\NetworkServer.h" />
768766
<ClInclude Include="Source\Managers\PerformanceMan.h" />
769767
<ClInclude Include="Source\Managers\PostProcessMan.h" />
770768
<ClInclude Include="Source\Managers\PrimitiveMan.h" />
@@ -803,7 +801,6 @@
803801
<ClInclude Include="Source\Renderer\GLCheck.h" />
804802
<ClInclude Include="Source\System\InputMapping.h" />
805803
<ClInclude Include="Source\System\InputScheme.h" />
806-
<ClInclude Include="Source\System\NetworkMessages.h" />
807804
<ClInclude Include="Source\System\GraphicalPrimitive.h" />
808805
<ClInclude Include="Source\System\Gamepad.h" />
809806
<ClInclude Include="Source\Menus\InventoryMenuGUI.h" />
@@ -924,8 +921,6 @@
924921
<ClInclude Include="Source\Activities\GAScripted.h" />
925922
<ClInclude Include="Source\Activities\GATutorial.h" />
926923
<ClInclude Include="Source\Activities\GibEditor.h" />
927-
<ClInclude Include="Source\Activities\MultiplayerGame.h" />
928-
<ClInclude Include="Source\Activities\MultiplayerServerLobby.h" />
929924
<ClInclude Include="Source\Activities\SceneEditor.h" />
930925
<ClInclude Include="Source\Menus\AreaEditorGUI.h" />
931926
<ClInclude Include="Source\Menus\AreaPickerGUI.h" />
@@ -1016,8 +1011,6 @@
10161011
<ClCompile Include="Source\GUI\GUISound.cpp" />
10171012
<ClCompile Include="Source\GUI\GUIWriter.cpp" />
10181013
<ClCompile Include="Source\Managers\MenuMan.cpp" />
1019-
<ClCompile Include="Source\Managers\NetworkClient.cpp" />
1020-
<ClCompile Include="Source\Managers\NetworkServer.cpp" />
10211014
<ClCompile Include="Source\Managers\PerformanceMan.cpp" />
10221015
<ClCompile Include="Source\Managers\PostProcessMan.cpp" />
10231016
<ClCompile Include="Source\Managers\PrimitiveMan.cpp" />
@@ -1448,8 +1441,6 @@
14481441
<ClCompile Include="Source\Activities\GAScripted.cpp" />
14491442
<ClCompile Include="Source\Activities\GATutorial.cpp" />
14501443
<ClCompile Include="Source\Activities\GibEditor.cpp" />
1451-
<ClCompile Include="Source\Activities\MultiplayerGame.cpp" />
1452-
<ClCompile Include="Source\Activities\MultiplayerServerLobby.cpp" />
14531444
<ClCompile Include="Source\Activities\SceneEditor.cpp" />
14541445
<ClCompile Include="Source\Menus\AreaEditorGUI.cpp" />
14551446
<ClCompile Include="Source\Menus\AreaPickerGUI.cpp" />

RTEA.vcxproj.filters

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -417,18 +417,6 @@
417417
<ClInclude Include="Source\Entities\PEmitter.h">
418418
<Filter>Entities</Filter>
419419
</ClInclude>
420-
<ClInclude Include="Source\Managers\NetworkClient.h">
421-
<Filter>Managers</Filter>
422-
</ClInclude>
423-
<ClInclude Include="Source\Managers\NetworkServer.h">
424-
<Filter>Managers</Filter>
425-
</ClInclude>
426-
<ClInclude Include="Source\Activities\MultiplayerGame.h">
427-
<Filter>Activities</Filter>
428-
</ClInclude>
429-
<ClInclude Include="Source\Activities\MultiplayerServerLobby.h">
430-
<Filter>Activities</Filter>
431-
</ClInclude>
432420
<ClInclude Include="Source\System\StandardIncludes.h">
433421
<Filter>System</Filter>
434422
</ClInclude>
@@ -998,18 +986,6 @@
998986
<ClCompile Include="Source\Entities\PEmitter.cpp">
999987
<Filter>Entities</Filter>
1000988
</ClCompile>
1001-
<ClCompile Include="Source\Managers\NetworkClient.cpp">
1002-
<Filter>Managers</Filter>
1003-
</ClCompile>
1004-
<ClCompile Include="Source\Managers\NetworkServer.cpp">
1005-
<Filter>Managers</Filter>
1006-
</ClCompile>
1007-
<ClCompile Include="Source\Activities\MultiplayerGame.cpp">
1008-
<Filter>Activities</Filter>
1009-
</ClCompile>
1010-
<ClCompile Include="Source\Activities\MultiplayerServerLobby.cpp">
1011-
<Filter>Activities</Filter>
1012-
</ClCompile>
1013989
<ClCompile Include="Source\System\StandardIncludes.cpp">
1014990
<Filter>System</Filter>
1015991
</ClCompile>

Source/Activities/GameActivity.cpp

Lines changed: 23 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -786,37 +786,32 @@ int GameActivity::Start() {
786786
////////////////////////////////////
787787
// GUI split screen setup
788788
// If there are split screens, set up the GUIs to draw and their mouses to point correctly
789-
if (g_FrameMan.IsInMultiplayerMode()) {
790-
m_pEditorGUI[player]->SetPosOnScreen(0, 0);
791-
m_pBuyGUI[player]->SetPosOnScreen(0, 0);
792-
} else {
793-
if (g_FrameMan.GetScreenCount() > 1) {
794-
// Screen 1 Always upper left corner
795-
if (ScreenOfPlayer(player) == 0) {
796-
m_pEditorGUI[player]->SetPosOnScreen(0, 0);
797-
m_pBuyGUI[player]->SetPosOnScreen(0, 0);
798-
} else if (ScreenOfPlayer(player) == 1) {
799-
// If both splits, or just Vsplit, then in upper right quadrant
800-
if ((g_FrameMan.GetVSplit() && !g_FrameMan.GetHSplit()) || (g_FrameMan.GetVSplit() && g_FrameMan.GetVSplit())) {
801-
m_pEditorGUI[player]->SetPosOnScreen(g_WindowMan.GetResX() / 2, 0);
802-
m_pBuyGUI[player]->SetPosOnScreen(g_WindowMan.GetResX() / 2, 0);
803-
}
804-
// If only hsplit, then lower left quadrant
805-
else {
806-
m_pEditorGUI[player]->SetPosOnScreen(0, g_WindowMan.GetResY() / 2);
807-
m_pBuyGUI[player]->SetPosOnScreen(0, g_WindowMan.GetResY() / 2);
808-
}
789+
if (g_FrameMan.GetScreenCount() > 1) {
790+
// Screen 1 Always upper left corner
791+
if (ScreenOfPlayer(player) == 0) {
792+
m_pEditorGUI[player]->SetPosOnScreen(0, 0);
793+
m_pBuyGUI[player]->SetPosOnScreen(0, 0);
794+
} else if (ScreenOfPlayer(player) == 1) {
795+
// If both splits, or just Vsplit, then in upper right quadrant
796+
if ((g_FrameMan.GetVSplit() && !g_FrameMan.GetHSplit()) || (g_FrameMan.GetVSplit() && g_FrameMan.GetVSplit())) {
797+
m_pEditorGUI[player]->SetPosOnScreen(g_WindowMan.GetResX() / 2, 0);
798+
m_pBuyGUI[player]->SetPosOnScreen(g_WindowMan.GetResX() / 2, 0);
809799
}
810-
// Screen 3 is lower left quadrant
811-
else if (ScreenOfPlayer(player) == 2) {
800+
// If only hsplit, then lower left quadrant
801+
else {
812802
m_pEditorGUI[player]->SetPosOnScreen(0, g_WindowMan.GetResY() / 2);
813803
m_pBuyGUI[player]->SetPosOnScreen(0, g_WindowMan.GetResY() / 2);
814804
}
815-
// Screen 4 is lower right quadrant
816-
else if (ScreenOfPlayer(player) == 3) {
817-
m_pEditorGUI[player]->SetPosOnScreen(g_WindowMan.GetResX() / 2, g_WindowMan.GetResY() / 2);
818-
m_pBuyGUI[player]->SetPosOnScreen(g_WindowMan.GetResX() / 2, g_WindowMan.GetResY() / 2);
819-
}
805+
}
806+
// Screen 3 is lower left quadrant
807+
else if (ScreenOfPlayer(player) == 2) {
808+
m_pEditorGUI[player]->SetPosOnScreen(0, g_WindowMan.GetResY() / 2);
809+
m_pBuyGUI[player]->SetPosOnScreen(0, g_WindowMan.GetResY() / 2);
810+
}
811+
// Screen 4 is lower right quadrant
812+
else if (ScreenOfPlayer(player) == 3) {
813+
m_pEditorGUI[player]->SetPosOnScreen(g_WindowMan.GetResX() / 2, g_WindowMan.GetResY() / 2);
814+
m_pBuyGUI[player]->SetPosOnScreen(g_WindowMan.GetResX() / 2, g_WindowMan.GetResY() / 2);
820815
}
821816
}
822817

@@ -1730,10 +1725,7 @@ void GameActivity::Update() {
17301725
if (m_ActivityState == ActivityState::Over && m_GameOverTimer.IsPastRealMS(m_GameOverPeriod)) {
17311726
g_FrameMan.ClearScreenText(ScreenOfPlayer(player));
17321727
// g_FrameMan.SetScreenText("Press [Esc] to leave the battlefield", ScreenOfPlayer(player), 750);
1733-
if (g_FrameMan.IsInMultiplayerMode())
1734-
g_FrameMan.SetScreenText("All players must press and hold [BACKSPACE] to continue!", ScreenOfPlayer(player), 750);
1735-
else
1736-
g_FrameMan.SetScreenText("Press [SPACE] or [START] to continue!", ScreenOfPlayer(player), 750);
1728+
g_FrameMan.SetScreenText("Press [SPACE] or [START] to continue!", ScreenOfPlayer(player), 750);
17371729

17381730
// Actually end on space
17391731
if (m_GameOverTimer.IsPastSimMS(55000) || g_UInputMan.AnyStartPress()) {

Source/Activities/meson.build

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ sources += files(
88
'GAScripted.cpp',
99
'GATutorial.cpp',
1010
'GibEditor.cpp',
11-
'MultiplayerGame.cpp',
12-
'MultiplayerServerLobby.cpp',
11+
#'MultiplayerGame.cpp',
12+
#'MultiplayerServerLobby.cpp',
1313
'SceneEditor.cpp',
1414
)

Source/Entities/Activity.cpp

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
#include "FrameMan.h"
99
#include "MetaMan.h"
1010
#include "SceneMan.h"
11-
#include "NetworkClient.h"
1211

1312
#include "ACraft.h"
1413

@@ -296,11 +295,9 @@ int Activity::Start() {
296295
m_Paused = false;
297296

298297
// Reset the mouse moving so that it won't trap the mouse if the window isn't in focus (common after loading)
299-
if (!g_FrameMan.IsInMultiplayerMode()) {
300-
g_UInputMan.DisableMouseMoving(true);
301-
g_UInputMan.DisableMouseMoving(false);
302-
g_UInputMan.DisableKeys(false);
303-
}
298+
g_UInputMan.DisableMouseMoving(true);
299+
g_UInputMan.DisableMouseMoving(false);
300+
g_UInputMan.DisableKeys(false);
304301

305302
int error = g_SceneMan.LoadScene();
306303
if (error < 0) {
@@ -881,9 +878,5 @@ bool Activity::CanBeUserSaved() const {
881878
return false;
882879
}
883880

884-
if (g_NetworkClient.IsConnectedAndRegistered()) {
885-
return false;
886-
}
887-
888881
return m_AllowsUserSaving;
889882
}

Source/Entities/Activity.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#include "Icon.h"
44
#include "Controller.h"
55
#include "GenericSavedData.h"
6+
#include "Entity.h"
67

78
namespace RTE {
89

Source/Entities/Actor.cpp

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1389,23 +1389,6 @@ void Actor::DrawHUD(BITMAP* pTargetBitmap, const Vector& targetPos, int whichScr
13891389
if (!m_Controller.IsState(PIE_MENU_ACTIVE) || actorScreen != whichScreen) {
13901390
// If we're still alive, show the team colors
13911391
if (m_Health > 0) {
1392-
if (IsPlayerControlled() && g_FrameMan.IsInMultiplayerMode()) {
1393-
m_pControllerIcon = nullptr;
1394-
if (m_Team == 0) {
1395-
m_pControllerIcon = g_UInputMan.GetDeviceIcon(DEVICE_GAMEPAD_1);
1396-
} else if (m_Team == 1) {
1397-
m_pControllerIcon = g_UInputMan.GetDeviceIcon(DEVICE_GAMEPAD_2);
1398-
} else if (m_Team == 2) {
1399-
m_pControllerIcon = g_UInputMan.GetDeviceIcon(DEVICE_GAMEPAD_3);
1400-
} else if (m_Team == 3) {
1401-
m_pControllerIcon = g_UInputMan.GetDeviceIcon(DEVICE_GAMEPAD_4);
1402-
}
1403-
1404-
if (m_pControllerIcon) {
1405-
std::vector<BITMAP*> apControllerBitmaps = m_pControllerIcon->GetBitmaps8();
1406-
masked_blit(apControllerBitmaps[0], pTargetBitmap, 0, 0, drawPos.m_X - apControllerBitmaps[0]->w - 2 + 10, drawPos.m_Y + m_HUDStack - (apControllerBitmaps[0]->h / 2) + 8, apControllerBitmaps[0]->w, apControllerBitmaps[0]->h);
1407-
}
1408-
}
14091392

14101393
// Get the Icon bitmaps of this Actor's team, if any
14111394
std::vector<BITMAP*> apIconBitmaps;
@@ -1447,13 +1430,6 @@ void Actor::DrawHUD(BITMAP* pTargetBitmap, const Vector& targetPos, int whichScr
14471430

14481431
m_HUDStack -= 11;
14491432
}
1450-
// Player name
1451-
if (g_FrameMan.IsInMultiplayerMode()) {
1452-
if (GameActivity* gameActivity = dynamic_cast<GameActivity*>(g_ActivityMan.GetActivity())) {
1453-
pSmallFont->DrawAligned(&bitmapInt, drawPos.GetFloorIntX(), drawPos.GetFloorIntY() + m_HUDStack + 2, gameActivity->GetNetworkPlayerName(m_Controller.GetPlayer()).c_str(), GUIFont::Centre);
1454-
m_HUDStack -= 11;
1455-
}
1456-
}
14571433
}
14581434
}
14591435
}

Source/Entities/MovableObject.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1112,14 +1112,12 @@ bool MovableObject::DrawToTerrain(SLTerrain* terrain) {
11121112
wrappedMaskedBlit(terrain->GetMaterialBitmap(), tempBitmap, tempBitmapPos, true);
11131113

11141114
terrain->AddUpdatedMaterialArea(Box(tempBitmapPos, static_cast<float>(tempBitmap->w), static_cast<float>(tempBitmap->h)));
1115-
g_SceneMan.RegisterTerrainChange(tempBitmapPos.GetFloorIntX(), tempBitmapPos.GetFloorIntY(), tempBitmap->w, tempBitmap->h, ColorKeys::g_MaskColor, false);
11161115
} else {
11171116
Draw(terrain->GetFGColorBitmap(), Vector(), DrawMode::g_DrawColor, true);
11181117
Material const* terrMat = g_SceneMan.GetMaterialFromID(g_SceneMan.GetTerrain()->GetMaterialPixel(m_Pos.GetFloorIntX(), m_Pos.GetFloorIntY()));
11191118
if (GetMaterial()->GetPriority() > terrMat->GetPriority()) {
11201119
Draw(terrain->GetMaterialBitmap(), Vector(), DrawMode::g_DrawMaterial, true);
11211120
}
1122-
g_SceneMan.RegisterTerrainChange(m_Pos.GetFloorIntX(), m_Pos.GetFloorIntY(), 1, 1, DrawMode::g_DrawColor, false);
11231121
}
11241122
return true;
11251123
}

Source/Entities/PieMenu.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,7 @@ void PieMenu::Draw(BITMAP* targetBitmap, const Vector& targetPos) const {
637637
CalculateDrawPosition(targetBitmap, targetPos, drawPos);
638638

639639
if (m_EnabledState != EnabledState::Disabled) {
640-
if (m_DrawBackgroundTransparent && !g_FrameMan.IsInMultiplayerMode()) {
640+
if (m_DrawBackgroundTransparent) {
641641
g_FrameMan.SetTransTableFromPreset(TransparencyPreset::MoreTrans);
642642
g_GLResourceMan.UpdateDynamicBitmap(m_BGBitmap, true);
643643
DrawTexture(g_GLResourceMan.GetStaticTextureFromBitmap(m_BGBitmap), drawPos.GetFloorIntX() - m_BGBitmap->w / 2, drawPos.GetFloorIntY() - m_BGBitmap->h / 2, {255, 255, 255, g_FrameMan.GetCurrentAlpha()});

Source/Entities/SLTerrain.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,6 @@ std::deque<MOPixel*> SLTerrain::EraseSilhouette(BITMAP* sprite, const Vector& po
465465
}
466466
if (colorPixel != ColorKeys::g_MaskColor) {
467467
putpixel(m_FGColorLayer->GetBitmap(), terrX, terrY, ColorKeys::g_MaskColor);
468-
g_SceneMan.RegisterTerrainChange(terrX, terrY, 1, 1, ColorKeys::g_MaskColor, false);
469468
}
470469
}
471470
}

0 commit comments

Comments
 (0)