Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
94 commits
Select commit Hold shift + click to select a range
10962a2
reimplement: SHC_3BB0A8C1_0x00480640 100.0% Reimplemented
gynt Oct 3, 2026
ab1c936
style: InitialAnnounceReply (0x00480640) follows the style guide
kotijekriv Nov 19, 2026
eccf871
reimplement: SHC_3BB0A8C1_0x00484450 100.0% Reimplemented
gynt Oct 3, 2026
f0f1ff1
style: ResetSyncStatusUnk (0x00484450) follows the style guide
kotijekriv Nov 19, 2026
1a1e55c
reimplement: SHC_3BB0A8C1_0x00485330 100.0% Reimplemented
gynt Oct 3, 2026
f74ec9c
style: CloseModalDialogForEveryone (0x00485330) follows the style guide
kotijekriv Nov 19, 2026
892464f
reimplement: SHC_3BB0A8C1_0x004893C0 100.0% Reimplemented
gynt Oct 3, 2026
a718757
style: InitialAnnounceToHost (0x004893C0) follows the style guide
kotijekriv Nov 19, 2026
8c9f912
reimplement: SHC_3BB0A8C1_0x00482360 100.0% Reimplemented
gynt Oct 3, 2026
17b4ba7
style: ClickChangeTaxes (0x00482360) follows the style guide
kotijekriv Nov 20, 2026
b697da5
reimplement: SHC_3BB0A8C1_0x004823C0 100.0% Reimplemented
gynt Oct 3, 2026
159f8b9
style: ClickChangeRations (0x004823C0) follows the style guide
kotijekriv Nov 20, 2026
eabc7e6
reimplement: SHC_3BB0A8C1_0x00482A40 100.0% Reimplemented
gynt Oct 3, 2026
43a5187
style: ClickBuildingSleep (0x00482A40) follows the style guide
kotijekriv Nov 20, 2026
b526eb0
reimplement: SHC_3BB0A8C1_0x004843F0 100.0% Reimplemented
gynt Oct 3, 2026
3d348f5
style: ResyncStatus2 (0x004843F0) follows the style guide
kotijekriv Nov 20, 2026
2bfbf1d
reimplement: SHC_3BB0A8C1_0x00484E10 100.0% Reimplemented
gynt Oct 3, 2026
90059f8
style: TriggerRecalculationOfUnitSameTileLinkage (0x00484E10) follows…
kotijekriv Nov 20, 2026
e890a87
reimplement: SHC_3BB0A8C1_0x004850E0 100.0% Reimplemented
gynt Oct 3, 2026
8e1f66d
style: BroadCastSyncRelatedStatus (0x004850E0) follows the style guide
kotijekriv Nov 20, 2026
37e36e3
reimplement: SHC_3BB0A8C1_0x004852D0 100.0% Reimplemented
gynt Oct 3, 2026
871a07d
style: ShareAnnouncementWithHost (0x004852D0) follows the style guide
kotijekriv Nov 20, 2026
1677d89
reimplement: SHC_3BB0A8C1_0x00484A00 100.0% Reimplemented
gynt Oct 3, 2026
65e7745
style: TribeRelated1 (0x00484A00) follows the style guide
kotijekriv Nov 20, 2026
b4f3ee7
reimplement: SHC_3BB0A8C1_0x00484DA0 100.0% Reimplemented
gynt Oct 3, 2026
2a880e5
style: DeselectUnit (0x00484DA0) follows the style guide
kotijekriv Nov 20, 2026
175e296
reimplement: SHC_3BB0A8C1_0x00486320 100.0% Reimplemented
gynt Oct 3, 2026
2302a2b
style: ShareAIVHash (0x00486320) follows the style guide
kotijekriv Nov 20, 2026
d099caa
reimplement: SHC_3BB0A8C1_0x00480680 100.0% Reimplemented
gynt Oct 3, 2026
620b777
style: AnnounceGameVersion (0x00480680) follows the style guide
kotijekriv Nov 20, 2026
69a29ad
reimplement: SHC_3BB0A8C1_0x004855C0 100.0% Reimplemented
gynt Oct 3, 2026
a22e2e9
style: NotifyLaggingPlayer (0x004855C0) follows the style guide
kotijekriv Nov 20, 2026
ef4622c
reimplement: SHC_3BB0A8C1_0x00485650 100.0% Reimplemented
gynt Oct 3, 2026
3825c13
style: SomeKindOfMultiplayerPingUnk (0x00485650) follows the style guide
kotijekriv Nov 20, 2026
f06a08e
reimplement: SHC_3BB0A8C1_0x0048FC20 100.0% Reimplemented
gynt Oct 3, 2026
1b5d052
style: ResyncStartCS_CS_Sub (0x0048FC20) follows the style guide
kotijekriv Nov 20, 2026
5e8293d
reimplement: SHC_3BB0A8C1_0x0048FFD0 100.0% Reimplemented
gynt Oct 3, 2026
1779504
style: HostRemoveAIPlayerBySlotID (0x0048FFD0) follows the style guide
kotijekriv Nov 20, 2026
a625827
reimplement: SHC_3BB0A8C1_0x00480E60 100.0% Reimplemented
gynt Oct 3, 2026
1596f7f
style: MakeUnitSelection (0x00480E60) follows the style guide
kotijekriv Nov 20, 2026
08c8a37
reimplement: SHC_3BB0A8C1_0x004821E0 100.0% Reimplemented
gynt Oct 3, 2026
c18449a
style: ClickRecruitUnit (0x004821E0) follows the style guide
kotijekriv Nov 20, 2026
900d971
reimplement: SHC_3BB0A8C1_0x00482620 100.0% Reimplemented
gynt Oct 3, 2026
6891e23
style: ClickBuyOrSell (0x00482620) follows the style guide
kotijekriv Nov 20, 2026
ae24a29
reimplement: SHC_3BB0A8C1_0x004847B0 100.0% Reimplemented
gynt Oct 3, 2026
cf94282
style: ClickUnitStance (0x004847B0) follows the style guide
kotijekriv Nov 20, 2026
045dd1d
reimplement: SHC_3BB0A8C1_0x00484960 100.0% Reimplemented
gynt Oct 3, 2026
fd84a0d
style: SiegeEngineRelated (0x00484960) follows the style guide
kotijekriv Nov 20, 2026
be0671d
reimplement: SHC_3BB0A8C1_0x00484A70 100.0% Reimplemented
gynt Oct 3, 2026
6d572c9
style: ReleaseDogs (0x00484A70) follows the style guide
kotijekriv Nov 20, 2026
83858c6
reimplement: SHC_3BB0A8C1_0x00485520 100.0% Reimplemented
gynt Oct 3, 2026
8c9c619
style: FlagsAndBraziersCommandUnk (0x00485520) follows the style guide
kotijekriv Nov 20, 2026
ede48a7
reimplement: SHC_3BB0A8C1_0x00485790 100.0% Reimplemented
gynt Oct 3, 2026
808412e
style: ResyncStatusStart (0x00485790) follows the style guide
kotijekriv Nov 20, 2026
41f11ac
reimplement: SHC_3BB0A8C1_0x00485E80 100.0% Reimplemented
gynt Oct 3, 2026
8dac866
style: MapSendingRelated (0x00485E80) follows the style guide
kotijekriv Nov 20, 2026
83be19d
reimplement: SHC_3BB0A8C1_0x00480DB0 100.0% Reimplemented
gynt Oct 3, 2026
4192c31
style: ClickNavigateMenuOrEscape (0x00480DB0) follows the style guide
kotijekriv Nov 20, 2026
d7fb29e
reimplement: SHC_3BB0A8C1_0x004856E0 100.0% Reimplemented
gynt Oct 3, 2026
d9ed59e
style: ShareGameStatePartialHashes (0x004856E0) follows the style guide
kotijekriv Nov 20, 2026
13b6f9e
reimplement: SHC_3BB0A8C1_0x0048A1F0 100.0% Reimplemented
gynt Oct 3, 2026
a83a7c7
style: SendResyncBuilding (0x0048A1F0) follows the style guide
kotijekriv Nov 20, 2026
93935f7
reimplement: SHC_3BB0A8C1_0x0048A2A0 100.0% Reimplemented
gynt Oct 3, 2026
321b66c
style: SendResyncVeg (0x0048A2A0) follows the style guide
kotijekriv Nov 20, 2026
edfc2ed
reimplement: SHC_3BB0A8C1_0x0048A460 100.0% Reimplemented
gynt Oct 3, 2026
1697536
style: SendResyncPlayerData (0x0048A460) follows the style guide
kotijekriv Nov 20, 2026
935d241
reimplement: SHC_3BB0A8C1_0x0048A710 100.0% Reimplemented
gynt Oct 3, 2026
6fd3b05
style: SendResyncEntity (0x0048A710) follows the style guide
kotijekriv Nov 20, 2026
2e9e848
reimplement: SHC_3BB0A8C1_0x0048AB40 100.0% Reimplemented
gynt Oct 3, 2026
3b24d6a
style: ResyncTeleClimb (0x0048AB40) follows the style guide
kotijekriv Nov 20, 2026
c1691c4
reimplement: SHC_3BB0A8C1_0x0048B280 100.0% Reimplemented
gynt Oct 3, 2026
323fbab
style: SendQuitGameQuestion (0x0048B280) follows the style guide
kotijekriv Nov 20, 2026
af9c1de
reimplement: SHC_3BB0A8C1_0x0048BBE0 100.0% Reimplemented
gynt Oct 3, 2026
f89126f
style: ResyncVillage (0x0048BBE0) follows the style guide
kotijekriv Nov 20, 2026
e6b5418
reimplement: SHC_3BB0A8C1_0x0048BC90 100.0% Reimplemented
gynt Oct 3, 2026
a5a4ebb
style: ResyncAIZone (0x0048BC90) follows the style guide
kotijekriv Nov 20, 2026
6aa93cf
reimplement: SHC_3BB0A8C1_0x004833F0 100.0% Reimplemented
gynt Oct 3, 2026
0ca543e
style: AcknowledgeMapExistence (0x004833F0) follows the style guide
kotijekriv Nov 20, 2026
38ef68f
reimplement: SHC_3BB0A8C1_0x004834B0 100.0% Reimplemented
gynt Oct 3, 2026
e0118a1
style: ShareMSVMapIndex (0x004834B0) follows the style guide
kotijekriv Nov 20, 2026
173e445
reimplement: SHC_3BB0A8C1_0x00484E70 100.0% Reimplemented
gynt Oct 3, 2026
1e02e90
style: ResyncZone (0x00484E70) follows the style guide
kotijekriv Nov 20, 2026
8c4ecf4
reimplement: SHC_3BB0A8C1_0x00485020 100.0% Reimplemented
gynt Oct 3, 2026
ebb4f06
style: CommandSelectionReplenishAmmo (0x00485020) follows the style g…
kotijekriv Nov 20, 2026
5c7f53e
reimplement: SHC_3BB0A8C1_0x00485210 100.0% Reimplemented
gynt Oct 3, 2026
213ad48
style: SyncPacketSizeAnnouncement (0x00485210) follows the style guide
kotijekriv Nov 20, 2026
05f56f5
reimplement: SHC_3BB0A8C1_0x0048AA80 100.0% Reimplemented
gynt Oct 3, 2026
85dce40
style: ResyncMoat (0x0048AA80) follows the style guide
kotijekriv Nov 20, 2026
4e28ee6
reimplement: SHC_3BB0A8C1_0x0048ABF0 100.0% Reimplemented
gynt Oct 3, 2026
85a9a82
style: ResyncPitch (0x0048ABF0) follows the style guide
kotijekriv Nov 20, 2026
2d9b3cc
reimplement: SHC_3BB0A8C1_0x00481050 100.0% Reimplemented
gynt Oct 3, 2026
48307cf
style: ClickErase (0x00481050) follows the style guide
kotijekriv Nov 20, 2026
57b028b
reimplement: SHC_3BB0A8C1_0x00482550 100.0% Reimplemented
gynt Oct 3, 2026
471511b
style: ClickSomethingWithDrawBridgeUnk (0x00482550) follows the style…
kotijekriv Nov 20, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions src/OpenSHC/Synchrony/Commands/AcknowledgeMapExistence.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#include "../Commands.func.hpp"

#include "OpenSHC/Synchrony/GameSynchronyState.func.hpp"
#include "OpenSHC/Commands/GameCommandParameterLocation.hpp"
#include "OpenSHC/Commands/GameCommandParameterReadWrite.hpp"
#include "OpenSHC/Commands/GameCommandScheduling.hpp"

#include "OpenSHC/Globals/DAT_GameSynchronyState.hpp"

namespace OpenSHC {
namespace Synchrony {

// FUNCTION: STRONGHOLDCRUSADER 0x004833F0
void Commands::AcknowledgeMapExistence()
{
DAT_GameSynchronyState::instance.DAT_CommandSize = 8;
DAT_GameSynchronyState::instance.DAT_GameCommandArray[DAT_GameSynchronyState::instance.DAT_CurrentGameCommandID]
.time = 0;
if (DAT_GameSynchronyState::instance.DAT_CommandActionPlan == OpenSHC::Commands::GCS_SCHEDULE_AND_SEND) {
MACRO_CALL_MEMBER(OpenSHC::Synchrony::GameSynchronyState_Func::serializeOrDeserializeCommandParameter,
DAT_GameSynchronyState::ptr)(&DAT_GameSynchronyState::instance.DAT_GameCommandParam0, 4,
OpenSHC::Commands::GCPL_FIXED_COMMAND_DATA_ADDRESS, OpenSHC::Commands::GCPRW_SERIALIZE_INTO_PARAM_1);
MACRO_CALL_MEMBER(OpenSHC::Synchrony::GameSynchronyState_Func::serializeOrDeserializeCommandParameter,
DAT_GameSynchronyState::ptr)(&DAT_GameSynchronyState::instance.DAT_GameCommandParam1, 4,
OpenSHC::Commands::GCPL_FIXED_COMMAND_DATA_ADDRESS, OpenSHC::Commands::GCPRW_SERIALIZE_INTO_PARAM_1);
DAT_GameSynchronyState::instance.DAT_CommandActionPlan = OpenSHC::Commands::GCS_EXECUTE;
return;
}
if (DAT_GameSynchronyState::instance.DAT_CommandActionPlan != OpenSHC::Commands::GCS_EXECUTE) {
return;
}
int parameter0;
MACRO_CALL_MEMBER(OpenSHC::Synchrony::GameSynchronyState_Func::serializeOrDeserializeCommandParameter,
DAT_GameSynchronyState::ptr)(&parameter0, 4, OpenSHC::Commands::GCPL_FIXED_COMMAND_DATA_ADDRESS,
OpenSHC::Commands::GCPRW_DESERIALIZE_FROM_PARAM1);
int mapIndex;
MACRO_CALL_MEMBER(OpenSHC::Synchrony::GameSynchronyState_Func::serializeOrDeserializeCommandParameter,
DAT_GameSynchronyState::ptr)(&mapIndex, 4, OpenSHC::Commands::GCPL_FIXED_COMMAND_DATA_ADDRESS,
OpenSHC::Commands::GCPRW_DESERIALIZE_FROM_PARAM1);
if (parameter0 == 0 && DAT_GameSynchronyState::instance.isHost) {
DAT_GameSynchronyState::instance.unknownMapRelatedReceivedDataArray[mapIndex] = 0;
DAT_GameSynchronyState::instance.mapExistenceAckCountdown = 50;
}
}

}
}
42 changes: 42 additions & 0 deletions src/OpenSHC/Synchrony/Commands/AnnounceGameVersion.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#include "../Commands.func.hpp"

#include "OpenSHC/Synchrony/GameSynchronyState.func.hpp"
#include "OpenSHC/Commands/GameCommandParameterLocation.hpp"
#include "OpenSHC/Commands/GameCommandParameterReadWrite.hpp"
#include "OpenSHC/Commands/GameCommandScheduling.hpp"

#include "OpenSHC/Globals/DAT_GameSynchronyState.hpp"

namespace OpenSHC {
namespace Synchrony {

// FUNCTION: STRONGHOLDCRUSADER 0x00480680
void Commands::AnnounceGameVersion()
{
DAT_GameSynchronyState::instance.DAT_CommandSize = 4;
DAT_GameSynchronyState::instance.DAT_GameCommandArray[DAT_GameSynchronyState::instance.DAT_CurrentGameCommandID]
.time = 0;
if (DAT_GameSynchronyState::instance.DAT_CommandActionPlan == OpenSHC::Commands::GCS_SCHEDULE_AND_SEND) {
DAT_GameSynchronyState::instance.DAT_GameCommandParam0 = 2752588;
MACRO_CALL_MEMBER(OpenSHC::Synchrony::GameSynchronyState_Func::serializeOrDeserializeCommandParameter,
DAT_GameSynchronyState::ptr)(&DAT_GameSynchronyState::instance.DAT_GameCommandParam0, 4,
OpenSHC::Commands::GCPL_FIXED_COMMAND_DATA_ADDRESS, OpenSHC::Commands::GCPRW_SERIALIZE_INTO_PARAM_1);
DAT_GameSynchronyState::instance.DAT_CommandActionPlan = OpenSHC::Commands::GCS_EXECUTE;
return;
}
if (DAT_GameSynchronyState::instance.DAT_CommandActionPlan != OpenSHC::Commands::GCS_EXECUTE) {
return;
}
MACRO_CALL_MEMBER(OpenSHC::Synchrony::GameSynchronyState_Func::serializeOrDeserializeCommandParameter,
DAT_GameSynchronyState::ptr)(&DAT_GameSynchronyState::instance.DAT_GameCommandParam0, 4,
OpenSHC::Commands::GCPL_FIXED_COMMAND_DATA_ADDRESS, OpenSHC::Commands::GCPRW_DESERIALIZE_FROM_PARAM1);
if (DAT_GameSynchronyState::instance.protocolInvokerPlayerID >= 1
&& DAT_GameSynchronyState::instance.protocolInvokerPlayerID <= 8) {
DAT_GameSynchronyState::instance
.DAT_MultiplayerGameVersions[DAT_GameSynchronyState::instance.protocolInvokerPlayerID]
= DAT_GameSynchronyState::instance.DAT_GameCommandParam0;
}
}

}
}
32 changes: 32 additions & 0 deletions src/OpenSHC/Synchrony/Commands/BroadCastSyncRelatedStatus.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#include "../Commands.func.hpp"

#include "OpenSHC/Commands/GameCommandScheduling.hpp"

#include "OpenSHC/Globals/DAT_GameSynchronyState.hpp"

namespace OpenSHC {
namespace Synchrony {

// FUNCTION: STRONGHOLDCRUSADER 0x004850E0
void Commands::BroadCastSyncRelatedStatus()
{
DAT_GameSynchronyState::instance.DAT_CommandSize = 0;
DAT_GameSynchronyState::instance.DAT_GameCommandArray[DAT_GameSynchronyState::instance.DAT_CurrentGameCommandID]
.time = 0;
if (DAT_GameSynchronyState::instance.DAT_CommandActionPlan == OpenSHC::Commands::GCS_SCHEDULE_AND_SEND) {
DAT_GameSynchronyState::instance.DAT_CommandActionPlan = OpenSHC::Commands::GCS_EXECUTE;
return;
}
if (DAT_GameSynchronyState::instance.DAT_CommandActionPlan != OpenSHC::Commands::GCS_EXECUTE) {
return;
}
DAT_GameSynchronyState::instance
.syncRelatedStatusArray[DAT_GameSynchronyState::instance.protocolInvokerPlayerID] = 1;
if (DAT_GameSynchronyState::instance.isHost) {
DAT_GameSynchronyState::instance.announcementReceiveTime = timeGetTime();
DAT_GameSynchronyState::instance.announcementReceivedBool = TRUE;
}
}

}
}
37 changes: 37 additions & 0 deletions src/OpenSHC/Synchrony/Commands/ClickBuildingSleep.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#include "../Commands.func.hpp"

#include "OpenSHC/Synchrony/Actions.func.hpp"
#include "OpenSHC/Synchrony/GameSynchronyState.func.hpp"
#include "OpenSHC/Commands/GameCommandParameterLocation.hpp"
#include "OpenSHC/Commands/GameCommandParameterReadWrite.hpp"
#include "OpenSHC/Commands/GameCommandScheduling.hpp"

#include "OpenSHC/Globals/DAT_GameSynchronyState.hpp"

namespace OpenSHC {
namespace Synchrony {

// FUNCTION: STRONGHOLDCRUSADER 0x00482A40
void Commands::ClickBuildingSleep()
{
DAT_GameSynchronyState::instance.DAT_CommandSize = 2;
if (DAT_GameSynchronyState::instance.DAT_CommandActionPlan == OpenSHC::Commands::GCS_SCHEDULE_AND_SEND) {
MACRO_CALL_MEMBER(OpenSHC::Synchrony::GameSynchronyState_Func::serializeOrDeserializeCommandParameter,
DAT_GameSynchronyState::ptr)(&DAT_GameSynchronyState::instance.DAT_GameCommandParam0, 2,
OpenSHC::Commands::GCPL_DYNAMIC_COMMAND_DATA_ADDRESS, OpenSHC::Commands::GCPRW_SERIALIZE_INTO_PARAM_1);
return;
}
if (DAT_GameSynchronyState::instance.DAT_CommandActionPlan != OpenSHC::Commands::GCS_EXECUTE) {
return;
}
DAT_GameSynchronyState::instance.DAT_GameCommandParam0 = 0;
MACRO_CALL_MEMBER(OpenSHC::Synchrony::GameSynchronyState_Func::serializeOrDeserializeCommandParameter,
DAT_GameSynchronyState::ptr)(&DAT_GameSynchronyState::instance.DAT_GameCommandParam0, 2,
OpenSHC::Commands::GCPL_DYNAMIC_COMMAND_DATA_ADDRESS, OpenSHC::Commands::GCPRW_DESERIALIZE_FROM_PARAM1);
MACRO_CALL(OpenSHC::Synchrony::Actions_Func::ProcessBuildingSleepUpdate)(
DAT_GameSynchronyState::instance.protocolInvokerPlayerID,
DAT_GameSynchronyState::instance.DAT_GameCommandParam0);
}

}
}
46 changes: 46 additions & 0 deletions src/OpenSHC/Synchrony/Commands/ClickBuyOrSell.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#include "../Commands.func.hpp"

#include "OpenSHC/Synchrony/Actions.func.hpp"
#include "OpenSHC/Synchrony/GameSynchronyState.func.hpp"
#include "OpenSHC/Commands/GameCommandParameterLocation.hpp"
#include "OpenSHC/Commands/GameCommandParameterReadWrite.hpp"
#include "OpenSHC/Commands/GameCommandScheduling.hpp"
#include "OpenSHC/Game/Resources/ResourceType.hpp"

#include "OpenSHC/Globals/DAT_GameSynchronyState.hpp"

namespace OpenSHC {
namespace Synchrony {

// FUNCTION: STRONGHOLDCRUSADER 0x00482620
void Commands::ClickBuyOrSell()
{
DAT_GameSynchronyState::instance.DAT_CommandSize = 2;
if (DAT_GameSynchronyState::instance.DAT_CommandActionPlan == OpenSHC::Commands::GCS_SCHEDULE_AND_SEND) {
MACRO_CALL_MEMBER(OpenSHC::Synchrony::GameSynchronyState_Func::serializeOrDeserializeCommandParameter,
DAT_GameSynchronyState::ptr)(&DAT_GameSynchronyState::instance.DAT_GameCommandParam0, 1,
OpenSHC::Commands::GCPL_DYNAMIC_COMMAND_DATA_ADDRESS, OpenSHC::Commands::GCPRW_SERIALIZE_INTO_PARAM_1);
MACRO_CALL_MEMBER(OpenSHC::Synchrony::GameSynchronyState_Func::serializeOrDeserializeCommandParameter,
DAT_GameSynchronyState::ptr)(&DAT_GameSynchronyState::instance.DAT_GameCommandParam1, 1,
OpenSHC::Commands::GCPL_DYNAMIC_COMMAND_DATA_ADDRESS, OpenSHC::Commands::GCPRW_SERIALIZE_INTO_PARAM_1);
return;
}
if (DAT_GameSynchronyState::instance.DAT_CommandActionPlan != OpenSHC::Commands::GCS_EXECUTE) {
return;
}
DAT_GameSynchronyState::instance.DAT_GameCommandParam0 = 0;
MACRO_CALL_MEMBER(OpenSHC::Synchrony::GameSynchronyState_Func::serializeOrDeserializeCommandParameter,
DAT_GameSynchronyState::ptr)(&DAT_GameSynchronyState::instance.DAT_GameCommandParam0, 1,
OpenSHC::Commands::GCPL_DYNAMIC_COMMAND_DATA_ADDRESS, OpenSHC::Commands::GCPRW_DESERIALIZE_FROM_PARAM1);
DAT_GameSynchronyState::instance.DAT_GameCommandParam1 = 0;
MACRO_CALL_MEMBER(OpenSHC::Synchrony::GameSynchronyState_Func::serializeOrDeserializeCommandParameter,
DAT_GameSynchronyState::ptr)(&DAT_GameSynchronyState::instance.DAT_GameCommandParam1, 1,
OpenSHC::Commands::GCPL_DYNAMIC_COMMAND_DATA_ADDRESS, OpenSHC::Commands::GCPRW_DESERIALIZE_FROM_PARAM1);
MACRO_CALL(OpenSHC::Synchrony::Actions_Func::ProcessBuyOrSell)(
DAT_GameSynchronyState::instance.protocolInvokerPlayerID,
DAT_GameSynchronyState::instance.DAT_GameCommandParam0,
(OpenSHC::Game::Resources::ResourceType)(DAT_GameSynchronyState::instance.DAT_GameCommandParam1));
}

}
}
37 changes: 37 additions & 0 deletions src/OpenSHC/Synchrony/Commands/ClickChangeRations.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#include "../Commands.func.hpp"

#include "OpenSHC/Synchrony/Actions.func.hpp"
#include "OpenSHC/Synchrony/GameSynchronyState.func.hpp"
#include "OpenSHC/Commands/GameCommandParameterLocation.hpp"
#include "OpenSHC/Commands/GameCommandParameterReadWrite.hpp"
#include "OpenSHC/Commands/GameCommandScheduling.hpp"

#include "OpenSHC/Globals/DAT_GameSynchronyState.hpp"

namespace OpenSHC {
namespace Synchrony {

// FUNCTION: STRONGHOLDCRUSADER 0x004823C0
void Commands::ClickChangeRations()
{
DAT_GameSynchronyState::instance.DAT_CommandSize = 1;
if (DAT_GameSynchronyState::instance.DAT_CommandActionPlan == OpenSHC::Commands::GCS_SCHEDULE_AND_SEND) {
MACRO_CALL_MEMBER(OpenSHC::Synchrony::GameSynchronyState_Func::serializeOrDeserializeCommandParameter,
DAT_GameSynchronyState::ptr)(&DAT_GameSynchronyState::instance.DAT_GameCommandParam0, 1,
OpenSHC::Commands::GCPL_DYNAMIC_COMMAND_DATA_ADDRESS, OpenSHC::Commands::GCPRW_SERIALIZE_INTO_PARAM_1);
return;
}
if (DAT_GameSynchronyState::instance.DAT_CommandActionPlan != OpenSHC::Commands::GCS_EXECUTE) {
return;
}
DAT_GameSynchronyState::instance.DAT_GameCommandParam0 = 0;
MACRO_CALL_MEMBER(OpenSHC::Synchrony::GameSynchronyState_Func::serializeOrDeserializeCommandParameter,
DAT_GameSynchronyState::ptr)(&DAT_GameSynchronyState::instance.DAT_GameCommandParam0, 1,
OpenSHC::Commands::GCPL_DYNAMIC_COMMAND_DATA_ADDRESS, OpenSHC::Commands::GCPRW_DESERIALIZE_FROM_PARAM1);
MACRO_CALL(OpenSHC::Synchrony::Actions_Func::ChangeRations)(
DAT_GameSynchronyState::instance.protocolInvokerPlayerID,
DAT_GameSynchronyState::instance.DAT_GameCommandParam0);
}

}
}
37 changes: 37 additions & 0 deletions src/OpenSHC/Synchrony/Commands/ClickChangeTaxes.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#include "../Commands.func.hpp"

#include "OpenSHC/Synchrony/Actions.func.hpp"
#include "OpenSHC/Synchrony/GameSynchronyState.func.hpp"
#include "OpenSHC/Commands/GameCommandParameterLocation.hpp"
#include "OpenSHC/Commands/GameCommandParameterReadWrite.hpp"
#include "OpenSHC/Commands/GameCommandScheduling.hpp"

#include "OpenSHC/Globals/DAT_GameSynchronyState.hpp"

namespace OpenSHC {
namespace Synchrony {

// FUNCTION: STRONGHOLDCRUSADER 0x00482360
void Commands::ClickChangeTaxes()
{
DAT_GameSynchronyState::instance.DAT_CommandSize = 1;
if (DAT_GameSynchronyState::instance.DAT_CommandActionPlan == OpenSHC::Commands::GCS_SCHEDULE_AND_SEND) {
MACRO_CALL_MEMBER(OpenSHC::Synchrony::GameSynchronyState_Func::serializeOrDeserializeCommandParameter,
DAT_GameSynchronyState::ptr)(&DAT_GameSynchronyState::instance.DAT_GameCommandParam0, 1,
OpenSHC::Commands::GCPL_DYNAMIC_COMMAND_DATA_ADDRESS, OpenSHC::Commands::GCPRW_SERIALIZE_INTO_PARAM_1);
return;
}
if (DAT_GameSynchronyState::instance.DAT_CommandActionPlan != OpenSHC::Commands::GCS_EXECUTE) {
return;
}
DAT_GameSynchronyState::instance.DAT_GameCommandParam0 = 0;
MACRO_CALL_MEMBER(OpenSHC::Synchrony::GameSynchronyState_Func::serializeOrDeserializeCommandParameter,
DAT_GameSynchronyState::ptr)(&DAT_GameSynchronyState::instance.DAT_GameCommandParam0, 1,
OpenSHC::Commands::GCPL_DYNAMIC_COMMAND_DATA_ADDRESS, OpenSHC::Commands::GCPRW_DESERIALIZE_FROM_PARAM1);
MACRO_CALL(OpenSHC::Synchrony::Actions_Func::ChangeTaxes)(
DAT_GameSynchronyState::instance.protocolInvokerPlayerID,
DAT_GameSynchronyState::instance.DAT_GameCommandParam0);
}

}
}
53 changes: 53 additions & 0 deletions src/OpenSHC/Synchrony/Commands/ClickErase.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#include "../Commands.func.hpp"

#include "OpenSHC/Map/TileMapState.func.hpp"
#include "OpenSHC/Synchrony/GameSynchronyState.func.hpp"
#include "OpenSHC/Commands/GameCommandParameterLocation.hpp"
#include "OpenSHC/Commands/GameCommandParameterReadWrite.hpp"
#include "OpenSHC/Commands/GameCommandScheduling.hpp"

#include "OpenSHC/Globals/DAT_GameSynchronyState.hpp"
#include "OpenSHC/Globals/DAT_TileMapState.hpp"

namespace OpenSHC {
namespace Synchrony {

// FUNCTION: STRONGHOLDCRUSADER 0x00481050
void Commands::ClickErase()
{
DAT_GameSynchronyState::instance.DAT_CommandSize = 5;
if (DAT_GameSynchronyState::instance.DAT_CommandActionPlan == OpenSHC::Commands::GCS_SCHEDULE_AND_SEND) {
MACRO_CALL_MEMBER(OpenSHC::Synchrony::GameSynchronyState_Func::serializeOrDeserializeCommandParameter,
DAT_GameSynchronyState::ptr)(&DAT_GameSynchronyState::instance.DAT_GameCommandParam0, 2,
OpenSHC::Commands::GCPL_DYNAMIC_COMMAND_DATA_ADDRESS, OpenSHC::Commands::GCPRW_SERIALIZE_INTO_PARAM_1);
MACRO_CALL_MEMBER(OpenSHC::Synchrony::GameSynchronyState_Func::serializeOrDeserializeCommandParameter,
DAT_GameSynchronyState::ptr)(&DAT_GameSynchronyState::instance.DAT_GameCommandParam1, 2,
OpenSHC::Commands::GCPL_DYNAMIC_COMMAND_DATA_ADDRESS, OpenSHC::Commands::GCPRW_SERIALIZE_INTO_PARAM_1);
MACRO_CALL_MEMBER(OpenSHC::Synchrony::GameSynchronyState_Func::serializeOrDeserializeCommandParameter,
DAT_GameSynchronyState::ptr)(&DAT_GameSynchronyState::instance.DAT_GameCommandParam2, 1,
OpenSHC::Commands::GCPL_DYNAMIC_COMMAND_DATA_ADDRESS, OpenSHC::Commands::GCPRW_SERIALIZE_INTO_PARAM_1);
return;
}
if (DAT_GameSynchronyState::instance.DAT_CommandActionPlan != OpenSHC::Commands::GCS_EXECUTE) {
return;
}
DAT_GameSynchronyState::instance.DAT_GameCommandParam0 = 0;
MACRO_CALL_MEMBER(OpenSHC::Synchrony::GameSynchronyState_Func::serializeOrDeserializeCommandParameter,
DAT_GameSynchronyState::ptr)(&DAT_GameSynchronyState::instance.DAT_GameCommandParam0, 2,
OpenSHC::Commands::GCPL_DYNAMIC_COMMAND_DATA_ADDRESS, OpenSHC::Commands::GCPRW_DESERIALIZE_FROM_PARAM1);
DAT_GameSynchronyState::instance.DAT_GameCommandParam1 = 0;
MACRO_CALL_MEMBER(OpenSHC::Synchrony::GameSynchronyState_Func::serializeOrDeserializeCommandParameter,
DAT_GameSynchronyState::ptr)(&DAT_GameSynchronyState::instance.DAT_GameCommandParam1, 2,
OpenSHC::Commands::GCPL_DYNAMIC_COMMAND_DATA_ADDRESS, OpenSHC::Commands::GCPRW_DESERIALIZE_FROM_PARAM1);
DAT_GameSynchronyState::instance.DAT_GameCommandParam2 = 0;
MACRO_CALL_MEMBER(OpenSHC::Synchrony::GameSynchronyState_Func::serializeOrDeserializeCommandParameter,
DAT_GameSynchronyState::ptr)(&DAT_GameSynchronyState::instance.DAT_GameCommandParam2, 1,
OpenSHC::Commands::GCPL_DYNAMIC_COMMAND_DATA_ADDRESS, OpenSHC::Commands::GCPRW_DESERIALIZE_FROM_PARAM1);
MACRO_CALL_MEMBER(OpenSHC::Map::TileMapState_Func::eraseAreaWithBrush, DAT_TileMapState::ptr)(
DAT_GameSynchronyState::instance.DAT_GameCommandParam0,
DAT_GameSynchronyState::instance.DAT_GameCommandParam1,
DAT_GameSynchronyState::instance.DAT_GameCommandParam2);
}

}
}
Loading
Loading