mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2025-12-18 14:02:34 +00:00
Added exceptions for specific hint messages being allowed/blocked by the Hints option (#462)
* Fix Windmill Isle Act 1 (Night) chip 'hint' not being shown * code style adjustments * Fix Apotos entrance gate first time Chip hint appearing with hints disabled --------- Co-authored-by: Hyper <34012267+hyperbx@users.noreply.github.com>
This commit is contained in:
parent
0b16633ee1
commit
98daa27c14
5 changed files with 60 additions and 7 deletions
|
|
@ -86,6 +86,7 @@
|
|||
#include "SWA/Inspire/InspireTextureAnimationInfo.h"
|
||||
#include "SWA/Inspire/InspireTextureOverlay.h"
|
||||
#include "SWA/Inspire/InspireTextureOverlayInfo.h"
|
||||
#include "SWA/Message/MsgRequestHelp.h"
|
||||
#include "SWA/Menu/MenuWindowBase.h"
|
||||
#include "SWA/Movie/MovieDisplayer.h"
|
||||
#include "SWA/Movie/MovieManager.h"
|
||||
|
|
|
|||
13
UnleashedRecomp/api/SWA/Message/MsgRequestHelp.h
Normal file
13
UnleashedRecomp/api/SWA/Message/MsgRequestHelp.h
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
#pragma once
|
||||
|
||||
#include <SWA.inl>
|
||||
|
||||
namespace SWA::Message
|
||||
{
|
||||
class MsgRequestHelp
|
||||
{
|
||||
public:
|
||||
SWA_INSERT_PADDING(0x1C);
|
||||
Hedgehog::Base::CSharedString m_Name;
|
||||
};
|
||||
}
|
||||
|
|
@ -108,3 +108,42 @@ PPC_FUNC(sub_82586698)
|
|||
|
||||
__imp__sub_82586698(ctx, base);
|
||||
}
|
||||
|
||||
// SWA::CObjHint::MsgNotifyObjectEvent::Impl
|
||||
// Disable only certain hints from hint volumes.
|
||||
// This hook should be used to allow hint volumes specifically to also prevent them from affecting the player.
|
||||
PPC_FUNC_IMPL(__imp__sub_82736E80);
|
||||
PPC_FUNC(sub_82736E80)
|
||||
{
|
||||
// GroupID parameter text
|
||||
auto* groupId = (const char*)(base + PPC_LOAD_U32(ctx.r3.u32 + 0x100));
|
||||
|
||||
if (!Config::Hints)
|
||||
{
|
||||
// WhiteIsland_ACT1_001 (Windmill Isle Act 1 Night, Start)
|
||||
// Your friend went off that way, Sonic. Quick, let's go after him!
|
||||
if (strcmp(groupId, "WhiteIsland_ACT1_001") != 0)
|
||||
return;
|
||||
}
|
||||
|
||||
__imp__sub_82736E80(ctx, base);
|
||||
}
|
||||
|
||||
// SWA::CHelpWindow::MsgRequestHelp::Impl
|
||||
// Disable only certain hints from other sequences.
|
||||
// This hook should be used to block hint messages from unknown sources.
|
||||
PPC_FUNC_IMPL(__imp__sub_824C1E60);
|
||||
PPC_FUNC(sub_824C1E60)
|
||||
{
|
||||
auto pMsgRequestHelp = (SWA::Message::MsgRequestHelp*)(base + ctx.r4.u32);
|
||||
|
||||
if (!Config::Hints)
|
||||
{
|
||||
// s10d_mykETF_c_navi (Town Mykonos Entrance, First Entry)
|
||||
// Looks like we can get to a bunch of places in the village from here!
|
||||
if (strcmp(pMsgRequestHelp->m_Name.c_str(), "s10d_mykETF_c_navi") == 0)
|
||||
return;
|
||||
}
|
||||
|
||||
__imp__sub_824C1E60(ctx, base);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -106,18 +106,18 @@ jump_address = 0x82468EE0
|
|||
name = "ResetScoreOnRestartMidAsmHook"
|
||||
address = 0x82304374
|
||||
|
||||
# Disable hint volumes
|
||||
[[midasm_hook]]
|
||||
name = "DisableHintsMidAsmHook"
|
||||
address = 0x827A2504
|
||||
jump_address_on_true = 0x827A251C
|
||||
|
||||
# Disable hint rings
|
||||
[[midasm_hook]]
|
||||
name = "DisableHintsMidAsmHook"
|
||||
address = 0x827A2E34
|
||||
jump_address_on_true = 0x827A2E4C
|
||||
|
||||
# Disable Tornado Defense hints
|
||||
[[midasm_hook]]
|
||||
name = "DisableHintsMidAsmHook"
|
||||
address = 0x82AF52BC
|
||||
jump_address_on_true = 0x82AF52E4
|
||||
|
||||
# Disable Egg Dragoon hint "V_WHG_083" ("That lit-up part on the bottom looks fishy. I'll try aiming for that.")
|
||||
[[midasm_hook]]
|
||||
name = "DisableHintsMidAsmHook"
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit 89c82c0aa820d3e3b6a1599faccfca8a4697a33c
|
||||
Subproject commit 1375ed71841dd391be609f9380ec456f2679463b
|
||||
Loading…
Add table
Reference in a new issue