Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion src/OpenSHC/AI/AICState.func.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ namespace AI {
setFoodBuyPlan;

MACRO_FUNCTION_RESOLVER(
int (AICState::*)(int), false, Address::SHC_3BB0A8C1_0x004CB120, &AICState::getAIBuildInterval)
int (AICState::*)(int), true, Address::SHC_3BB0A8C1_0x004CB120, &AICState::getAIBuildInterval)
getAIBuildInterval;

MACRO_FUNCTION_RESOLVER(
Expand Down
20 changes: 20 additions & 0 deletions src/OpenSHC/AI/AICState/getAIBuildInterval.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#include "OpenSHC/AI/AICState.hpp"
#include "OpenSHC/Globals/DAT_GameState.hpp"
namespace OpenSHC {
namespace AI {

// FUNCTION: STRONGHOLDCRUSADER 0x004cb120
int AICState::getAIBuildInterval(int playerID)

{
int _aiType;

_aiType = DAT_GameState::ptr->playerDataArray[playerID].aiType;
if (_aiType == 0) {
return _aiType;
}
Comment on lines +10 to +15
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would prefer:

  • direct assign to const int _aiType
  • Usage of the enum you already used in another PR
  • return 0 -> at least I think that is what is happening here.


return this->DAT_AICArray[(_aiType - 1)].buildInterval;
}
}
}
2 changes: 1 addition & 1 deletion status/addresses-SHC-3BB0A8C1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16807,7 +16807,7 @@ SHC_3BB0A8C1_0x004CAD10 | 0.0% | Pending
SHC_3BB0A8C1_0x004CAE20 | 0.0% | Pending
SHC_3BB0A8C1_0x004CAEA0 | 0.0% | Pending
SHC_3BB0A8C1_0x004CB060 | 0.0% | Pending
SHC_3BB0A8C1_0x004CB120 | 0.0% | Pending
SHC_3BB0A8C1_0x004CB120 | 100.0% | Reimplemented
SHC_3BB0A8C1_0x004CB150 | 0.0% | Pending
SHC_3BB0A8C1_0x004CB180 | 0.0% | Pending
SHC_3BB0A8C1_0x004CB1B0 | 0.0% | Pending
Expand Down
Loading