mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2025-04-28 13:27:58 +03:00
Initial research
This commit is contained in:
parent
98daa27c14
commit
11863beb46
6 changed files with 69 additions and 17 deletions
|
@ -0,0 +1,12 @@
|
|||
#pragma once
|
||||
|
||||
#include <SWA.inl>
|
||||
|
||||
namespace Hedgehog::Mirage
|
||||
{
|
||||
class CMatrixNodeListener : public Base::CObject
|
||||
{
|
||||
public:
|
||||
SWA_INSERT_PADDING(0x04);
|
||||
};
|
||||
}
|
|
@ -31,6 +31,7 @@
|
|||
#include "Hedgehog/Math/Quaternion.h"
|
||||
#include "Hedgehog/Math/Vector.h"
|
||||
#include "Hedgehog/MirageCore/MatrixNode/hhMatrixNode.h"
|
||||
#include "Hedgehog/MirageCore/MatrixNode/hhMatrixNodeListener.h"
|
||||
#include "Hedgehog/MirageCore/Misc/hhTransform.h"
|
||||
#include "Hedgehog/MirageCore/Misc/hhVertexDeclarationPtr.h"
|
||||
#include "Hedgehog/MirageCore/RenderData/hhMaterialData.h"
|
||||
|
@ -91,6 +92,7 @@
|
|||
#include "SWA/Movie/MovieDisplayer.h"
|
||||
#include "SWA/Movie/MovieManager.h"
|
||||
#include "SWA/Object/Common/DashPanel/ObjDashPanel.h"
|
||||
#include "SWA/Object/Event/Hint/ObjHintRing.h"
|
||||
#include "SWA/Object/SonicStage/EU/RollingBarrel/ObjRollingBarrel.h"
|
||||
#include "SWA/Player/Character/EvilSonic/EvilSonic.h"
|
||||
#include "SWA/Player/Character/EvilSonic/EvilSonicContext.h"
|
||||
|
|
14
UnleashedRecomp/api/SWA/Object/Event/Hint/ObjHintRing.h
Normal file
14
UnleashedRecomp/api/SWA/Object/Event/Hint/ObjHintRing.h
Normal file
|
@ -0,0 +1,14 @@
|
|||
#pragma once
|
||||
|
||||
#include <SWA.inl>
|
||||
|
||||
namespace SWA
|
||||
{
|
||||
class CObjHintRing
|
||||
{
|
||||
public:
|
||||
SWA_INSERT_PADDING(0x160);
|
||||
be<uint32_t> m_AnimationID;
|
||||
bool m_Field164;
|
||||
};
|
||||
}
|
|
@ -13,6 +13,38 @@ bool DisableHintsMidAsmHook()
|
|||
return !Config::Hints;
|
||||
}
|
||||
|
||||
// Disable hint ring visuals.
|
||||
PPC_FUNC_IMPL(__imp__sub_82738088);
|
||||
PPC_FUNC(sub_82738088)
|
||||
{
|
||||
auto pObjHintRing = (SWA::CObjHintRing*)(base + ctx.r3.u32);
|
||||
auto pDeltaTime = (be<float>*)(base + ctx.r4.u32);
|
||||
|
||||
if (!Config::Hints)
|
||||
{
|
||||
auto pAnimationControl = PPC_LOAD_U32(ctx.r3.u32 + 0xF0);
|
||||
|
||||
// how does this even work
|
||||
guest_stack_var<be<float>> time = 0.0f;
|
||||
GuestToHostFunction<int>(sub_82BB4A40, pAnimationControl, time.get());
|
||||
GuestToHostFunction<int>(sub_82BBC050, pAnimationControl, *pDeltaTime);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
__imp__sub_82738088(ctx, base);
|
||||
}
|
||||
|
||||
// Disable hint ring hit event.
|
||||
PPC_FUNC_IMPL(__imp__sub_827391E0);
|
||||
PPC_FUNC(sub_827391E0)
|
||||
{
|
||||
if (!Config::Hints)
|
||||
return;
|
||||
|
||||
__imp__sub_827391E0(ctx, base);
|
||||
}
|
||||
|
||||
// Disable Perfect Dark Gaia hints.
|
||||
PPC_FUNC_IMPL(__imp__sub_82AC36E0);
|
||||
PPC_FUNC(sub_82AC36E0)
|
||||
|
@ -24,9 +56,14 @@ PPC_FUNC(sub_82AC36E0)
|
|||
__imp__sub_82AC36E0(ctx, base);
|
||||
}
|
||||
|
||||
bool DisableControlTutorialMidAsmHook()
|
||||
// Disable navigation volumes.
|
||||
PPC_FUNC_IMPL(__imp__sub_8273C4C8);
|
||||
PPC_FUNC(sub_8273C4C8)
|
||||
{
|
||||
return !Config::ControlTutorial;
|
||||
if (!Config::ControlTutorial)
|
||||
return;
|
||||
|
||||
__imp__sub_8273C4C8(ctx, base);
|
||||
}
|
||||
|
||||
bool DisableEvilControlTutorialMidAsmHook(PPCRegister& r4, PPCRegister& r5)
|
||||
|
|
|
@ -1206,7 +1206,6 @@ static void DrawConfigOptions()
|
|||
|
||||
int32_t rowCount = 0;
|
||||
|
||||
bool isStage = OptionsMenu::s_pauseMenuType == SWA::eMenuType_Stage || OptionsMenu::s_pauseMenuType == SWA::eMenuType_Hub;
|
||||
auto cmnReason = &Localise("Options_Desc_NotAvailable");
|
||||
|
||||
// TODO: Don't use raw numbers here!
|
||||
|
@ -1216,8 +1215,8 @@ static void DrawConfigOptions()
|
|||
DrawConfigOption(rowCount++, yOffset, &Config::Language, !OptionsMenu::s_isPause, cmnReason);
|
||||
DrawConfigOption(rowCount++, yOffset, &Config::VoiceLanguage, OptionsMenu::s_pauseMenuType == SWA::eMenuType_WorldMap, cmnReason);
|
||||
DrawConfigOption(rowCount++, yOffset, &Config::Subtitles, true);
|
||||
DrawConfigOption(rowCount++, yOffset, &Config::Hints, !isStage, cmnReason);
|
||||
DrawConfigOption(rowCount++, yOffset, &Config::ControlTutorial, !isStage, cmnReason);
|
||||
DrawConfigOption(rowCount++, yOffset, &Config::Hints, true);
|
||||
DrawConfigOption(rowCount++, yOffset, &Config::ControlTutorial, true);
|
||||
DrawConfigOption(rowCount++, yOffset, &Config::AchievementNotifications, true);
|
||||
DrawConfigOption(rowCount++, yOffset, &Config::TimeOfDayTransition, !Config::UseArrowsForTimeOfDayTransition);
|
||||
break;
|
||||
|
|
|
@ -106,12 +106,6 @@ jump_address = 0x82468EE0
|
|||
name = "ResetScoreOnRestartMidAsmHook"
|
||||
address = 0x82304374
|
||||
|
||||
# Disable hint rings
|
||||
[[midasm_hook]]
|
||||
name = "DisableHintsMidAsmHook"
|
||||
address = 0x827A2E34
|
||||
jump_address_on_true = 0x827A2E4C
|
||||
|
||||
# Disable Tornado Defense hints
|
||||
[[midasm_hook]]
|
||||
name = "DisableHintsMidAsmHook"
|
||||
|
@ -184,12 +178,6 @@ name = "DisableHintsMidAsmHook"
|
|||
address = 0x82691CB0
|
||||
jump_address_on_true = 0x82691E24
|
||||
|
||||
# Disable navigation volumes
|
||||
[[midasm_hook]]
|
||||
name = "DisableControlTutorialMidAsmHook"
|
||||
address = 0x827AA5EC
|
||||
jump_address_on_true = 0x827AA604
|
||||
|
||||
# Disable Werehog button prompts
|
||||
[[midasm_hook]]
|
||||
name = "DisableEvilControlTutorialMidAsmHook"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue