Repository navigation
Reimplement 29 Synchrony and Game functions at 100% #403
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
6and8
wants to merge
13
commits into
sourcehold:main
Choose a base branch
from
6and8:pr-sync-100
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,614
−62
Open
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
2934f4d
headers: StoreLocalTime returns void, DirectPlay address callback tak…
loamifi-jake a302fe5
Reimplement 29 Synchrony and Game functions at 100%
loamifi-jake 526bee8
Merge remote-tracking branch 'origin/main' into pr-sync-100
loamifi-jake 1cb57fd
headers: the screen resolution flags are BOOLEnum
loamifi-jake ed31291
headers: ProcessAllyRequestingGoods takes a ResourceTypeMin1, Process…
loamifi-jake 03b0702
headers: DirectPlay address callback parameters (GUID, size, data, co…
loamifi-jake f33fde9
Review: relative main includes first, countof bounds, readable range …
loamifi-jake b865e65
headers: Actions.func.hpp needs ResourceTypeMin1 too
loamifi-jake fd25cc4
DAT_LastTeamMemberIndex stays undefined4 (an int type renames its rec…
loamifi-jake a151d50
SetAIPlayerNickNames: AITypeA case labels (currentAIArray is 1-based,…
loamifi-jake 05c4ad4
PlayerData: name the goods request arrays (goodsRequestTypeByPlayer, …
loamifi-jake e126fe0
ScreenResolutionUnion: clang-format include order
loamifi-jake 8d8af62
DirectPlayModemRelated_MemoryAllocationCallback: note why the loop st…
loamifi-jake File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
src/OpenSHC/Game/ScenarioEvents/InGameEventUnionVersion/initializeScenarioEvent.cpp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| #include "../InGameEventUnionVersion.func.hpp" | ||
|
|
||
| namespace OpenSHC { | ||
| namespace Game { | ||
| namespace ScenarioEvents { | ||
|
|
||
| // FUNCTION: STRONGHOLDCRUSADER 0x004B77A0 | ||
| ScenarioEventCondition* InGameEventUnionVersion::initializeScenarioEvent() | ||
| { | ||
| this->header.month = 0; | ||
| this->header.year = 1181; | ||
| this->header.tl_type = 3; | ||
| this->data.scenario.ScenarioEventType = 0; | ||
| this->data.scenario.actionData = 0; | ||
| *(short*)&this->data.scenario.allOrAnyCondition = 1; | ||
|
TheRedDaemon marked this conversation as resolved.
Resolved
|
||
| this->data.scenario.repeat = 0; | ||
| ScenarioEventCondition* condition = this->data.scenario.conditions; | ||
| for (int i = 0; i < countof(this->data.scenario.conditions); ++i) { | ||
| condition->enabled = 0; | ||
| condition->value = 0; | ||
| condition->subType = 0; | ||
| ++condition; | ||
| } | ||
| return condition; | ||
| } | ||
|
|
||
| } | ||
| } | ||
| } | ||
25 changes: 25 additions & 0 deletions
25
src/OpenSHC/Game/ScenarioEvents/InGameEventUnionVersion/resetEvent.cpp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| #include "../InGameEventUnionVersion.func.hpp" | ||
|
|
||
| namespace OpenSHC { | ||
| namespace Game { | ||
| namespace ScenarioEvents { | ||
|
|
||
| // FUNCTION: STRONGHOLDCRUSADER 0x004B7730 | ||
| BOOLEnum InGameEventUnionVersion::resetEvent() | ||
| { | ||
| this->header.month = 0; | ||
| this->header.year = 1181; | ||
| this->data.invasion.repeatMonths = 0; | ||
| this->header.tl_type = 1; | ||
| this->data.invasion.crusaderArabian = 0; | ||
| this->data.invasion.totalUnitCount = 0; | ||
| for (int i = 0; i < countof(this->data.invasion.unitCountsPerUnitType); ++i) { | ||
| this->data.invasion.unitCountsPerUnitType[i] = 0; | ||
| } | ||
| this->data.invasion.invasionPoint = 0; | ||
| return FALSE; | ||
| } | ||
|
|
||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| #include "../Skirmish.func.hpp" | ||
|
|
||
| #include "OpenSHC/Map/Units/UnitsState.func.hpp" | ||
|
|
||
| #include "OpenSHC/Globals/DAT_AlliesCount.hpp" | ||
| #include "OpenSHC/Globals/DAT_GameCore.hpp" | ||
| #include "OpenSHC/Globals/DAT_GameState.hpp" | ||
| #include "OpenSHC/Globals/DAT_GameSynchronyState.hpp" | ||
| #include "OpenSHC/Globals/DAT_LastTeamMemberIndex.hpp" | ||
| #include "OpenSHC/Globals/DAT_SomeTeamMemberPlayerIDArray.hpp" | ||
| #include "OpenSHC/Globals/DAT_UnitsState.hpp" | ||
|
|
||
| namespace OpenSHC { | ||
| namespace Game { | ||
| namespace Skirmish { | ||
|
|
||
| // FUNCTION: STRONGHOLDCRUSADER 0x004AC570 | ||
| void RecalculateAllies() | ||
| { | ||
| if ((int)DAT_GameCore::instance.mapTimeInTicks - (int)DAT_GameCore::instance.section1127 > 400 | ||
| && MACRO_CALL_MEMBER(Map::Units::UnitsState_Func::getAliveLordForPlayer, DAT_UnitsState::ptr)( | ||
| DAT_GameSynchronyState::instance.currentPlayerSlotID) | ||
| == 0) { | ||
| DAT_AlliesCount::instance = 0; | ||
| return; | ||
| } | ||
| int const team | ||
| = DAT_GameState::instance.mapAndTime.playerTeams[DAT_GameSynchronyState::instance.currentPlayerSlotID]; | ||
| DAT_AlliesCount::instance = 0; | ||
| for (int player = 1; player < countof(DAT_GameSynchronyState::instance.currentPlayerFullIDArray); | ||
| ++player) { | ||
| if (player == DAT_GameSynchronyState::instance.currentPlayerSlotID) { | ||
| continue; | ||
| } | ||
| if (DAT_GameSynchronyState::instance.currentPlayerFullIDArray[player] == -1 | ||
| && DAT_GameSynchronyState::instance.currentAIArray[player] == 0) { | ||
| continue; | ||
| } | ||
| if ((int)DAT_GameCore::instance.mapTimeInTicks - (int)DAT_GameCore::instance.section1127 > 400 | ||
| && MACRO_CALL_MEMBER(Map::Units::UnitsState_Func::getAliveLordForPlayer, DAT_UnitsState::ptr)( | ||
| player) | ||
| == 0) { | ||
| continue; | ||
| } | ||
| if (team != DAT_GameState::instance.mapAndTime.playerTeams[player]) { | ||
| continue; | ||
| } | ||
| DAT_SomeTeamMemberPlayerIDArray::instance[DAT_AlliesCount::instance] = player; | ||
| DAT_AlliesCount::instance += 1; | ||
| if (DAT_AlliesCount::instance >= 6) { | ||
| break; | ||
| } | ||
| } | ||
| if ((int)DAT_LastTeamMemberIndex::instance >= DAT_AlliesCount::instance) { | ||
| DAT_LastTeamMemberIndex::instance = DAT_AlliesCount::instance - 1; | ||
| } | ||
| if ((int)DAT_LastTeamMemberIndex::instance < 0) { | ||
| DAT_LastTeamMemberIndex::instance = 0; | ||
| } | ||
| } | ||
|
|
||
| } | ||
| } | ||
| } |
119 changes: 119 additions & 0 deletions
119
src/OpenSHC/Game/Skirmish/SetupSkirmishBalanceAndOrIntensity.cpp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,119 @@ | ||
| #include "../Skirmish.func.hpp" | ||
|
|
||
| #include "OpenSHC/Synchrony/GameSynchronyState.func.hpp" | ||
|
|
||
| #include "OpenSHC/Globals/DAT_GameSynchronyState.hpp" | ||
| #include "OpenSHC/Globals/DAT_RenderingDefinedData.hpp" | ||
|
|
||
| namespace OpenSHC { | ||
| namespace Game { | ||
| namespace Skirmish { | ||
|
|
||
| // FUNCTION: STRONGHOLDCRUSADER 0x00429710 | ||
| void SetupSkirmishBalanceAndOrIntensity() | ||
|
TheRedDaemon marked this conversation as resolved.
Resolved
|
||
| { | ||
| switch (DAT_GameSynchronyState::instance.skirmishTechLevel) { | ||
| case 0: | ||
| DAT_GameSynchronyState::instance.skirmishGameIntensityType = 1; | ||
| DAT_GameSynchronyState::instance.skirmishGameIntensityType2 = 0; | ||
| DAT_GameSynchronyState::instance.skirmishDefaultPopularity = 80; | ||
| DAT_GameSynchronyState::instance.skirmishUnknownSetting1[0] = 1; | ||
| DAT_GameSynchronyState::instance.skirmishUnknownSetting1[1] = 1; | ||
| DAT_GameSynchronyState::instance.skirmishUnknownSetting1[3] = 1; | ||
| break; | ||
| case 1: | ||
| DAT_GameSynchronyState::instance.skirmishGameIntensityType = 1; | ||
| DAT_GameSynchronyState::instance.skirmishGameIntensityType2 = 1; | ||
| DAT_GameSynchronyState::instance.skirmishDefaultPopularity = 80; | ||
| DAT_GameSynchronyState::instance.skirmishUnknownSetting1[0] = 1; | ||
| DAT_GameSynchronyState::instance.skirmishUnknownSetting1[1] = 1; | ||
| DAT_GameSynchronyState::instance.skirmishUnknownSetting1[3] = 1; | ||
| break; | ||
| case 2: | ||
| DAT_GameSynchronyState::instance.skirmishGameIntensityType = 2; | ||
| DAT_GameSynchronyState::instance.skirmishGameIntensityType2 = 1; | ||
| DAT_GameSynchronyState::instance.skirmishDefaultPopularity = 80; | ||
| DAT_GameSynchronyState::instance.skirmishUnknownSetting1[0] = 1; | ||
| DAT_GameSynchronyState::instance.skirmishUnknownSetting1[1] = 1; | ||
| DAT_GameSynchronyState::instance.skirmishUnknownSetting1[3] = 1; | ||
| break; | ||
| case 3: | ||
| DAT_GameSynchronyState::instance.skirmishGameIntensityType = 2; | ||
| DAT_GameSynchronyState::instance.skirmishGameIntensityType2 = 2; | ||
| DAT_GameSynchronyState::instance.skirmishDefaultPopularity = 80; | ||
| DAT_GameSynchronyState::instance.skirmishUnknownSetting1[0] = 1; | ||
| DAT_GameSynchronyState::instance.skirmishUnknownSetting1[1] = 1; | ||
| DAT_GameSynchronyState::instance.skirmishUnknownSetting1[3] = 1; | ||
| break; | ||
| case 4: | ||
| DAT_GameSynchronyState::instance.skirmishGameIntensityType = 3; | ||
| DAT_GameSynchronyState::instance.skirmishGameIntensityType2 = 3; | ||
| DAT_GameSynchronyState::instance.skirmishDefaultPopularity = 80; | ||
| DAT_GameSynchronyState::instance.skirmishUnknownSetting1[0] = 1; | ||
| DAT_GameSynchronyState::instance.skirmishUnknownSetting1[1] = 1; | ||
| DAT_GameSynchronyState::instance.skirmishUnknownSetting1[3] = 1; | ||
| break; | ||
| } | ||
|
|
||
| switch (DAT_GameSynchronyState::instance.skirmishGameIntensityType) { | ||
| case 1: | ||
| for (int i = 0; i < countof(DAT_GameSynchronyState::instance.skirmishIntensityRelatedArray); ++i) { | ||
| DAT_GameSynchronyState::instance.skirmishIntensityRelatedArray[i] | ||
| = DAT_RenderingDefinedData::instance | ||
| .SkirmishIntensityRelatedArray[0][DAT_GameSynchronyState::instance.skirmishTechLevel][i]; | ||
| } | ||
| break; | ||
| case 2: | ||
| for (int i = 0; i < countof(DAT_GameSynchronyState::instance.skirmishIntensityRelatedArray); ++i) { | ||
| DAT_GameSynchronyState::instance.skirmishIntensityRelatedArray[i] | ||
| = DAT_RenderingDefinedData::instance | ||
| .SkirmishIntensityRelatedArray[1][DAT_GameSynchronyState::instance.skirmishTechLevel][i]; | ||
| } | ||
| break; | ||
| case 3: | ||
| for (int i = 0; i < countof(DAT_GameSynchronyState::instance.skirmishIntensityRelatedArray); ++i) { | ||
| DAT_GameSynchronyState::instance.skirmishIntensityRelatedArray[i] | ||
| = DAT_RenderingDefinedData::instance | ||
| .SkirmishIntensityRelatedArray[2][DAT_GameSynchronyState::instance.skirmishTechLevel][i]; | ||
| } | ||
| break; | ||
| } | ||
|
|
||
| switch (DAT_GameSynchronyState::instance.skirmishGameIntensityType2) { | ||
| case 0: | ||
| for (int i = 0; i < countof(DAT_GameSynchronyState::instance.skirmishBalanceRelatedArrayUnk1); ++i) { | ||
| DAT_GameSynchronyState::instance.skirmishBalanceRelatedArrayUnk1[i] = 0; | ||
| } | ||
| break; | ||
| case 1: | ||
| for (int i = 0; i < countof(DAT_GameSynchronyState::instance.skirmishBalanceRelatedArrayUnk1); ++i) { | ||
| DAT_GameSynchronyState::instance.skirmishBalanceRelatedArrayUnk1[i] | ||
| = DAT_RenderingDefinedData::instance | ||
| .SkirmishIntensityRelatedArray2[DAT_GameSynchronyState::instance.skirmishTechLevel][i]; | ||
| } | ||
| break; | ||
| case 2: | ||
| for (int i = 0; i < countof(DAT_GameSynchronyState::instance.skirmishBalanceRelatedArrayUnk1); ++i) { | ||
| DAT_GameSynchronyState::instance.skirmishBalanceRelatedArrayUnk1[i] | ||
| = DAT_RenderingDefinedData::instance.SkirmishIntensityRelatedArray2[5 | ||
| + DAT_GameSynchronyState::instance.skirmishTechLevel][i]; | ||
| } | ||
| break; | ||
| case 3: | ||
| for (int i = 0; i < countof(DAT_GameSynchronyState::instance.skirmishBalanceRelatedArrayUnk1); ++i) { | ||
| DAT_GameSynchronyState::instance.skirmishBalanceRelatedArrayUnk1[i] | ||
| = DAT_RenderingDefinedData::instance.SkirmishIntensityRelatedArray2[10 | ||
| + DAT_GameSynchronyState::instance.skirmishTechLevel][i]; | ||
| } | ||
| break; | ||
| } | ||
|
|
||
| MACRO_CALL_MEMBER(Synchrony::GameSynchronyState_Func::queueCommand, DAT_GameSynchronyState::ptr)( | ||
| Commands::GCT_CHANGE_GAME_INTENSITY_OR_BALANCE); | ||
| DAT_GameSynchronyState::instance.field_0x1072e8 = -1; | ||
| DAT_GameSynchronyState::instance.field_0x1072ec = -1; | ||
| } | ||
|
|
||
| } | ||
| } | ||
| } | ||
48 changes: 48 additions & 0 deletions
48
src/OpenSHC/Game/Skirmish/SkirmishLobbySetupStructure/commitSkirmishSettings.cpp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| #include "../SkirmishLobbySetupStructure.func.hpp" | ||
|
|
||
| #include "OpenSHC/Globals/DAT_GameCore.hpp" | ||
| #include "OpenSHC/Globals/DAT_GameState.hpp" | ||
| #include "OpenSHC/Globals/DAT_GameSynchronyState.hpp" | ||
|
|
||
| namespace OpenSHC { | ||
| namespace Game { | ||
| namespace Skirmish { | ||
|
|
||
| // FUNCTION: STRONGHOLDCRUSADER 0x00486C40 | ||
| void SkirmishLobbySetupStructure::commitSkirmishSettings() | ||
| { | ||
| this->mapu4int2 = DAT_GameSynchronyState::instance.skirmishAutoSaveEveryMinutes; | ||
| this->mbr_0x4 = DAT_GameState::instance.mapAndTime.skirmishFogOfWar; | ||
| strcpy(this->mapName, DAT_GameSynchronyState::instance.mapName); | ||
| for (int player = 0; player < countof(this->roundTableOrderArray); ++player) { | ||
| this->roundTableOrderArray[player] = DAT_GameSynchronyState::instance.DAT_RoundTableOrderArray[player]; | ||
| this->playerGroupArray[player] = DAT_GameSynchronyState::instance.DAT_PlayerGroupArray[player]; | ||
| this->currentAIArray[player] = DAT_GameSynchronyState::instance.currentAIArray[player]; | ||
| this->aiVariationArray[player] = DAT_GameSynchronyState::instance.aiVariationArray[player]; | ||
| } | ||
| this->slot1Position = DAT_GameSynchronyState::instance.playerPositionsArray[0]; | ||
| this->slot2Position = DAT_GameSynchronyState::instance.playerPositionsArray[1]; | ||
| this->slot3Position = DAT_GameSynchronyState::instance.playerPositionsArray[2]; | ||
| this->slot4Position = DAT_GameSynchronyState::instance.playerPositionsArray[3]; | ||
| this->slot5Position = DAT_GameSynchronyState::instance.playerPositionsArray[4]; | ||
| this->slot6Position = DAT_GameSynchronyState::instance.playerPositionsArray[5]; | ||
| this->slot7Position = DAT_GameSynchronyState::instance.playerPositionsArray[6]; | ||
| this->slot8Position = DAT_GameSynchronyState::instance.playerPositionsArray[7]; | ||
| this->currentPlayerSlotID = DAT_GameSynchronyState::instance.currentPlayerSlotID; | ||
| this->currentAdvantageBalance = DAT_GameSynchronyState::instance.skirmishCurrentAdvantageBalance; | ||
| this->currentAdvantageGroup = DAT_GameSynchronyState::instance.skirmishGameIntensityType; | ||
| this->mbr_0x80 = DAT_GameSynchronyState::instance.skirmishTechLevel; | ||
| for (int player = 0; player < countof(this->playerLordTypeArray); ++player) { | ||
| this->playerLordTypeArray[player] = DAT_GameCore::instance.selectedLordTypes[player]; | ||
| } | ||
| this->mbr_0xf0 = DAT_GameCore::instance.field_0x2340; | ||
| this->selectedLordType = DAT_GameCore::instance.selectedLordTypeUnk; | ||
| this->popularity = DAT_GameSynchronyState::instance.skirmishDefaultPopularity; | ||
| this->mapSelectionRelativeSelected = DAT_GameSynchronyState::instance.DAT_MapSelectionRelativeSelected; | ||
| this->mapSelectionScrollOffset = DAT_GameSynchronyState::instance.DAT_MapSelectionScrollOffset; | ||
| this->mbr_0xfc = DAT_GameSynchronyState::instance.lobbyMapSortOrder; | ||
| } | ||
|
|
||
| } | ||
| } | ||
| } |
49 changes: 49 additions & 0 deletions
49
src/OpenSHC/Game/Skirmish/StoreCurrentGameIntoTemporarySKMasterEntry.cpp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| #include "../Skirmish.func.hpp" | ||
|
|
||
| #include "OpenSHC/UI/GreatestLord.func.hpp" | ||
|
|
||
| #include "OpenSHC/Globals/DAT_GameCore.hpp" | ||
| #include "OpenSHC/Globals/DAT_GameState.hpp" | ||
| #include "OpenSHC/Globals/DAT_GameSynchronyState.hpp" | ||
| #include "OpenSHC/Globals/DAT_SkMasterDataEntry.hpp" | ||
|
|
||
| namespace OpenSHC { | ||
| namespace Game { | ||
| namespace Skirmish { | ||
|
|
||
| // FUNCTION: STRONGHOLDCRUSADER 0x004D1700 | ||
| BOOLEnum StoreCurrentGameIntoTemporarySKMasterEntry(int score) | ||
| { | ||
| DAT_SkMasterDataEntry::instance.score = score; | ||
| strcpy(DAT_SkMasterDataEntry::instance.mapName, DAT_GameSynchronyState::instance.mapName); | ||
| DAT_SkMasterDataEntry::instance.skMasterScore = MACRO_CALL(UI::GreatestLord_Func::ComputeSkMasterScore)( | ||
| DAT_GameSynchronyState::instance.currentPlayerSlotID); | ||
| int activePlayerCount = 0; | ||
| for (int player = 1; player < countof(DAT_GameSynchronyState::instance.finalResults.active); ++player) { | ||
| if (DAT_GameSynchronyState::instance.finalResults.active[player] == 0) { | ||
| break; | ||
| } | ||
| ++activePlayerCount; | ||
| } | ||
| DAT_SkMasterDataEntry::instance.activePlayerCount = activePlayerCount; | ||
| for (int player = 1; player < countof(DAT_SkMasterDataEntry::instance.array1); ++player) { | ||
| DAT_SkMasterDataEntry::instance.array1[player] | ||
| = DAT_GameState::instance.mapAndTime.playerGroupArray[player]; | ||
| } | ||
| for (int player = 1; player < countof(DAT_SkMasterDataEntry::instance.aiArray); ++player) { | ||
| DAT_SkMasterDataEntry::instance.aiArray[player] | ||
| = DAT_GameSynchronyState::instance.currentAIArray[player]; | ||
| } | ||
| for (int player = 1; player < countof(DAT_SkMasterDataEntry::instance.aliveArray); ++player) { | ||
| DAT_SkMasterDataEntry::instance.aliveArray[player] | ||
| = DAT_GameState::instance.mapAndTime.playerIsAlive[player]; | ||
| } | ||
| DAT_SkMasterDataEntry::instance.lordType = DAT_GameCore::instance.selectedLordTypeUnk; | ||
| MACRO_CALL(Skirmish_Func::StoreLocalTime)(); | ||
| DAT_SkMasterDataEntry::instance.results = DAT_GameSynchronyState::instance.finalResults; | ||
| return TRUE; | ||
| } | ||
|
|
||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| #include "../Skirmish.func.hpp" | ||
|
|
||
| #include "OpenSHC/Globals/DAT_GameCore.hpp" | ||
| #include "OpenSHC/Globals/DAT_SkMasterDataEntry.hpp" | ||
|
|
||
| namespace OpenSHC { | ||
| namespace Game { | ||
| namespace Skirmish { | ||
|
|
||
| // FUNCTION: STRONGHOLDCRUSADER 0x004C6CD0 | ||
| void StoreLocalTime() | ||
| { | ||
| SYSTEMTIME localTime; | ||
| GetLocalTime(&localTime); | ||
| DAT_SkMasterDataEntry::instance.localTimeDay = localTime.wDay; | ||
| DAT_SkMasterDataEntry::instance.localTimeMonth = localTime.wMonth; | ||
| DAT_SkMasterDataEntry::instance.localTimeYear = localTime.wYear; | ||
| DAT_SkMasterDataEntry::instance.gameDurationInMinutes = (int)DAT_GameCore::instance.gameDuration / 60000; | ||
| DAT_SkMasterDataEntry::instance.mapTimeInTicks = DAT_GameCore::instance.mapTimeInTicks; | ||
| } | ||
|
|
||
| } | ||
| } | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.