mirror of
https://github.com/hedge-dev/UnleashedRecomp
synced 2026-06-08 20:30:02 -04:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 92ccc1f298 | |||
| 5e8695a157 |
@@ -1686,3 +1686,13 @@ void EndingTextPositionMidAsmHook(PPCRegister& r31, PPCRegister& f13)
|
||||
else if (align == ALIGN_LEFT)
|
||||
f13.f64 += 133.0 * (1.0 - g_aspectRatioNarrowScale);
|
||||
}
|
||||
|
||||
// Offsets calculated by converting the 4:3 values to 16:9 space and then substracting the differences from the original 16:9 position.
|
||||
// Afterward fact checked by overlaying a capture from the original hardware at 4:3 and a capture from recomp at 4:3.
|
||||
void AdvertiseLogoPlacementMidAsmHook(PPCRegister& f0, PPCRegister& f13, PPCRegister& f12, PPCRegister& f11)
|
||||
{
|
||||
f0.f64 += -133.0f / 1280.0f * (1.0 - g_aspectRatioNarrowScale);
|
||||
f13.f64 += 3.5f / 720.0f * (1.0 - g_aspectRatioNarrowScale);
|
||||
f12.f64 += -133.0f / 1280.0f * (1.0 - g_aspectRatioNarrowScale);
|
||||
f11.f64 += 3.5f / 720.0f * (1.0 - g_aspectRatioNarrowScale);
|
||||
}
|
||||
|
||||
@@ -195,3 +195,11 @@ bool SparkleLocusMidAsmHook()
|
||||
// This has the side effect of the locus particle eventually snapping to the rest position during pause, but it's better than vertices exploding.
|
||||
return App::s_deltaTime < (1.0 / 60.0);
|
||||
}
|
||||
|
||||
void CEvilSonicContext_CStateWall_LeaveRotationMidAsmHook(PPCRegister& f1)
|
||||
{
|
||||
// The code in the Werehog's "wall" state for leaving walls adds a constant
|
||||
// value of 0.05 to his transform every frame. This makes the value respect
|
||||
// delta time whilst maintaining the original behaviour at 30 FPS.
|
||||
f1.f64 = f1.f64 * (std::min(App::s_deltaTime, 1.0 / 15.0) / (1.0 / 30.0));
|
||||
}
|
||||
|
||||
@@ -1141,3 +1141,20 @@ registers = ["r3"]
|
||||
name = "EndingTextPositionMidAsmHook"
|
||||
address = 0x82580168
|
||||
registers = ["r31", "f13"]
|
||||
|
||||
# Wall Leave - Left
|
||||
[[midasm_hook]]
|
||||
name = "CEvilSonicContext_CStateWall_LeaveRotationMidAsmHook"
|
||||
address = 0x824067BC
|
||||
registers = ["f1"]
|
||||
|
||||
# Wall Leave - Right
|
||||
[[midasm_hook]]
|
||||
name = "CEvilSonicContext_CStateWall_LeaveRotationMidAsmHook"
|
||||
address = 0x82406774
|
||||
registers = ["f1"]
|
||||
|
||||
[[midasm_hook]]
|
||||
name = "AdvertiseLogoPlacementMidAsmHook"
|
||||
address = 0x82B729A0
|
||||
registers = ["f0", "f13", "f12", "f11"]
|
||||
|
||||
Reference in New Issue
Block a user