Skip to content
Draft
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#include "../SoundSystem.func.hpp"

#include "OpenSHC/Random/RNG.func.hpp"

#include "OpenSHC/Globals/DAT_GameCore.hpp"
#include "OpenSHC/Globals/DAT_SoundEffectsHelperData1.hpp"
#include "OpenSHC/Globals/DAT_TroopValueState.hpp"
#include "OpenSHC/Globals/SEC_RNG.hpp"

namespace OpenSHC {
namespace Audio {
namespace MSS {

// FUNCTION: STRONGHOLDCRUSADER 0x0047A130
void SoundSystem::mapLoadingAndLaunchGameRelated1()
{
DAT_SoundEffectsHelperData1::ptr->SEC_Section1079.field0_0x0 = 1;
DAT_SoundEffectsHelperData1::ptr->SEC_Section1079.field1_0x4 = SEC_RNG::ptr->currentNumber1 % 4;
MACRO_CALL_MEMBER(Random::RNG_Func::nextRandomNumber1, SEC_RNG::ptr)();
DAT_SoundEffectsHelperData1::ptr->SEC_Section1079.incrementorUpTo4 = SEC_RNG::ptr->currentNumber1 % 4 + 1;
DAT_GameCore::ptr->cowPoisonTrackerUnk = 0;
DAT_GameCore::ptr->someSoundMatchTime_1 = DAT_GameCore::ptr->mapTimeInTicks;
DAT_GameCore::ptr->battleLevel = 0;
DAT_GameCore::ptr->battleLevel2 = 0;
DAT_GameCore::ptr->field36_0x90 = 0;
DAT_TroopValueState::ptr->attackInfo.field_0x469d8 = 0;
DAT_TroopValueState::ptr->attackInfo.field_0x469e0 = 0;
DAT_TroopValueState::ptr->attackInfo.field128082_0x469dc = 0;
DAT_SoundEffectsHelperData1::ptr->field8_0x3c = 0;
}

}
}
}
4 changes: 2 additions & 2 deletions src/OpenSHC/Map/AttackInfo.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,9 @@ namespace Map {
int unknownSignpostRelatedArray; // 0x0004690C length: 4
undefined1 padding_0x46910[196]; // 0x00046910 length: 196
int field128077_0x469d4; // 0x000469D4 length: 4
undefined1 padding_0x469d8[4]; // 0x000469D8 length: 4
int field_0x469d8; // 0x000469D8 length: 4
int field128082_0x469dc; // 0x000469DC length: 4
undefined1 padding_0x469e0[4]; // 0x000469E0 length: 4
int field_0x469e0; // 0x000469E0 length: 4
int knights; // 0x000469E4 length: 4
int ranged; // 0x000469E8 length: 4
undefined1 padding_0x469ec[8]; // 0x000469EC length: 8
Expand Down
2 changes: 1 addition & 1 deletion status/addresses-SHC-3BB0A8C1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10894,7 +10894,7 @@ SHC_3BB0A8C1_0x00479E60 | 100.0% | Reimplemented
SHC_3BB0A8C1_0x00479F30 | 100.0% | Reimplemented
SHC_3BB0A8C1_0x00479FC0 | 0.0% | Pending
SHC_3BB0A8C1_0x0047A080 | 0.0% | Pending
SHC_3BB0A8C1_0x0047A130 | 0.0% | Pending
SHC_3BB0A8C1_0x0047A130 | 100.0% | Reimplemented, but requires all used structs to be active
SHC_3BB0A8C1_0x0047A1B0 | 0.0% | Pending
SHC_3BB0A8C1_0x0047A220 | 0.0% | Pending
SHC_3BB0A8C1_0x0047A290 | 0.0% | Pending
Expand Down