Skip to content

Commit 7b46b5b

Browse files
authored
Merge pull request #95 from sourcehold/reimpl/SHC_3BB0A8C1_0x0047A130
reimplement: SHC_3BB0A8C1_0x0047A130 100%
2 parents 0d42407 + e131130 commit 7b46b5b

2 files changed

Lines changed: 35 additions & 1 deletion

File tree

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#include "../SoundSystem.func.hpp"
2+
3+
#include "OpenSHC/Random/RNG.func.hpp"
4+
5+
#include "OpenSHC/Globals/DAT_GameCore.hpp"
6+
#include "OpenSHC/Globals/DAT_SoundEffectsHelperData1.hpp"
7+
#include "OpenSHC/Globals/DAT_TroopValueState.hpp"
8+
#include "OpenSHC/Globals/SEC_RNG.hpp"
9+
10+
namespace OpenSHC {
11+
namespace Audio {
12+
namespace MSS {
13+
14+
// FUNCTION: STRONGHOLDCRUSADER 0x0047A130
15+
void SoundSystem::mapLoadingAndLaunchGameRelated1()
16+
{
17+
DAT_SoundEffectsHelperData1::ptr->SEC_Section1079.field0_0x0 = 1;
18+
DAT_SoundEffectsHelperData1::ptr->SEC_Section1079.field1_0x4 = SEC_RNG::ptr->currentNumber1 % 4;
19+
MACRO_CALL_MEMBER(Random::RNG_Func::nextRandomNumber1, SEC_RNG::ptr)();
20+
DAT_SoundEffectsHelperData1::ptr->SEC_Section1079.incrementorUpTo4 = SEC_RNG::ptr->currentNumber1 % 4 + 1;
21+
DAT_GameCore::ptr->cowPoisonTrackerUnk = 0;
22+
DAT_GameCore::ptr->someSoundMatchTime_1 = DAT_GameCore::ptr->mapTimeInTicks;
23+
DAT_GameCore::ptr->battleLevel = 0;
24+
DAT_GameCore::ptr->battleLevel2 = 0;
25+
DAT_GameCore::ptr->field36_0x90 = 0;
26+
DAT_TroopValueState::ptr->attackInfo.field128078_0x469d8 = 0;
27+
DAT_TroopValueState::ptr->attackInfo.field128080_0x469e0 = 0;
28+
DAT_TroopValueState::ptr->attackInfo.field128079_0x469dc = 0;
29+
DAT_SoundEffectsHelperData1::ptr->field8_0x3c = 0;
30+
}
31+
32+
}
33+
}
34+
}

status/addresses-SHC-3BB0A8C1.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10894,7 +10894,7 @@ SHC_3BB0A8C1_0x00479E60 | 100.0% | Reimplemented
1089410894
SHC_3BB0A8C1_0x00479F30 | 100.0% | Reimplemented
1089510895
SHC_3BB0A8C1_0x00479FC0 | 100.0% | Reimplemented
1089610896
SHC_3BB0A8C1_0x0047A080 | 0.0% | Pending
10897-
SHC_3BB0A8C1_0x0047A130 | 0.0% | Pending
10897+
SHC_3BB0A8C1_0x0047A130 | 100.0% | Reimplemented, but requires all used structs to be active
1089810898
SHC_3BB0A8C1_0x0047A1B0 | 100.0% | Reimplemented
1089910899
SHC_3BB0A8C1_0x0047A220 | 0.0% | Pending
1090010900
SHC_3BB0A8C1_0x0047A290 | 100.0% | Reimplemented

0 commit comments

Comments
 (0)