Skip to content

Commit

Permalink
Fix vomaps merging
Browse files Browse the repository at this point in the history
  • Loading branch information
psiberx committed Nov 17, 2024
1 parent 833df3b commit 81ecfa1
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/App/Extensions/Localization/Module.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ bool App::LocalizationModule::Load()
{
HookAfter<Raw::Localization::LoadTexts>(&LocalizationModule::OnLoadTexts).OrThrow();
HookAfter<Raw::Localization::LoadSubtitles>(&LocalizationModule::OnLoadSubtitles).OrThrow();
//HookBefore<Raw::Localization::LoadVoiceOvers>(&LocalizationModule::OnLoadVoiceOvers).OrThrow();
HookBefore<Raw::Localization::LoadVoiceOvers>(&LocalizationModule::OnLoadVoiceOvers).OrThrow();
HookAfter<Raw::Localization::LoadLipsyncs>(&LocalizationModule::OnLoadLipsyncs).OrThrow();

return true;
Expand All @@ -26,7 +26,7 @@ bool App::LocalizationModule::Unload()
{
Unhook<Raw::Localization::LoadTexts>();
Unhook<Raw::Localization::LoadSubtitles>();
// Unhook<Raw::Localization::LoadVoiceOvers>();
Unhook<Raw::Localization::LoadVoiceOvers>();
Unhook<Raw::Localization::LoadLipsyncs>();

return true;
Expand Down Expand Up @@ -335,7 +335,7 @@ void App::LocalizationModule::OnLoadVoiceOvers(void* aContext, uint64_t a2)
{
auto depot = Red::ResourceDepot::Get();
auto& tokens = Raw::Localization::VoiceOverTokens::Ref(aContext);
auto map = tokens.values[0]->resource->root.GetPtr<Red::locVoLanguageDataMap>();
auto map = tokens.Get(0)->entries[0]->resource->root.GetPtr<Red::locVoLanguageDataMap>();

for (auto& entry : map->entries)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Red/Addresses/Library.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ constexpr uint32_t JournalTree_ProcessJournalIndex = 837162664;

constexpr uint32_t Localization_LoadOnScreens = 3550098299;
constexpr uint32_t Localization_LoadSubtitles = 772484645;
constexpr uint32_t Localization_LoadVoiceOvers = 4259845555;
constexpr uint32_t Localization_LoadVoiceOvers = 4223669659;
constexpr uint32_t Localization_LoadLipsyncs = 1488657506;

constexpr uint32_t MappinSystem_GetMappinData = 3299551353;
Expand Down
2 changes: 1 addition & 1 deletion src/Red/Localization.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ constexpr auto LocKeyPrefixLength = std::char_traits<char>::length(LocKeyPrefix)

namespace Raw::Localization
{
using VoiceOverTokens = Core::OffsetPtr<0x8, Red::Map<uint32_t, Red::SharedPtr<Red::ResourceToken<Red::JsonResource>>>>;
using VoiceOverTokens = Core::OffsetPtr<0x8, Red::HashMap<uint32_t, Red::DynArray<Red::SharedPtr<Red::ResourceToken<Red::JsonResource>>>>>;
using LipMapToken = Core::OffsetPtr<0x188, Red::SharedPtr<Red::ResourceToken<Red::animLipsyncMapping>>>;

constexpr auto LoadTexts = Core::RawFunc<
Expand Down
2 changes: 1 addition & 1 deletion vendor/RED4ext.SDK

0 comments on commit 81ecfa1

Please sign in to comment.