Skip to content

Commit dc2c644

Browse files
committed
reimplement: SHC_3BB0A8C1_0x0047A130 100%
1 parent 07477ad commit dc2c644

3 files changed

Lines changed: 37 additions & 3 deletions

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.field_0x469d8 = 0;
27+
DAT_TroopValueState::ptr->attackInfo.field_0x469e0 = 0;
28+
DAT_TroopValueState::ptr->attackInfo.field128082_0x469dc = 0;
29+
DAT_SoundEffectsHelperData1::ptr->field8_0x3c = 0;
30+
}
31+
32+
}
33+
}
34+
}

src/OpenSHC/Map/AttackInfo.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,9 +179,9 @@ namespace Map {
179179
int unknownSignpostRelatedArray; // 0x0004690C length: 4
180180
undefined1 padding_0x46910[196]; // 0x00046910 length: 196
181181
int field128077_0x469d4; // 0x000469D4 length: 4
182-
undefined1 padding_0x469d8[4]; // 0x000469D8 length: 4
182+
int field_0x469d8; // 0x000469D8 length: 4
183183
int field128082_0x469dc; // 0x000469DC length: 4
184-
undefined1 padding_0x469e0[4]; // 0x000469E0 length: 4
184+
int field_0x469e0; // 0x000469E0 length: 4
185185
int knights; // 0x000469E4 length: 4
186186
int ranged; // 0x000469E8 length: 4
187187
undefined1 padding_0x469ec[8]; // 0x000469EC length: 8

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 | 0.0% | Pending
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 | 0.0% | Pending
1089910899
SHC_3BB0A8C1_0x0047A220 | 0.0% | Pending
1090010900
SHC_3BB0A8C1_0x0047A290 | 0.0% | Pending

0 commit comments

Comments
 (0)