Skip to content

Reimpl/GameCore 100% - #232

Open
gynt wants to merge 3 commits into
mainfrom
reimpl/GameCore
Open

gynt wants to merge 3 commits into
mainfrom
reimpl/GameCore

Conversation

@gynt

@gynt gynt commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

100% (setupVolumeAndSoundIDWithMultiplier in src/OpenSHC/Audio/mss/SoundSystem.func.hpp needs to be set to reimplemented for the tail jmp to compare nicely)

Found an oddity earlier on : some function bodies use this and DAT_GameCore::instance. replacing with this reduces match.

@gynt
gynt requested a review from TheRedDaemon September 22, 2026 20:44
@gynt
gynt removed the request for review from TheRedDaemon October 5, 2026 17:17
@gynt gynt changed the title Reimpl/game core Reimpl/GameCore 100% Oct 5, 2026
@gynt
gynt force-pushed the reimpl/GameCore branch from c43ab76 to f2947bc Compare October 7, 2026 20:55
@gynt
gynt requested a review from TheRedDaemon October 7, 2026 20:56
{
++this->missionNumber1to20;
MACRO_CALL_MEMBER(GameCore_Func::removeLadyAndJester, this)();
if (!this->unlockAllHistoricalCampaigns && this->missionNumber1to20 > (int)this->furthestMission) {

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.

You can check other usages in Ghirda. If this compares as int or rather never as uint, maybe it is an int?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Solved upstream

void GameCore::removeJesterAndLadyUnitsInCertainMissions()
{
if (this->missionNumber1to20 < 7) {
DAT_GameState::instance.mapAndTime.unitJesterRelated = 0;

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.

I assume this is a jesterActive flag, then?
Or it is the flag indicating that a jester is present. Depends if this prevents it from spawing or if it follows the spawning, so to say.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Will solve later.

}

if (this->missionNumber1to20 < 11) {
DAT_GameState::instance.mapAndTime.unitLadyRelated = 0;

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.

Same as the jester case: A flag indicating if active?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Will solve later.


// FUNCTION: STRONGHOLDCRUSADER 0x0046B2F0
void GameCore::setViewOnExitUnk() { this->currentMenuViewType = (MenuViewType)2; }
void GameCore::setViewOnExitUnk() { this->currentMenuViewType = 2; }

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.

Is this a enum constant we already have?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

No it is an unknown/undefinable one. Added it as UNKNOWN_2

{
if (this->buildmenuMenuTabToSwitchTo.tabType == OpenSHC::UI::Enums::BASMTT_SIEGETENT_SHIELD) {
this->buildmenuMenuTabToSwitchTo.tabType = OpenSHC::UI::Enums::BASMTT_SIEGETENT_BATTERINGRAM;
if (this->buildmenuMenuTabToSwitchTo.buildMenuTab == 62) {

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.

Do we have enums for these tabs?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes!

@gynt
gynt requested a review from TheRedDaemon October 11, 2026 20:40

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants